| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Display Membership Levels on all Pages | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Display Membership Levels on all Pages
I know this has been discussed in the past, however not all of the code worked for me.
I need to display the Membership Level immediately after Login. Even if the user returns to the very first page, the Membership Level needs to be displayed. If they are not a member, I would like it to show - "Membership Level: Not a Member". I am currently using the following code in the Header.tpl: {if $userinfo.membership ne ""} Membership Level: {$lng.lbl_your_membership}{$userinfo.membership} {/if} This only works after clicking the View Cart or Checkout links. If I return to the "Home" page, it disappears. Any help would be much appreciated. |
|||||||
#2
|
|||||||||
|
|||||||||
Open:
checkuseraccount.php Look for the last closing } at the end of the first if ($login){ routine add Code:
and before the last ?> add Code:
You can now use {$usermembership} in your smarty templates.
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
#3
|
|||||||
|
|||||||
Thank you!
That worked perfectly! I used the below code to: 1. Keep the Membership Level from showing when nobody is logged in 2. Show what Membership Level the user is when they login 3. Show "Not a Member" if they are not a member when they are login. {if $usermembership ne ""} Membership Level: {$lng.lbl_your_membership}{$usermembership} {else} {if $login ne ""} [b]Membership Level: Not a Member <//b> {/if} {/if} |
|||||||
#4
|
|||||||
|
|||||||
implemented this code. works great.
Thank you, jprintz and groovico
__________________
all the best, Wubi ::::::::: xcart gold v4.3.2 with lots of customizations Linux Php 5.2.4 MySQL: 4.1.22-standard |
|||||||
#5
|
|||||||
|
|||||||
Does anyone know how to do this in version 4.1.2. ??
|
|||||||
#6
|
|||||||
|
|||||||
Re: Display Membership Levels on all Pages
This is old but it is what I need. How can I make this owrk in a 4.1.9 cart?
There is no checkuseraccount.php file in a 4.1.9 cart. I am using pro so maybe it's some place else? thanks
__________________
Currently Using: For X-cart v5.2.0 1 Business v5.2.6 license <Getting Better>! 1 Banner Mod 5.2.7 license 1 #28 iGoods Template For X-cart v4.7.0 1 GoldPlus v4 license unused 3 Gold v4 license Unused A wise man once said it is best to fix the cart instead of trying to use a broken cart. The horse has a very hard time pushing a broken cart!! |
|||||||
#7
|
|||||||
|
|||||||
Re: Display Membership Levels on all Pages
ok, I found the solution.
the file is located in the include/check_useraccount.php. sg
__________________
Currently Using: For X-cart v5.2.0 1 Business v5.2.6 license <Getting Better>! 1 Banner Mod 5.2.7 license 1 #28 iGoods Template For X-cart v4.7.0 1 GoldPlus v4 license unused 3 Gold v4 license Unused A wise man once said it is best to fix the cart instead of trying to use a broken cart. The horse has a very hard time pushing a broken cart!! |
|||||||
#8
|
|||||||
|
|||||||
Re: Display Membership Levels on all Pages
I changed the file /customer/main/cart.tpl
{if $cart.coupon_discount eq 0 and $products ne "" and $membership_levels ne "Wholesale"} <P> {if $active_modules.Discount_Coupons ne "" } {include file="modules/Discount_Coupons/add_coupon.tpl"} {/if} Coupon still shows up, no matter who is signed in. PLEASE HELP!!! Thanks
__________________
www.ChiMassager.com X-cart Version 4.44 www.SEOMarketing30days.com --> Download FREE SEO marketing Ebook (valued $50) Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic! |
|||||||
#9
|
|||||||
|
|||||||
Re: Display Membership Levels on all Pages
I think you're just missing an {else} and a closing {/if}:
{if $cart.coupon_discount eq 0 and $products ne "" and $membership_levels ne "Wholesale"} {if $active_modules.Discount_Coupons ne "" } {include file="modules/Discount_Coupons/add_coupon.tpl"} {/if} {else} # You need to provide an alternative if the conditions fail. {/if}
__________________
--- x-cart 4.1.9 XC SEO 1.4 x-cart 4.2 |
|||||||
#10
|
|||||||
|
|||||||
Re: Display Membership Levels on all Pages
I've found it.
Quote:
{if $active_modules.Discount_Coupons ne "" and $userinfo.membership ne "Wholesale"} {include file="modules/Discount_Coupons/add_coupon.tpl"} {/if} thanks for all your advice
__________________
www.ChiMassager.com X-cart Version 4.44 www.SEOMarketing30days.com --> Download FREE SEO marketing Ebook (valued $50) Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic! |
|||||||
|
|||
X-Cart forums © 2001-2020
|