jaymz1097 Posted November 27, 2020 Share Posted November 27, 2020 (edited) Hey everyone. I´m trying to hide the Quantity button if the product has some variants. I´m getting an error on the page if I use $product.id_product_attribute != 0. The script works just fine if I apply it for some category ID but not with that one above. Can you, please, share some solution with me? <!--works for category --> {if ($category->id==1)} <script type="text/javascript"> $("#quantity_wanted, #quantity_wanted_p, .button-minus, .button-plus").css( "display", "none" ); $("#quantity_wanted").prev().css( "display", "none" ); </script> <!--doesn´t work--> {if ($product.id_product_attribute != 0)} <script type="text/javascript"> $("#quantity_wanted, #quantity_wanted_p, .button-minus, .button-plus").css( "display", "none" ); $("#quantity_wanted").prev().css( "display", "none" ); </script> {/if} Thanks in forward! Edited November 27, 2020 by jaymz1097 (see edit history) Link to comment Share on other sites More sharing options...
jaymz1097 Posted November 28, 2020 Author Share Posted November 28, 2020 This solved it!! isset($groups) is the thing you´re looking for Add it in the product.tpl 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