Esempio n. 1
0
 function doCollection()
 {
     $collection = new Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection();
     $collection->setStoreId(Mage::app()->getStore()->getId());
     $collection->addAttributeToSelect('*');
     $collection->addStoreFilter();
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
     return $collection;
 }
Esempio n. 2
0
 /**
  * Adds store filter into array
  *
  * @param mixed $storeId
  * @return Mage_Review_Model_Mysql4_Review_Product_Collection
  */
 public function addStoreFilter($storeId = null)
 {
     if (is_null($storeId)) {
         $storeId = $this->getStoreId();
     }
     parent::addStoreFilter($storeId);
     if (!is_array($storeId)) {
         $storeId = array($storeId);
     }
     if (!empty($this->_storesIds)) {
         $this->_storesIds = array_intersect($this->_storesIds, $storeId);
     } else {
         $this->_storesIds = $storeId;
     }
     return $this;
 }
Esempio n. 3
0
 public function addStoreFilter($storeId = null)
 {
     parent::addStoreFilter($storeId);
     $this->getSelect()->join(array('store' => $this->_reviewStoreTable), 'rt.review_id=store.review_id AND store.store_id=' . (int) $storeId, array());
     return $this;
 }
 /**
  * Add store availability filter. Include availability product
  * for store website
  *
  * @param mixed $store
  * @return Listrak_Remarketing_Model_Mysql4_Product_Collection
  */
 public function addStoreFilter($store = null)
 {
     $this->_storeFilter = $store;
     parent::addStoreFilter($store);
     return $this;
 }