koolrifz Posted September 16, 2013 Share Posted September 16, 2013 (edited) Hi, I've upgraded to 1.5.5 and would really like to hack in a "Call for Price" when the price is set to $0. It would need to be on the Featured Products module, Product listing, Manufacturers page and Product page. I've seen some tutorials around for ver 1.4...tried it but no luck. If there is already a tutorial around I would be grateful if you could send me in the right direction. Thank you! Edited September 16, 2013 by koolrifz (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 product listing, categories, manufacturers etc. open product-list.tpl file located in your theme directory change: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} to: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{if $product.price==0}{l s='Call for price'}{else}{convertPrice price=$product.price}{/if}{else}{if $product.price==0}{l s='Call for price'}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}</span><br />{/if} Link to comment Share on other sites More sharing options...
koolrifz Posted September 16, 2013 Author Share Posted September 16, 2013 Here's a thought... IF "Show Price" is not checked in Product Global Information (when entering the product into admin site) THEN Display "Call for Price" images relevant to each product listing page. Little image for Featured Products module, larger image for Product page etc. Text "Call for Price" is fine but an image can be a better call to action especially since we want to speak to the customer. Link to comment Share on other sites More sharing options...
koolrifz Posted September 16, 2013 Author Share Posted September 16, 2013 product listing, categories, manufacturers etc. open product-list.tpl file located in your theme directory change: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} to: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{if $product.price==0}{l s='Call for price'}{else}{convertPrice price=$product.price}{/if}{else}{if $product.price==0}{l s='Call for price'}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}</span><br />{/if} Oh cool. I was replying to myself and didn't see your reply. Thank you very much...I'll get stuck into it. So will I find and change code above in the category-tpl and manufacturers-tpl too? Cheers Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 manufacturers, categories, search, tags etc. use the same file to display products - it is product-list.tpl file Link to comment Share on other sites More sharing options...
koolrifz Posted September 16, 2013 Author Share Posted September 16, 2013 manufacturers, categories, search, tags etc. use the same file to display products - it is product-list.tpl file Yes, that makes sense and all the listings are working but I wonder why my product still shows $0.00 http://store.musicplace.com.au/trombones/1074-the-ultimate-lead-or-jazz-trombone.html ...and the same product on the front page Featured Products still shows $0 http://store.musicplace.com.au/ So close. Thanks! Link to comment Share on other sites More sharing options...
koolrifz Posted September 16, 2013 Author Share Posted September 16, 2013 I got it working on the homefeatured.tpl using the mod here: http://www.prestashop.com/forums/topic/210915-prestashop-152-tutorial-call-for-price-modifications/ B. Find in modules/homefeatured/ Find and open the file homefeatured.tpl ------------------------------------------------------------------------------------------------------- Find the line below ------------------------------------------------------------------------------------------------------- <a class="lnk_more" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a>------------------------------------------------------------------------------------------------------- After the line above add ------------------------------------------------------------------------------------------------------- {if $product.price < '1.00'}<span class="callforprice"><br/>Call For Price!!!</span> {else} ------------------------------------------------------------------------------------------------------- But make sure it is above the line below ------------------------------------------------------------------------------------------------------- {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if}------------------------------------------------------------------------------------------------------- After the above lines add the line below ------------------------------------------------------------------------------------------------------- {/if} Now if could just get the Product page to work I'd be wrapt!!! Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 it works for product listings: so i suppose that you want to change it also on product page. product page has got own separate template file named product.tpl (not product-list.tpl) Link to comment Share on other sites More sharing options...
koolrifz Posted September 16, 2013 Author Share Posted September 16, 2013 Got it working in the product.tpl file by using this http://www.prestashop.com/forums/topic/2795-call-for-pricing/ Just add in the following 2 lines after <!-- add to cart form --> {if $product->price == 0}<h3>Call for Pricing!</h3>{/if} {if $product->price != 0} then your form code remains the same <form id="buy_block" .......... after the form tag closes on the next line add: {/if} Thank you for your help. Cheers, Rob Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 so the problem is SOLVED? Link to comment Share on other sites More sharing options...
koolrifz Posted September 16, 2013 Author Share Posted September 16, 2013 YEP! I'm just trying to figure out how to mark this thread as SOLVED. Thank you vekia. Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2013 Share Posted September 16, 2013 I'm glad that it works as you expected here is an instruction about marking topic as [solved] [sOLVED] TopicIf, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution.Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED].To mark a topic as [solved] :- Edit the first post of your topic by clicking on the "Edit" button,- Click on the "Use full editor" button,- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button. Link to comment Share on other sites More sharing options...
stuartvideo Posted October 15, 2013 Share Posted October 15, 2013 (edited) hi i have tried this all and not working please help. Stuartvideo.com email : [email protected] presta 1.4.8.2 Edited October 15, 2013 by stuartvideo (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2013 Share Posted October 15, 2013 as title of this topic says, this is for prestashop based on 1.5.x engine Link to comment Share on other sites More sharing options...
klymets1 Posted December 4, 2013 Share Posted December 4, 2013 as title of this topic says, this is for prestashop based on 1.5.x engine hello) but as I do in this code? <div class="right_block"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale title_shop">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount title_shop">{l s='Reduced price!'}</span>{/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if} {/if} very necessary Link to comment Share on other sites More sharing options...
TCS Posted August 11, 2017 Share Posted August 11, 2017 Hi, Is there a way to have it work on prestashop 1.6.1.15? here is the code from my product-list.tpl <div class="price-rating"> {hook h='displayProductListReviews' product=$product} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} {hook h="displayProductPriceBlock" product=$product type='before_price'} <span class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} {hook h="displayProductPriceBlock" product=$product type="old_price"} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"} {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"} {hook h="displayProductPriceBlock" product=$product type='after_price'} {/if} </div> {/if} </div> regards, 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