After update from 1.6.1.2 to 1.6.1.16 without updating the theme. When I'm adding product to the cart .layer_cart_overlay
does not show anymore.
So now, that modal popup window doesn't appear, Chrome devtool said
chrome error and Firefox devtool said:
TypeError: product.attributes_full is undefined
So, is it enough to add if (typeof product.attributes_full !== 'undefined')
?
My code, lines 732-748:
updateLayer : function(product){
$('#layer_cart_product_title').text(product.name);
$('#layer_cart_product_attributes').text('');
if (product.hasAttributes && product.hasAttributes == true)
$('#layer_cart_product_attributes').html(product.attributes_full.replace(/\,/g,'<br>'));
$('#layer_cart_product_price').text(product.price);
$('#layer_cart_product_quantity').text(product.quantity);
$('.layer_cart_img').html('<img class="layer_cart_img img-responsive" src="' + product.image + '" alt="' + product.name + '" title="' + product.name + '" />');
var n = parseInt($(window).scrollTop()) + 'px';
$('.layer_cart_overlay').css('width','100%');
$('.layer_cart_overlay').css('height','100%');
$('.layer_cart_overlay').show();
$('#layer_cart').css({'top': n}).fadeIn('fast');
crossselling_serialScroll();
},
Lines 346-354:
if (idCombination)
$(jsonData.products).each(function() {
if (this.id != undefined
&& this.id == parseInt(idProduct)
&& this.idCombination == parseInt(idCombination)
)
if (contentOnly)
window.parent.ajaxCart.updateLayer(this);
else
ajaxCart.updateLayer(this);
});
Link to full project: ajax-cart.js