| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
$cat.category..........desc? | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
$cat.category..........desc?
So I'm developing a dynamic section that loads all the categories from $categories
And it's going perfectly. It loads the link, it loads the category picture. And I've figured out a way to make it so that the description COULD load next to it and still remain dynamic and neat and pretty. Der Problem How do I load the description? I'm pretty sure there's a variable like the variable categoryid. Only I need categorydesc. I tried taking the code from main/subcategories.tpl ( {$current_category.description} ) But unfortunately it doesn't load Der Info This is the code I have so far and the example is here (scroll to the bottom) Code:
Class bot_cat is just to make sure it wraps at 900px Class bot_products is the size 200px 12px margin for both sides (completely irrelevant to the problem) Der Request I want the text to load to the right of the Category Images. But I can't seem to load the descriptions... At all. Not even a little. Does anyone know what variable string it might be? or another solution? Also... Could I find this if I had DB access? (my boss isn't letting me have that access, but he might let me if I tell him I have to find it from there.)
__________________
Moo? Quality Door & Hardware Version X-Cart 4.1.108 Add-ons X-AOM (Advanced Order Management) Ad / Banner X-cart Mod (BCSE) DSEFU Dynamic Image Mod Pre-login Shipping Calculator Power Filter Contact Us Form Shipping Carrier Mod Submit Button Send me a message, I can talk about anything. |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
You probably have to edit php file responsible for writing the $category array and include description in the query. It just depends where you are doing this but take a look at function func_get_category_data($cat) in include/func/func.category.php
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#3
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
Thanks for the lead! I'll take a look at this right away
__________________
Moo? Quality Door & Hardware Version X-Cart 4.1.108 Add-ons X-AOM (Advanced Order Management) Ad / Banner X-cart Mod (BCSE) DSEFU Dynamic Image Mod Pre-login Shipping Calculator Power Filter Contact Us Form Shipping Carrier Mod Submit Button Send me a message, I can talk about anything. |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
Der Find
So I went into *.*/include/func/func.category.php Unfortunately, there is no func_get_category_data($cat) However I did find func_get_category_parents down below Code:
I created a Test Variable to try and find where in the Database they placed the Descriptions in hopes of finding it. I'm not sure if this will help, but I figured it points to the location of where the descriptions are. Code:
Test 03 is where the information was placed. --- Is there someway that I could develop the functionality for xcart to get the information from where the description would be, if I copied the code for where it gets categoryid, and point it to where test 03 currently is?
__________________
Moo? Quality Door & Hardware Version X-Cart 4.1.108 Add-ons X-AOM (Advanced Order Management) Ad / Banner X-cart Mod (BCSE) DSEFU Dynamic Image Mod Pre-login Shipping Calculator Power Filter Contact Us Form Shipping Carrier Mod Submit Button Send me a message, I can talk about anything. |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
Ok I just saw you are on 4.1 and this was for 4.2. Sorry. The fuction for 4.1 is in include/categories.php
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#6
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
Wow, you really know where everything in xCart is. I found it and I'm looking for where I might find a variable for the description and if not, where it's getting categoryid so that I might be able to copy that functionality.
Any ideas on where to go from here while I'm searching?
__________________
Moo? Quality Door & Hardware Version X-Cart 4.1.108 Add-ons X-AOM (Advanced Order Management) Ad / Banner X-cart Mod (BCSE) DSEFU Dynamic Image Mod Pre-login Shipping Calculator Power Filter Contact Us Form Shipping Carrier Mod Submit Button Send me a message, I can talk about anything. |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
This query is in there
Code:
The code is from 4.1.11 so don't just copy/paste
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#8
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
Very cool
I found this code in include/categories.php although I'm not sure how to utilize it. To me it seems what I want is $categories.description or $category.description But unfortunately neither of those seem to work. Description seems to be the variable, since they seem to use categoryid similarly I'm pretty lost
__________________
Moo? Quality Door & Hardware Version X-Cart 4.1.108 Add-ons X-AOM (Advanced Order Management) Ad / Banner X-cart Mod (BCSE) DSEFU Dynamic Image Mod Pre-login Shipping Calculator Power Filter Contact Us Form Shipping Carrier Mod Submit Button Send me a message, I can talk about anything. |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
try this...
if ($short_list === X_CATEGORIES_FOR_SELECT_BOX) { added description to 3 $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].*"; }
__________________
xcart 5.1.2 |
|||||||||
|
#10
|
|||||||||
|
|||||||||
Re: $cat.category..........desc?
Ummm... Where would I place that... -_-
(out for 40 minutes -_-)
__________________
Moo? Quality Door & Hardware Version X-Cart 4.1.108 Add-ons X-AOM (Advanced Order Management) Ad / Banner X-cart Mod (BCSE) DSEFU Dynamic Image Mod Pre-login Shipping Calculator Power Filter Contact Us Form Shipping Carrier Mod Submit Button Send me a message, I can talk about anything. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|