0

アンカー カテゴリの商品数を取得できるスクリプトまたはアイデアが必要です。

loadProductCount()クラスからメソッドを試しMage_Catalog_Model_Resource_Eav_Mysql4_Category_Collectionましたが、製品数を返さず、代わりに配列を返します。以下の配列を見てください。

Array
(
    [0] => Array
        (
            [entity_id] => 1
            [entity_type_id] => 3
            [attribute_set_id] => 0
            [parent_id] => 0
            [created_at] => 0000-00-00 00:00:00
            [updated_at] => 2011-10-31 16:14:51
            [path] => 1
            [position] => 0
            [level] => 0
            [children_count] => 163
        )

    [1] => Array
        (
            [entity_id] => 2
            [entity_type_id] => 3
            [attribute_set_id] => 3
            [parent_id] => 1
            [created_at] => 2011-10-31 16:14:51
            [updated_at] => 2012-09-07 20:51:21
            [path] => 1/2
            [position] => 1
            [level] => 1
            [children_count] => 163
        )

[2] => Array
    (
        [entity_id] => 117
        [entity_type_id] => 3
        [attribute_set_id] => 0
        [parent_id] => 2
        [created_at] => 2012-09-07 16:51:28
        [updated_at] => 2012-09-10 07:55:24
        [path] => 1/2/117
        [position] => 13
        [level] => 2
        [children_count] => 15
    )

....

4

2 に答える 2

0

getProductCount関数 onは、Mage_Catalog_Model_Category求めている情報を返す必要があります。

于 2012-09-26T10:48:32.220 に答える