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
  #31  
Old 10-17-2004, 01:59 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Second time today.

I'm really depressed about it. Time for a drink!
Reply With Quote
  #32  
Old 10-17-2004, 02:01 PM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default

2 in one day. Sure you didnt start drinking earlier?
Reply With Quote
  #33  
Old 10-17-2004, 02:04 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Reply With Quote
  #34  
Old 10-24-2004, 09:48 PM
 
nhraracer241 nhraracer241 is offline
 

Member
  
Join Date: Jul 2004
Posts: 25
 

Default

May,
I think the fix for your problem is in this bit of code from subcategories.tpl

Quote:
<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"}


Delete |escape from $subcategories[cat_num].description so you have this:
Quote:
<td align=left><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
{$subcategories[cat_num].category|escape}</a>

{$subcategories[cat_num].description}
{if $config.Appearance.count_products eq "Y"}


and that should fix it.

Bobby
__________________
nhraracer241
1 X-Cart Version 4.1.10
2 X-Cart version 3.5.10
PHP 4.3.5
MySQL server 4.0.20-standard
Operation system Linux
Apache Web Server
Reply With Quote
  #35  
Old 10-26-2004, 08:40 AM
 
mcmann mcmann is offline
 

Newbie
  
Join Date: May 2004
Posts: 7
 

Default

THANK YOU!! That did the trick
__________________
May
_______

X-cart Pro 3.5.7
Linux
Reply With Quote
  #36  
Old 10-26-2004, 09:59 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

I would love to implement this mod but I am really new to x-cart and have version 4.0.5....and wonder if anyone has implemented on this version?

I read through the entire post and am afraid I would screw it up. Wonder if anyone can post exact steps to implement?

It would be appreciated greatly.

Thanks,

Dalmuti
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #37  
Old 10-31-2004, 10:53 AM
 
adamsteinhoff adamsteinhoff is offline
 

Member
  
Join Date: Sep 2004
Posts: 19
 

Default

Quote:
Originally Posted by nhraracer241
May,
I think the fix for your problem is in this bit of code from subcategories.tpl

Quote:
<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"}


Delete |escape from $subcategories[cat_num].description so you have this:
Quote:
<td align=left><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }">
{$subcategories[cat_num].category|escape}</a>

{$subcategories[cat_num].description}
{if $config.Appearance.count_products eq "Y"}


and that should fix it.

Bobby

Bobby,

Thanks for the code, but it still doesn't work on my site. Any other suggestions?

Adam
__________________
X-Cart 4.0.3
PHP 4.3.8
OS Linux
Perl 5.006001
XML 1.95.6
Reply With Quote
  #38  
Old 11-09-2004, 05:55 PM
 
grimscot grimscot is offline
 

Member
  
Join Date: Nov 2003
Location: Scotland
Posts: 22
 

Default

Quote:
Originally Posted by dalmuti
I would love to implement this mod but I am really new to x-cart and have version 4.0.5....and wonder if anyone has implemented on this version?


I have implemented this on 4.0.6 and it works with one small modification.

All you have to do is edit the skin1/customer/main/subcategories.tpl file

and replace the code with this

Code:
{* $Id: subcategories.tpl,v 1.43.2.2 2004/10/07 07:08:51 max Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.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} {* ==================== Sub categories mod start *} {section name=cat_num loop=$subcategories} { if %cat_num.first% } <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> {/if} { if %cat_num.index% is div by 2} <tr> {/if} <td align="center" valign="top"> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> <font size="3">{ $subcategories[cat_num].category|escape }</font></a> { $subcategories[cat_num].description|escape } {if $config.Appearance.count_products eq "Y"} {if $subcategories[cat_num].product_count} ({ $subcategories[cat_num].product_count } Products) {elseif $subcategories[cat_num].subcategory_count} ({ $subcategories[cat_num].subcategory_count } Subcategories) {/if} {/if} </td> { if %cat_num.last% } </tr> </table> {/if} {/section} {* ==================== Sub categories mod end *} {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_man} {/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" }
Reply With Quote
  #39  
Old 11-10-2004, 05:37 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

That works perfect in 4.05 as well.

Thanks so much for the code.

Dalmuti
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #40  
Old 11-11-2004, 08:57 AM
  EnriqueHavoc's Avatar 
EnriqueHavoc EnriqueHavoc is offline
 

eXpert
  
Join Date: Jul 2004
Posts: 232
 

Default

awesome! http://www.motionzoo.com/forum/images/smilies/more/kiss.gif
__________________
X-Cart 4.0.12
PHP 4.3.11
MySQL 4.0.23
Linux/Apache
Net::SSLeay 1.25
libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4
www.ewdhosting.com
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 12:30 PM.

   

 
X-Cart forums © 2001-2020