X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Category parameters (https://forum.x-cart.com/showthread.php?t=71918)

Roman Prisiazhniuk 04-28-2015 05:20 AM

Category parameters
 
What functions ca I use to output category name, category description, category photo?

tony_sologubov 05-04-2015 03:03 AM

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(); 


Roman Prisiazhniuk 05-12-2015 06:48 AM

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

tony_sologubov 05-13-2015 02:42 AM

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

Roman Prisiazhniuk 05-13-2015 10:34 PM

Re: Category parameters
 
$category->getImage()->getImageURL() works for me, problem is resolved


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

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