cart total is now shown without handling and shipping

This commit is contained in:
Senad Uka
2015-02-15 06:43:37 +01:00
parent ba22ea8bd7
commit f74bee360e
3 changed files with 49 additions and 3 deletions

View File

@@ -0,0 +1,37 @@
var React = require('react'),
Globals = require('../../globals');
;
var Router = require('react-router');
var CartTotal = React.createClass({
render: function() {
var counts = this.props.itemCounts;
var total = 0;
this.props.items.map(function (i) {
var count = counts[i.get('id')].get('count');
var price = i.get('list_price');
total += (price * count)
return total;
});
return (
<div className="row-fluid cart-total">
<div className="col-md-offset-9 col-md-3">
Ukupno: {Globals.FormatCurrency(total)} + Dostava
</div>
</div>
);
}
});
module.exports = CartTotal;