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

Calling an additional field as part of the category array

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-16-2008, 05:52 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Calling an additional field as part of the category array

Here's one I can't seem to work out - I created an additional field for categories, sort of like a second category title. I need to use this as a sub-title for the side menu categories. I can successfully get it to display on the category page using {$current_category.subtitle}, but I can't seem to get it to show under the side menu links. Here's the code:

Code:
{foreach from=$categories item=c} <div class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></div> <div class="CategoriesListSub">{$c.subtitle}</div> {/foreach}

Do I somehow need to specify this additional field in categories.php or am I just missing something obvious from staring at this for hours?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #2  
Old 12-16-2008, 09:02 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Calling an additional field as part of the category array

Hi balinor,
yes you need to specify it in include/categories.php
In function ->func_get_categories_list
in the below mentioned line.
if ($short_list) {
$to_search = "$sql_tbl[categories].subtitle,$sql_tbl[categories].categoryid,



Quote:
Originally Posted by balinor
Here's one I can't seem to work out - I created an additional field for categories, sort of like a second category title. I need to use this as a sub-title for the side menu categories. I can successfully get it to display on the category page using {$current_category.subtitle}, but I can't seem to get it to show under the side menu links. Here's the code:

Code:
{foreach from=$categories item=c} <div class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></div> <div class="CategoriesListSub">{$c.subtitle}</div> {/foreach}

Do I somehow need to specify this additional field in categories.php or am I just missing something obvious from staring at this for hours?
Reply With Quote
  #3  
Old 12-16-2008, 09:10 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Calling an additional field as part of the category array

Woo hoo! Thanks for the tip!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 12-16-2008, 09:29 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Calling an additional field as part of the category array

Its my pleasure to help such a great person like you(POST:25,180).
Have a nice day.
Season greeting.
Quote:
Originally Posted by balinor
Woo hoo! Thanks for the tip!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 03:59 PM.

   

 
X-Cart forums © 2001-2020