Page 1 of 1

Show "You Save: %" when using special prices.

Posted: Tue Nov 08, 2011 2:25 pm
by akgamerx
Would love to see a "You Save: %" or "Save: %" standard in product prices when using a special price.

Re: Show "You Save: %" when using special prices.

Posted: Tue Nov 08, 2011 3:00 pm
by jimmyphong

Code: Select all

$this->data['percent_savings'] = round((($product_info['price'] - $product_info['special']) / $product_info['price'] * 100));
this code can be to help !

Regards
Jimmy

Re: Show "You Save: %" when using special prices.

Posted: Sat Nov 26, 2011 5:14 pm
by roozaimee
hi

can anyone tell me how to put the code?
~beginner~

regards

Re: Show "You Save: %" when using special prices.

Posted: Mon Nov 28, 2011 4:11 am
by greenpanda
Thanks Jimmy - very nice. I'm using this code to show the exact saving:

Code: Select all

$this->data['you_save'] = $product_info['price'] - $product_info['special']; 
@roozaimee - It needs to go into the following file:
catalog/view/theme/[your-theme]/template/product/product.tpl

Re: Show "You Save: %" when using special prices.

Posted: Thu Dec 01, 2011 11:03 pm
by carter16
How to modify this code to make it work in featured module?

Re: Show "You Save: %" when using special prices.

Posted: Sun Dec 04, 2011 9:01 pm
by smifis
add it in the controller

Re: Show "You Save: %" when using special prices.

Posted: Sun Dec 04, 2011 9:14 pm
by GoGo OpenCart
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.

Re: Show "You Save: %" when using special prices.

Posted: Thu Dec 08, 2011 1:00 am
by missjames
You might find this vQmod by Fido-X useful http://forum.opencart.com/viewtopic.php?f=131&t=39597

Re: Show "You Save: %" when using special prices.

Posted: Mon Aug 06, 2012 4:14 pm
by yesweus
Hi
I am new developer in opencart.
I am using Version 1.5.1.3 .
Where i put this codes.
Pls help

Re: Show "You Save: %" when using special prices.

Posted: Mon Dec 17, 2012 2:05 am
by satish11nov
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?

Re: Show "You Save: %" when using special prices.

Posted: Sun Feb 03, 2013 4:12 am
by ibietela
Yeah Am interested. Where do we add the code?

Re: Show "You Save: %" when using special prices.

Posted: Wed Dec 25, 2019 11:04 am
by webocreation.com
If you are looking step by step then this guy tutorials will be helpful.
https://webocreation.com/blog/how-to-in ... -opencart/