|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
nanillia Smarty n00b
Joined: 18 Dec 2012 Posts: 2
|
Posted: Wed Apr 03, 2013 9:30 am Post subject: math equation - problem |
|
|
hello,
I have problem, in file html I want place kode that calculates the discount
[I cant edit other files]
Code has to calculate the difference between the old and new price I did something like this:
{math equation="(y-x)/100" y=$old_price_brutto x=$price_brutto format="%.2f"} This code does not work
When I put the numbers is no problem calculates the difference
for example:
{math equation="(y-x)/100" y="100" x="20" format="%.2f"}
Thank you for your help ! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Apr 04, 2013 10:58 pm Post subject: |
|
|
{math equation="(y-x)/100" y=$old_price_brutto x=$price_brutto format="%.2f"}
is correct code.
Are you sure that you have assigned the right values to $old_price_brutto and $price_brutto?
Add
{$old_price_brutto} {$price_brutto} to check the values |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|