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

How to display subcategories into multiple columns?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 07-24-2003, 06:08 PM
 
Mad Mad is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: Brooklyn, NY
Posts: 60
 

Default

Nice post. Just wanted to say thanks because I used the code (modified it a little to more suit my needs) found here.
Reply With Quote
  #12  
Old 08-03-2003, 05:52 AM
 
deathbyfire deathbyfire is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 59
 

Default Icons disappear when I hit submit.

I am trying to get this code to work on 3.4.4 and when I go to subcategories it looks like it did. When I am in the admin area and try to add an icon for a subcategory it shows on the screen and says to hit submit. When I hit submit it disappears. Please Help?

http://www.paintballadrenaline.com
Reply With Quote
  #13  
Old 01-08-2004, 12:48 PM
 
jimskodi jimskodi is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: florida, usa
Posts: 33
 

Default what would happen if?

I sell art and I have sub catagories of Artist names. listed alphabetically.

Under "A" I have about 40 names that I would like to split up into 2 rows. and then say under the "S" I would need to have these split into 3 rows.

Would I need to have this done for each of the sub catagories of "A" through "Z" or does putting it in once work on all subcatagories?
Reply With Quote
  #14  
Old 01-08-2004, 01:25 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

This will work for all subcategories. but you will need to decide how many per row you want them unless you want some seriously detailed code.
__________________
ex x-cart guru
Reply With Quote
  #15  
Old 01-21-2004, 11:07 AM
  lyncca's Avatar 
lyncca lyncca is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Fort Worth, Texas
Posts: 455
 

Default

Hey this is awsome I didn't even think of doing this until I saw this post and it looks much cleaner than a long line of sub categories. Is there a way to add in paren after a subcategory how many of an item are in the sub? ex. SUBCATEGORY (4)

No biggie if not, we just think its nice for a customer to know how many of something are in the cartegory, which is an option you can turn on (and was) and disappeared with this mod.
Reply With Quote
  #16  
Old 09-15-2004, 06:50 AM
 
24md 24md is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: United Kingdom
Posts: 44
 

Default

I never really thought of this either but with an increasing number of subcategories this is perfect for not making the page huge and looks good.

Just wanted to show my appreciation, cheers.
__________________
www.anime-on-line.com
4.5.2 (live)
php 5.3.17
mysql 5.5.27
Reply With Quote
  #17  
Old 09-22-2004, 09:36 AM
 
chawla@moviesandgamesonli chawla@moviesandgamesonli is offline
 

Senior Member
  
Join Date: Mar 2003
Location: UK
Posts: 125
 

Default

Will this code work in verion 4.0.4?

Versdion 4.0.4
Reply With Quote
  #18  
Old 09-23-2004, 09:21 AM
 
Jason @ streetwerke Jason @ streetwerke is offline
 

Member
  
Join Date: Aug 2004
Posts: 21
 

Default

Cool mod. I didn't see any icon images initially. To make the icon images show up, I had to tell it the source.

Was:

Code:
[img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]

Now:

Code:
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]

Also, to get rid of the ItemList text from showing up at the bottom of the dialog box...I deleted this code:

Code:
<TD align="left" nowrap width="95%"><FONT class="ItemsList">{ $subcat.category|escape }</FONT> </TD>

The issue I have now is getting the icon images to line up horizontally. I have a couple subcategory titles that are long (two lines of text that is wrapped). When that happens, the text justifies to center vertical alignment...which pushes the icon image up throwing it out of alignment with the others. What's the easy fix for that?
__________________
Jason
streetwerke.com
X-Cart 4.0.11 Gold(AOM/Pconf/GiftReg/Affiliate)
MySQL 4.0.24-standard
PHP 4.3.11
Reply With Quote
  #19  
Old 09-23-2004, 01:40 PM
 
chawla@moviesandgamesonli chawla@moviesandgamesonli is offline
 

Senior Member
  
Join Date: Mar 2003
Location: UK
Posts: 125
 

Default

I have got this mod working, the only problem is the follwing message comes up There are no available products under this manufacturer. under the sub-cat. listing.

This is the code for the sub-categories


Quote:
{* $Id: subcategories.tpl,v 1.43 2004/06/24 12:31:10 svowl Exp $ *}
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"}



{include file="modules/Bestsellers/bestsellers.tpl"}
{/if}



{ include file="customer/main/navigation.tpl" }
{if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace: "/[\n]/":"
"}

{/if}
{capture name=dialog}
{assign var="tmp" value="0"}
{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table border="0" cellspacing="0" cellpadding="5">
{/if}
{ if %cat_num.index% is div by 4}
<tr>
{/if}
<td align="center">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]


{ $subcategories[cat_num].category|escape }</a>
</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{if $tmp and $products ne "" }
<BR clear="left">
<HR size="1" noshade>
{/if}
{if $products}
{if $sort_fields}
<DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV>




{/if}
{include file="customer/main/products.tpl" products=$products}
{/if}
{if $products eq "" and $tmp eq "0"}
{$lng.txt_no_products_in_man}
{/if}
{/capture}
{include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"}
{if $products eq ""}
{if $f_products ne ""}



{include file="customer/main/featured.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }

Any ideas where i'm going wrong?


Version 4.0.4
Reply With Quote
  #20  
Old 09-25-2004, 02:48 AM
 
chawla@moviesandgamesonli chawla@moviesandgamesonli is offline
 

Senior Member
  
Join Date: Mar 2003
Location: UK
Posts: 125
 

Default

Can someone please post the full code for this mod for version 4?

Thanks

Version 4.0.4
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 06:04 AM.

   

 
X-Cart forums © 2001-2020