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

Mod for subcategories in columns with descriptions and icons

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #171  
Old 10-10-2006, 04:30 PM
 
jessej jessej is offline
 

Member
  
Join Date: Oct 2006
Posts: 26
 

Default Re: Mod for subcategories in columns with descriptions and icons

I tried it but it makes my category show up with nothing in it? Any help would be greatly appreciated.
__________________
Version 4.1.3
X-Cart Pro
http://www.mallclub.com
Reply With Quote
  #172  
Old 10-16-2006, 11:12 AM
 
Zak Zak is offline
 

Member
  
Join Date: May 2004
Posts: 18
 

Default Re: Mod for subcategories in columns with descriptions and icons

Hello,

I've reviewed this whole thread and have seen mention of this, but no working solutions. I'm currently working with a X-Cart version 4.0.19 and am trying to get the subcategory descriptions to show up under the category title. I've tried:
{ $subcategories[cat_num].description|escape }

but absolutely nothing happens using that. I suspect I'm calling this wrong, but don't have a clue how else it might be called. Any help on this much appreciated. Thanks.
__________________
Zak
Xcart Version 4.18
Reply With Quote
  #173  
Old 11-13-2006, 07:56 AM
 
IAPDirect.com IAPDirect.com is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 56
 

Default Re: Mod for subcategories in columns with descriptions and icons

I am using the version shown below and it shows that there are no subcategories available with some clickable links that link back to the main page. Can someone please clarify what code needs to be replaced in my version?

thanks.
__________________
-Peter
Version 4.1.10
Reply With Quote
  #174  
Old 11-16-2006, 07:53 AM
 
ptcsstore ptcsstore is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 34
 

Default Re: Mod for subcategories in columns with descriptions and icons

Ok, I have this mod working sort of, It is displaying my categories, but for some reason it starts with a blank space, and does not include my last category. The last category that should appear is dancing poles. It shows up fine in the sidebar menu. Thanks. http://72.34.43.238/store/

Code:
{* $Id: subcategories.tpl,v 1.43.2.7 2005/10/28 05:23:51 svowl Exp $ *} {capture name=dialog} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}{/if}<br><br> {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 width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> {/if} { if %cat_num.index% is div by 3} <tr> {/if} <td align="center" valign="top"> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> {if $subcategories[cat_num].icon_url}<img src="{$subcategories[cat_num].icon_url}" border="0" style="padding-bottom: 5px;">{else}<img src="{$xcart_web_dir}/default_icon.gif" border="0" style="padding-bottom: 5px;">{/if} </a><br /><br /> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> <b>{ $subcategories[cat_num].category|escape }</b></a><br><br> { $subcategories[cat_num].description|escape }</td> { if %cat_num.last% } </tr> </table> {/if} {/section} {if $total_pages gt 2} <br> { include file="customer/main/navigation.tpl" } {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_categories_home content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} <BR><BR> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }
__________________
Bryan Edwards
X-cart Version 4.1.3
Reply With Quote
  #175  
Old 11-21-2006, 01:05 PM
 
sandersdesign sandersdesign is offline
 

Member
  
Join Date: Oct 2005
Posts: 26
 

Default Re: Mod for subcategories in columns with descriptions and icons

hi, great mod, but how do I show sub-subcategories, I’d like to show the following;

Subcategory Title
Sub-subcategory Title - Sub-subcategory Icon

Any help welcome, thanks
__________________
www.sandersdesign.net
X-Cart Gold v4.0.16, Unix
Reply With Quote
  #176  
Old 11-28-2006, 10:05 AM
 
boxerbay boxerbay is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 170
 

Default Re: Mod for subcategories in columns with descriptions and icons

why do i get bracket img bracket displaying instead of the image?

