our commission is now shown on cart page
This commit is contained in:
@@ -25,6 +25,7 @@ var CartPage = React.createClass({
|
||||
return count > 0 || count === "";
|
||||
}).map(function (i) {
|
||||
var count = counts[i.get('id')].get('count');
|
||||
var commission = counts[i.get('id')].get('commission');
|
||||
var price = i.get('list_price');
|
||||
var firstImage = i.get('multi_media_descriptions')[0];
|
||||
firstImage = firstImage || { resized_url: "https://res.cloudinary.com/lfvt7ps2n/image/upload/c_fit,h_172,w_226/v1421732950/http_www.asms.ru_bitrix_templates_main_images_nophoto_irnofq.png" } ;
|
||||
@@ -33,13 +34,16 @@ var CartPage = React.createClass({
|
||||
<td className='text-center'>
|
||||
<img style={{maxWidth: '90px', maxHeight: '90px'}} src={firstImage.url} alt="product image"/>
|
||||
</td>
|
||||
<td>
|
||||
<td className="cart-price-bigger">
|
||||
<p> {i.get('brand').name}</p>
|
||||
<p>
|
||||
{i.get('name')}
|
||||
</p>
|
||||
</td>
|
||||
<td>{ Globals.FormatCurrency(price) }</td>
|
||||
<td className="cart-price-bigger text-center">{ Globals.FormatCurrency(price) }
|
||||
<div className="cart-commision-tiny text-center">{ Globals.FormatPercentage(commission) } RUC</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<select style={{textAlign: 'center'}} value={count} className="form-control"
|
||||
onChange={self._onQuantityChange.bind(self, i.get('id'))}
|
||||
@@ -57,7 +61,7 @@ var CartPage = React.createClass({
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<td className="cart-price-bigger text-center">
|
||||
{ Globals.FormatCurrency(count * price) }
|
||||
</td>
|
||||
<td>
|
||||
@@ -109,7 +113,7 @@ var CartPage = React.createClass({
|
||||
content = (<div>
|
||||
<table className="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr className="text-center">
|
||||
<th className="col-lg-2"></th>
|
||||
<th>Proizvod</th>
|
||||
<th>Cijena</th>
|
||||
|
||||
@@ -51,4 +51,11 @@
|
||||
.cart-table-row {
|
||||
vertical-align: middle;
|
||||
|
||||
}
|
||||
|
||||
.cart-price-bigger {
|
||||
font-size: 21px;
|
||||
}
|
||||
.cart-commision-tiny {
|
||||
font-size: 45%;
|
||||
}
|
||||
@@ -7,5 +7,9 @@ module.exports = {
|
||||
var amount = parseFloat(amount_s);
|
||||
return ( amount.toFixed(2) + " KM" )
|
||||
},
|
||||
FormatPercentage: function(amount_s) {
|
||||
var amount = parseFloat(amount_s);
|
||||
return ( amount.toFixed(2) + "%" )
|
||||
},
|
||||
MaxNumberOfItemsToBeAdded: 1000
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user