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

Sub-Category Thumbnails?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-18-2005, 01:09 PM
 
MetalLaw MetalLaw is offline
 

Advanced Member
  
Join Date: Jan 2005
Location: San Diego, California
Posts: 42
 

Default Sub-Category Thumbnails?

The way my store is set up is that after a customer selects a main category in the left-hand menu, he is directed to a listing of sub-categories. I noticed that it is possible to assign icons to categories. I tried putitng images in there and they saved fine but are not showing up in the live store. What are these Icons? Are they NOT thumbnails? Is there a way to put thumbnails in the subcategory listings?
__________________
X-Cart 4.0.9
Reply With Quote
  #2  
Old 05-21-2005, 03:27 PM
 
MetalLaw MetalLaw is offline
 

Advanced Member
  
Join Date: Jan 2005
Location: San Diego, California
Posts: 42
 

Default

no one knows...
__________________
X-Cart 4.0.9
Reply With Quote
  #3  
Old 05-28-2005, 07:48 AM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default

http://forum.x-cart.com/viewtopic.php?t=19698
__________________
"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
  #4  
Old 10-11-2005, 07:08 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default did you get it to work

I'm having the same problem MetalLaw did you ever figure out what the trouble was this link does not work?

http://forum.x-cart.com/viewtopic.php?t=19698
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #5  
Old 10-12-2005, 01:58 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

search custom mods forum for mods to do this
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 10-30-2005, 01:32 AM
 
tangodancer tangodancer is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 32
 

Default

All, Hope this helps. I got this from X-cart technical support. It works well for me and my version ... I would just like to know how to turn the thumbnail/icon into a hyperlink that matches the category title. If anyone knows how to do that please post a reply.

X-Cart shows a category icon only if the category has subcategories only and no products in it.

If you would like to show category icon near each category name in the customer's area, you should modify x-cart template skin1/customer/main/subcategories.tpl and replace in the file

{if $subcategories}
{if $tmp} [img]{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img] {/if} <TABLE border="0" cellspacing="5"> {foreach from=$subcategories item=subcat} <TR>
<TD align="left" nowrap width="95%"><FONT class="ItemsList">{ $subcat.category|escape }</FONT>
</TD>
<TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if}
{/if}</FONT></TD>
</TR>
{/foreach}
</TABLE>
{/if}


with

{if $subcategories}
<TABLE border="0" cellspacing="5">
{foreach from=$subcategories item=subcat}
<TR>
<TD align="left" nowrap width="95%">[img]{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/icon.php?categoryid={$subcat.categoryid}{/if}[/img]<FONT class="ItemsList">{ $subcat.category|escape }</FONT>
</TD>
<TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if}
{/if}</FONT></TD>
</TR>
{/foreach}
</TABLE>
{/if}
__________________
Tango Dancer
X-Cart Gold Version 4.0.14, X-Affiliate, AOM, X-RMA
Reply With Quote
  #7  
Old 11-10-2005, 03:55 PM
 
EJBogusch EJBogusch is offline
 

Newbie
  
Join Date: Nov 2005
Posts: 1
 

Default

This should link your thumbnail.


{if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if}
{/section}
{if $subcategories}
<TABLE border="0" cellspacing="5">
{foreach from=$subcategories item=subcat}
<TR>
<TD align="left" nowrap width="95%">
[img]{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/icon.php?categoryid={$subcat.categoryid}{/if}[/img]

<FONT class="ItemsList">{ $subcat.category|escape }</FONT>
</TD>
<TD align="right" nowrap><FONT class="Text">
{if $config.Appearance.count_products eq "Y"}
{if $subcat.product_count}{ $subcat.product_count }
{$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if}
{/if}</FONT></TD>
</TR>
{/foreach}
</TABLE>


{/if}
__________________
Version 4.0.16
Reply With Quote
  #8  
Old 01-11-2006, 11:30 AM
 
kostia kostia is offline
 

Member
  
Join Date: Nov 2005
Posts: 15
 

Default

I have the subcategories.tpl showing icon on top then categories under. this is the code I got but it's not showing icons if category has no subcategory/product. can anyone hlep please.

Code:
{* $Id: subcategories.tpl,v 1.43.2.7 2005/10/28 05:23:51 svowl Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {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]/":" "} {/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} {if $subcategories} {if $tmp and $first_subcat ne "Y"} <TABLE border="0" cellspacing="5" width="100%"> <TR> <TD valign="top" rowspan="{count value=$subcategories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD> </TR> </TABLE> {assign var="first_subcat" value="Y"} {/if} <TABLE border="0" cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <TR> {*if $tmp and $first_subcat ne "Y"} <TD valign="top" rowspan="{count value=$subcategories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD> {assign var="first_subcat" value="Y"} {/if*} <TD align="left" width="95%"><FONT class="ItemsList">{ $subcat.category|escape }</FONT> </TD> <TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</FONT></TD> </TR> {/foreach} </TABLE> {/if} {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} { 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 ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }
__________________
Xcart 4.0.17 GOLD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:37 PM.

   

 
X-Cart forums © 2001-2020