public function getProduct() { $product = parent::getProduct(); $this->_confProduct = $product; $product = Mage::helper('amconf')->getSimpleProductWithMinPrice($product); return $product; }
public function getProduct() { $product = parent::getProduct(); $this->_confProduct = $product; if (Mage::getStoreConfig('amconf/general/display_price')) { $product = Mage::helper('amconf')->getSimpleProductWithMinPrice($product); } return $product; }
protected function _toHtml() { if ($this->config_enabled == 1 && !$this->helper('customer')->isLoggedIn()) { $this->setTemplate('pricehide/price.phtml'); } if (!$this->getProduct() || $this->getProduct()->getCanShowPrice() === false) { return ''; } return parent::_toHtml(); }
/** * Add content of template block below price html if defined in config * * @return string */ public function _toHtml() { $html = trim(parent::_toHtml()); if (empty($html) || !Mage::getStoreConfigFlag('catalog/price/display_block_below_price')) { return $html; } if ($this->getTemplate() != $this->_tierPriceDefaultTemplate) { $html .= $this->getLayout()->createBlock('core/template')->setTemplate('germansetup/price_info.phtml')->setFormattedTaxRate($this->getFormattedTaxRate())->setIsIncludingTax($this->isIncludingTax())->setIsShowShippingLink($this->isShowShippingLink())->toHtml(); } return $html; }
protected function _toHtml() { if (!$this->getProduct() || $this->getProduct()->getCanShowPrice() === false) { return ''; } if (!(!$this->helper('customerprices')->isEnabled() || (!$this->helper('customerprices')->isHidePrice() || $this->helper('customer')->isLoggedIn())) && $this->getTemplate() == 'catalog/product/price.phtml') { return 'You need to <a href="' . Mage::getUrl('customer/account/login') . '">login</a> to see product price<br/>'; } if (!(!$this->helper('customerprices')->isEnabled() || (!$this->helper('customerprices')->isHidePrice() || $this->helper('customer')->isLoggedIn()))) { return ''; } return parent::_toHtml(); }
protected function _toHtml() { $helper = Mage::helper('downloads'); $isCategory = Mage::registry('current_category') && !Mage::registry('current_product'); $toolbar = $this->getLayout()->getBlock('product_list_toolbar'); $isGridMode = $toolbar && $toolbar->getCurrentMode() && $toolbar->getCurrentMode() == 'grid'; $html = parent::_toHtml(); if (!$isCategory || !$helper->isEnabled() || !$helper->isEnableFilesOnCategoryPages() || !$this->getProduct() || !$this->getProduct()->getId()) { return $html; } $filesBlock = $this->getLayout()->createBlock('downloads/product_link', '', array('id' => $this->getProduct()->getId(), 'is_category' => true, 'is_grid_mode' => $isGridMode))->toHtml(); $html .= $filesBlock; return $html; }
public function _toHtml() { $htmlToInsertAfter = '<div class="price-box">'; if ($this->getTemplate() == 'catalog/product/price.phtml') { $product = $this->getProduct(); if (is_object($product) && $product->isConfigurable()) { $extraHtml = '<span class="label" id="configurable-price-from-' . $product->getId() . $this->getIdSuffix() . '"><span class="configurable-price-from-label">' . $this->__('Price From:') . '</span></span>'; $priceHtml = parent::_toHtml(); #manually insert extra html needed by the extension into the normal price html return substr_replace($priceHtml, $extraHtml, strpos($priceHtml, $htmlToInsertAfter) + strlen($htmlToInsertAfter), 0); } } return parent::_toHtml(); }
/** * Convert block to html string * * @return string */ protected function _toHtml() { $product = $this->getProduct(); $isReservation = ITwebexperts_Payperrentals_Helper_Data::getAttributeCodeForId($product->getId(), 'is_reservation'); $typeId = $product->getTypeId(); if ($this->getTemplate() == $this->getTierPriceTemplate()) { return parent::_toHtml(); } if ($typeId == ITwebexperts_Payperrentals_Helper_Data::PRODUCT_TYPE || $isReservation != ITwebexperts_Payperrentals_Model_Product_Isreservation::STATUS_DISABLED && $isReservation !== false) { $priceHtml = $this->getLayout()->createBlock("payperrentals/catalog_product_price")->setTemplate('payperrentals/catalog/product/priceppr.phtml')->setProduct($product)->setDisplayMinimalPrice($this->getDisplayMinimalPrice())->setIdSuffix($this->getIdSuffix()); $priceHtml = $priceHtml->toHtml(); return $priceHtml; } return parent::_toHtml(); }
/** * Convert block to html string * * @return string */ protected function _toHtml() { $product = $this->getProduct(); if ($this->getMAPTemplate() && Mage::helper('catalog')->canApplyMsrp($product) && $product->getPriceType() != Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC) { if (Mage::helper('catalog')->isShowPriceOnGesture($product)) { $this->setWithoutPrice(true); } $realPriceHtml = parent::_toHtml(); $this->unsWithoutPrice(); $addToCartUrl = $this->getLayout()->getBlock('product.info.bundle')->getAddToCartUrl($product); $product->setAddToCartUrl($addToCartUrl); $html = $this->getLayout()->createBlock('catalog/product_price')->setTemplate($this->getMAPTemplate())->setRealPriceHtml($realPriceHtml)->setIdSuffix('_clone')->setProduct($product)->toHtml(); return $realPriceHtml . $html; } return parent::_toHtml(); }
protected function _toHtml() { $html = parent::_toHtml(); $html = Mage::helper('aitunits/event')->addAfterToHtml($html, $this); return $html; }
public function getProduct() { $sarpProduct = parent::getProduct(); if ($sarpProduct->getAwSarpEnabled() && Mage::helper('sarp')->isSubscriptionType($sarpProduct) && $sarpProduct->getTypeInstance()->getDefaultSubscriptionPeriodId() != AW_Sarp_Model_Period::PERIOD_TYPE_NONE) { $newPrice = Mage::helper('sarp')->getSarpSubscriptionPrice($sarpProduct); if (!is_null($sarpProduct->getData('price'))) { $sarpProduct->setPrice($newPrice); } if (!is_null($sarpProduct->getData('final_price'))) { $sarpProduct->setFinalPrice($newPrice); } if (!is_null($sarpProduct->getData('minimal_price'))) { $sarpProduct->setMinimalPrice($newPrice); } } return $sarpProduct; }
/** * Override this method in descendants to produce html * * @return string */ protected function _toHtml() { if ($this->isEnabled()) { $this->setTemplate('rewards/product/price.phtml'); } return parent::_toHtml(); }
/** * 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); } }
public function getProduct() { $product = parent::getProduct(); $sarpProduct = Mage::getModel('catalog/product')->load($product->getId()); if ($sarpProduct->getAwSarpEnabled() && Mage::helper('sarp')->isSubscriptionType($product) && ($sarpProduct->getAwSarpPeriod() != AW_Sarp_Model_Period::PERIOD_TYPE_NONE || !is_numeric($sarpProduct->getAwSarpPeriod()))) { $newPrice = Mage::helper('sarp')->getSarpSubscriptionPrice($sarpProduct); if (!is_null($sarpProduct->getData('price'))) { $sarpProduct->setPrice($newPrice); } if (!is_null($sarpProduct->getData('final_price'))) { $sarpProduct->setFinalPrice($newPrice); } if (!is_null($sarpProduct->getData('minimal_price'))) { $sarpProduct->setMinimalPrice($newPrice); } } return $sarpProduct; }