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

Subcategories Icon

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 12-15-2005, 01:29 PM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default

Quote:
Originally Posted by dprice.sf
"No matching products found"

Hi,

I think you have change in products.tpl file:

from

Code:
{else} {$lng.txt_no_products_found}

to

Code:
{else} {* $lng.txt_no_products_found *}
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Reply With Quote
  #22  
Old 12-15-2005, 01:53 PM
 
dprice.sf dprice.sf is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 66
 

Default

thanks 27stars - that did it
__________________
Version 4.0.14
Reply With Quote
  #23  
Old 12-18-2005, 08:36 PM
  ddsman's Avatar 
ddsman ddsman is offline
 

Member
  
Join Date: Jul 2005
Posts: 21
 

Default Great Mod - But What if you are using File System

This mod works great if you are using the database to store the category images. But what if you change to a file system? When I click on the properties of a subcategory image I get:

Code:
http://www.profilespa.com/onlinestore/icon.php?categoryid=277

but if I check an item image I get:

Code:
http://www.profilespa.com/onlinestore/images/catalog/t_13011.gif

Since my DB performance sucks I would really like to change this to use my file system. Can I do this?

The code i'm using for subcategories.tpl in version 4.017 is:
Code:
{* $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 2} </tr><tr valign="top"> {/if} <td valign="top" width="70" align="center"> <a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] </a> </td> <td align=left><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} </td> { if %cat_num.last% } </tr></table> {/if} {/section} {if $tmp and $products ne "" } <br clear=_all>{*<hr size=1 noshade>*} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {include file="customer/main/products.tpl" products=$products} {/capture} {include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" 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" }
__________________
Danny Mac -
Version 4.0.17
http://www.profilespa.com
PROFILE Spa & Salon for Men
Irvine, CA - Orange County
Reply With Quote
  #24  
Old 12-25-2005, 02:46 PM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Default

Hey since a helpful person on here told me how to use Dreamweaver to alter my code I decided to try this mod and it works great ! Now the only problem is since I've been lazy and not bothered clipping my images to size is there a little bit of code I can put in there to display the icon/image at a certain size like 200x200 or 150 x 150 ? as i use the larger image in product detail too which prevents me running a batch job in Fireworks.

Thanks
and Merry Christmas
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
Reply With Quote
  #25  
Old 01-06-2006, 07:10 PM
 
Touchy Touchy is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: USA
Posts: 49
 

Default Description not coming through

Hi, This mod is great!!

One question though. I have copied both versions into my cart to try them out and they both work except for the won't bring in the sub category descriptions????

The piece of code I think is try to call it out is:

<td align=left><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"}

However it won't bring it in. Can anybody help

I tried searching for subcategories[cat.num]. Is this a database input?? I do not have a xcart_subcategories database.

Any help to get this working would be great.
__________________
Thanks,

Version 4.0.17
Reply With Quote
  #26  
Old 01-10-2006, 02:20 PM
 
Touchy Touchy is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: USA
Posts: 49
 

Default Subscriptions Icon

Hey manage to get this working with help from 27stars and anoher forum link

Thought I'd shared in case anybody else is looking at this.

You need to go to the categories.php file and change the code

Original Code:

Code:
if ($short_list) { $to_search = "$sql_tbl[categories].categoryid,$sql_tbl[categories].parentid,$sql_tbl[categories].categoryid_path,$sql_tbl[categories].category,$sql_tbl[categories].product_count,$sql_tbl[categories].avail,$sql_tbl[categories].order_by"; } else { $to_search = "$sql_tbl[categories].*";

New code:

Code:
if ($short_list) { $to_search = "$sql_tbl[categories].categoryid,$sql_tbl[categories].description,$sql_tbl[categories].parentid,$sql_tbl[categories].categoryid_path,$sql_tbl[categories].category,$sql_tbl[categories].product_count,$sql_tbl[categories].avail,$sql_tbl[categories].order_by"; } else { $to_search = "$sql_tbl[categories].*";

Hope this helps.

The only thing else I'm trying to do is get the sub category description to display HTML like the product descriptions.

Can anybody help.
Still not very code with code.

Thanks
__________________
Thanks,

Version 4.0.17
Reply With Quote
  #27  
Old 01-30-2006, 03:55 PM
 
Glowinafuse Glowinafuse is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 80
 

Default

This is what I have been looking for...

This helps with having over 400 categories

Thanks for posting...
__________________
Gold 4.1.11
www.houseoftropicals.com/store
Reply With Quote
  #28  
Old 01-31-2006, 08:31 PM
 
Glowinafuse Glowinafuse is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 80
 

Default

I tried to get the names of the sub cats under the pic. But no help... I tried the left to center. But it did nothing.

Can someone be more specific on what I need to do.

Thanks in advance,
__________________
Gold 4.1.11
www.houseoftropicals.com/store
Reply With Quote
  #29  
Old 03-02-2006, 12:53 PM
 
smartoption smartoption is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: York UK
Posts: 87
 

Default

This is great, i have managed to get the list into rows of 3's, i have also changed the icon to the null image but this leaves a gap between the rows. Can anyone tell me how to close these gaps up or make it so the category does not look for an image?

Thanks
__________________
X-Cart Gold - Version 4.0.18
Reply With Quote
  #30  
Old 03-04-2006, 07:03 PM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default

Quote:
Originally Posted by smartoption
Can anyone tell me how to close these gaps up or make it so the category does not look for an image?

Hi,

Can you provide link to that page?
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
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 09:58 PM.

   

 
X-Cart forums © 2001-2020