Не могу получить дополнительные свойства товара в Основном макете сайта
Код:
<?php
if (Core::moduleIsActive('shop'))
{
$Shop_Controller_Show = new Shop_Controller_Show(
Core_Entity::factory('Shop', 1)
);
$Shop_Controller_Show
->xsl(
Core_Entity::factory('Xsl')->getByName('МагазинКаталогТоваровНаГлавной')
)
->groupsMode('none')
//->itemsForbiddenTags(array('text'))
->group(FALSE)
->limit(8);
$Shop_Controller_Show
->shopItems()
->queryBuilder()
->leftJoin('shop_item_discounts', 'shop_item_discounts.shop_item_id', '=', 'shop_items.id')
->leftJoin('shop_discounts', 'shop_discounts.id', '=', 'shop_item_discounts.shop_discount_id')
->clearOrderBy()
->orderBy('datetime');
$Shop_Controller_Show->show();
// Additional properties
$oShop_Item_Property_List = Core_Entity::factory('Shop_Item_Property_List', 1);
$aProperties = $Shop_Controller_Show->group !== FALSE
? $oShop_Item_Property_List->getPropertiesForGroup($Shop_Controller_Show->group)
: $oShop_Item_Property_List->Properties->findAll();
$aTmpProperties = array();
$havingCount = 0;
foreach ($aProperties as $oProperty)
{
$aPropertiesValue = $oProperty->getValues(165);
var_dump($aPropertiesValue->value);
}
exit;
$Shop_Controller_Show->show();
}
?>
Выдает ошибку:
Замечание: Trying to get property of non-object в файле /home/u993733836/public_html/templates/template7/template.htm (строка 51)NULL Замечание: Trying to get property of non-object в файле /home/u993733836/public_html/templates/template7/template.htm (строка 51)
Матерится на
var_dump($aPropertiesValue->value);
свойство value