Jump to content

Call for Price


Recommended Posts

Hi,

 

I have a client who has some products where the price is not advertised in his website.

 

Is there any way to have 'Call for Price' in place of the price on both product list and product page? Obviously there would be no need for an Add to Cart button for these products.

 

How could I achieve this for some products?

 

Thanks.

 

Edit: In 1.4.4.1. there is a 'show price' check box in product catalogue. It would be great if the 'Call for Price' could also be an option here. Uncheck show price and check call for price.

 

Help very much appreciated.

Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...

Okay everyone here is a tutorial that may help you.

 

 

PrestaShop 1.5.2 Tutorial: Call for Price Modifications

A gift to PrestaShop user from

Shop Save N Earn

 

 

12/15/2012

William R. Williamson

 

PrestaShop 1.5.2 Tutorial: Call for Price Modifications

 

 

 

Hi everyone it's me again, William Williamsons at Shop Save N Earn; with another great tutorial for PrestaShop in which many of my fellow PrestaShop users can definitely use. Firstly I want to say that if anyone knows how I would be able to turn this into a module to release for free as a community project please do at [email protected]. I personally, believe this is a necessity for all shops as many suppliers invoke restrictions that you must follow, which happen to be the most largest suppliers or manufacturers.

 

 

Summary

 

Okay to summarize this tutorial we will edit three files in two different directories product_list.tpl, product.tpl, and products-comparision.tpl in themes/default/ directory of their store and one file in the modules/homefeatured/homefeatured.tpl file. The edits are small and simple so it should be an easy job.

 

A. Find in themes/default/

 

 

Find and open the file product_list.tpl

 

-------------------------------------------------------------------------------------------------------

Find the line below

-------------------------------------------------------------------------------------------------------

<div class="content_price">

-------------------------------------------------------------------------------------------------------

after this line after

-------------------------------------------------------------------------------------------------------

 


{if $product.price < '1.00'}<span [b]class="callforprice">[/b]Call For Price!!!</span>{/if}

-------------------------------------------------------------------------------------------------------

Make sure to create a class in global.css an example is below

-------------------------------------------------------------------------------------------------------


.callforprice {
		font-family: Verdana, Geneva, sans-serif;
		font-size: 14px;
		font-style: italic;
		line-height: normal;
		font-weight: bolder;
		font-variant: normal;
		color: #F00;
		text-decoration: blink;
}

-------------------------------------------------------------------------------------------------------

Find the line below

-------------------------------------------------------------------------------------------------------


