[-] BO: Fix PSCFV-3095 display of gifts product on backoffice order
This commit is contained in:
@@ -635,7 +635,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function updateCartProducts(products)
|
||||
function updateCartProducts(products, gifts)
|
||||
{
|
||||
var cart_content = '';
|
||||
$.each(products, function() {
|
||||
@@ -646,6 +646,10 @@
|
||||
cart_content += '<a href="#" class="delete_product" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/delete.gif" /></a>';
|
||||
cart_content += '</div></td><td>'+this.total+' <span class="currency_sign"></span></td></tr>';
|
||||
});
|
||||
$.each(gifts, function() {
|
||||
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td>';
|
||||
cart_content += '<td>{l s='Gift !'}</td><td>'+this.cart_quantity+'</td><td>{l s='Gift !'}</td></tr>';
|
||||
});
|
||||
$('#customer_cart tbody').html(cart_content);
|
||||
}
|
||||
|
||||
@@ -672,7 +676,7 @@
|
||||
|
||||
function displaySummary(jsonSummary)
|
||||
{
|
||||
updateCartProducts(jsonSummary.summary.products);
|
||||
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products);
|
||||
updateCartVouchers(jsonSummary.summary.discounts);
|
||||
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user