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!