Code:
{* $Id: subcategories.tpl,v 1.34 2003/10/06 10:04:00 svowl Exp $ *} { include file="location.tpl" } {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} <p> {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <p> { include file="customer/main/navigation.tpl" } {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":"<BR>"}<P>{/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} {* ==================== Sub categories mod start *} {section name=cat_num loop=$subcategories} { if %cat_num.first% } <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> {/if} { if %cat_num.index% is div by 2} <tr> {/if} <td align="center" valign="top"> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> <font size="3">{ $subcategories[cat_num].category|escape }</font></a> { $subcategories[cat_num].description|escape } {if $config.Appearance.count_products eq "Y"} {if $subcategories[cat_num].product_count} ({ $subcategories[cat_num].product_count } Products) {elseif $subcategories[cat_num].subcategory_count} ({ $subcategories[cat_num].subcategory_count } Subcategories) {/if} {/if} </td> { if %cat_num.last% } </tr> </table> {/if} {/section} {* ==================== Sub categories mod end *} {if $tmp and $products ne "" } <br clear=_all><hr size=1 noshade> {/if} {include file="customer/main/products.tpl" products=$products} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category_name|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} <p> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

Version 3.5.12
http://www.miamistartruckparts.com/shop/customer/home.php?cat=88
__________________
Thanks,
Alex.
Too many version to list. I have some on 3.51 and some on the latest version.
Reply With Quote
  #177  
Old 11-28-2006, 10:41 AM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: Mod for subcategories in columns with descriptions and icons

In your code you have [img] this should be changed to a valid img tag i.e.:
Code:
<img source=blah>
The posts got messed up when they upgraded a while back, so in all of the code that was posted, the img tags are messed up. Just make it a valid img tag and it will work.
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #178  
Old 11-28-2006, 11:13 AM
 
boxerbay boxerbay is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 170
 

Default Re: Mod for subcategories in columns with descriptions and icons

U Da Man!
__________________
Thanks,
Alex.
Too many version to list. I have some on 3.51 and some on the latest version.
Reply With Quote
  #179  
Old 11-28-2006, 07:37 PM
 
xsgear xsgear is offline
 

Newbie
  
Join Date: Jun 2004
Posts: 8
 

Default Re: Mod for subcategories in columns with descriptions and icons

After applying this mod I now have my site navagation showing twice at the top of page, where as before it was showing only once. What can I do to get it back to showing only once?

Adrenalin Village :: Paintball
Adrenalin Village :: Paintball
__________________
dcastle
4.0.19
Reply With Quote
  #180  
Old 12-14-2006, 09:13 AM
 
ryan c. ryan c. is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 58
 

Default Re: Mod for subcategories in columns with descriptions and icons

Well after digging thru this thread I finally got this to work. I am running 4.0.17 here is my subcategories.tpl for anyone interested:

Code:
{* $Id: subcategories.tpl,v 1.43.2.7 2005/10/28 05:23:51 svowl Exp $ *} {if $products|@count eq 1} {assign var="prodURL" value="product.php?productid=`$products.0.productid`&cat=$cat&page=1"} {php} header( "Location: " . $GLOBALS[smarty]->_tpl_vars[prodURL] ); {/php} {/if} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} <P> {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <P> {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/category_offers_short_list.tpl} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":"<BR>"}<P>{/if} {capture name=dialog} {assign var="tmp" value="0"} {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 3} </tr><tr valign="top"> {/if} <td valign="top" align="center"><ceter> <a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }"> {if $subcategories[cat_num].icon_url}<IMG height="100" border="0" alighn="middle" src="{if $subcategories[cat_num].icon_url}{$subcategories[cat_num].icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}">{/if} </a><br><b><center><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }"> {$subcategories[cat_num].category|escape}</a> { $categories[cat_num].description|escape } </center></b><p> </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} {if $total_pages gt 2} <BR> { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} <P> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

And here is how it looks:
http://www.coopers-seafood.com/shop/home.php?cat=15
BTW I do store my files in the file system and NOT the database.

Thanks for all the help in this thread.
__________________
Version 4.1.8
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:09 PM.

   

 
X-Cart forums © 2001-2020