Magento BestSeller Module - Summing Configurable Products And Adding Them Back In

前端 未结 2 1790
我寻月下人不归
我寻月下人不归 2021-02-11 01:04

This has been bugging me for quite a while. Basically, what we are trying to achieve is in the bestsellers on our front page, to have the products listed in the amount sold. For

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-11 01:45

    You can use the following piece of code to get the simple products attached to the configurable product. I'm not sure if this is 100% correct, I haven't tried it myself.

    $simpleProducts = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);
    

提交回复
热议问题