Jump to content

How to Hide the Price and display "Contact us for Pricing Details" instead


Recommended Posts

Hi,

For some of my products I don't want the price to be displayed,
but instead show the message "Contact us for pricing details".

Anyone know how to get this working?

I tried to set the price to 0,00 but then Prestashop makes it a Free Order
and does not display the last steps of the checkout procedure.


Best regards,

Sanook :coolsmile:

Link to comment
Share on other sites

  • 4 months later...

I'm new at this but seeing as there's no replies I'm going to take a stab at it. This idea will only work if you don't ever discount items using the sale feature.

Go into product.tpl and change this (starting line 188):


               {if $product->on_sale}

{l s='On sale!'}
               {elseif ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))}
{l s='Price lowered!'}
               {/if}



               {if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)}

               {/if}
               {if $priceDisplay == 1}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}

               {/if}



to:


{if $product->on_sale}
{l s='Contact us for details!'}
               {elseif ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))}
{l s='Price lowered!'}
               {/if}



               {elseif !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)}

               {/if}
               {elseif $priceDisplay == 1}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}

               {/if}




You might have to tweak it some but my thinking is to basically to change the way the sale flag is handled. It would display the "Contact us" text instead of a sale icon and change the price display to elseif so that it wouldn't display any price if it was "on sale". Obviously in the back office you would mark those items on sale to trigger the event.

I haven't tested it, just thinking out loud for a quick and dirty fix...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...