bogdan90i Posted July 13, 2012 Share Posted July 13, 2012 (edited) I would like to know how i can show "Coming Soon" when the price of my product is 0. I'd like the function to work only if the product price is null, if the product has the price 12€ for example it should show the price but if it has 0€ it should show Coming Soon. Edited July 14, 2012 by bogdan90i (see edit history) Link to comment Share on other sites More sharing options...
Mr S Posted July 13, 2012 Share Posted July 13, 2012 in your product.tpl file you could do this {if $productPrice == 0}Coming Soon{/if} Don't forget to disable available for order 1 Link to comment Share on other sites More sharing options...
bogdan90i Posted July 13, 2012 Author Share Posted July 13, 2012 Thx for the reply HA!*!*Y, i tried adding it to product.tpl, there is where i looked around all day. I added it here: <span class="our_price_display">{if $productPrice == 0}Coming Soon{/if} {if $priceDisplay >= 0 && $priceDisplay <= 2} And here: <span id="our_price_display">{convertPrice price=$productPrice}{if $productPrice == 0}Coming Soon{/if}</span> And here: {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}{if $productPrice == 0}Coming Soon{/if} {/if} But it shows the price an the tax incl. I also disabled available for order and show price and nothing. i should also mention i am using catalog mode. Link to comment Share on other sites More sharing options...
bogdan90i Posted July 14, 2012 Author Share Posted July 14, 2012 (edited) After a few hours i finally got it right. Here is how to code should be edited: Find this around line 254: <span class="our_price_display"> {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} </span> And replace with: <span class="our_price_display"> {if $productPrice == 0}Coming Soon{elseif $priceDisplay >= 0 && $priceDisplay <= 2} <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} </span> Hope this will help others. Btw if it wasn't for you HA!*!*Y i would still be looking for an answer. Thx and good night. Edited July 14, 2012 by bogdan90i (see edit history) Link to comment Share on other sites More sharing options...
Barmunk Posted November 6, 2012 Share Posted November 6, 2012 When I add this the conditions, missing all prices. I think it not correct the variable prices. Help me please. <p class="price"> <span class="our_price_display"> {if !$priceDisplay || $priceDisplay == 2} <span id="our_price_display">{convertPrice price=$product->getPrice(true, $smarty.const.NULL)}</span><br> {if $tax_enabled}Preise inkl. gesetzlicher MwSt. <a title="Versandkosten" href="cms.php?id_cms=1" style="text-decoration:underline">zzgl. Versandkosten</a>{/if} {/if} Link to comment Share on other sites More sharing options...
ali.sajadi Posted July 20, 2015 Share Posted July 20, 2015 hi I would like to know how i can show "Coming Soon" when the price of my product is 0 in my product list i changed product-item.tpl in line 113 but change all price {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="content_price"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span itemprop="price" class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> help me plz 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