public function hasProductUrl() { $buyRequest = Mage::helper('collpur')->getBuyRequest($this->getItem(), true); if ($buyRequest->getDealId()) { return true; } return parent::hasProductUrl(); }
public function getDeleteUrl() { $helper = Mage::helper('adodis_ajaxcart'); $is_cart = $helper->getIsCartPage() || $helper->getChangeAttributeCart() || $helper->getChangeQtyCart(); if ($helper->isAjaxCartEnable() && (Mage::getStoreConfig('adodis_ajaxcart/qty_settings/cart_block') && !$is_cart || Mage::getStoreConfig('adodis_ajaxcart/qty_settings/cart_page') && $is_cart)) { return 'javascript:AjaxCartConfig.deleteItem(\'' . $this->getUrl('checkout/cart/delete', array('id' => $this->getItem()->getId())) . '\')'; } else { return parent::getDeleteUrl(); } }
public function getProductOptions() { $parent = parent::getProductOptions(); if (!Mage::helper('giftcard')->isActive() || $this->getProduct()->getTypeId() != MT_Giftcard_Model_Catalog_Product_Type::TYPE_GIFTCARD_PRODUCT) { return $parent; } $giftCardHelper = Mage::helper('giftcard/catalog_product_configuration'); $giftCardOptions = $giftCardHelper->getCustomOptions($this->getItem()); return array_merge($giftCardOptions, $parent); }
public function getDeleteUrl() { $helper = Mage::helper('flycart'); $rendered = $this->getRenderedBlock(); $is_cart = $helper->isCartPage() || $helper->isChangedAttributeCart() || $helper->isChangedQtyCart() || $helper->isCrosssellAdd(); if ($helper->isActivated() && ((Mage::getStoreConfig('flycart/qtyupdate/cart_block') || Mage::getStoreConfig('flycart/general/visible_top_cart')) && $rendered || Mage::getStoreConfig('flycart/qtyupdate/cart_page') && $is_cart)) { return 'javascript:ajaxcartConfig.deleteItem(\'' . $this->getUrl('checkout/cart/delete', array('id' => $this->getItem()->getId())) . '\')'; } else { return parent::getDeleteUrl(); } }
public function getProductOptions() { $options = parent::getProductOptions(); if (Mage::helper('giftvoucher')->getInterfaceConfig('display')) { foreach (Mage::helper('giftvoucher')->getGiftVoucherOptions() as $code => $label) { if ($option = $this->getItem()->getOptionByCode($code)) { $options[] = array('label' => $label, 'value' => $this->htmlEscape($option->getValue())); } } } return $options; }
public function testThumbnail() { $size = $this->_block->getThumbnailSize(); $sidebarSize = $this->_block->getThumbnailSidebarSize(); $this->assertGreaterThan(1, $size); $this->assertGreaterThan(1, $sidebarSize); $this->assertContains('/' . $size, $this->_block->getProductThumbnailUrl()); $this->assertContains('/' . $sidebarSize, $this->_block->getProductThumbnailSidebarUrl()); $this->assertStringEndsWith('magento_image.jpg', $this->_block->getProductThumbnailUrl()); $this->assertStringEndsWith('magento_image.jpg', $this->_block->getProductThumbnailSidebarUrl()); }
public function getProductOptions() { switch ($this->getItem()->getProductType()) { case 'bundle': $renderer = $this->getLayout()->createBlock('bundle/checkout_cart_item_renderer'); $renderer->setItem($this->getItem()); return $renderer->getOptionList(); case 'configurable': $renderer = $this->getLayout()->createBlock('checkout/cart_item_renderer_configurable'); $renderer->setItem($this->getItem()); return $renderer->getOptionList(); } return parent::getProductOptions(); }
public function getOptionList() { $options = parent::getOptionList(); $item = $this->getItem(); $giftwrapItem = Mage::getModel('giftwrap/selectionitem')->getCollection()->addFieldToFilter('item_id', $item->getId())->getFirstItem(); $giftbox = Mage::getModel('giftwrap/selection')->load($giftwrapItem->getSelectionId()); $giftwrap = Mage::getModel('giftwrap/giftwrap')->load($giftbox->getStyleId()); $giftcard = Mage::getModel('giftwrap/card')->load($giftbox->getGiftcardId()); if ($giftwrapItem->getId()) { $options[] = array('label' => Mage::helper('giftwrap')->__('Gift Wrap'), 'value' => $this->htmlEscape($giftwrap->getTitle())); if ($giftcard->getId()) { $options[] = array('label' => Mage::helper('giftwrap')->__('Gift Card'), 'value' => $this->htmlEscape($giftcard->getName())); } if ($giftbox->getMessage()) { $options[] = array('label' => Mage::helper('giftwrap')->__('Gift Message'), 'value' => $this->htmlEscape($giftbox->getMessage())); } } return $options; }
public function getProductThumbnail() { #If product not added via SCP, use default behaviour if (!$this->getConfigurableProductParentId()) { return parent::getProductThumbnail(); } #If showing simple product image if (!Mage::getStoreConfig('SCP_options/cart/show_configurable_product_image')) { $product = $this->getProduct(); #if product image is not a thumbnail if ($product->getData('thumbnail') && $product->getData('thumbnail') != 'no_selection') { return $this->helper('catalog/image')->init($product, 'thumbnail'); } } #If simple prod thumbnail image is placeholder, or we're not using simple product image #show configurable product image $product = $this->getConfigurableProductParent(); return $this->helper('catalog/image')->init($product, 'thumbnail'); }
/** * Retrieve block cache tags * * @return array */ public function getCacheTags() { return array_merge(parent::getCacheTags(), $this->getGroupedProduct()->getCacheIdTags()); }
/** * Retrieve block cache tags * * @return array */ public function getCacheTags() { return array_merge(parent::getCacheTags(), $this->getConfigurableProduct()->getCacheIdTags()); }
public function getOptionList() { return array_merge($this->_getSarpOptions(), parent::getOptionList()); }
public function __construct() { parent::__construct(); $this->_configurationHelper = Mage::helper('Mage_Bundle_Helper_Catalog_Product_Configuration'); }
public function __construct(array $initParams = []) { list($this->edd) = $this->checkTypes($this->nullCoalesce($initParams, 'edd', Mage::getModel('ebayenterprise_inventory/edd'))); parent::__construct($this->removeKnownKeys($initParams)); }
public function _prepareLayout() { return parent::_prepareLayout(); }
/** * Overloaded method for getting list of bundle options * Caches result in quote item, because it can be used in cart 'recent view' and on same page in cart checkout * * @return array */ public function getOptionList() { $item = $this->getItem(); $optionList = $item->getBlockOptionList(); if ($optionList === null) { $optionList = array_merge($this->_getBundleOptions(), parent::getOptionList()); $item->setBlockOptionList($optionList); } return $optionList; }