Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $products = Mage::getModel('catalog/product')->getCollection(); $products->addAttributeToSelect(array('name', 'thumbnail', 'price')); //feel free to add any other attribues you need. Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
- Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products); Mage::getModel('cataloginventory/stock_item')->loadByProduct($products); $products->getSelect()->order('RAND()'); $products->getSelect()->limit(6);
Add Comment
Please, Sign In to add comment