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

Adding an OR statement

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-19-2006, 02:34 PM
  bedstar's Avatar 
bedstar bedstar is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 115
 

Default Adding an OR statement

Hi All

Could someone tell me the structure for an OR statement

i.e

{if $cat eq '277' OR '278'} do this action {/if}

Im not quite sure how to write it

thanks

john
Xcart 3x
__________________
https://www.bedstar.co.uk
Reply With Quote
  #2  
Old 12-19-2006, 02:51 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Adding an OR statement

try

Code:
{if $cat eq '277' || $cat eq '278'}
__________________
xcartmods.co.uk
Reply With Quote
  #3  
Old 12-19-2006, 06:17 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Adding an OR statement

you can use "or" or "||" whichever you are more comfortable with...but you need to add "$cat eq" to the latter half of your statement
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
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 06:51 AM.

   

 
X-Cart forums © 2001-2020