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

amazon-style tabbed menu for 4.0.x

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 07-19-2006, 01:30 PM
 
cheaperplanet cheaperplanet is offline
 

Newbie
  
Join Date: Jul 2006
Posts: 5
 

Default

Does anyone hava an update for version 4.12?

It would be highly appreciated.
__________________
Kurt
X-Cart 4.1.3
Windows IIS 6, PHP 4, MYSQL 5
http://www.cheaperplanet.com
Reply With Quote
  #72  
Old 07-21-2006, 03:21 PM
 
cheaperplanet cheaperplanet is offline
 

Newbie
  
Join Date: Jul 2006
Posts: 5
 

Default amazon style menu for 4.12

Anybody wants the code for xcart 4.12, let me know, i figured it out.
__________________
Kurt
X-Cart 4.1.3
Windows IIS 6, PHP 4, MYSQL 5
http://www.cheaperplanet.com
Reply With Quote
  #73  
Old 07-21-2006, 03:37 PM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default

Can you post it?
__________________
"The point is, to make so much money, that money isn't the point anymore."

Pro Version 4.0.19
Gold Version 4.1.3
Linux
Reply With Quote
  #74  
Old 07-21-2006, 05:27 PM
 
cheaperplanet cheaperplanet is offline
 

Newbie
  
Join Date: Jul 2006
Posts: 5
 

Default

Please copy over the skin1/customer/tab_menu.tpl file with the following code:

Quote:
{if $printable ne ''}
{include file="customer/tab_menu_printable.tpl"}
{else}
<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
<TR><TD align="left">
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR>
{if $cat eq 0}
<TD align="left" class="tabmenuitemon" nowrap><span>home</span>
</TD>
{else}
<TD align="left" class="tabmenuitem" nowrap><span>home</span>
</TD>
{/if}
{foreach from=$categories item=c}
{if $c.order_by lt 10}
{if $cat eq $c.categoryid || $current_category.parentid eq $c.categoryid}
<TD align="center" class="tabmenuitemon" nowrap><span>{$c.category}</span>
</TD>
{else}
<TD align="center" class="tabmenuitem" nowrap><span>{$c.category}</span>
</TD>
{/if}
{/if}
{/foreach}
</TR>
</TABLE>
</TD></TR>
<TR><TD class="submenu" align="center" valign="top">
<TABLE border="0" cellpadding="0" cellspacing="0">
{assign var=current_category_top value=$current_category.categoryid_path|regex_repl ace:"/\/.*/":""}
<TR>
<TD class="submenuitem"></TD>
{if $cat gt 0}
{assign var=subcat_count value=1}
{foreach from=$subcategories item=c key=catid}
{if $c.parentid eq $current_category_top}
{if $c.catid eq $cat || $c.catid eq $current_category.parentid}
<TD class="submenuitemon" align="center" nowrap>{$c.category|truncate:20:"...":true}{if $subcat_count eq 7 || $subcat_count eq 14 || $subcat_count eq 21}</TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD class="submenuitem">{elseif not %sub_num.last%}<FONT class="submenuitem">|</FONT>{/if}</TD>
{assign var=subcat_count value=$subcat_count+1}
{else}
<TD class="submenuitem" align="center" nowrap>{$c.category|truncate:20:"...":true}{if $subcat_count eq 7 || $subcat_count eq 14 || $subcat_count eq 21}</TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD class="slash_submenu">{elseif not %sub_num.last%}|{/if}</TD>
{assign var=subcat_count value=$subcat_count+1}
{/if}
{/if}
{/foreach}
{else}
<TD class="submenumsg" align="center" valign="middle">{$lng.lbl_welcome_msg}</TD>
{/if}
<TD class="submenuitem"></TD>
</TR>
</TABLE>
</TD></TR>
</TABLE>

Cheers
__________________
Kurt
X-Cart 4.1.3
Windows IIS 6, PHP 4, MYSQL 5
http://www.cheaperplanet.com
Reply With Quote
  #75  
Old 07-23-2006, 10:08 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default

Seems to have needed another {/if} after the last {/if} in the code provided, to get this to work on my test site.

Edit: Although having said that, it only displays one home link as the parent category, no other main categories are displayed.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #76  
Old 07-24-2006, 02:19 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default

whoops i forgot the test site has different positions for the cats, ie. 10, 20 etc, lowered the numbers in categories.php admin page, and the cats show now, in case anyone else missed that like me.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #77  
Old 07-24-2006, 03:08 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default

There is a problem with the 4.1x code a few posts ago, in that the sub categories do not even appear after more than one level deep
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #78  
Old 08-07-2006, 01:57 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default

any update on this is appreciated
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #79  
Old 08-10-2006, 06:56 PM
  proboscidian's Avatar 
proboscidian proboscidian is offline
 

Senior Member
  
Join Date: May 2005
Location: Clearwater, FL
Posts: 146
 

Default Subcategories only works too!

I commented out the table with the main categories in the tabs and just left the subcategories, and it works great. Only took a few minutes to install, too. Thanks!

in action: www.mineandmillindustrialsupplyco.com
__________________
Industrial Webworks
Various xcart versions from 4.1.19 gold - 4.7 gold
http://www.industrialwebworks.net
Reply With Quote
  #80  
Old 09-26-2006, 09:38 PM
 
stevenhanton stevenhanton is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 2
 

Default Re: amazon-style tabbed menu for 4.0.x

Has anyone got this working with 4.13. I simple doesn't show anything below where i place the

{ include file="customer/tab_menu.tpl" }

I would really like to get this working.

Thanks

Steve
xcart 4.13 gold
__________________
Steve
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 12:23 PM.

   

 
X-Cart forums © 2001-2020