Pikpay button
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user