コード例 #1
0
 /**
  * Merge Attributes
  *
  * @see parent::getCustomOptions()
  * @param Mage_Catalog_Model_Product_Configuration_Item_Interface $item
  * @return array
  */
 public function getCustomOptions(Mage_Catalog_Model_Product_Configuration_Item_Interface $item)
 {
     $optionsParent = parent::getCustomOptions($item);
     $optionsSelf = $this->_getAttributes($item);
     $options = array_merge($optionsSelf, $optionsParent);
     return $options;
 }
コード例 #2
0
 /**
  * Prepare select for load
  *
  * @param Varien_Db_Select $select
  * @return string
  */
 public function _prepareSelect(Varien_Db_Select $select)
 {
     $allowedProductTypes = array();
     foreach ($this->_configurationHelper->getConfigurableAllowedTypes() as $type) {
         $allowedProductTypes[] = $type->getName();
     }
     $this->addAttributeToSelect('name')->addAttributeToSelect('price')->addAttributeToSelect('sku')->addAttributeToSelect('weight')->addFieldToFilter('type_id', $allowedProductTypes)->addFieldToFilter('entity_id', array('neq' => $this->getProduct()->getId()))->addFilterByRequiredOptions()->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner');
     return parent::_prepareSelect($select);
 }
 public function getFormattedOptionValue($optionValue, $params = null)
 {
     if (!$params) {
         $params = array();
     }
     if (isset($params['max_length'])) {
         $params['max_length'] = null;
     }
     return parent::getFormattedOptionValue($optionValue, $params);
 }
コード例 #4
0
 public function getCustomOptions(Mage_Catalog_Model_Product_Configuration_Item_Interface $item)
 {
     $this->setCustomOptionsDetails($item);
     return parent::getCustomOptions($item);
 }