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

Category parameters

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-28-2015, 05:20 AM
 
Roman Prisiazhniuk Roman Prisiazhniuk is offline
 

Member
  
Join Date: Apr 2015
Posts: 17
 

Default Category parameters

What functions ca I use to output category name, category description, category photo?
__________________
xcart 4.4.1, 5
Reply With Quote
  #2  
Old 05-04-2015, 03:03 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Category parameters

If you have your \XLite\Model\Category object, then you can access its properties as follows:
PHP Code:
$category->getName();
$category->getDescription();
$category->getImage()->getFrontURL(); 
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 05-12-2015, 06:48 AM
 
Roman Prisiazhniuk Roman Prisiazhniuk is offline
 

Member
  
Join Date: Apr 2015
Posts: 17
 

Default Re: Category parameters

May 12 15:45:10 XLite [error] File /var/www/html/dev10/mymotoshield/skins/default/en/modules/XC/CustomSkin/page/policy_type/body.tpl, line 6, col 9: Unknown modifier '->getFrontURL();'

I have this error
__________________
xcart 4.4.1, 5
Reply With Quote
  #4  
Old 05-13-2015, 02:42 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Category parameters

Hello Roman,

Could you please send me the whole code from the template that causes the problem?
It would allow to understand why Flexy Compiler thinks of ->getFrontURL(); as a modifier.

Just a note that our Flexy guide is here:
http://kb.x-cart.com/display/XDD/Flexy+Guide
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #5  
Old 05-13-2015, 10:34 PM
 
Roman Prisiazhniuk Roman Prisiazhniuk is offline
 

Member
  
Join Date: Apr 2015
Posts: 17
 

Default Re: Category parameters

$category->getImage()->getImageURL() works for me, problem is resolved
__________________
xcart 4.4.1, 5
Reply With Quote

The following user thanks Roman Prisiazhniuk for this useful post:
qualiteam (05-19-2015)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


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 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:10 PM.

   

 
X-Cart forums © 2001-2020