fixed problem with multiple carts and a whole load of problems with crazy delivery destination logic / if I didn't write it i would have thought it was written by a drug abuser during high
This commit is contained in:
22
front-ui/app/models/cart.js
Normal file
22
front-ui/app/models/cart.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var Backbone = require('backbone');
|
||||
var Globals = require('../globals');
|
||||
|
||||
var Cart = Backbone.Model.extend({
|
||||
|
||||
initialize: function() {
|
||||
$.ajaxPrefilter(
|
||||
function(options, originalOptions, jqXHR) {
|
||||
options.xhrFields = {
|
||||
withCredentials: true
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
urlRoot : Globals.ApiUrl + '/cart',
|
||||
defaults : {
|
||||
'yes': 'yes'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = Cart;
|
||||
Reference in New Issue
Block a user