X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   sub cat description? (https://forum.x-cart.com/showthread.php?t=49180)

ARW VISIONS 08-14-2009 11:29 AM

sub cat description?
 
I'm pulling my hair out on this.

I am using the sub cat list with columns, so I can display sub cat icons. On teh cat page I would also like the sub cat description to show also.

Can anyone help me out here?

cflsystems 08-14-2009 12:15 PM

Re: sub cat description?
 
You probably have to change this function in include/func/func.category.php to include decsription in the query
Code:

function func_get_categories_list

ARW VISIONS 08-14-2009 12:31 PM

Re: sub cat description?
 
wow... what do I change / or add?

amy2203 08-14-2009 09:27 PM

Re: sub cat description?
 
you'll probably need to add the descrition to the select query in include/categories.php

cflsystems 08-15-2009 04:16 AM

Re: sub cat description?
 
In include/func/func.category.php find below code under function
function func_get_categories_list
Code:

if ($current_area == "C" || $current_area == "B") {
  $join_tbl .= " LEFT JOIN $sql_tbl[categories_lng] USE INDEX (PRIMARY) ON $sql_tbl[categories_lng].code='$shop_language' AND $sql_tbl[categories_lng].categoryid=$sql_tbl[categories].categoryid ";
  $join_tbl .= " LEFT JOIN $sql_tbl[category_memberships] ON $sql_tbl[category_memberships].categoryid = $sql_tbl[categories].categoryid ";
  $to_search .= ", IF($sql_tbl[categories_lng].categoryid IS NOT NULL AND $sql_tbl[categories_lng].category != '', $sql_tbl[categories_lng].category, $sql_tbl[categories].category) as category";
 }

and replace with
Code:

if ($current_area == "C" || $current_area == "B") {
  $join_tbl .= " LEFT JOIN $sql_tbl[categories_lng] USE INDEX (PRIMARY) ON $sql_tbl[categories_lng].code='$shop_language' AND $sql_tbl[categories_lng].categoryid=$sql_tbl[categories].categoryid ";
  $join_tbl .= " LEFT JOIN $sql_tbl[category_memberships] ON $sql_tbl[category_memberships].categoryid = $sql_tbl[categories].categoryid ";
  $to_search .= ", IF($sql_tbl[categories_lng].categoryid IS NOT NULL AND $sql_tbl[categories_lng].category != '', $sql_tbl[categories_lng].category, $sql_tbl[categories].category) as category, $sql_tbl[categories].description";
 }


cowsdonthack 09-03-2009 09:38 AM

Re: sub cat description?
 
http://connectpoliticditto.files.wordpress.com/2008/04/jasparafterthedive.jpg

I've got your Sub Cat right here.


All times are GMT -8. The time now is 07:37 AM.

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