anniebellainc Posted March 2, 2016 Share Posted March 2, 2016 (edited) Hello, How to hide "quantity button" with "add to cart button" when combination is not available? Pictures are attached. Thank you. PrestaShop 1.6.1.4 + Leo Template Edited March 2, 2016 by anniebellainc (see edit history) Link to comment Share on other sites More sharing options...
polosat Posted March 2, 2016 Share Posted March 2, 2016 You need to edit your "/themes/YOUR_THEME/js/product.js" file and find there a place where the "add to cart button" becoming hidden.For example, in the defaulth theme that line looks like this: $('#add_to_cart:visible').fadeOut(600); And in that place you need to add a code for hiding quantity block. It should looks like this: $('#quantity_wanted_p:visible').fadeOut(600); (#quantity_wanted_p may differ in dependency of your theme) 1 Link to comment Share on other sites More sharing options...
anniebellainc Posted March 2, 2016 Author Share Posted March 2, 2016 Thank you. Works great ! Link to comment Share on other sites More sharing options...
anniebellainc Posted March 2, 2016 Author Share Posted March 2, 2016 (edited) You need to edit your "/themes/YOUR_THEME/js/product.js" file and find there a place where the "add to cart button" becoming hidden. For example, in the defaulth theme that line looks like this: $('#add_to_cart:visible').fadeOut(600); And in that place you need to add a code for hiding quantity block. It should looks like this: $('#quantity_wanted_p:visible').fadeOut(600); (#quantity_wanted_p may differ in dependency of your theme) How can I hide Reference and Condition too ? Edited March 2, 2016 by anniebellainc (see edit history) Link to comment Share on other sites More sharing options...
polosat Posted March 3, 2016 Share Posted March 3, 2016 You need to use the same code, but with other ids. This code is for default theme, hopefully it will work for you too: $('#product_reference:visible').fadeOut(600); $('#product_condition:visible').fadeOut(600); By the way, don't forget to add code for showing these blocks again when selecting available combination Link to comment Share on other sites More sharing options...
anniebellainc Posted March 3, 2016 Author Share Posted March 3, 2016 You need to use the same code, but with other ids. This code is for default theme, hopefully it will work for you too: $('#product_reference:visible').fadeOut(600); $('#product_condition:visible').fadeOut(600); By the way, don't forget to add code for showing these blocks again when selecting available combination Works great. Thank you. 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