I'm trying to get product collection and join table catalog/category_product.
$productCollection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds())
->joinField('category_id','catalog/category_product','category_id','product_id=entity_id',null,'left');
And I have the error.
Item (Mage_Catalog_Model_Product) with the same id "338" already exist.
What am I doing wrong?
Thanks.
Best Answer
Please use this collection.