/**
  * Initialize attributes parameters for all attributes' sets.
  *
  * @return $this
  */
 protected function _initAttributes()
 {
     parent::_initAttributes();
     if (isset(self::$attributeCodeToId['price_type']) && ($id = self::$attributeCodeToId['price_type'])) {
         self::$commonAttributesCache[$id]['type'] = 'select';
         self::$commonAttributesCache[$id]['options'] = [self::VALUE_DYNAMIC => BundlePrice::PRICE_TYPE_DYNAMIC, self::VALUE_FIXED => BundlePrice::PRICE_TYPE_FIXED];
     }
 }
Beispiel #2
0
 /**
  * Initialize attributes parameters for all attributes' sets.
  *
  * @return $this
  */
 protected function _initAttributes()
 {
     parent::_initAttributes();
     $options = [self::VALUE_DYNAMIC => BundlePrice::PRICE_TYPE_DYNAMIC, self::VALUE_FIXED => BundlePrice::PRICE_TYPE_FIXED];
     foreach ($this->_specialAttributes as $attributeCode) {
         if (isset(self::$attributeCodeToId[$attributeCode]) && ($id = self::$attributeCodeToId[$attributeCode])) {
             self::$commonAttributesCache[$id]['type'] = 'select';
             self::$commonAttributesCache[$id]['options'] = $options;
             foreach ($this->_attributes as $attrSetName => $attrSetValue) {
                 if (isset($attrSetValue[$attributeCode])) {
                     $this->_attributes[$attrSetName][$attributeCode]['type'] = 'select';
                     $this->_attributes[$attrSetName][$attributeCode]['options'] = $options;
                 }
             }
         }
     }
 }