How to get products from a particular category in magento ecommerce

后端 未结 6 1327
广开言路
广开言路 2020-12-05 11:50

I\'d like to get a list of random products from the same category as the current product for displaying within the product view - so far all I\'ve dug up is

Magento

6条回答
  •  无人及你
    2020-12-05 12:45

    You should instantiate a model by calling Mage::getModel('catalog/product') in this case because then you get a configured object instance, extended by any configured modules.

    If you do it like new Mage_Catalog_Model_Product() this will ignore modules and bypass the Magento API.

提交回复
热议问题