Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. $_productCollection = Mage::getResourceModel('catalog/product_collection')
  2. ->setStoreId(0)
  3. ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left')
  4. ->addAttributeToFilter('category_id', array('in' => $category_ids))
  5. ->addAttributeToSelect('*')
  6. ->addAttributeToFilter('visibility', 4) // Only catalog, search visiblity
  7. ->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED))
  8. ->addAttributeToSort('is_featured', 'DESC')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement