Merge branch 'ticket-12574-RemoveProductFromBlockcart' into develop

This commit is contained in:
Marion Muszynski 2017-03-28 10:10:07 +02:00
commit 35f047278f

View File

@ -62,11 +62,11 @@ var ajaxCart = {
var customizationId = 0;
var productId = 0;
var productAttributeId = 0;
if ($($(this).parent().parent()).attr('name') == 'customization')
if ($($(this).parent().parent().parent()).attr('name') == 'customization')
// Reverse two levels: a >> div >> li
var customizableProductDiv = $($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");
var customizableProductDiv = $($(this).parent().parent().parent()).find("div[id^=deleteCustomizableProduct_]");
else
var customizableProductDiv = $($(this).parent()).find("div[id^=deleteCustomizableProduct_]");
var customizableProductDiv = $($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]");
if (customizableProductDiv && $(customizableProductDiv).length)
{
$(customizableProductDiv).each(function(){
@ -86,7 +86,7 @@ var ajaxCart = {
if (!customizationId)
{
//retrieve idProduct and idCombination from the displayed product in the block cart
var firstCut = $(this).parent().parent().attr('id').replace('cart_block_product_', '');
var firstCut = $(this).parent().parent().parent().attr('id').replace('cart_block_product_', '');
firstCut = firstCut.replace('deleteCustomizableProduct_', '');
ids = firstCut.split('_');
productId = parseInt(ids[0]);
@ -431,10 +431,10 @@ var ajaxCart = {
content += '<a class="cart_block_product_name" href="' + this.link + '" title="' + this.name + '">' + name + '</a>';
content += '<p class="label_quantity">Quantité : ';
content += '<span class="quantity">' + this.quantity + '</span>';
content += ' <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_'+productId+'_'+productAttributeId+'" onclick="updateQuantity('+productId+','+productAttributeId+',\'down\');"><img src="'+baseDir+'themes/site/img/icon/quantity_down.gif" alt="-" width="14" height="9" /></a>';
content += ' <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_'+productId+'_'+productAttributeId+'" onclick="updateQuantity('+productId+','+productAttributeId+',\'up\');"><img src="'+baseDir+'themes/site/img/icon/quantity_up.gif" alt="-" width="14" height="9" /></a>';
content += '</p>';
content += ' <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_'+productId+'_'+productAttributeId+'" onclick="updateQuantity('+productId+','+productAttributeId+',\'down\');"><img src="'+baseDir+'themes/site/img/moins.png" alt="-" width="13" height="13" /></a>';
content += ' <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_'+productId+'_'+productAttributeId+'" onclick="updateQuantity('+productId+','+productAttributeId+',\'up\');"><img src="'+baseDir+'themes/site/img/plus.png" alt="-" width="13" height="13" /></a>';
content += '<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="' + baseDir + 'cart.php?delete&amp;id_product=' + productId + '&amp;token=' + static_token + (this.hasAttributes ? '&amp;ipa=' + parseInt(this.idCombination) : '') + '"> </a></span>';
content += '</p>';
content += '<p><span class="label_price">Prix unitaire : <span class="green price">' + this.unit_price + '</span></p>';
content += '</dt>';
// if (this.hasAttributes)