brownstring Posted February 24, 2012 Share Posted February 24, 2012 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 More sharing options...
bellini13 Posted February 25, 2012 Share Posted February 25, 2012 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 More sharing options...
brownstring Posted February 25, 2012 Author Share Posted February 25, 2012 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 More sharing options...
brownstring Posted February 26, 2012 Author Share Posted February 26, 2012 OK - I've just upgraded to the latest version 1.4.7.0 and the old and new prices show and all I need to do now is edit the css file. I guess I learned a valuable lesson here - always use the latest version! Link to comment Share on other sites More sharing options...
bellini13 Posted February 26, 2012 Share Posted February 26, 2012 hi there, thanks for coming back and sharing your results. 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