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

$user_membership

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-01-2005, 09:50 PM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default $user_membership

I am trying to make a modification where it shows one menu on default BUT if you have "Wholesale" access then it would show a different menu... I thought it was as easy as the following code BUT for some reason it is not working

Code:
{if $user_membership eq "Wholesale"} <TABLE border="0" cellpadding="0" cellspacing="0" width=100%> <TR> <TD align=center> Wholesalel 1 | Wholesale 2<a/> | <a href="/home.php?cat=8">Wholesale 3 | Wholesale 4 | Wholesale 5 </TD> </TR> </TABLE> {else} <TABLE border="0" cellpadding="0" cellspacing="0" width=100%> <TR> <TD align=center> Retail 1 | Retail 2<a/> | <a href="/home.php?cat=3">Retail 3 | Retail 4 | Retail 5 </TD> </TR> </TABLE> {/if}

I created a membership level of Wholesale and then created a user and assigned them to the Wholesale level... but when I log onto the site I still see the retail menu??? Can someone point me in the right direction?

Thanks

Mike
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #2  
Old 03-02-2005, 04:00 AM
  shan's Avatar 
shan shan is offline
 

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

Default

try

Code:
{if $user_membership ne ""}
__________________
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 03-02-2005, 04:01 AM
  shan's Avatar 
shan shan is offline
 

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

Default

http://forum.x-cart.com/viewtopic.php?p=69941#69941

http://forum.x-cart.com/viewtopic.php?t=15391&highlight=wholesale
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 03-02-2005, 04:43 AM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default

Quote:
Originally Posted by shan
try

Code:
{if $user_membership ne ""}

I have tried this also but it is still showing the retail options. So I added a line that just says {$user_membership} to see what was showing up and it never changes from nothing EVEN when a Wholesale customer is logged in.

The $user_membership is linked to the "Membership Levels" we create in the admin panel correct?

Mike
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #5  
Old 03-02-2005, 05:40 AM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default

I just tried installing a clean version of 4.0.12 and attached it to my existing database. I then put the following in welcome.tpl to see what would show up...

Code:
{$user_membership}

and no matter if I am on a regular account or a Wholesale (created in Membership Levels) Account it still displays nothing. I do know it is recognizing the level though because if I create a category and have it only shown to "Wholesale" accounts -- that is working...

Mike
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #6  
Old 03-02-2005, 05:48 AM
  shan's Avatar 
shan shan is offline
 

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

Default

try

Code:
{$userinfo.membership}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #7  
Old 03-02-2005, 06:19 AM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default

Seems with a little more looking I was able to find the answer from Boomer in another thread...

Thanks for your help Shan

Mike
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #8  
Old 06-04-2005, 12:25 PM
 
Inner Eye Inner Eye is offline
 

Member
  
Join Date: Jan 2005
Posts: 25
 

Default

Other people search these forums months, somtimes years later looking for the same solutions, would be helpful to post the solution if you figured it out. This worked for me.

http://forum.x-cart.com/viewtopic.php?t=16090&highlight=membership+wholesa le

Thanks!
__________________
Before you criticize someone, walk a mile in his shoes.
That way, if he gets angry, he\'ll be a mile away - and barefoot.

Version 4.0.9
Reply With Quote
  #9  
Old 06-04-2005, 05:34 PM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default

That is the solution I had used... the thread you linked to...

point taken also that I should have linked to it
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #10  
Old 05-05-2006, 09:23 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default

yep it's add

Code:
$membership_ac = $user_account['membership']; $smarty->assign("membership_ac",$membership_ac);

to your php ie product.php

and

Code:
{$membership_ac}

to the template where you want the name of the membership group to appear ie product.tpl
__________________
Core version: 5.5.xx
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:23 AM.

   

 
X-Cart forums © 2001-2020