Nik Chankov Posted March 2, 2011 Share Posted March 2, 2011 Hi guys,I am newbie in Prestashop, but I found a issue displaying original price in Product details.Basically the idea is to display Current price and the Original price as well as the percentage of discount.In the product.tpl there is variable called $productPriceWithoutRedution but the value there is the price of the product with discount. Here is the scenario:A product with regular price of 100$ has been discounted from the Price tab by adding a rule where the new price is 80$. There is no extra discounts for the group.When I use {$productPriceWithoutRedution} it's 80$ instead of 100$ and this way I cannot calculate the precentage of discount as well I cannot display the original price.My solution is to extend the Product.php class. Here is the code snippet: http://pastebin.com/Akbx9TftYou should get that code and place it in: /your_presta_installation/override/classes/Product.phpThen your $productPriceWithoutRedution will display the proper value of the Info tabHope this helps to someone. 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