vasan82 Posted March 23, 2014 Share Posted March 23, 2014 Is there a module in the current version of Prestashop that can disable current items pricing to make it say Call For Pricing? If code changes are required kindly let me know how to do it . Link to comment Share on other sites More sharing options...
vasan82 Posted March 27, 2014 Author Share Posted March 27, 2014 Is there a module in the current version of Prestashop that can disable current items pricing to make it say Call For Pricing? If code changes are required kindly let me know how to do it . kindly repond Link to comment Share on other sites More sharing options...
vasan82 Posted April 11, 2014 Author Share Posted April 11, 2014 Any one has a solution for this Link to comment Share on other sites More sharing options...
NemoPS Posted April 14, 2014 Share Posted April 14, 2014 You can try enabling catalog mode, then add a link leading to the contact page with the test 'contact us for a quote' somewhere inside product.tpl, using something like the following: <a href="{$link->getPageLink('contact')}">{l s="Contact us for a quote"}</a> 1 Link to comment Share on other sites More sharing options...
vasan82 Posted April 14, 2014 Author Share Posted April 14, 2014 (edited) Thanks , That works .. is there any option to enable this for only certain type of products in the shop and not all of them .Kindly advise . I dont have idea of PHP . I want some thing like this if <price of product = 0> display "Call for pricing" End if Updated at approx 7:30 PM IST ======================================================== I came through the below while searching in the forum but it is for PrestaShop 1.5.2 http://www.prestashop.com/forums/topic/135602-call-for-price/ will it work in PS V1.6 Updated at 10:38 PM IST ======================================================== the above did not work for me in the localhost . Kindly help me with alternatives . Edited April 14, 2014 by vasan82 (see edit history) Link to comment Share on other sites More sharing options...
vasan82 Posted April 15, 2014 Author Share Posted April 15, 2014 kindly help me with this Link to comment Share on other sites More sharing options...
NemoPS Posted April 16, 2014 Share Posted April 16, 2014 well you can use {if $product.price == 0} code here {/if} for the product list, or {if $productPrice == 0} code here {/if} for the product page 1 Link to comment Share on other sites More sharing options...
vasan82 Posted April 16, 2014 Author Share Posted April 16, 2014 {if $product.price == 0} code here {/if} for the product list, or {if $productPrice == 0} code here {/if} The code here is to be replaced with the below piece of code . Kindly confirm <a href="{$link->getPageLink('contact')}">{l s="Contact us for a quote"}</a> Link to comment Share on other sites More sharing options...
NemoPS Posted April 16, 2014 Share Posted April 16, 2014 yes, confirmed 1 Link to comment Share on other sites More sharing options...
unit Posted June 5, 2014 Share Posted June 5, 2014 (edited) where I have to add the code to make it work? {if $product.price == 0} code here {/if} for the product list, or {if $productPrice == 0} code here {/if} Edited June 5, 2014 by unit (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted June 6, 2014 Share Posted June 6, 2014 The first one in product-list.tpl, the other in product.tpl Link to comment Share on other sites More sharing options...
unit Posted June 6, 2014 Share Posted June 6, 2014 I know that, but i don't know where I can embed this in this files. I tried to add this rule probably everywhere, and every time nothing happens or page breaks down Link to comment Share on other sites More sharing options...
NemoPS Posted June 7, 2014 Share Posted June 7, 2014 Of course you need to place it in a logic place, like inside the loop in product-list.tpl Link to comment Share on other sites More sharing options...
richsuccessonline Posted July 9, 2014 Share Posted July 9, 2014 Hi, I also need help on this topic. Please kindly tell me where should I embed the code Thank you Link to comment Share on other sites More sharing options...
cdnielson Posted October 15, 2014 Share Posted October 15, 2014 So, here's where to put the code: In the file product.tpl (themes/default-bootstrap/product.tpl) immediately below: <!-- prices --> <div class="price"> add: {if $productPrice == 0} <p class="callforprice">Call For Price</p> {else} and then immediately above: </div> <!-- end prices --> add: {/if} In the file product-list.tpl (themes/default-bootstrap/product-list.tpl) Immediately after: <div class="content_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> add: {if $product.price == 0} <p class="callforprice">Call For Price</p> {else} and immediately before the closing </div> tag after: {hook h="displayProductPriceBlock" product=$product type="unit_price"} {/if} add another: {/if} Then style the callforprice class if you wish. 1 Link to comment Share on other sites More sharing options...
memodemo Posted January 6, 2015 Share Posted January 6, 2015 Great Helpful, I use the solutions is work, but don't know why the popular product at homepage and category page, it display the price 0.00 during in grid list, how can change it become "Call for price" too. Anyone can advise. thank a lot http://shop.hk1083.com/ Link to comment Share on other sites More sharing options...
NemoPS Posted January 7, 2015 Share Posted January 7, 2015 That's managed by product-list.tpl, for both modules. Locate the spot where your price is displayed, the default it <span itemprop="price" class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> And change accordingly, following the above. Please notice it might be necessary to clear the shop's cache Link to comment Share on other sites More sharing options...
memodemo Posted January 7, 2015 Share Posted January 7, 2015 Thank you for reply, I have found the code in themes/default-bootstrap/product-list.tpl, but don't know how to change it. Would you please advise step by step. Thank you very much! <span itemprop="price" class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> Link to comment Share on other sites More sharing options...
Martino00 Posted January 8, 2015 Share Posted January 8, 2015 This works fine for me. perfect ! Now i would like to do the same for my products with attributes. So when one of the attributes prices is set to 0. Does anyone knows what to use instead of {if $product.price == 0} Link to comment Share on other sites More sharing options...
NemoPS Posted January 9, 2015 Share Posted January 9, 2015 That's way more complex. Attributes are (sadly) all managed by javascript. I am not sure how to do it out of my head myself, but you must edit the updatePrice function of product.js, here $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank)); Link to comment Share on other sites More sharing options...
Martino00 Posted January 9, 2015 Share Posted January 9, 2015 I have solved my problem Nemo1 thank you to put me in the right direction. Here below my solution. in product.js you can find $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank)); the "our_price_display" is then transfered to the product.tpl page <span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span> i have changed the formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank) to a var "text_or_price" and i have added an if check on the basePriceDisplay and when this is not null i change my var "text_or_price" to formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank) else i change my var "text_or_price" to the text i want to display if the price for the combination is null. so in product.js you can search for $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank)); and replace it with if (basePriceDisplay > 0) { var text_or_price = formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank); } else { var text_or_price = "Not available" ; } $('#our_price_display').text(text_or_price); And if you want you can hide the counter and add to cart button also if you want. Just add it to the else but don't forget to add the show also in the if statement otherwise it will stay hidden when you switch between your combinations. So then it becomes if (basePriceDisplay > 0) { var text_or_price = formatCurrency(priceWithDiscountsDisplay * currencyRate, currencyFormat, currencySign, currencyBlank); $('#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); Maybe someone can use this. 3 Link to comment Share on other sites More sharing options...
Recommended Posts