{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">

-------------------------------------------------------------------------------------------------------

replace it with the line below

-------------------------------------------------------------------------------------------------------

{if isset($product.show_price) && $product.price > '1.00' && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">

-------------------------------------------------------------------------------------------------------

Find and open the file product.tpl

-------------------------------------------------------------------------------------------------------

Find the line beow

-------------------------------------------------------------------------------------------------------

<div class="price">

-------------------------------------------------------------------------------------------------------

After this add the code above

-------------------------------------------------------------------------------------------------------

{if $product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision) < '1.00'}<p class="callforprice">Call For Price!!!</p>{/if}
								{else}

---------------------------------------------------------------------------------------------------------

and make sure it is inserted before the code below

-------------------------------------------------------------------------------------------------------

{if !$priceDisplay || $priceDisplay == 2}
{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{elseif $priceDisplay == 1}
  {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}

-------------------------------------------------------------------------------------------------------

Find and open the file---products-comparison.tpl

-------------------------------------------------------------------------------------------------------

Find the line below

-------------------------------------------------------------------------------------------------------

<p class="price_container">

-------------------------------------------------------------------------------------------------------

After the line above add

-------------------------------------------------------------------------------------------------------

{if $product->getPrice($taxes_behavior) < '1.00'}<span class="callforprice">Call For Price!!!</span>
{else}

-------------------------------------------------------------------------------------------------------

Make sure it is above the line below

-------------------------------------------------------------------------------------------------------

<span class="price">{convertPrice price=$product->getPrice($taxes_behavior)}</span></p>

-------------------------------------------------------------------------------------------------------

After the line above add the line below

-------------------------------------------------------------------------------------------------------

	
{/if}

-------------------------------------------------------------------------------------------------------

 

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}

-------------------------------------------------------------------------------------------------------

 

That's it folks, hope it has helped.

 

 

Conclusion

 

Well that concludes our tutorial, however there may be more edits that could result in the pricing showing, which must also be modified. Although, doing the modifications this way ensures it still does not show a real price just 0.00, thus saving the business owner from losing their partnership and supplier contact. I like to play it safe personally. As always please be kind, if there are any issues errors or typo's please email me the corrections in a positive manner.

 

Also if this tutorial helps you and you use it please shoot some back links to me at http://www.shopsavenearn.com thanks.

 

Here is a pdf version

PrestaShop 1.5.2 Tutorial- Call for Price Modifications.pdf

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Okay everyone here is a tutorial that may help you.

 

 

PrestaShop 1.5.2 Tutorial: Call for Price Modifications

A gift to PrestaShop user from Shop Save N Earn

 

12/15/2012

Shop Save N Earn

William R. Williamson

PrestaShop 1.5.2 Tutorial: Call for Price Modifications

 

 

 

Hi everyone it's me again, William Williamsons at Shop Save N Earn; with another great tutorial for PrestaShop in which many of my fellow PrestaShop users can definitely use. Firstly I want to say that if anyone knows how I would be able to turn this into a module to release for free as a community project please do at [email protected]. I personally, believe this is a necessity for all shops as many suppliers invoke restrictions that you must follow, which happen to be the most largest suppliers or manufacturers.

 

 

Summary

 

Okay to summarize this tutorial we will edit three files in two different directories product_list.tpl, product.tpl, and products-comparision.tpl in themes/default/ directory of their store and one file in the modules/homefeatured/homefeatured.tpl file. The edits are small and simple so it should be an easy job.

 

A. Find in themes/default/

 

 

Find and open the file product_list.tpl

 

-------------------------------------------------------------------------------------------------------

Find the line below

-------------------------------------------------------------------------------------------------------

<div class="content_price">
-------------------------------------------------------------------------------------------------------

after this line after

-------------------------------------------------------------------------------------------------------

 


{if $product.price < '1.00'}<span [b]class="callforprice">[/b]Call For Price!!!</span>{/if}
-------------------------------------------------------------------------------------------------------

Make sure to create a class in global.css an example is below

-------------------------------------------------------------------------------------------------------


.callforprice {
			font-family: Verdana, Geneva, sans-serif;
			font-size: 14px;
			font-style: italic;
			line-height: normal;
			font-weight: bolder;
			font-variant: normal;
			color: #F00;
			text-decoration: blink;
}
-------------------------------------------------------------------------------------------------------

Find the line below

-------------------------------------------------------------------------------------------------------


{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">

-------------------------------------------------------------------------------------------------------

replace it with the line below

-------------------------------------------------------------------------------------------------------

{if isset($product.show_price) && $product.price > '1.00' && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">
-------------------------------------------------------------------------------------------------------

Find and open the file product.tpl

-------------------------------------------------------------------------------------------------------

Find the line beow

-------------------------------------------------------------------------------------------------------

<div class="price">
-------------------------------------------------------------------------------------------------------

After this add the code above

-------------------------------------------------------------------------------------------------------

{if $product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision) < '1.00'}<p class="callforprice">Call For Price!!!</p>{/if}
									{else}
---------------------------------------------------------------------------------------------------------

and make sure it is inserted before the code below

-------------------------------------------------------------------------------------------------------

{if !$priceDisplay || $priceDisplay == 2}
{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
{assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{elseif $priceDisplay == 1}
   {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
-------------------------------------------------------------------------------------------------------

Find and open the file---products-comparison.tpl

-------------------------------------------------------------------------------------------------------

Find the line below

-------------------------------------------------------------------------------------------------------

<p class="price_container">
-------------------------------------------------------------------------------------------------------

After the line above add

-------------------------------------------------------------------------------------------------------

{if $product->getPrice($taxes_behavior) < '1.00'}<span class="callforprice">Call For Price!!!</span>
{else}
-------------------------------------------------------------------------------------------------------

Make sure it is above the line below

-------------------------------------------------------------------------------------------------------

<span class="price">{convertPrice price=$product->getPrice($taxes_behavior)}</span></p>
-------------------------------------------------------------------------------------------------------

After the line above add the line below

-------------------------------------------------------------------------------------------------------

{/if}
-------------------------------------------------------------------------------------------------------

 

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}
-------------------------------------------------------------------------------------------------------

 

That's it folks, hope it has helped.

 

 

Conclusion

 

Well that concludes our tutorial, however there may be more edits that could result in the pricing showing, which must also be modified. Although, doing the modifications this way ensures it still does not show a real price just 0.00, thus saving the business owner from losing their partnership and supplier contact. I like to play it safe personally. As always please be kind, if there are any issues errors or typo's please email me the corrections in a positive manner.

 

Also if this tutorial helps you and you use it please shoot some back links to me at http://www.shopsavenearn.com thanks.

 

Here is a pdf version

attachicon.gifPrestaShop 1.5.2 Tutorial- Call for Price Modifications.pdf

 

A very great tutorial,thanks very much.

I have test use 1.5.6.2 it is work well with the price and price-list,but the homefeatured not work well,still show $0.00

Link to comment
Share on other sites

  • 8 months later...

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...