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
  #181  
Old 01-23-2007, 12:26 AM
 
karentown karentown is offline
 

Senior Member
  
Join Date: Apr 2005
Posts: 129
 

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

I used the code exactly as above and now have two columns as seen here:

http://www.partypresence.co.uk/store/home.php?cat=248

How do I get the icons to show to the left of the headings (which part of the code do I edit?) and how can I get the columns to align left rather than centred like they are as I changed this part:

Code:
<td valign="top" align="center"> <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?catego ryid={$cat}{/if}">{/if}


and changed "center" to "left" but nothing happened?

Thanks for your help .... and thanks Padraic (Balinor) for pointing me to this mod
__________________
Running stores using the following:

2@ Version 4.0.19
2@ Version 4.1.9
1@ Version 4.1.11
Reply With Quote
  #182  
Old 01-25-2007, 05:38 AM
 
karentown karentown is offline
 

Senior Member
  
Join Date: Apr 2005
Posts: 129
 

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

OK, all done and working now on version 4.0.19 as seen here:

http://www.partypresence.co.uk/store/home.php?cat=248

The subcategories code is:

Code:
{* $Id: subcategories.tpl,v 1.43.2.9 2006/06/27 08:22:01 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 and $category_offers} <BR><BR> {include file="modules/Special_Offers/customer/category_offers_short_list.tpl"} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<BR><BR>{/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} <table cellspacing="5" width="100%" border="0"> <tr> {foreach from=$subcategories item=subcat} {if $tmp is div by 3} </tr><tr><td colspan="3"></td></tr><tr valign="top"> {/if} { if $tmp and $first_subcat ne "Y" } {assign var="tmp" value=0} {assign var="first_subcat" value="Y"} {/if} <td class="ColumnTitles" valign="top"><a title="{$subcat.description}" href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_web_dir}/default_image.gif{/if}" alt="" align="middle" <br><left> <font class="ItemsList">{ $subcat.category|escape }</font></a> {if $config.Appearance.count_products eq "Y"} {/if} {assign var="tmp" value=$tmp+1} {/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} <BR> { include file="customer/main/navigation.tpl" } {/if} <BR> {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" }

Hope that helps someone! Thanks so much for the emails Robbert .... couldnt have done it without you!!!!
__________________
Running stores using the following:

2@ Version 4.0.19
2@ Version 4.1.9
1@ Version 4.1.11
Reply With Quote
  #183  
Old 02-14-2007, 12:27 PM
 
Poweredag Poweredag is offline
 

Member
  
Join Date: Oct 2006
Posts: 11
 

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

mrkenzie's mod worked wonders. However, I have an appearance issue on one subcat only http://www.poweredag.com/home.php?cat=3 where the second row subcat title is to the right of the image. It only happens with this subcat. Any help would be appreciated.
__________________
www.poweredag.com
XCart Gold v4.3.1 [Unix]
Reply With Quote
  #184  
Old 02-15-2007, 11:37 PM
  BizzyB's Avatar 
BizzyB BizzyB is offline
 

Senior Member
  
Join Date: Sep 2006
Location: Australia
Posts: 102
 

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

Quote:
Originally Posted by Poweredag
mrkenzie's mod worked wonders. However, I have an appearance issue on one subcat only http://www.poweredag.com/home.php?cat=3 where the second row subcat title is to the right of the image. It only happens with this subcat. Any help would be appreciated.

Hi,
I havent tried the mod yet but just looking at your site - have you tried reducing the number of characters in the title to see if this makes a difference? Alternatively, have you tried making the image area slightly wider.

Just a thought.
__________________
Version = X-Cart 4.1.3 Gold
Status - Closed
Addon: Magnifier
OS = Windows
Western Australia
Reply With Quote
  #185  
Old 02-16-2007, 11:00 AM
 
Poweredag Poweredag is offline
 

Member
  
Join Date: Oct 2006
Posts: 11
 

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

Thanks BizzyB,

It was a title character issue as you suggested, but I solved it with a hyphen.
__________________
www.poweredag.com
XCart Gold v4.3.1 [Unix]
Reply With Quote
  #186  
Old 02-22-2007, 10:35 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

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

where do I find categories.php? to change the code
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #187  
Old 02-22-2007, 10:54 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

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

ok I found categories.php I have X-Cart v 4.1.x and can not find that code in categories.php?does anyone have this mod working on my version b/c I can't get any of them to work so far
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #188  
Old 02-23-2007, 02:48 AM
 
obaluba2 obaluba2 is offline
 

Senior Member
  
Join Date: Sep 2006
Posts: 152
 

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

Hey,

I'm using the same code as KarenTown but It just wont find my category images..

PHP Code:
{* $Idsubcategories.tpl,v 1.43.2.9 2006/06/27 08:22:01 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 and $category_offers}
<
BR><BR>
{include 
file="modules/Special_Offers/customer/category_offers_short_list.tpl"}
{/if}
{if (
$navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<BR><BR>{/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}
<
table cellspacing="5" width="100%" border="0">
<
tr>
{foreach 
from=$subcategories item=subcat}
{if 
$tmp is div by 3}
</
tr><tr><td colspan="3"></td></tr><tr valign="top">
{/if}
{ if 
$tmp and $first_subcat ne "Y" }
{
assign var="tmp" value=0}
{
assign var="first_subcat" value="Y"}
{/if}
<
td class="ColumnTitles" valign="top"><a title="{$subcat.description}href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_web_dir}/default_image.gif{/if}" alt="" align="middle" <br><left
<
font class="ItemsList">{ $subcat.category|escape }</font></a>
{if 
$config.Appearance.count_products eq "Y"}
 
{/if}
{
assign var="tmp" value=$tmp+1}
{/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}
<
BR>
{ include 
file="customer/main/navigation.tpl" }
{/if}
<
BR>
{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" 

I am using this on version 4.1.6 but its strange is the image location different in this version?

thanks for looking
__________________
4.0.1.18 & 4.1.6 & 4.1.9 & 4.1.11 & 4.2.2 & 4.3.2, 4.6.1
Reply With Quote
  #189  
Old 02-23-2007, 10:38 AM
 
Poweredag Poweredag is offline
 

Member
  
Join Date: Oct 2006
Posts: 11
 

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

Quote:
Originally Posted by obaluba2
Hey,

I'm using the same code as KarenTown but It just wont find my category images..

I am using this on version 4.1.6 but its strange is the image location different in this version?

I have v4.1.3 and used mrkenzie's mod on page 14. It worked like a charm for me. The images should be uploaded to the file system, and I called them from the admin section subcat menu. You can see it working here: http://www.poweredag.com/Commercial-p-1-c-3.html
Hope that answered your question.
__________________
www.poweredag.com
XCart Gold v4.3.1 [Unix]
Reply With Quote
  #190  
Old 04-07-2007, 03:08 AM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

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

Looks like a great mod. Unfortunately I've forgot to keep updated with this tread.
ANybody knows which code I need to know for 4.0.17? 4.0.X version will do.
I don't need the DSEFU code as I am using DSEFU PRO, but images are stored in the file system.

Thanks for the help.
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 05:00 AM.

   

 
X-Cart forums © 2001-2020