Jump to content

[solved] Discount and original price


Recommended Posts

Hi everybody,

I'm starting using Prestashop, but I'm trying to do a thing without success.

 

I would like to display in the products list and in the product details page two prices: one without a discount (the original price) and the discounted price.

 

Is there a way to do so? Can you explain me how?

 

Thankyou all very much!

 

Gabriel

Link to comment
Share on other sites

default template for product page shows two prices - with & without discount

which version of ps you use? with default theme?

The version is 1.5 and we used a personalized template.

 

But, how to set the price with and without the discount in the admin page?

Link to comment
Share on other sites

{assign var='priceDisplayPrecision' value=2}

{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}

{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}

 

<span id="our_price_display">{convertPrice price=$productPrice}</span>

<span id="price_without_reduction">{convertPrice price=$productPriceWithoutReduction}</span>

 

this is for product page, but you can modify this for product-list also

  • Like 1
Link to comment
Share on other sites

These two lines go in the template?

<span id="our_price_display">{convertPrice price=$productPrice}</span>
<span id="price_without_reduction">{convertPrice price=$productPriceWithoutReduction}</span>

 

These ones in which page?

{assign var='priceDisplayPrecision' value=2}
{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}

Edited by vekia (see edit history)
Link to comment
Share on other sites

i said that you need to make some changes in the code for the pages other than product.tpl

 

anyway, does the code that i pasted work for product page?

 

im checking product-list.tpl right now

Here the product.tpl and it works:

 

CODE HIDDEN

 

I didn't used the code you wrote me in this page, I could try it if this can help you.

 

Thank you again for your time.

Edited by gabriel91g (see edit history)
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...