[-] BO: Fix PSCFV-3095 display of gifts product on backoffice order

This commit is contained in:
rGaillard
2012-07-19 14:03:56 +00:00
parent ba89723d6c
commit fee90a651d
@@ -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+'&nbsp;<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);