Beispiel #1
0
 /**
  * Checks to see if the price can be shown.
  *
  * @return boolean
  */
 protected function _canShowPrice()
 {
     if (!$this->oB2BHelper->isExtensionActive()) {
         return true;
     }
     return $this->oB2BCustomerHelper->isCustomerLoggedIn();
 }
Beispiel #2
0
 /**
  * For a given product price block check if the product is active
  *  - if it is active then set the price html as the default message
  *
  * @param Mage_Catalog_Block_Product_Price $oBlock
  * @param Varien_Object $oTransport
  */
 protected function transformPriceBlock($oBlock, $oTransport)
 {
     $oProduct = $oBlock->getProduct();
     $iCurrentProductId = $oProduct->getId();
     if ($this->oB2BHelper->isProductActive($oProduct) === false) {
         // To stop duplicate information being displayed validate that we only do this once per product
         if ($iCurrentProductId !== self::$iLastProductId) {
             self::$iLastProductId = $iCurrentProductId;
             $oTransport->setHtml($this->oB2BHelper->getLoginMessage());
         } else {
             $oTransport->setHtml('');
         }
         $this->setSymmetricsProductType($oProduct);
     }
 }