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

Check if not logged in and $main is...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-11-2009, 12:40 AM
 
nck-k nck-k is offline
 

Newbie
  
Join Date: Mar 2009
Posts: 8
 

Default Check if not logged in and $main is...

Hi,

I am trying to create an if statement that will check if the visitor is not logged in and the page he is visiting not equals a static page or a help page, but i can't get it to work:

Code:
{if $login eq "" && ($main ne "pages" || $main ne "help")} do something 1 {else} do something 2 {/if}

I have tried several ways, but this codes looks like the logical one for me.
Can someone help me?
__________________
x-cart gold - 4.1.x
Reply With Quote
  #2  
Old 12-11-2009, 05:24 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Check if not logged in and $main is...

Try {if $login eq "" && $main ne "pages" && $main ne "help"}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
nck-k (12-14-2009)
  #3  
Old 12-14-2009, 04:03 AM
 
nck-k nck-k is offline
 

Newbie
  
Join Date: Mar 2009
Posts: 8
 

Default Re: Check if not logged in and $main is...

Quote:
Originally Posted by cflsystems
Try {if $login eq "" && $main ne "pages" && $main ne "help"}

Thank you, it works for me!
__________________
x-cart gold - 4.1.x
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:38 PM.

   

 
X-Cart forums © 2001-2020