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
  #81  
Old 03-31-2005, 01:33 AM
 
alexg alexg is offline
 

Newbie
  
Join Date: Jan 2005
Posts: 5
 

Default

I added this mod (Herman Steijn) to my 4.0.13 localhost machine with the fashion mosaic template. Works well. When I tried to go back to my original subcategories.tpl file nothing happens i.e. the new mod is still in place. I restarted my machine but no change. Any ideas?

Above problem solved. I was editing template files outside of the admin console which caused refresh problems in the template sub-system.

On a seperate note, I can't get the sub-category descriptions to show. Some people have suggested removing the "escape" from the second instance of it appearing in the code. This didn't work for me. (I'm using 4.0.13).

Regards,
__________________
alexg
X-Cart 4.0.13
PHP 4.3.10
MySQL 4.1.8
Apache 1.3.33
WinXP Pro SP1
Reply With Quote
  #82  
Old 04-05-2005, 02:08 PM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default I can't get the Descriptions

I can't seem to get the descriptions to display at all for 4.0.12

I've tried taking out the "|escape" I've tried different things nothing seems to work can anyone help, please?

Code:
{section name=cat_num loop=$subcategories} { if %cat_num.first% } <table width="548" border="0"> {/if} {if $smarty.section.cat_num.index is div by 2} </tr><tr> {/if} <td width="122" height="100"> <A href="/home/{ $subcategories[cat_num].categoryid }/{ $subcategories[cat_num].category|replace:" ":"_" }.html"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a> </td> <td width="132" class="product_desc" height="100"> <A href="/home/{ $subcategories[cat_num].categoryid }/{ $subcategories[cat_num].category|replace:" ":"_" }.html"> <FONT class="ItemsList">{ $subcategories[cat_num].category|escape }</FONT></A> { $subcategories[cat_num].description|escape }</td> { if %cat_num.last% } </tr></table> {/if} {/section}
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #83  
Old 04-05-2005, 05:42 PM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

I've had the same problems with all the versions that I've tried this mod in. Could it be a php setting that needs to be turned on or off? Any modules or settings that need to be enabled or disabled?

I know I've spent at least 10 hrs trying to make this work and nothing I do seems to work. It's actually ridiculous when you think about it. All that time on a mod that's been written and tested.

__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote
  #84  
Old 04-06-2005, 06:43 AM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default Figured it out for 4.0.12

After thinking about this problem with the descriptions not displaying on my version of 4.0.12. I began wondering if the SQL Query was even pulling out the description. And Tada, that's the problem right there.

(newbies to php and SQL queries be wary)

If you look at the file /*xcart_dir*/include/categories.php you will find on lines 74-78 (in version 4.0.12 at least) the code that looks like this:

Code:
if ($short_list) { $to_search = "$sql_tbl[categories].categoryid,$sql_tbl[categories].parentid, $sql_tbl[categories].categoryid_path,$sql_tbl[categories].category, $sql_tbl[categories].product_count,$sql_tbl[categories].avail, $sql_tbl[categories].order_by"; } else { $to_search = "$sql_tbl[categories].*"; }

It doesn't take much to see that if X-Cart pulls back the categories with $short_list set to TRUE (the default for category pages) then the description will not be included. so for the first "$to_search =" statement above just add ,$sql_tbl[categories].description between the quotes at the end. now your description variable will have a value in the template files.
so the {$subcategories[cat_num].description|escape} works! I have longer descriptions than that so I am going to see if the whole |truncate statement will work (i'm sure it will).

Thanks for this great mod.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #85  
Old 05-10-2005, 04:22 PM
 
lusterca lusterca is offline
 

Member
  
Join Date: Apr 2005
Posts: 24
 

Default

Thanks Jason,
the description finally shows up. GREAT!!!
__________________
Elegant Blown Glass Oil Candles
http://www.luster.ca/images/logo.jpg
Reply With Quote
  #86  
Old 05-22-2005, 06:35 PM
 
MetalLaw MetalLaw is offline
 

Advanced Member
  
Join Date: Jan 2005
Location: San Diego, California
Posts: 42
 

Default Re: this on is for version 4.0.11

I used weckie's mod from above. The way it is set up now is the subcategory title displays next to the LOWER RIGHT of the icon. How can I have it display next to the UPPER RIGHT of the icon?
__________________
X-Cart 4.0.9
Reply With Quote
  #87  
Old 06-09-2005, 01:01 AM
 
x-light x-light is offline
 

Member
  
Join Date: Mar 2005
Posts: 29
 

Default excellent mod

Hi guys,

Thanks for providing this great mod. I got it working in about 5 minutes with 4.0.13. Great stuff!

~x-light
__________________
X-Cart 4.xx Gold
Enterprise Linux
Reply With Quote
  #88  
Old 07-19-2005, 11:52 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

Hi,

I do appreciate this is a great mod.

However i need an addtional option with this one. i.e

When on mouseover the sub-categories, the corresponding sub-categories menu for that sub-category should be displayed and clicking the menu will cut off an extra step to move forward.

Have a look at this image and will get my point.

http://www.just4naija.com/ab/product.gif
Reply With Quote
  #89  
Old 07-20-2005, 08:47 AM
 
mirajtrading mirajtrading is offline
 

Member
  
Join Date: May 2005
Posts: 14
 

Default Thanks

Thanks.

Miraj Trading
Phone: 1-888-331-4233
Fax: 613-798-8072
URL: www.mirajtrading.com
__________________
X-Cart version 4.0.9
Reply With Quote
  #90  
Old 07-24-2005, 05:47 AM
 
mt mt is offline
 

Member
  
Join Date: Mar 2005
Location: Australia!!
Posts: 16
 

Default HI

Does this work with 10.0.14 i am cautious about changing the tpl in case it does something irreversible.

Matt

x-cart gold 10.0.14 Fashion skin.14
__________________
x-cart gold 4.0.14
fashion skin 4.0.14

Whatever remains is the solution.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 07:32 AM.

   

 
X-Cart forums © 2001-2020