Pikpay button

This commit is contained in:
Adam
2016-01-11 08:53:03 +01:00
parent 2a0e326862
commit 7b2552c31c
384 changed files with 208 additions and 135485 deletions

View File

@@ -2694,10 +2694,14 @@ var addNItems = function(item, count) {
var changeDeliveryDestinationProperty = function(property, value) {
_deliveryDestination.set(property, value);
console.log(_deliveryDestination);
if (property === 'place') {
fetchPlace();
}
validateDeliveryDestinationForm();
console.log(_deliveryDestination);
};
@@ -2717,6 +2721,13 @@ var confirmOrder = function() {
});
};
var saveDeliveryDestinationAnd = function(successCallback) {
_deliveryDestination.save(null, {
success: function() {
successCallback();
}
})
};
var saveDeliveryDestination = function() {
_deliveryDestination.save(null, {
@@ -2809,8 +2820,8 @@ var CartStore = _.extend({}, EventEmitter.prototype, {
},
getDeliveryCost: function(instantDelivery) {
return instantDelivery ? _deliveryCosts.get('instant_delivery_price')
: _deliveryCosts.get('delivery_price');
return instantDelivery ? Number(_deliveryCosts.get('instant_delivery_price'))
: Number(_deliveryCosts.get('delivery_price'));
},
getWholeCartState: function() {
@@ -2871,6 +2882,14 @@ var CartStore = _.extend({}, EventEmitter.prototype, {
address.push(_deliveryDestination.get('email'))
return address;
},
getNameOfThePlace: function(code) {
return nameOfThePlace(code);
},
saveDeliveryDestinationAnd: function(successCallback) {
saveDeliveryDestinationAnd(successCallback);
}
});