Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

smarty question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-10-2008, 11:43 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default 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.
__________________
xcart 5.1.2
Reply With Quote
  #2  
Old 02-10-2008, 11:48 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: smarty question

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

you are correct!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 02-10-2008, 11:49 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: smarty question

http://www.smarty.net/manual/en/language.function.if.php
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 02-10-2008, 01:59 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: smarty question

so are the normal PHP operand ok to use in smarty? is == ok or <=?
__________________
xcart 5.1.2
Reply With Quote
  #5  
Old 02-10-2008, 02:03 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 02-10-2008, 02:12 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default 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?
__________________
Doms
kube v4.1.9
Reply With Quote
  #7  
Old 02-10-2008, 03:01 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: smarty question

Moving to Template Editing
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:25 AM.

   

 
X-Cart forums © 2001-2020