/** * Add support for getFormatedOptionValue to enable custom_view * @see Ip_Swatches_Model_Product_Option_Type_Swatch::getCustomizedView * @return array */ public function getItemOptions() { $result = array(); $options = parent::getItemOptions(); foreach ($options as $option) { $value = $this->getFormatedOptionValue($option); $option['print_value'] = $value['value']; $option['value'] = $value['value']; $result[] = $option; } 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()->getItemRenderer($productType); $renderer->setItem($this->getItem()); return $renderer->toHtml(); } return parent::_toHtml(); }
public function getItemOptions() { $options = false; if (Mage::getStoreConfig('SCP_options/cart/show_custom_options')) { $options = parent::getItemOptions(); } if (Mage::getStoreConfig('SCP_options/cart/show_config_product_options')) { if ($this->getConfigurableProductParentId()) { $attributes = $this->getConfigurableProductParent()->getTypeInstance()->getUsedProductAttributes(); foreach ($attributes as $attribute) { $options[] = array('label' => $attribute->getFrontendLabel(), 'value' => $this->getProduct()->getAttributeText($attribute->getAttributeCode()), 'option_id' => $attribute->getId()); } } } return $options; }
public function getItemOptions() { $result = parent::getItemOptions(); 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/>'; } $options = array(array('label' => Mage::helper('giftcard')->__('Gift Card'), 'value' => $giftCardValue)); if ($giftCard->getStatus() == MT_Giftcard_Model_Giftcard::STATUS_PENDING) { $options[] = array('label' => '<br/>', 'value' => Mage::helper('giftcard')->__('Please pay for gift card. After this, your gift cards will be active.')); } $result = array_merge($result, $options); } } return $result; }