Price and shipping to euro
This commit is contained in:
@@ -2790,6 +2790,29 @@ var CartStore = _.extend({}, EventEmitter.prototype, {
|
||||
return supportedPlaces;
|
||||
},
|
||||
|
||||
getAmount: function() {
|
||||
var counts = states;
|
||||
|
||||
var total = 0;
|
||||
|
||||
if (counts && _itemsForDisplay) {
|
||||
var items = _itemsForDisplay.models;
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var item = items[i];
|
||||
var count = counts[item.get('id')].get('count');
|
||||
var price = item.get('list_price');
|
||||
total += (price * count)
|
||||
};
|
||||
}
|
||||
|
||||
return total;
|
||||
},
|
||||
|
||||
getDeliveryCost: function(instantDelivery) {
|
||||
return instantDelivery ? _deliveryCosts.get('instant_delivery_price')
|
||||
: _deliveryCosts.get('delivery_price');
|
||||
},
|
||||
|
||||
getWholeCartState: function() {
|
||||
|
||||
var numberOfItems = 0;
|
||||
|
||||
Reference in New Issue
Block a user