Example #1
0
 /**
  * Construct
  *
  * @param array $defaultConfig
  * @param array $defaultData
  */
 public function __construct(array $defaultConfig = array(), array $defaultData = array())
 {
     parent::__construct($defaultConfig, $defaultData);
     $this->_data[self::CONFIGURABLE]['data']['affect_configurable_product_attributes'] = 'Template %isolation%';
     $this->_data[self::CONFIGURABLE_ADVANCED_PRICING] = $this->getConfigurableAdvancedPricing();
     $this->_data[self::CONFIGURABLE_MAP] = $this->addMapToConfigurable($this->_data[self::CONFIGURABLE]);
     $this->_data[self::PRODUCT_VARIATIONS] = array('config' => $defaultConfig, 'data' => $this->buildProductVariations($defaultData));
     $this->_data['edit_configurable'] = $this->editConfigurable();
 }
Example #2
0
 /**
  * @param string $productType
  * @return array
  */
 protected function resetRequiredFields($productType)
 {
     $required = parent::resetRequiredFields($productType);
     if (isset($this->_data[$productType]['data']['fields']['price'])) {
         $required = array_merge_recursive($required, array('data' => array('fields' => array('price' => array('value' => 60, 'group' => Fixture\Product::GROUP_PRODUCT_DETAILS)), 'checkout' => array('prices' => array('price_from' => 70, 'price_to' => 72)))));
     } else {
         $required['data']['checkout']['prices'] = $this->_data[$productType]['data']['checkout']['prices'];
     }
     return $required;
 }
Example #3
0
 /**
  * @param string $productType
  * @return array
  */
 protected function resetRequiredFields($productType)
 {
     return array_replace_recursive(parent::resetRequiredFields($productType), ['data' => ['fields' => ['price' => ['value' => '1.99', 'group' => Fixture\Product::GROUP_PRODUCT_DETAILS]]]]);
 }