Jump to content

Deactivate add to cart popup for custom category - PS 1.6.1.5


Recommended Posts

 

how can i modifiy my ajax-cart.js that not visible the add to cart popup if i add a product from a custom category to the cart?

The code to modify i think is here  (ajax-cart.js, row 720)

 

 

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);
$('#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();
},

 

 

If i comment the code out, than the popup dont working for any products. But i need deactivate only for one category.

 

i need something like this : if product.id_category_default == 95 then deactivate the popup, otherwise show the popup.

Hope somebody can help, my Ajax its not the best. Thank ahead
Edited by m3442a (see edit history)
Link to comment
Share on other sites

No, i need the add to cart button for that category. This Products only can add to cart from iframe. Problem is, if the popup active and i add the product, than my iframe closing. Thats why i need to deactivate the layer only for that category.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...