[-] BO: Fix PSCFV-3095 display of gifts product on backoffice order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16496 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -635,7 +635,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCartProducts(products)
|
function updateCartProducts(products, gifts)
|
||||||
{
|
{
|
||||||
var cart_content = '';
|
var cart_content = '';
|
||||||
$.each(products, function() {
|
$.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 += '<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>';
|
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);
|
$('#customer_cart tbody').html(cart_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,7 +676,7 @@
|
|||||||
|
|
||||||
function displaySummary(jsonSummary)
|
function displaySummary(jsonSummary)
|
||||||
{
|
{
|
||||||
updateCartProducts(jsonSummary.summary.products);
|
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products);
|
||||||
updateCartVouchers(jsonSummary.summary.discounts);
|
updateCartVouchers(jsonSummary.summary.discounts);
|
||||||
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
|
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user