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

quick question about if's and userinfo

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-12-2005, 11:05 PM
 
ddmitche ddmitche is offline
 

Newbie
  
Join Date: Oct 2004
Posts: 5
 

Default quick question about if's and userinfo

This seems really basic, and if anyone has seen a thread that can shed further light please help.(this is categories.tpl)

{if ($userinfo.membership eq "Registered")}
<a href="home.php?cat=254">Download Upgrades
</a>
{else}<a href="../UP_login.php">Looking for upgrades?
</a>{/if}

I am using this code to change what a registered person sees...but it is not working? What am i missing to get this working? I feel like i must be close!
__________________
d@spyfx.com
_________

X-Cart version 3.5.11
PHP 4.1.2
MySQL server 4.0.20-standard
Reply With Quote
  #2  
Old 01-13-2005, 07:43 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

Code:
{if $userinfo.membership eq "Registered"} {else} {/if}

to see a better list of variables in the debug console edit /smarty.php

change:

Code:
$smarty->debug_tpl="file:debug_templates.tpl";

to:

Code:
$smarty->debug_tpl="file:debug.tpl";
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 01-17-2005, 08:53 AM
  epi's Avatar 
epi epi is offline
 

Member
  
Join Date: Apr 2004
Posts: 22
 

Default

Hi,

I am having the same problem. Like the original poster, I would like to use the $userinfo.membership value to give a different greeting, present some other information, et cetera...

But the $userinfo variable is not always set. It is only set when user is logging in, or on his cart/profile pages.

Is there a change we can make so that the $userinfo variable is assigned as often as possible, so we can use the information from $userinfo in the layout?

Cheers!
epi
__________________
Xcart 4.0.19 Gold
modules: X-affiliate, AOM, Feed Manager, SnS
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 09:55 PM.

   

 
X-Cart forums © 2001-2020