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
  #51  
Old 09-06-2005, 06:57 PM
 
salsabeel salsabeel is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 132
 

Default

Does anyone have the tab images that were in the first post? I do not see them anymore.
__________________
X-Cart Platinum 4.6.5
Reply With Quote
  #52  
Old 09-07-2005, 01:22 AM
 
steveparks steveparks is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: UK
Posts: 87
 

Default tabs

ooops, sorry - have moved server. I'll repost them soon

steve
__________________
--------------
RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3
X-Cart 4.0.16 - Live
X-Affiliate
X-AOM
ez-checkout
ez-upsell
--------------
Reply With Quote
  #53  
Old 09-07-2005, 04:03 AM
 
rossco rossco is offline
 

Advanced Member
  
Join Date: Feb 2005
Posts: 97
 

Default

Steve, Hi

Do you have an idea of what to modify to make the tabs wrap after say 7 tabs?

Thanks

Allan
__________________
How loud do you want it?

X-Cart Gold 4.0.12 & 17
Reply With Quote
  #54  
Old 09-07-2005, 03:42 PM
 
steveparks steveparks is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: UK
Posts: 87
 

Default amazon tabs mod update

Hi all

OK I've updated the links to the tab images.

Re: having two lines of tabs, I think it would look pretty odd, but if you really really want to do it then have a look at what I've done to split the subcategories into multiple rows if there are too many:

Code:
{assign var=subcat_count value=1} {section name=sub_num loop=$allcategories} {if $allcategories[sub_num].parentid eq $current_category_top} {if $allcategories[sub_num].categoryid eq $cat || $allcategories[sub_num].categoryid eq $current_category.parentid} <TD class="submenuitemon" align="center" nowrap>{$allcategories[sub_num].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>{$allcategories[sub_num].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%}|{/if}</TD> {assign var=subcat_count value=$subcat_count+1} {/if} {/if} {/section}

The key section to look at within that is:

Code:
{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">

So it whenever the section is processing items 7, 14 and 21 it closes off the existing table and creates a new one. It's a table so that each row is individually centred.

You can then adapt this code to be used with the main tabs.

However I would suggest reducing the number of top level categories that display on tabs instead, but that's only my 2 cents.

steve[/b]
__________________
--------------
RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3
X-Cart 4.0.16 - Live
X-Affiliate
X-AOM
ez-checkout
ez-upsell
--------------
Reply With Quote
  #55  
Old 09-08-2005, 01:07 AM
 
salsabeel salsabeel is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 132
 

Default

steveparks,

Thank you so much for the tab images. One more favor, your website listed in the first post that show the preview is no longer up. Is it possible you can show me these tabs on a functioning website or at least a screenshot? I just want to see how they look and perform before I install them.

Thank you again!
__________________
X-Cart Platinum 4.6.5
Reply With Quote
  #56  
Old 09-08-2005, 01:40 AM
 
steveparks steveparks is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: UK
Posts: 87
 

Default example site

Hi

They are live on http://www.redshop.biz

PLEASE NOTE: THIS IS A LIVE STORE!!!! please do not place test orders, etc etc.

thanks
steve
__________________
--------------
RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3
X-Cart 4.0.16 - Live
X-Affiliate
X-AOM
ez-checkout
ez-upsell
--------------
Reply With Quote
  #57  
Old 09-18-2005, 10:26 AM
 
salsabeel salsabeel is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 132
 

Default

Is there a way to display sub-sub categories with this mod?
__________________
X-Cart Platinum 4.6.5
Reply With Quote
  #58  
Old 09-19-2005, 02:16 AM
 
steveparks steveparks is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: UK
Posts: 87
 

Default sub-sub categories

I've only had a few minutes, so this may not work first time - you might have to tweak the code a bit - but this should display the immediate subcategories of the current category/subcategory.


Code:
{if $printable ne ''} {include file="customer/tab_menu_printable.tpl"} {else} <TABLE width="100%" border="0" cellpadding="0" cellspacing="0"> <TR><TD align="center"> <TABLE border="0" cellpadding="0" cellspacing="0"> <TR> {if $cat eq 0} <TD align="center" class="tabmenuitemon" nowrap><span>home</span> </TD> {else} <TD align="center" class="tabmenuitem" nowrap><span>home</span> </TD> {/if} {section name=cat_num loop=$categories} {if $categories[cat_num].order_by lt 10} {if $cat eq $categories[cat_num].categoryid || $current_category.parentid eq $categories[cat_num].categoryid} <TD align="center" class="tabmenuitemon" nowrap><span>{$categories[cat_num].category}</span> </TD> {else} <TD align="center" class="tabmenuitem" nowrap><span>{$categories[cat_num].category}</span> </TD> {/if} {/if} {/section} </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_replace:"/\/.*/":""} <TR> <TD class="submenuitem"></TD> {if $cat gt 0} {assign var=subcat_count value=1} {section name=sub_num loop=$allcategories} {if $allcategories[sub_num].categoryid eq $cat || $allcategories[sub_num].categoryid eq $current_category.parentid} <TD class="submenuitemon" align="center" nowrap>{$allcategories[sub_num].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} {/if} {/section} {else} <TD class="submenumsg" align="center" valign="middle">{$lng.lbl_welcome_msg}</TD> {/if} <TD class="submenuitem"></TD> </TR> </TABLE> </TD></TR> </TABLE> {/if}
__________________
--------------
RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3
X-Cart 4.0.16 - Live
X-Affiliate
X-AOM
ez-checkout
ez-upsell
--------------
Reply With Quote
  #59  
Old 09-26-2005, 08:41 AM
 
Lucent88 Lucent88 is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 147
 

Default

how can I have it like this...

Instead of having subcategories listed under the tab, can I have it listed on the left side menu?

So, on the left side menu (where it usually list all categories) only shows the current categories name then all subcategories under it.

And when you are on the current subcategory the link will be highlighted or shows different css.

I remember seeing this somwhere from this froum, but I can't seem to find it no more.
__________________
X-Cart Gold 4.0.17
Reply With Quote
  #60  
Old 09-28-2005, 07:26 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default

This is one of the best free mods I've ever encountered here - thanks for sharing it.
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
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:24 PM.

   

 
X-Cart forums © 2001-2020