firegento-dynamiccategory icon indicating copy to clipboard operation
firegento-dynamiccategory copied to clipboard

Product attributes index not triggered

Open pquerner opened this issue 8 years ago • 0 comments

We only had configurable products in categories in the past and no simple products, therefore the index tables for simple products for this index are empty at best.

Now that we use dynamiccategory we have some simple products in a category and its displayed fine, with the exception of missing filters in those category.

The reason is, that with this query output:

SELECT 
*
    #`sw_stone_color_idx`.`value`,
    #COUNT(sw_stone_color_idx.entity_id) AS `count`
FROM
    `catalog_product_entity` AS `e`
        INNER JOIN
    `catalog_category_product_index` AS `cat_index` ON cat_index.product_id = e.entity_id
        AND cat_index.store_id = 2
        AND cat_index.visibility IN (2 , 4)
        AND cat_index.category_id = '1211'
        INNER JOIN
    `groupscatalog_product_idx` ON groupscatalog_product_idx.catalog_entity_id = e.entity_id
        AND groupscatalog_product_idx.group_id = 0
        AND groupscatalog_product_idx.store_id = 2
        INNER JOIN
    `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id
        AND price_index.website_id = '1'
        AND price_index.customer_group_id = 0
        INNER JOIN
    `catalog_product_index_eav` AS `sw_stone_color_idx` ON sw_stone_color_idx.entity_id = e.entity_id
        AND sw_stone_color_idx.attribute_id = '240'
        AND sw_stone_color_idx.store_id = '2'
#GROUP BY `sw_stone_color_idx`.`value`

We dont have any results and therefore this filter is not visible on frontend.

I didnt check any code but we use dynamiccategory with the module "AsyncIndex" (https://github.com/magento-hackathon/AsyncIndex) and I guess the dynamiccategory module does not add any events so AsyncIndex may pick it up.

Therefore the index tables stay empty.

Can we patch this module so it fixes this problem ? I'd be happy to provide a PR if I have some time, but theres none in the near future.

pquerner avatar Jun 23 '16 07:06 pquerner