m3442a Posted August 17, 2016 Share Posted August 17, 2016 (edited) 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 August 17, 2016 by m3442a (see edit history) Link to comment Share on other sites More sharing options...
electriz Posted August 17, 2016 Share Posted August 17, 2016 Wouldn't be easier to hide/disable *add to cart* button in products from your category? Link to comment Share on other sites More sharing options...
m3442a Posted August 17, 2016 Author Share Posted August 17, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now