| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
simple smarty question | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I have an offer of free shipping for all orders over $30 so I want to implement the following:
{if $subtotal<30} if you order just ($30-$subtotal} more you can get free shipping {/if} I can get the message to print if it is lower than $30 but how do you do simple math in Smarty? Just as a side note: the Smarty folks MUST get their act together on the docs. I have spent the past hour trying to find some documentation of how to do this VERY SIMPLE task and cannot find it on the SMARTY site. they have one example of MATH for variables but it does not talk about using those variables it just shows you that you can add things together... LAME... thank you for any help |
|||||||
#2
|
|||||||
|
|||||||
![]() Try this:
Code:
And yes, the Smarty docs suck; especially the search function. HTH.
__________________
Jeremy X-Cart Gold v3.4.14 [Linux/Apache] Heavily Modded |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Try this:
Code:
I have not tested this, but it should work just fine. Here is the page in the Smarty Docs that references math equations in templates: http://smarty.php.net/manual/en/language.function.math.php |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() LOL
|
|||||||||
#5
|
|||||||
|
|||||||
![]() Well if that's not a coincidence I don't know what is...
I guess great minds think alike.
__________________
Jeremy X-Cart Gold v3.4.14 [Linux/Apache] Heavily Modded |
|||||||
#6
|
|||||||
|
|||||||
![]() thank you very much for the help...
![]() |
|||||||
|
|||
X-Cart forums © 2001-2020
|