![]() |
Re: Mod for subcategories in columns with descriptions and icons
i cant find xcart/include/catagories.php....
help? |
Re: Mod for subcategories in columns with descriptions and icons
I was wondering if you could change it with the picture on the left and the name of the subcategory on the right, going down the page?
|
Re: Mod for subcategories in columns with descriptions and icons
eurojet,
Quote:
jcgoldy, Quote:
Just change the width and text-align code in your skin1/skin1.css file to this: Code:
and replace the code from <table ..to...</table> in skin1/customer/main/subcategories.tpl with this: Code:
Make sure you also change the code in xcart/include/categories.php as noted in post #211. I think that should do it. - MoonDog - |
Re: Mod for subcategories in columns with descriptions and icons
let me explain a little better. I was hoping to have the text displayed on the right side of the pictures...is this possible?
http://www.thebabblingbaby.com/newbaby/images/C/TYC091thumb.jpg Thank You Cards - To Match Announcements (1) |
Re: Mod for subcategories in columns with descriptions and icons
Hi jcgoldy,
See if this works. I changed the code, it's quick and dirty and I have not tested it. Let me know if it doesn't work and I'll try to correct it by this weekend. Code:
- MoonDog - |
Re: Mod for subcategories in columns with descriptions and icons
Looks like there is a syntax error below in the subcategories.tpl insert.
Code:
<td class="ColumnTitles" valign="top"><a title="{$subcat.description}" <a href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_web_dir}/default_image.gif{/if}" alt="" /><br> notice <a title="{$subcat.description}" <a theres a double a< a< and it made my display a bit weird. well i removed <a title="{$subcat.description}" to avoid from pulling in the description. Quote:
|
Re: Mod for subcategories in columns with descriptions and icons
Working great in 4.1.9 Thanks!
|
Re: Mod for subcategories in columns with descriptions and icons
Am I being an idiot or what? I am setting the code to show coloumns in fours but it is setting to five .... I have changed the css as per boxerbay ... why is this happening?
Here is an example http://www.organ-nics.com/store/home.php?cat=264 and this is my subcategory code: Code:
{* $Id: subcategories.tpl,v 1.43.2.9 2006/06/27 08:22:01 svowl Exp $ *} |
Re: Mod for subcategories in columns with descriptions and icons
Anyone have any ideas for the above? I am really stuck and it looks so stupid! Thanks for your help :)
|
Re: Mod for subcategories in columns with descriptions and icons
I had this problem too. Use the following code should work fine
{* $Id: subcategories.tpl,v 1.55.2.1 2006/06/27 08:20:37 svowl Exp $ *} <p /> {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/category_offers_short_list.tpl"} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<p /> {/if} {capture name=dialog} {assign var="tmp" value="0"} {foreach from=$subcategories item=c key=catid} {if $c.category}{assign var="tmp" value="1"}{/if} {/foreach} {if $subcategories} <table cellspacing="5" width="100%" border="0"> <tr> {foreach from=$subcategories item=subcat} {if $tmp is div by 4} </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"><div align="center"><a title="{$subcat.category|escape}" href="home.php?cat={$subcat.categoryid}"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/default_image.gif{/if}" alt="{$subcat.category|escape}" /></a><br> <a title="{$subcat.category|escape}" href="home.php?cat={$subcat.categoryid}" align="center"> <font class="ItemsList">{$subcat.category|escape}</font></a> {if $config.Appearance.count_products eq "Y"} <br/> {if $subcat.product_count}{elseif $subcat.subcategory_count} {else} {/if} {/if} {assign var="tmp" value=$tmp+1} {/foreach} </div></td> </tr> </table> {/if} {if $tmp and $products ne "" } <br clear="left" /> <hr size="1" noshade="noshade" /> {/if} {if $products} {if $sort_fields} <div style="float: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 style="clear:both;" /><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 /> <hr size="1" noshade="noshade" /> {capture name=dialog} {include file="customer/main/products.tpl" products=$f_products featured="Y"} {/capture} {include file="dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog extra="width=100%"} <p /> {/if} {include file="customer/main/navigation.tpl"} |
Re: Mod for subcategories in columns with descriptions and icons
It is still jumping down one level on the end.....
http://www.organ-nics.com/store/home.php?cat=264 Pulling my hair out! |
Re: Mod for subcategories in columns with descriptions and icons
Its fixed ... yay! Thank you!!!
|
Re: Mod for subcategories in columns with descriptions and icons
amazing mod, thanks everyone who has put the time into this!
|
Re: Mod for subcategories in columns with descriptions and icons
Could anyone give me an example or the full template of the sub categories displayed in 2 columns for the latest v4?
I don't need icons. I just need to split the subs up in 2 or maybe even 3 columns. Any help is greatly appreciated. Thanks |
Re: Mod for subcategories in columns with descriptions and icons
Is there a way to make this mod affect only certain categories? We sell vinyl records and dj equipment, I want logos for manufacruters of equipment, but not for "styles" of music.
|
Re: Mod for subcategories in columns with descriptions and icons
This works great in v4.1.10 - you know what would put this mod over the top!?!
"1. the default "No Image Available" image is displayed if none is assigned" If the first available image in the subcategory group was displayed instead of the no_image_available default image. ...OR!!! To randomly grab a new image from the subcategory group. So if you have 115 products in a subcategory and 108 of them have an image associated with it (i.e. not a no image available image). The subcategory image would show any one of the available 108 available images each time the page reloads. And in my beautiful perfect world, the image would auto resize to a predefined subcategory image size. :) I'm liking this mod more and more. :) |
Re: Mod for subcategories in columns with descriptions and icons
why is this happening?
[img]/shop/icon.php?categoryid=276[/img] BIKINI'S 11 Items [img]/shop/icon.php?categoryid=275[/img] MONOKINI 3 Items [img]/shop/icon.php?categoryid=274[/img] ONE PIECES 25 Items [img]/shop/icon.php?categoryid=277[/img] YINGFA 11 Items no images i have dynamic image generator does that make a difference? |
Re: Mod for subcategories in columns with descriptions and icons
Girls Swimwear
GIRLS http://www.slixaustralia.com.au/shop/files/thumbnails/t_16169.jpg BIKINI'S 11 Items [img]/shop/default_icon.gif[/img] MONOKINI 3 Items [img]/shop/default_icon.gif[/img] ONE PIECES 25 Items [img]/shop/default_icon.gif[/img] YINGFA 11 Items this is what im getting now !! please what am i doing wrong!! http://www.slixaustralia.com.au/shop/home.php?cat=254 |
Re: Mod for subcategories in columns with descriptions and icons
don't worry i just changed the [img] tags with <img src=zxxxxx > go figure! it works
|
Re: Mod for subcategories in columns with descriptions and icons
Hello
Im trying in version 4.1.10 I just used this mod and works fine except for the icons that doesnt show up even they show up in the admin area. Any suggestions? thank you |
Re: Mod for subcategories in columns with descriptions and icons
I am having trouble finding the include folder. I have read through all 26 pages of this thread and saw someone else had an issue finding it as well and got the following response:
"xcart is your root directory. Just look for the include folder and the catagores.php file should be in there." Unfortunately, I just can't seem to find the include folder. It is probably obvious, can anyone help please? I can't wait to try this mod. |
Re: Mod for subcategories in columns with descriptions and icons
I found the solution for the subcategory icons not showing for version 4.1.10
The solution is to set the Image Location for your icons to file system and it works perfectly. Thank you all |
Re: Mod for subcategories in columns with descriptions and icons
lindseyabrandon do you have your xcart in the root directory?
Anyway the include folder is inside the xcart root folder not necesarily in the root of your domain. Hope it helps |
Re: Mod for subcategories in columns with descriptions and icons
Quote:
I finally found my include folder...it was only accessible through FTP and I was looking in the Admin section. I think I have the mod installed correctly, but the images aren't showing up. They are in the file system, but I am unclear how to make sure the permissions and htaccess files are correct. I can see the category icons in the admin area. I am so close to being done, please help! :lol: |
Re: Mod for subcategories in columns with descriptions and icons
Awesome MOD! Works well in 4.1.10 as well.
|
Re: Mod for subcategories in columns with descriptions and icons
Thanks to all that created the mod :lol: , but I'm still on the below problem can someone tell me what I missed, I followed the all the directions and still can't get it to display right. 8O
Thanks Quote:
|
Re: Mod for subcategories in columns with descriptions and icons
gpagan - Please post your code from subcategories.tpl so i can have a look
|
Re: Mod for subcategories in columns with descriptions and icons
Here it is. Thanks
{* $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 *} {foreach from=$subcategories item=subcat name="subcats"} { if $smarty.foreach.subcats.first } <table cellspacing="5" width="100%" border="0"> <tr> {foreach from=$subcategories item=subcat} {if $tmp is div by 4} </tr> <tr><td colspan="4"></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}" <a href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/spacer.gif{/if}" alt="" /><br> <font class="ItemsList">{ $subcat.category|escape }</font></a> {if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}({ $subcat.product_count }) {elseif $subcat.subcategory_count}({ $subcat.subcategory_count }) {else} (0) {/if} {/if} {assign var="tmp" value=$tmp+1} {/foreach} </tr> </td> </table> {/if} {/foreach} {* ==================== 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" } |
Re: Mod for subcategories in columns with descriptions and icons
Ok guys, I am REALLY confused. I have been trying to find out how to put the category images on our site and I was referred to this forum topic. I do not know how to use this code or where it is goes....can anyone give me some direction here?
We are using version 4.1.11 Thanks in advance for any help! |
Re: Mod for subcategories in columns with descriptions and icons
I hear you...I was in the same boat and ended up just spending the points to have the X-Cart people help me and I am glad I did. I would suggest that.
Good luck! |
Re: Mod for subcategories in columns with descriptions and icons
Hi toddpatterson,
Please try to replace customer/main/subcategories.tpl with this file: {* $Id: subcategories.tpl,v 1.55.2.1 2006/06/27 08:20:37 svowl Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {if $active_modules.Special_Offers && $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"} {foreach from=$subcategories item=c key=catid} {if $c.category}{assign var="tmp" value="1"}{/if} {/foreach} {if $subcategories} {* <table cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <tr> {if $tmp and $first_subcat ne "Y"} <td valign="top" rowspan="{count value=$subcategories print="Y"}"><img src="{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/image.php?id={$cat}&type=C{/if}" alt="" /></td> {assign var="first_subcat" value="Y"} {/if} <td class="SubcatTitle"><a href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font></a><br /></td> <td class="SubcatInfo">{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} {/if} {/if}</td> </tr> {/foreach} </table> *} {* subcategories in 4 columns mod by Finestshops.com *} <table border=0 cellspacing="0" cellspacing="0" width="100%"> {foreach from=$subcategories key=k item=subcat name=subcategories} {if $smarty.foreach.subcategories.index is div by 4} </tr><tr valign="top"> {/if} <td valign="top" width="25%" align="center"> <A href="home.php?cat={ $subcat.categoryid }"><IMG alt="{* $subcat.category|escape *}" border="0" src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/icon.php?categoryid={$subcat.categoryid}{/if}"></a> <br> <A href="home.php?cat={ $subcat.categoryid }"><FONT class="ItemsList">{ $subcat.category|escape }</FONT></A> <br> <FONT class="Text">{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} {/if} {/if} </FONT> </td> {/foreach} </tr> </table> {* subcategories in 4 columns mod by Finestshops.com *} <table width="100%" cellpadding="5" cellspacing="1"> {math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"} {section name=product loop=$products} {assign var="discount" value=0} {if %product.index% is div by $config.Appearance.products_per_row} <tr> {assign var="cell_counter" value=0} {/if} {math equation="x+1" x=$cell_counter assign="cell_counter" } <td width="{$width}%" class="PListCell"> <a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_p age}" class="ProductTitle">{$products[product].product}</a><br /> {if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""} {$lng.lbl_sku}: {$products[product].productcode}<br /> {/if} <table cellpadding="3" cellspacing="0" width="100%"> <tr> <td height="100" nowrap="nowrap" align="center">{include file="product_thumbnail_cust.tpl" product=$products[product]}</td> </tr> </table> <a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_p age}{if $featured eq 'Y'}&featured{/if}">{$lng.lbl_see_details}</a> {if $products[product].product_type ne "C"} <br /> <br /> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $config.General.unlimited_products ne "Y" && ($products[product].avail le 0 or $products[product].avail lt $products[product].min_amount) && $products[product].variantid} {elseif $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} <font class="MarketPrice">{$lng.lbl_market_price}: <s> {include file="currency.tpl" value=$products[product].list_price} </s></font><br /> {/if} {/if} <font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</font><br /><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</font>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""},{/if} {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes}{/if} {if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]} {/if} {else} <font class="ProductPrice">{$lng.lbl_enter_your_price}</font> {/if} {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0} <div align="center" style="width: 100%; padding-top: 10px;"> {include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} </div> {/if} {*** Uncomment it if you need 'Buy Now' button *** {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} *** Uncomment it if you need 'Buy Now' button ***} {/if} </td> {capture name=prod_index} {math equation="index+x+1" index=%product.index% x=$config.Appearance.products_per_row} {/capture} {if $smarty.capture.prod_index is div by $config.Appearance.products_per_row } </tr> {/if} {/section} {if $cell_counter lt $config.Appearance.products_per_row} {section name=rest_cells loop=$config.Appearance.products_per_row start=$cell_counter} <td class="SectionBox"> </td> {/section} </tr> {/if} </table> {/if} {if $tmp and $products ne "" } <br clear="left" /> <hr size="1" noshade="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" } |
Re: Mod for subcategories in columns with descriptions and icons
Thanks a million! It looks like that is EXACTLY what I was looking for. I appreciate it!
Todd |
Re: Mod for subcategories in columns with descriptions and icons
Hello I have 4.1.11 which post will show me how to do this mod, post number please
|
Re: Mod for subcategories in columns with descriptions and icons
I used #271 and it worked for me just fine
|
Re: Mod for subcategories in columns with descriptions and icons
Great mod. Anyway to remove the product list from the main page though?
Shows all my categories on my welcome page but also is including product images with price. Any way to get rid of this? |
Re: Mod for subcategories in columns with descriptions and icons
Hi Guys I tried the code in post #271 which had some interesting effects
- displays the category thumbnail and a header link - unfortunately it doesn't show the category description text - it seems to have swapped sides with the lefthand navigation which has jumped to the righthand side of the page... looks like I need to make some changes :smile: any ideas? Nick |
Re: Mod for subcategories in columns with descriptions and icons
Hi, I tried using this mod. I liked the way you were pulling in information. I changed it a bit to make a <ul> instead, but there is something wrong. It's not pulling any data from the database. The loop works fine, all the HTML gets populated, but wherever the data should appear, the HTML is blank. Is there a reason why this wouldn't pull in data for me? Maybe the version?
Below is the code, thanks very much to anyone who considers this small issue. Code:
{capture name=dialog} |
Re: Mod for subcategories in columns with descriptions and icons
this is a great mod. Looking for a modified version, which would read as follows:
CategoryA (Image) CategoryA (title) SubcategoryA (title) SubcategoryB (title) SubcategoryC (title) Does anyone know how to modify the code to do that??? |
Re: Mod for subcategories in columns with descriptions and icons
I am using the code from post #271 to display my subcategories using version 4.1.10, although I changed the code to only display one category image and title per row. I have read and re-read this post over and over and I cannot find code that will work in v4.1.10 that allows for the inclusion of the category description within the row. When complete, I would like to display the category image on the left, then the category title to the right of the image and the category description below the category description. Would someone please help me understand how to add the additional code to the template(s) in v4.1.10?
Thank you so much in advance, |
Re: Mod for subcategories in columns with descriptions and icons
I moved the code for the css to the skin1_c.css and this worked.
|
All times are GMT -8. The time now is 12:40 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.