X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   $user_membership (https://forum.x-cart.com/showthread.php?t=12511)

Wizard 03-01-2005 09:50 PM

$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

shan 03-02-2005 04:00 AM

try

Code:

{if $user_membership ne ""}

shan 03-02-2005 04:01 AM

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

http://forum.x-cart.com/viewtopic.php?t=15391&highlight=wholesale

Wizard 03-02-2005 04:43 AM

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

Wizard 03-02-2005 05:40 AM

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

shan 03-02-2005 05:48 AM

try

Code:

{$userinfo.membership}

Wizard 03-02-2005 06:19 AM

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

Thanks for your help Shan

Mike

Inner Eye 06-04-2005 12:25 PM

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!

Wizard 06-04-2005 05:34 PM

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

point taken also that I should have linked to it

xgarb 05-05-2006 09:23 AM

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


All times are GMT -8. The time now is 11:08 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.