protected function _toHtml() { if (!$this->getCount()) { return $this->renderView(); } $this->setRecentlyViewedProducts($this->getItemsCollection()); return parent::_toHtml(); }
public function getItemsCollection() { if (is_null($this->_collection)) { $collection = parent::getItemsCollection(); $session = Mage::getSingleton('customer/session'); $isCorporate = FALSE; if ($session->isLoggedIn()) { $customer = $session->getCustomer(); $isCorporate = $customer->getZiscorporate(); } if ($isCorporate == 470) { $collection->getSelect()->where("price_index.tier_price IS NOT NULL"); } $this->_collection = $collection; } return $this->_collection; }
/** * Internal constructor * */ protected function _construct() { parent::_construct(); $this->addColumnCountLayoutDepend('one_column', 5)->addColumnCountLayoutDepend('two_columns_left', 4)->addColumnCountLayoutDepend('two_columns_right', 4)->addColumnCountLayoutDepend('three_columns', 3); $this->addPriceBlockType('bundle', 'bundle/catalog_product_price', 'bundle/catalog/product/price.phtml'); }
/** * Emulate 'viewed products' block with persistent data * * @param Mage_Reports_Block_Product_Viewed $block * @return null */ public function emulateViewedProductsBlock(Mage_Reports_Block_Product_Viewed $block) { if (!Mage::helper('enterprise_persistent')->isViewedProductsPersist()) { return; } $customerId = $this->_getCustomerId(); $block->getModel()->setCustomerId($customerId)->calculate(); $block->setCustomerId($customerId); }