[-] Fix bug #PSCFV-9633 again could not see delete href in block cart

This commit is contained in:
gRoussac
2013-07-15 17:29:08 +02:00
parent 01bad90b29
commit f9c5bf0bf2
+5 -6
View File
@@ -348,13 +348,12 @@ var ajaxCart = {
});
});
}
var removeLinks = $('#cart_block_product_' + domIdProduct).find('.ajax_cart_block_remove_link');
var removeLinks = $('#' + domIdProduct).find('.ajax_cart_block_remove_link');
if (!product.hasCustomizedDatas && !removeLinks.length)
{
$('#cart_block_product_' + domIdProduct + ' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="' + baseUri + '?controller=cart&amp;delete=1&amp;id_product=' + product['id'] + '&amp;ipa=' + product['idCombination'] + '&amp;token=' + static_token + '"> </a>');
}
$('#' + domIdProduct + ' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="' + baseUri + '?controller=cart&amp;delete=1&amp;id_product=' + product['id'] + '&amp;ipa=' + product['idCombination'] + '&amp;token=' + static_token + '"> </a>');
if (product.is_gift)
$('#cart_block_product_' + domIdProduct + ' span.remove_link').html('');
$('#' + domIdProduct + ' span.remove_link').html('');
},
doesCustomizationStillExist : function (product, customizationId)
@@ -448,7 +447,7 @@ var ajaxCart = {
var name = (this.name.length > 12 ? this.name.substring(0, 10) + '...' : this.name);
content += '<a href="' + this.link + '" title="' + this.name + '" class="cart_block_product_name">' + name + '</a>';
if (this.is_gift != undefined && this.is_gift == 1)
if (typeof(this.is_gift) == 'undefined' || this.is_gift == 0)
content += '<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="' + baseUri + '?controller=cart&amp;delete=1&amp;id_product=' + productId + '&amp;token=' + static_token + (this.hasAttributes ? '&amp;ipa=' + parseInt(this.idCombination) : '') + '"> </a></span>';
else
content += '<span class="remove_link"></span>';