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)
-   -   $cat.category..........desc? (https://forum.x-cart.com/showthread.php?t=49520)

cflsystems 09-03-2009 11:57 AM

Re: $cat.category..........desc?
 
Replace this
Code:

$to_search .= ",IF(($sql_tbl[categories_lng].category IS NOT NULL AND $sql_tbl[categories_lng].category != ''), $sql_tbl[categories_lng].category, $sql_tbl[categories].category) as category, IF(($sql_tbl[categories_lng].description IS NOT NULL AND $sql_tbl[categories_lng].description != ''), $sql_tbl[categories_lng].description, $sql_tbl[categories].description) as description, $sql_tbl[categories].category as category_name_orig";
with this
Code:

  $to_search .= ",IF(($sql_tbl[categories_lng].category IS NOT NULL AND $sql_tbl[categories_lng].category != ''), $sql_tbl[categories_lng].category, $sql_tbl[categories].category) as category, IF(($sql_tbl[categories_lng].description IS NOT NULL AND $sql_tbl[categories_lng].description != ''), $sql_tbl[categories_lng].description, $sql_tbl[categories].description) as description, $sql_tbl[categories].category as category_name_orig, $sql_tbl[categories].description as category_descr";
and then in the template call it like this $current_category.category_descr or $category.category_descr or $cat.category_descr and see what happens

ARW VISIONS 09-03-2009 12:38 PM

Re: $cat.category..........desc?
 
include/func/func.category.php

cowsdonthack 09-03-2009 12:41 PM

Re: $cat.category..........desc?
 
And I'm back

ARW VISIONS 09-03-2009 12:54 PM

Re: $cat.category..........desc?
 
huh?

cowsdonthack 09-03-2009 12:59 PM

Re: $cat.category..........desc?
 
Quote:

Originally Posted by cflsystems
Replace this
Code:

$to_search .= ",IF(($sql_tbl[categories_lng].category IS NOT NULL AND $sql_tbl[categories_lng].category != ''), $sql_tbl[categories_lng].category, $sql_tbl[categories].category) as category, IF(($sql_tbl[categories_lng].description IS NOT NULL AND $sql_tbl[categories_lng].description != ''), $sql_tbl[categories_lng].description, $sql_tbl[categories].description) as description, $sql_tbl[categories].category as category_name_orig";
with this
Code:

  $to_search .= ",IF(($sql_tbl[categories_lng].category IS NOT NULL AND $sql_tbl[categories_lng].category != ''), $sql_tbl[categories_lng].category, $sql_tbl[categories].category) as category, IF(($sql_tbl[categories_lng].description IS NOT NULL AND $sql_tbl[categories_lng].description != ''), $sql_tbl[categories_lng].description, $sql_tbl[categories].description) as description, $sql_tbl[categories].category as category_name_orig, $sql_tbl[categories].description as category_descr";
and then in the template call it like this $current_category.category_descr or $category.category_descr or $cat.category_descr and see what happens


DER PROGRESS!

Ok, it may not be success, but it's definitely very cool

I tried these three to no avail
$current_category.category_descr
$category.category_descr
$cat.category_descr

But then I realized, that "cat" was the item holding the description.

So I tried
{$cat.category.category_descr}

What you did must have worked somewhat. It loads "something"

http://frozeninksecret.com/tmp/que.gif

Some coincidences... There are 14 Categories that it loads, and fourteen 14 Images.

Whatever {$cat.category.category_descr} pulls is 14 Characters. So what I'm thinking is that it's pulling one letter of something from the DB.

cowsdonthack 09-03-2009 01:00 PM

Re: $cat.category..........desc?
 
Quote:

Originally Posted by Ashley
include/func/func.category.php


I'm sorry. I meant where in func.category.php -_-

cowsdonthack 09-04-2009 05:02 AM

Re: $cat.category..........desc?
 
Oh wait... No, it doesn't matter what I put after $cat.category.whatever it'll always pull up those fourteen characters. Nevermind. -_-

cflsystems 09-04-2009 05:12 AM

Re: $cat.category..........desc?
 
$cat.category.something will not work. With the code in your first post you have to use $cat.category_descr.

cowsdonthack 09-04-2009 07:15 AM

Re: $cat.category..........desc?
 
Quote:

Originally Posted by cflsystems
$cat.category.something will not work. With the code in your first post you have to use $cat.category_descr.


Ok, a couple more testing. When I use $cat.categoryid it does pull up the IDs however $cat.category_descr does not work after I placed the code. Although when I placed the code, the website functioned but Search and Checkout didn't work.

This is really a head scratcher it is, thanks for all of your help so far, it's much appreciated.

Ashley --> I added the code to func.php (tested both solutions separately and together) but it also doesn't seem to be pulling anything from $cat.description

I also tried changing the [category] to [category_lng] just in case it might be asking for a different database.

No such luck -_-

ChristineP 09-04-2009 07:49 AM

Re: $cat.category..........desc?
 
Though I don't know exactly what script you're needing, take a look at this post
http://forum.x-cart.com/showthread.php?t=41665&page=2 post #17, and you'll find
{$current_category.description}


All times are GMT -8. The time now is 05:39 PM.

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