Jump to content

Adding Old Price to Product Pages


brownstring

Recommended Posts

Hi

 

I have some products with a reduced price - I would like to show the old price as well as the current price on the product pages. How do I get it to display both prices, I can then format them with css but I have no idea how to show both.

 

I am running prestashop 1.4.4.1

 

Thanks

Link to comment
Share on other sites

are you experienced with coding? or are you looking for someone to do this for you?

if you would like to do this yourself, then I can give you guidance. You would have to alter the ProductController.php file so that in addition to calculating the special price, that it also calculates the base price.

Once calculated, the controller has to add that price to smarty, so it can be used within the templates.

Then inside you template, you simply use that variable.

Link to comment
Share on other sites

Thanks Bellini13 - I've done a fair bit of coding. I just hoped it would be a little easier than that. Isn't what I need fairly normal for shopping carts to display discounted prices and regular prices?

 

I also noticed looking at the page source that when I change a price the new price shows up in a span our_price_display and there is another span below this called old_price however the span is empty. The css also is set up to use a strikethrough to display the old price but as its empty nothing happens. When I don't have a reduced price then the old_price span doesn't show up so something is working but not completly.

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