X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   smarty question (https://forum.x-cart.com/showthread.php?t=37479)

ARW VISIONS 02-10-2008 11:43 AM

smarty question
 
Ok so I can't find the info on smarty opernads.

Does xcart use its own set?

what is gt ne eq?

eq I guess means ==
ne means not equal?
gt greater than?

pleae shed some light on this for me. :)

carpeperdiem 02-10-2008 11:48 AM

Re: smarty question
 
Quote:

eq I guess means ==
ne means not equal?
gt greater than?

you are correct!

carpeperdiem 02-10-2008 11:49 AM

Re: smarty question
 
http://www.smarty.net/manual/en/language.function.if.php

ARW VISIONS 02-10-2008 01:59 PM

Re: smarty question
 
so are the normal PHP operand ok to use in smarty? is == ok or <=?

carpeperdiem 02-10-2008 02:03 PM

Re: smarty question
 
Quote:

The following is a list of recognized qualifiers, which must be separated from surrounding elements by spaces. Note that items listed in [brackets] are optional. PHP equivalents are shown where applicable.

The way I read it: use the 1st column. 2nd column is optional/alternate method.

kube 02-10-2008 02:12 PM

Re: smarty question
 
Quote:

Originally Posted by Ashley
so are the normal PHP operand ok to use in smarty? is == ok or <=?


Pertaining to the == condition. I'm not sure if the rule still applies with Smarty but I recall if you wrote it (like me with PHP) with no spaces then Smarty failed the statement.

ie...
(with spaces works)
{if $name == 'Fred' || $name == 'Wilma'}

(without spaces doesn't)
{if $name=='Fred' || $name=='Wilma'}

I thought I got that from carpeperdiem's source at smarty.net - but it doesn't seem to be there any more?? Has it changed then?

balinor 02-10-2008 03:01 PM

Re: smarty question
 
Moving to Template Editing


All times are GMT -8. The time now is 03:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.