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)

ESvideo 09-22-2009 03:24 PM

Re: Mod for subcategories in columns with descriptions and icons
 
Quote:

Originally Posted by chawla@moviesandgamesonli
Can someone please enter the complete code for this mod as its quite confusing at the moment.



Did anyone ever answer with the complete working code for 4.2? :?

presson83 09-28-2009 09:32 AM

Re: Mod for subcategories in columns with descriptions and icons
 
I'm wondering this as well - how the heck do you get the sub-category description to appear under the thumbnail on the sub-category list (or anywhere on the page for that matter)? What's the point of having a description for a sub-category if it doesn't appear anywhere? QT needs to remedy this.

ARW VISIONS 09-28-2009 04:07 PM

Re: Mod for subcategories in columns with descriptions and icons
 
in includes/func/func.category.php around line 539
Code:

    if ($short_list === X_CATEGORIES_FOR_SELECT_BOX) {
        $to_search = " $sql_tbl[categories].categoryid as cid, $sql_tbl[categories].categoryid, $sql_tbl[categories].parentid, $sql_tbl[categories].categoryid_path, $sql_tbl[categories].category";

    } elseif ($short_list) {
        $to_search = " $sql_tbl[categories].categoryid as cid, $sql_tbl[categories].categoryid, $sql_tbl[categories].parentid, $sql_tbl[categories].categoryid_path, $sql_tbl[categories].category, $sql_tbl[categories].avail, $sql_tbl[categories].order_by";

    } else {
        $to_search = "$sql_tbl[categories].categoryid as cid, $sql_tbl[categories].*";
    }


to this

Code:

    if ($short_list === X_CATEGORIES_FOR_SELECT_BOX) {
        $to_search = "$sql_tbl[categories].description, $sql_tbl[categories].categoryid as cid, $sql_tbl[categories].categoryid, $sql_tbl[categories].parentid, $sql_tbl[categories].categoryid_path, $sql_tbl[categories].category";

    } elseif ($short_list) {
        $to_search = "$sql_tbl[categories].description, $sql_tbl[categories].categoryid as cid, $sql_tbl[categories].categoryid, $sql_tbl[categories].parentid, $sql_tbl[categories].categoryid_path, $sql_tbl[categories].category, $sql_tbl[categories].avail, $sql_tbl[categories].order_by";

    } else {
        $to_search = "$sql_tbl[categories].description, $sql_tbl[categories].categoryid as cid, $sql_tbl[categories].*";
    }


Then in subcategories_t.tpl call the description with this.

{$subcategory.description}

presson83 09-29-2009 06:30 AM

Re: Mod for subcategories in columns with descriptions and icons
 
Works perfectly Ashley, THANK-YOU!!!!

voodoo1967 10-06-2009 01:19 PM

Re: Mod for subcategories in columns with descriptions and icons
 
I have the same issue re sub cats etc but
All these little tweaks and changes are all well and good.But it really doesnt give me much confidence in the product.
I have been here before with other carts, you make a little change here, a little tweak there , and before you know it you have a very customised design. The problem then comes when you need to upgrade to the latest version, and yuou then lose all those little tweaks , or even worse your upgrade doesnt work.

How do you guys overcome this problem ?

robertswww 10-08-2009 05:45 AM

Re: Mod for subcategories in columns with descriptions and icons
 
Quote:

Originally Posted by voodoo1967
The problem then comes when you need to upgrade to the latest version, and you then lose all those little tweaks, or even worse your upgrade doesn't work.

How do you guys overcome this problem ?

Hi Voodoo,

Yes, it is a hassle with any cart, to have to re-apply your custom changes after an upgrade.

Some people do not want to deal with those upgrade hassles you mentioned, and choose to either use a Shopping Cart As-Is, or maybe just customize with only simple style mark-up changes that can be done via the CSS file without touching the templates.

Others may choose an integrated store, such as Ecwid, that is updated automatically for you, as it is just a widget that fits into an existing web site.

But, for those of us who like our shopping carts to be highly customized, one of the best ways to proceed is through the use of heavy documentation.

We keep a Word Doc of every customized file in our Cart. We also add comments to every file that we customize.

When we are ready to upgrade to the newest version we just go through our list of files with custom mods, and manually insert them into the new files...

First, we download and unpack the latest version of the cart to our local hard drive. Then, we open each old file and new file side-by-side and copy and paste each mod into the new file. Then, we FTP the new files up to the test server. Next, we run the Database updater script on a copy of our database. Test everything out, make any adjustments that might be required, and we are good to go. Now, we can move all the files to our live site and run the DB updater on the live site.

Robert


All times are GMT -8. The time now is 04:48 AM.

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