Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

math equation - problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
nanillia
Smarty n00b


Joined: 18 Dec 2012
Posts: 2

PostPosted: Wed Apr 03, 2013 9:30 am    Post subject: math equation - problem Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Apr 04, 2013 10:58 pm    Post subject: Reply with quote

{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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP