![]() |
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, |
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} |
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. ](*,) |
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) { 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. |
Thanks Jason,
the description finally shows up. GREAT!!! |
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?
|
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 |
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 |
Thanks
|
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 |
Anyone know how to supress product info until you get to the final subcategory? I have a similar mod doing this in a 3.5.10 shop, http://www.speedunleashed.com/shop/customer/home.php?cat=418, but I can't get it going in 4.0.14, http://www.savagetruckstuff.com/shop/home.php?cat=248. Any ideas?
|
Worked for me in 4.014
Cheers Chris |
MOD for every version
Hi
Can anyone post the complete MOD made for 4.014 along with an example site?! I went back and forward reading the thread, it had too many change along the way. If someone can organize it and post the mod made for different version along with the example site of the MOD.. that would help out a lot of people lost in this long thread!! |
Hi
Just did one for 4.014 for a site I have just started to develop for a client http://www.bluechilli.com.au/home.php?cat=1 I went to WECKS one on page 6 Posted: Sat Feb 19, 2005 8:02 am Post subject: this on is for version 4.0.11 subcategories.tpl I then used the code posted by jdiehl on page 6 PostPosted: Wed Apr 06, 2005 9:43 am Post subject: Figured it out for 4.0.12 /include/categories.php Cheers Chris |
Does this mod work in 4.0.15
|
Quote:
should be fine |
This Mod is not working for me.
I am using version 4.0.12 now, is there and updated mod available ? |
It will work fine in 4.0.12...just be sure to follow the code to the letter.
|
ok, i think maybe the problem is my category icons aren't uploading correctly..
when i go to "chang icon" under one of my subcategories.. it allows me to browse and select an image.. but when i click on "Save" teh page refreshes and the image is gone. i have category icons currently set to file icons as opposed to database, but they don't seem to be uploading. |
Try uploading them to the server first and then browsing on the server for them.
|
NM Got it to work!!
I'm an idiot.. total user error on my part. I got things up and running now. Thanks for your help! |
Description text
Great Mod!! Well done just one thing I put my text in the Description: field and it doesn't show on my website any one know why? :roll:
|
Hi Guys,
I just got the Dynamic SEO-Friendly URLs from SafetyNet Web thanks Hooter :-) and I 'm using the Fashion Mosaic on a new shop 4.0.16 So the question is, has anyone got an example with subcategories in a 3 column layout with an image for each sub-cat with name and product count below the image, using the above mod? Thanks Arton |
Thanks for your mod Anton
It didn't work for me until I used Jason mod. Quote:
On my version, instead of Code:
{section name=cat_num loop=$subcategories} Code:
{foreach from=$subcategories item=subcat}. So I put Code:
{$subcat.description|escape} Code:
{ $categories[cat_num].description|escape } |
Work great but,,,
I love how this works, but for some reason it is displaying the catagory and subcatagory words twice.
Company Name : T-Shirts Comapny Name : T-Shirts up top. |
Language issues
I've finaly been able to get my description to show.
Except that it will only show the default language. Here's my working code with the default language Code:
{foreach from=$subcategories item=subcat} What do I have to change to get the description to show in all the language? I've tried with no success Code:
{$subcat.lng.description|regex_replace:"/[\n]/":" Code:
{$lng.subcat.description|regex_replace:"/[\n]/":" Is there something else I have to modify in categories.php? Martin |
Re: Language issues
Quote:
Hey Martin, Try this for include/categories.php (backup your existing file, I did not have a chance to test it): Code:
Let me know if this one did not help. |
Still no luck!!!!
What part did you change maybe i'll see somethings. It doesnt make any sense! Every othe part of you mod shows in the wright language. |
Quote:
I didn't see an answer for this, and I just figured it out, so I thought I would share in case others want it too. I used WECKS change to the subcategories.tpl file posted here: http://forum.x-cart.com/viewtopic.php?p=78344#78344. To change the format to 3 columns I did the following: on line 21 I changed this bit from: Code:
{ if %cat_num.index% is div by 2} Code:
{ if %cat_num.index% is div by 3} Just so it looked better, on line 24, within the <TD> tags, I added width="33%". I couldn't believe it was so simple. :P |
Hi Guys,
Sorry for asking again but I'm still looking for this mod. I have got the Dynamic SEO-Friendly URLs from SafetyNet Web thanks Hooter and I 'm using the Fashion Mosaic on a new shop 4.0.16 So the question is, has anyone got an example with subcategories in a 3 column layout with an image for each sub-cat with name and product count below the image, using Dynamic SEO-Friendly URLs from SafetyNet Webs mod? Thanks Arton |
okay, I need my subcats names to be under the image for 4.0.17... Not sure what I need to do for this version.
Can someone please help me. thanks in advance, |
here is my code for the subcategories.tpl
please help please!!! I have not found out how to do it... Code:
{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya Exp $ *} thanks in advance for the help...[/code] |
Subcategory description under link
Hi,
I'm trying to add the subcategory descriptions under the subcategory link on the category page, see: http://www.bubblebathrooms.co.uk/Whirlpool-baths-p-1-c-243.html Ideally I want the definition of a single ended bath to be next to the image and under the link "single ended baths" but I just can't seem to get the right code - would be most grateful for some guidance. My current subcategories code is: (I added the line " $subcategories[cat_num].description|escape}" to no avail: {* $Id: subcategories.tpl,v 1.43.2.5 2004/12/01 15:15:49 mclap Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {if $active_modules.Special_Offers and $category_offers} {include file="modules/Special_Offers/customer/category_offers_short_list.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} {if $subcategories} <TABLE width="100%" border="0" cellspacing="5"> {foreach from=$subcategories item=subcat} <TR> {* SAFETYNET DSEFU MOD *} {if $enable_seo_links == "Y"} <TD align="left" nowrap width="40%">[img]{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/icon.php?categoryid={$subcat.categoryid}{/if}[/img]</TD> <TD width="95%" align="left" valign="middle" nowrap><FONT class="ItemsList">{ $subcat.category|escape }</FONT> { $subcategories[cat_num].description|escape} </TD> {else} <TD align="left" nowrap width="40%">[img]{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/icon.php?categoryid={$subcat.categoryid}{/if}[/img]</TD> <TD width="95%" align="left" valign="middle" nowrap><FONT class="ItemsList">{ $subcat.category|escape }</FONT> </TD> {/if} {* END SAFETYNET DSEFU MOD *} <TD width="40%" align="right" nowrap><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> </TR> {/foreach} </TABLE> {/if} {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} {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 ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" } |
I have too many subcategories to be displayed on one page.
How can subcategories be broken down into several pages with "ABCDEFGH..." or "Page1 Page2 Page 3..." on top |
A great Thank You to all those that have contributed to this great mod.
Unless I'm mistaken, It looks like the sub-cat icon is being sourced from the db instead of the file system. Code:
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] Will it be possible to change this so that the icon image is sourced from the file system? |
change image location in admin area from db to file system
|
Limiting the number sub categories displayed per page
Hi folks,
I see several people have asked but nobody has answered. This mod is great but if you have a lot of sub categories, you end up with a huge list, that can take a long time to load. Is it possible to paginate the display to say 10 sub categories per page. We have large sub cat descriptions so adding more columns is not an option for us. I think if this could be made possible this mod would be work for a lot more people. Anybody Help or confirmation if it can be done would help everyone. |
I received a quote from x-cart to make subcategory pagination with a switch in general options.
Email me if you want to split the cost. forum@cellcorner.com |
ok here is what i figured out with this "MOD"
Open the CAT you want to work on.. fill in the following fields.. this is so you know which field is which snippet of code below. category: what you have + TITLE ( this will be the page title ) Description: what you have + DESCRIPTION push OK/Save now: edit subcatagories.tpl File location: /customer/main/subcategories.tpl Add the following in your *.TPL {$current_category.description|escape} above is same as following: {$current_category.description|regex_replace:"/[\n]/":""} to pull in extra keywords or subcat descriptions: {$subcat.description|escape} the subcat pulls in descrips from ther subcats as well.. Now paste all that fun stuff into your TPL (subcats) and submit it -- then preview.. you should see everything working. NOW-- for me to get to this stage.. i had to change the SQL statement as posted further back in this MOD ( page 6 i think ). Everything is working GREAT.. except on one of my pages i'm getting the above duplicated...will figure it out.. unless someone has a solution. good luck. ciao garz 4.07/php.linux |
One of my all time favorite mods, but if you have your images in the filesystem (which is recommended for speed reasons) this mod will continue to pull the images from the db, as it is hard-coded in. To fix this, replace this:
Code:
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] with this Code:
{if $subcategories[cat_num].icon_url}[img]{$subcategories[cat_num].icon_url}[/img]{else}[img]{$xcart_web_dir}/default_icon.gif[/img]{/if} You'll want to add in a height or width as well, as this will pull the full-sized image without it. You should notice a huge speed improvement on your category pages, particularly if you have a ton of sub-categories. The {if} statement simply shows the default_icon.gif image if there is no sub-category icon present. Enjoy! |
All times are GMT -8. The time now is 04:36 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.