added instant delivery to gui / added RUC as abbr tag and details tag on mobile

This commit is contained in:
Senad Uka
2015-08-02 18:47:48 +02:00
parent 68b25bf491
commit 69f6c86aee
4 changed files with 66 additions and 36 deletions

View File

@@ -9,11 +9,11 @@ var CartTotal = React.createClass({
render: function() {
var counts = this.props.itemCounts;
var total = 0;
if (counts && this.props.items) {
var items = this.props.items.models;
var items = this.props.items.models;
for (var i = 0; i < items.length; i++) {
var item = items[i];
var count = counts[item.get('id')].get('count');
@@ -22,7 +22,11 @@ var CartTotal = React.createClass({
};
}
if (this.props.deliveryCosts) {
total += Number(this.props.deliveryCosts.get('delivery_price'))
if (this.props.instantDelivery) {
total += Number(this.props.deliveryCosts.get('instant_delivery_price'))
} else {
total += Number(this.props.deliveryCosts.get('delivery_price'))
}
}
return ( < span > {