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
  #21  
Old 09-25-2004, 11:15 AM
 
Jason @ streetwerke Jason @ streetwerke is offline
 

Member
  
Join Date: Aug 2004
Posts: 21
 

Default

I haven't fully sorted it out for 4.0.4 yet, so I'm not going to post my complete code. I'm busy adding content right now, so making things look better isn't on my agenda. In fact, after initially playing with this mod I've reverted back to original code. It was nice to take a break from entering products though!

When I get some time later on, and if I figure it out...I'll post the code that works for 4.0.4. I'm guessing somebody else will beat me to it though.
__________________
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
  #22  
Old 09-27-2004, 08:35 PM
 
doggifts doggifts is offline
 

Newbie
  
Join Date: Sep 2004
Posts: 8
 

Default

chawla, tried your code and received the same issue about the manufacture. I will take a look and see if we can not figure it out.
__________________
x-cart 4.0.12
Reply With Quote
  #23  
Old 10-07-2004, 01:34 PM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default Enjoy

{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya 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 $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}
{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table border=0 cellspacing=5 width=100%>
{/if}
{if $smarty.section.cat_num.index is div by 4}
<tr valign="top">
{/if}
<td valign="top" align=center>
{if $subcategories}{if $tmp}[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]{/if}{/if}

<a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
{$subcategories[cat_num].category|escape}</a>
{ $subcategories[cat_num].description|escape }
{if $config.Appearance.count_products eq "Y"}
[<font class=Text>{if $subcategories[cat_num].product_count}{ $subcategories[cat_num].product_count }
{$lng.lbl_products}{elseif $subcategories[cat_num].subcategory_count}
{ $subcategories[cat_num].subcategory_count }{$lng.lbl_categories|lower}{/if}
</font>]
{/if}
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{if $tmp and $products ne "" }
<BR clear="left">
<HR size="1" noshade>
{/if}
{if $products}
{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/specials.tpl"}
{/if}
{/if}
{ include file="customer/main/navigation.tpl" }
__________________
X-CART GOLD: 4.0.14

Operating system Linux
Apache version 1.3.33 (Unix)
PERL version 5.8.1
PHP version 4.3.10
MySQL version 4.0.22-standard
Reply With Quote
  #24  
Old 10-07-2004, 01:50 PM
 
Jason @ streetwerke Jason @ streetwerke is offline
 

Member
  
Join Date: Aug 2004
Posts: 21
 

Default

Nice job sabrina. I tried it in 4.0.4, and it's fine.
__________________
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
  #25  
Old 10-07-2004, 02:00 PM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default

No problem.
__________________
X-CART GOLD: 4.0.14

Operating system Linux
Apache version 1.3.33 (Unix)
PERL version 5.8.1
PHP version 4.3.10
MySQL version 4.0.22-standard
Reply With Quote
  #26  
Old 10-23-2004, 06:28 AM
 
BHMedia BHMedia is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 71
 

Default

question - this mod works but what do i have to change to get a seperate image? Like where do i upload those images? Any idea's? 4.0.3
Reply With Quote
  #27  
Old 01-13-2005, 06:10 PM
 
cigarbox cigarbox is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: Boston, Ma
Posts: 31
 

Default

Will this mod work with 4.0.8 ?
__________________
X-cart Gold - 4.08
Reply With Quote
  #28  
Old 01-13-2005, 06:14 PM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Quote:
Originally Posted by BHMedia
question - this mod works but what do i have to change to get a seperate image? Like where do i upload those images? Any idea's? 4.0.3

You need to add the Image as a an Icon for each sub-cat. In your Admin area modify the sub-cat and add the Image you like in the Icon area.

Kind regards,
Ricky
__________________
X-CART Gold version 4.0.14 & 4.1.11
Apache Version 1.3.29 (Unix)
EWDHosting-Quality X-cart Hosting
We will always sell you the right shoe and the left one is free.
Reply With Quote
  #29  
Old 01-14-2005, 12:25 PM
 
cigarbox cigarbox is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: Boston, Ma
Posts: 31
 

Default

worked great for me ...thanks
__________________
X-cart Gold - 4.08
Reply With Quote
  #30  
Old 01-20-2005, 01:54 PM
 
Chris B Chris B is offline
 

eXpert
  
Join Date: Oct 2002
Posts: 226
 

Default

Is there a method to use the file system url in this mod?

For example:

https://mydomainname.com/icon.php?categoryid=1

Is how an image is displayed using this mod. Since we have our images in the file system format, I would like the images to be displayed using: https://mydomainname.com/files/category_1.jpg.

The reason for this would be to save the refresh time once a visitor has downloaded all the subcategory icons. (The images would be cached on the surfers web browser already.)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 10:58 AM.

   

 
X-Cart forums © 2001-2020