View Single Post
  #120  
Old 06-09-2006, 05:19 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

One of my all time favorite mods, but if you have your images in the filesystem (which is recommended for speed reasons) this mod will continue to pull the images from the db, as it is hard-coded in. To fix this, replace this:

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

with this

Code:
{if $subcategories[cat_num].icon_url}[img]{$subcategories[cat_num].icon_url}[/img]{else}[img]{$xcart_web_dir}/default_icon.gif[/img]{/if}

You'll want to add in a height or width as well, as this will pull the full-sized image without it. You should notice a huge speed improvement on your category pages, particularly if you have a ton of sub-categories. The {if} statement simply shows the default_icon.gif image if there is no sub-category icon present. Enjoy!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote