Я новичок в magento и php и пытаюсь получить значения из объекта.
$_productCollection=$this->getLoadedProductCollection();
Когда я делаю print_r()
, я получаю что-то вроде ниже
Mage_Catalog_Model_Resource_Product_Collection Object
(
[_flatEnabled:protected] => Array
(
[1] =>
)
[_productWebsiteTable:protected] => sn_catalog_product_website
[_productCategoryTable:protected] => sn_catalog_category_product
[_addUrlRewrite:protected] => 1
[_urlRewriteCategory:protected] => 3
[_addMinimalPrice:protected] =>
[_addFinalPrice:protected] =>
[_allIdsCache:protected] =>
[_addTaxPercents:protected] => 1
[_productLimitationFilters:protected] => Array
(
[category_id] => 3
[category_is_anchor] => 1
[store_id] => 1
[use_price_index] => 1
[customer_group_id] => 0
[website_id] => 1
[visibility] => Array
(
[0] => 2
[1] => 4
)
)
)
И мне нужно получить ID категории в этом.Может кто-нибудь, пожалуйста, помогите мне