X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Mod for subcategories in columns with descriptions and icons (https://forum.x-cart.com/showthread.php?t=3848)

alexg 03-31-2005 01:33 AM

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,

jdiehl 04-05-2005 02:08 PM

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}


zilker 04-05-2005 05:42 PM

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.

](*,)

jdiehl 04-06-2005 06:43 AM

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.

lusterca 05-10-2005 04:22 PM

Thanks Jason,
the description finally shows up. GREAT!!!

MetalLaw 05-22-2005 06:35 PM

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-light 06-09-2005 01:01 AM

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

Dongan 07-19-2005 11:52 PM

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

mirajtrading 07-20-2005 08:47 AM

Thanks
 
Thanks.

Miraj Trading
Phone: 1-888-331-4233
Fax: 613-798-8072
URL: www.mirajtrading.com

mt 07-24-2005 05:47 AM

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


All times are GMT -8. The time now is 07:54 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.