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 > Changing and adding new features
 
Thread Tools Search this Thread
  #21  
Old 11-23-2003, 04:09 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

Ok for starters in subcategories.tpl

replace

Code:
{capture name=dialog} {assign var="tmp" value="0"}

with

Code:
{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}

Right above the start of the Mod. This will lose the extra text saying that there are no products.

I'm working on the other issue.
Reply With Quote
  #22  
Old 11-24-2003, 08:09 PM
 
reaction reaction is offline
 

Newbie
  
Join Date: Jun 2003
Posts: 4
 

Default Category Display Issues

Hello adpboss,

Thank you for your mod, worked great.
Reply With Quote
  #23  
Old 10-12-2004, 12:40 PM
 
mcmann mcmann is offline
 

Newbie
  
Join Date: May 2004
Posts: 7
 

Default

First thanks for this MOD, it was just what I was looking for

I'm hoping someone can help me here

I'm using this MOD successfully on our site, with one problem.

If I use any html code in my description all the codes show in the description created next to the image.
http://www.wahmboutique.com/boutique/customer/home.php?cat=303
The code is applied correctly above the subcategory name when you open the subcategory.
http://www.wahmboutique.com/boutique/customer/home.php?cat=302

Is there a way to fix this and if so, can someone lead me in the right direction.

Thanks in advance,
May
__________________
Version 3.5.9
Reply With Quote
  #24  
Old 10-14-2004, 09:33 PM
 
nhraracer241 nhraracer241 is offline
 

Member
  
Join Date: Jul 2004
Posts: 25
 

Default

May,
Can you post your subcategories.tpl and your subcat description for Lil Mermaids?

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
  #25  
Old 10-16-2004, 09:32 AM
 
mcmann mcmann is offline
 

Newbie
  
Join Date: May 2004
Posts: 7
 

Default

I'll get the code in a bit, but for the description - the only html used in the description right now is a
.

May
Reply With Quote
  #26  
Old 10-17-2004, 12:03 PM
 
adamsteinhoff adamsteinhoff is offline
 

Member
  
Join Date: Sep 2004
Posts: 19
 

Default

I was hoping that someone would help me in troubleshooting this script. I implemented the script and see the extra columns with icons, but I don't get the descriptions or product counts.

Here is a link to one of my categories: http://www.eartpark.com/home.php?cat=253

Here is a link to one of the sub-categories: http://www.eartpark.com/home.php?cat=263

As you can see, there is a text description in the sub-category. Why would it not display?

Here is the code that I am using in subcategories.tpl:

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} {* ==================== Sub categories mod end *} {if $tmp and $products ne "" } <br clear=_all>{*<hr size=1 noshade>*} {/if} {if $products ne "" and $tmp eq "0"} {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|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {if $products eq "" and $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} { include file="customer/main/navigation.tpl" }
__________________
X-Cart 4.0.3
PHP 4.3.8
OS Linux
Perl 5.006001
XML 1.95.6
Reply With Quote
  #27  
Old 10-17-2004, 12:05 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

Add this to get the description

Code:
{$products[product].descr|truncate:300:"...":true}
Reply With Quote
  #28  
Old 10-17-2004, 01:51 PM
 
adamsteinhoff adamsteinhoff is offline
 

Member
  
Join Date: Sep 2004
Posts: 19
 

Default

Quote:
Originally Posted by adpboss
Add this to get the description

Code:
{$products[product].descr|truncate:300:"...":true}

Thanks for the quick reply, but shouldn't the description for the subcategories come from something that looks like this? The code you sent looks like what I would use for product descriptions...

Code:
{$subcategories[cat_num].category|escape}
__________________
X-Cart 4.0.3
PHP 4.3.8
OS Linux
Perl 5.006001
XML 1.95.6
Reply With Quote
  #29  
Old 10-17-2004, 01:53 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

You are correct. I have made a bo-bo.


Reply With Quote
  #30  
Old 10-17-2004, 01:56 PM
  lildawg's Avatar 
lildawg lildawg is offline
 

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

Default

WHAT??? You of all people have made a boo bo? I never thought I would see the day.
__________________
www.earthslove.com
X-Cart 4.6.6
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 11:34 AM.

   

 
X-Cart forums © 2001-2018