protected function _toHtml()
 {
     $result = parent::_toHtml();
     $result = Mage::helper('aitcg')->getSecureUnsecureUrl($result);
     $result = Mage::helper('aitcg')->removeSocialWidgetsFromHtml($result);
     return $result;
 }
Exemple #2
0
 public function getOrderOptions()
 {
     $result = parent::getOrderOptions();
     $item = $this->getItem();
     if ($item->getProductType() != 'giftvoucher') {
         return $result;
     }
     if ($options = $item->getProductOptionByCode('info_buyRequest')) {
         foreach (Mage::helper('giftvoucher')->getGiftVoucherOptions() as $code => $label) {
             if ($options[$code]) {
                 $result[] = array('label' => $label, 'value' => $options[$code], 'option_value' => $options[$code]);
             }
         }
     }
     $giftVouchers = Mage::getModel('giftvoucher/giftvoucher')->getCollection()->addItemFilter($item->getId());
     if ($giftVouchers->getSize()) {
         $giftVouchersCode = array();
         foreach ($giftVouchers as $giftVoucher) {
             $currency = Mage::getModel('directory/currency')->load($giftVoucher->getCurrency());
             $balance = $giftVoucher->getBalance();
             if ($currency) {
                 $balance = $currency->format($balance, array(), false);
             }
             $giftVouchersCode[] = $giftVoucher->getGiftCode() . ' (' . $balance . ') ';
         }
         $codes = implode(' ', $giftVouchersCode);
         $result[] = array('label' => $this->__('Gift Voucher Code'), 'value' => $codes, 'option_value' => $codes);
     }
     return $result;
 }
Exemple #3
0
 /**
  * @return array
  */
 public function getOrderOptions()
 {
     $result = array();
     if ($options = $this->getItem()->getProductOptions()) {
         $newResult = Mage::helper('payperrentals/rendercart')->renderDates($options, $this->getItem());
         $result = array_merge($newResult, $result);
         $result = array_merge($result, parent::getOrderOptions());
     }
     return $result;
 }
Exemple #4
0
 public function getFormattedOption($value)
 {
     $result = parent::getFormattedOption($value);
     if (!is_null($result)) {
         return $result;
     }
     $_remainder = '';
     $value = Mage::helper('core/string')->truncate($value, 55, '', $_remainder);
     $result = array('value' => nl2br($value), 'remainder' => nl2br($_remainder));
     return $result;
 }
 /**
  * Prepare item html
  *
  * This method uses renderer for real product type
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->getItem()->getOrderItem()) {
         $item = $this->getItem()->getOrderItem();
     } else {
         $item = $this->getItem();
     }
     if ($productType = $item->getRealProductType()) {
         $renderer = $this->getRenderedBlock()->getColumnHtml($this->getItem(), $productType);
         return $renderer;
     }
     return parent::_toHtml();
 }
Exemple #6
0
 public function getOrderOptions()
 {
     $result = parent::getOrderOptions();
     if (Mage::getStoreConfig('SCP_options/cart/show_config_product_options')) {
         if ($this->getConfigurableProductParentId()) {
             $attributes = $this->getConfigurableProductParent()->getTypeInstance()->getUsedProductAttributes();
             foreach ($attributes as $attribute) {
                 $configOptions[] = array('label' => $attribute->getFrontendLabel(), 'value' => $this->getProduct()->getAttributeText($attribute->getAttributeCode()), 'option_id' => $attribute->getId());
             }
             $result = array_merge($result, $configOptions);
         }
     }
     return $result;
 }
Exemple #7
0
 public function getOrderOptions()
 {
     $result = parent::getOrderOptions();
     if ($this->getItem()->getProductType() == MT_Giftcard_Model_Catalog_Product_Type::TYPE_GIFTCARD_PRODUCT) {
         $giftCardValue = '';
         $giftCardCollection = Mage::getModel('giftcard/giftcard')->getCollection()->addFieldToFilter('order_item_id', $this->getItem()->getId());
         if ($giftCardCollection->count() > 0) {
             foreach ($giftCardCollection as $giftCard) {
                 $giftCardValue .= $giftCard->getCode() . '(' . Mage::helper('giftcard')->__($giftCard->getStatus()) . ')<br/>';
             }
             $productOptions = $this->getItem()->getProductOptions();
             $options = array(array('label' => Mage::helper('giftcard')->__('Gift Card'), 'value' => $giftCardValue));
             $result = array_merge($result, $options);
         }
     }
     return $result;
 }
 public function getOrderOptions()
 {
     $result = array();
     if ($options = $this->getItem()->getProductOptions()) {
         $startDateLabel = $this->getItem()->getIsVirtual() ? $this->__("Subscription start:") : $this->__("First delivery:");
         if (isset($options['info_buyRequest'])) {
             $periodTypeId = @$options['info_buyRequest']['aw_sarp_subscription_type'];
             $periodStartDate = @$options['info_buyRequest']['aw_sarp_subscription_start'];
             if ($periodTypeId && $periodStartDate) {
                 $result[] = array('label' => $this->__('Subscription type:'), 'value' => Mage::getModel('sarp/period')->load($periodTypeId)->getName());
                 $result[] = array('label' => $startDateLabel, 'value' => $periodStartDate);
             }
         }
         $result = array_merge($result, parent::getOrderOptions());
     }
     return $result;
 }
 public function getOrderOptions()
 {
     return array_merge($this->_getGiftcardOptions(), parent::getOrderOptions());
 }