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

Subcategories with images
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 12-07-2003, 12:39 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default Subcategories with images

When a user clicks on a category they get a list of subcategories but I would like for each list item(subcategory) to have it's own image with the linktext underneath like this:

Link to example

What tpl files need to be edited and what would the code be to allow this?
Reply With Quote
  #2  
Old 12-30-2003, 04:11 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

customer/main/subcategories.tpl would need to be changed.

The code is:

Code:
{section name=cat_num loop=$subcategories} {assign var="tmp" value="1"} { if %cat_num.first% } <table border="0" cellspacing="0" cellpadding="5" width="100%"> {/if} { if %cat_num.index% is div by 3} <tr> {/if} <td> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] { $subcategories[cat_num].category|escape }</a> </td> { if %cat_num.last% } </tr> </table> {/if} {/section}

This is adapted from my own site, so feel free to jazz it up to what you need
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 12-30-2003, 10:51 AM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

Thanks funkydunk!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


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 04:27 AM.

   

 
X-Cart forums © 2001-2020