Code: Select all
$this->data['percent_savings'] = round((($product_info['price'] - $product_info['special']) / $product_info['price'] * 100));
Regards
Jimmy
News CMS || Plus SEO || Live Price change with Option Select
Thanks Jimmy - very nice. I'm using this code to show the exact saving:
@roozaimee - It needs to go into the following file:
catalog/view/theme/[your-theme]/template/product/product.tpl
Code: Select all
$this->data['you_save'] = $product_info['price'] - $product_info['special'];
catalog/view/theme/[your-theme]/template/product/product.tpl
You can take a look at this extension:
http://www.opencart.com/index.php?route ... on_id=4023
I also made it to be shown in the Featured module's box, by the request of the costumers who purchased it, so you'll get that, too, by email, without any additional charges.
http://www.opencart.com/index.php?route ... on_id=4023
I also made it to be shown in the Featured module's box, by the request of the costumers who purchased it, so you'll get that, too, by email, without any additional charges.
See all my extensions: https://www.opencart.com/index.php?rout ... 20OpenCart
You might find this vQmod by Fido-X useful http://forum.opencart.com/viewtopic.php?f=131&t=39597
Version 1.5.1.3 newbie!!!!
where to put this code in product.tpl ?
$this->data['you_save'] = $product_info['price'] - $product_info['special'];
also , do i need to modify any other file?
$this->data['you_save'] = $product_info['price'] - $product_info['special'];
also , do i need to modify any other file?
If you are looking step by step then this guy tutorials will be helpful.
https://webocreation.com/blog/how-to-in ... -opencart/
https://webocreation.com/blog/how-to-in ... -opencart/
Blog free tips and tricks
Free extensions
OpenCart Tutorials
OpenCart Tutorials Youtube Video for developers
Who is online
Users browsing this forum: No registered users and 55 guests