예제 #1
0
 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);
 }
예제 #2
0
 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;
 }
예제 #3
0
 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();
 }
예제 #4
0
파일: Item.php 프로젝트: AleksNesh/pandora
 public function getProductOptions()
 {
     $options = parent::getProductOptions();
     $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/giftcard')->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 ($giftcard->getId() && $giftbox->getMessage()) {
             $options[] = array('label' => Mage::helper('giftwrap')->__('Gift Message'), 'value' => $this->htmlEscape($giftbox->getMessage()));
         }
     }
     return $options;
 }