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)

cowsdonthack 09-04-2009 08:21 AM

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

Originally Posted by ChristineP
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}


Thanks a lot ChristineP, that's very close to what I'm looking for

Unfortunately, I'm trying to get it load outside of that page. (The home front page)

Whenever I tried to load $current_category.description foreach category. It won't load.

It will load the IDs which concurrently allows the images and the links to load. But the description doesn't load and I'm wondering how to get that to work. Any ideas?

ARW VISIONS 09-04-2009 09:26 AM

Re: $cat.category..........desc?
 
did you try $cat.description?

cowsdonthack 09-04-2009 09:59 AM

Re: $cat.category..........desc?
 
Yep. Definitely tried { $cat.description }

cflsystems 09-04-2009 10:22 AM

Re: $cat.category..........desc?
 
1 Attachment(s)
Rename the attached file to 'debug_templates.tpl' and replace the original in skin1. Open the client's side with webmaster mode enable and search in the debug window for $cat, $categories and see if description is in the arrays and what the variable name is

ARW VISIONS 09-04-2009 11:11 AM

Re: $cat.category..........desc?
 
this worked. {$cat.description}

http://www.arwvisions.com/test2/xcart/

cowsdonthack 09-08-2009 05:51 AM

Re: $cat.category..........desc?
 
1 Attachment(s)
Quote:

Originally Posted by cflsystems
Rename the attached file to 'debug_templates.tpl' and replace the original in skin1. Open the client's side with webmaster mode enable and search in the debug window for $cat, $categories and see if description is in the arrays and what the variable name is


Code:

{$current_category}Array (18)
categoryid => "155"
parentid => "0"
categoryid_path => "155"
category => "Access Control Hardware"
description => "test 01"
meta_descr => ""
avail => "Y"
views_stats => "256"
order_by => "0"
threshold_bestsellers => "1"
product_count => "59"
meta_keywords => ""
is_icon => "Y"
image_path => "./images/C/01.gif"
subcategory_count => "4"
category_name_orig => "Access Control Hardware"
category_location => Array (1)
  0 => Array (2)
    0 => "Access Control Hardware"
    1 => "home.php?cat=155"
icon_url => "http://www.qualitydoor.com/images/C/0..."


This is what I got, it seems to be "description" but { $cat.description } doesn't work. I'll use this information to experiment s'more

Enclosed is the entire statistics for this one page.

cowsdonthack 09-08-2009 05:51 AM

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

Originally Posted by Ashley
this worked. {$cat.description}

http://www.arwvisions.com/test2/xcart/


I see that, which makes me think, maybe the variable is rewritten in mine or something... Thanks for going to such lengths to help me out

cflsystems 09-08-2009 05:55 AM

Re: $cat.category..........desc?
 
What you are showing is $currect_category.description. Looking at your debug file for $cat you have just 155

cowsdonthack 09-08-2009 05:58 AM

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

Originally Posted by Ashley
this worked. {$cat.description}

http://www.arwvisions.com/test2/xcart/


O_O It worked straight from Copy and Paste on your site but not on mine!??

Are you -expletive-ing me!?

cowsdonthack 09-08-2009 06:01 AM

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

Originally Posted by cflsystems
What you are showing is $currect_category.description. Looking at your debug file for $cat you have just 155


Yeah... I tried placing { $current_category.description } and { $cat.current_category.description } within the foreach tags.

Thought it might have a chance.

So... Is there anyway I could define the current code that I have within $current_category?

I tried setting {foreach from=$current_category item=cat} but then it wouldn't show the images or the descriptions.

Code is still

Code:

<div class="bot_cat" align="left">
{foreach from=$categories item=cat}
<a class="bot_products" href="home.php?cat={ $cat.categoryid }"><img src="{$xcart_web_dir}/image.php?id={ $cat.categoryid }&amp;type=C" alt="" />{ $cat.categoryid }
</a>{/foreach}
</div>



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

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