Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

$cat.category..........desc?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 09-03-2009, 11:57 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
cowsdonthack (09-04-2009)
  #12  
Old 09-03-2009, 12:38 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

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

include/func/func.category.php
__________________
xcart 5.1.2
Reply With Quote

The following user thanks ARW VISIONS for this useful post:
cowsdonthack (09-04-2009)
  #13  
Old 09-03-2009, 12:41 PM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

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

And I'm back
__________________
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.
Reply With Quote
  #14  
Old 09-03-2009, 12:54 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

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

huh?
__________________
xcart 5.1.2
Reply With Quote

The following user thanks ARW VISIONS for this useful post:
cowsdonthack (09-04-2009)
  #15  
Old 09-03-2009, 12:59 PM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

Default 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.
__________________
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.
Reply With Quote
  #16  
Old 09-03-2009, 01:00 PM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

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

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

I'm sorry. I meant where in func.category.php -_-
__________________
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.
Reply With Quote
  #17  
Old 09-04-2009, 05:02 AM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

Default 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. -_-
__________________
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.
Reply With Quote
  #18  
Old 09-04-2009, 05:12 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

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

$cat.category.something will not work. With the code in your first post you have to use $cat.category_descr.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
cowsdonthack (09-04-2009)
  #19  
Old 09-04-2009, 07:15 AM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

Default 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 -_-
__________________
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.
Reply With Quote
  #20  
Old 09-04-2009, 07:49 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default 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}
__________________
______________
version 4.1.9 Gold
Reply With Quote

The following user thanks ChristineP for this useful post:
cowsdonthack (09-04-2009)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:30 PM.

   

 
X-Cart forums © 2001-2020