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

Speed Bar Modification tabs

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-21-2014, 09:59 AM
 
banberry banberry is offline
 

Member
  
Join Date: May 2009
Location: West Des Moines, IA
Posts: 13
 

Default Speed Bar Modification tabs

I cannot get this to work. I am trying to conditionally show a link in the speedbar tab. However, even if a user is registered but does not have a membership applied yet, the link will still appear. I want only registered users with a membership of "Wholesale" be able to see this link. All other times it is hidden. See code I used below. Any help appreciated.

PHP Code:
{if $speed_bar}
  <
div class="tabs{if $all_languages_cnt gt 1} with_languages{/if}">
    <
ul>
{if 
$user_membership eq "Wholesale" && $login ne ""}
<
li{interline name=tabs}><a href="http://www.domain.com/2014catalog/2014catalog.pdf">Download Catalog</a></li>
{/if}
      {foreach 
from=$speed_bar item=sb name=tabs}
        <
li{interline name=tabs}><a href="{$sb.link|amp}">{$sb.title}</a></li>
      {/foreach}
    </
ul>
  </
div>
{/if} 
__________________
v4.5.5 Gold Plus/Apache/Linux/VPS
php 5.3.3

v4.4.5 Gold/Apache/Linux/VPS
php 5.3.3
Reply With Quote
  #2  
Old 10-29-2014, 03:16 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Speed Bar Modification tabs

Try looking for $userinfo.membershipid eq 2 or whatever the correct id is. If it's not present in $userinfo you might need to do something like add the following to include/check_useraccount.php:

PHP Code:
$smarty->assign('user_membershipid',$user_account['membershipid']); 

Then use:

Code:
{if $user_membershipid eq 2} ...
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:13 PM.

   

 
X-Cart forums © 2001-2020