| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Mod for subcategories in columns with descriptions and icons | ||||
|
|
Thread Tools | Search this Thread |
#201
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
I have read through this thread & am a bit confused as to what code I need to use to get the sub-category thumbs to show up. I tried a few different things that were shown here but could not get it to function properly so I restored the original subcategories.tpl file to our site.
Can someone post the latest, functional code again please?
__________________
- - Versions: 4.1.10 and 4.3.0 (see post for which cart) "Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison "Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982 "Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes |
|||||||
#202
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
__________________
Greg X-CART Gold 4.1.10 |
|||||||
#203
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
mrkenzie post #137 does indeed work with v4.1.7. Thank you!
When checking the html output it seems that the table cells are not closed ie: <td>subcategory icon <td>subcategory icon etc. with no closing </td> tags. Anyone know where/how to fix this? FIXED: code: subcategories.tpl: _________________________________________________ {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 }"><font class="ItemsList">{ $subcat.category|escape }</font><br /><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/default_image.gif{/if}" alt="" /> </a></td> {if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {else} 0 Products {/if} {/if} {assign var="tmp" value=$tmp+1} {/foreach} </tr></table> {/if} __________________________________________________ ____
__________________
maineiac x-cart gold v4.0.18 x-cart gold v4.1.8 Last edited by maineiac : 06-05-2007 at 05:54 AM. Reason: resolved |
|||||||
#204
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
Quote:
the post on page 14 works (mrkenzie's, post #137 from the link above) for 4.1.8. tested. you just need to save your category icons to the filesystem and not the database. i have yet to see a working code for calling images from the database. you can set where the images are saved thru the images location in your x-cart admin page. hope that helps. i seem to be having an issue with the descriptions though. if i use the wysiwyg mode to type in the description it shows the html tags when you hover over the subcat title. has anyone been able to make it work with wysiwyg mode without showing the html tags?
__________________
x-cart 4.1.8 |
|||||||
#205
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
I actually got it working some time last week. I just have been so busy with modifying the cart & other things at work I did not get back here to post.
Thanks for the help!
__________________
- - Versions: 4.1.10 and 4.3.0 (see post for which cart) "Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison "Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982 "Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes |
|||||||
#206
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
I've implemented the code listed on page 14 of this thread and found it to be straight forward to get working. I have, however, noticed that the subcategory description alongside the image is a link (good) with the alt tag being the sub category description (also good) except it displays the <h1> and <\h1> header tags.
Can anyone point me towards where the subcategory description header is formed so that I can use it before the <h1> tags are added? ...or does anyone know how to strip leading/trailing characters from strings?
__________________
X-Cart GOLD Plus v4.5.4 CDSEO Pro ewdhosting Dedicated Server Dedicated SSL Stone Edge OM |
|||||||
#207
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
As has been the case with all my posts I shall now answer my own question:
To remove the header 1 tags from the title of the subcategory links using the code on page 14 I have used the strip_tags variable modifier as follows: Code:
I just love it when code does what you want it to!
__________________
X-Cart GOLD Plus v4.5.4 CDSEO Pro ewdhosting Dedicated Server Dedicated SSL Stone Edge OM |
|||||||
#208
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
How do I get the code below for message 182 to be centered under image?
Please help Jason Quote:
|
|||||||
#209
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
I have tried the code from post 137 and I see no difference. What could I be doing wrong?
I have ver 4.1.8. I made the changes to skin1.css, include/categories.php, and skin1/customer/main/subcategories.tpl. Uploaded the files, refreshed my frontpage of the store and no changes.... Thanks for the help.
__________________
Bryan Edwards X-cart Version 4.1.3 |
|||||||
#210
|
|||||||
|
|||||||
Re: Mod for subcategories in columns with descriptions and icons
I can't believe it that X-Cart still hasn't fix this "problem" since several release ago.
If someone from Xcart reading this, PLEASE consider getting this added as an option on the next release!!!
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9 |
|||||||
|
|||
X-Cart forums © 2001-2020
|