質問

イベントでカテゴリに参加しようとしています。

これは私がこれまでのものです:

<?php
$rootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$categoryModel = Mage::getModel('catalog/category');
$categories = $categoryModel->getCollection()
                ->addAttributeToSelect(array('name'))
                ->addAttributeToFilter('parent_id', array('eq' => $rootCategoryId))
                ->addAttributeToFilter('is_active', array('eq' => 1));
$categories->joinTable('catalogevent/event', 'entity_id=category_id');
.

受信したエラーは次のとおりです。

致命的なエラー:未定義の方法への呼び出し MAGE_CATALOG_MODEL_RESOURCE_CATEGORY_FLAT_COLLECTION :: GOONITABLE()

任意の助けが大いに感謝されています。joinfieldとjoinAttributeを使用しようとしている同様のエラーが発生します。

役に立ちましたか?

解決

を試してください

$rootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$categoryModel = Mage::getModel('catalog/category');
                ->getCollection()
                ->addAttributeToSelect(array('name'))
                ->addAttributeToFilter('parent_id', array('eq' => $rootCategoryId))
                ->addAttributeToFilter('is_active', array('eq' => 1));
$categoryModel->getSelect()->join('catalogevent/event', 'entity_id=category_id');
.

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top