Zen_j1 Posted May 20, 2016 Share Posted May 20, 2016 how to Disable/Hide Add to cart button if price is zero in prestashop 1.6.1.3 Link to comment Share on other sites More sharing options...
jllramos Posted May 20, 2016 Share Posted May 20, 2016 On 5/20/2016 at 5:05 PM, Zen_j1 said: how to Disable/Hide Add to cart button if price is zero in prestashop 1.6.1.3 Hello, You want to disable add to cart button in one page in particular or in all pages that appear the product - Home, Categories, Product, Lists... If is in one page is quite simple, but in all pages maybe you need to override some controllers. ¿Would you like to add request info link in all your products? <- This module can help you to convert visitors to customers -> Link to comment Share on other sites More sharing options...
Zen_j1 Posted May 20, 2016 Author Share Posted May 20, 2016 (edited) Hi there, I went thru solution given in topic below to hide add to cart using js but i can not make this work in 1.6.3.1 i am have able do till "Call for Price" but could not hide add to cart as given in solution Can someone guide to make this solution work on prestashop 1.6.3.1https://www.prestashop.com/forums/topic/317432-call-for-pricing-help-in-prestashop-v16/page-2My code in prestahop 1.6.3.1 before change if (priceWithDiscountsDisplay > 0) { $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay, currencyFormat, currencySign, currencyBlank)).trigger('change'); } else { $('#our_price_display').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank)).trigger('change'); }After change as suggestedif (priceWithDiscountsDisplay > 0) { if (basePriceDisplay > 0) {var text_or_price = formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank).trigger('change');$('#quantity_wanted_p').show(); //show quantity counter if it's hidden$('#add_to_cart').show(); //show add to cart if it's hidden}else{var text_or_price = "Not available" ;$('#quantity_wanted_p').hide(); //show quantity counter if it's hidden$('#add_to_cart').hide(); //show add to cart if it's hidden} $('#our_price_display').text(text_or_price); } else { $('#our_price_display').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank)).trigger('change'); } Edited May 21, 2016 by Zen_j1 (see edit history) 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