Example #1
0
 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'simple', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = $this->_getPreparedData();
     $this->_data['fields'] = array_merge($this->_data['fields'], $data);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogSimpleProduct($this->_dataConfig, $this->_data);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = ['constraint' => 'Success', 'grid_filter' => ['name'], 'create_url_params' => ['type' => 'virtual', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID], 'input_prefix' => 'product'];
     $data = ['is_virtual' => ['value' => '', 'group' => null], 'price' => ['value' => 15, 'group' => static::GROUP_PRODUCT_DETAILS], 'tax_class_id' => ['value' => 'Taxable Goods', 'input_value' => '2', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'], 'qty' => ['value' => 1000, 'group' => static::GROUP_PRODUCT_DETAILS, 'input_name' => 'product[quantity_and_stock_status][qty]'], 'product_website_1' => ['value' => 'Yes', 'input_value' => 1, 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'product[website_ids][]'], 'inventory_manage_stock' => ['value' => 'No', 'input_value' => '0', 'group' => static::GROUP_PRODUCT_INVENTORY, 'input' => 'select', 'input_name' => 'product[stock_data][manage_stock]']];
     $this->_data['fields'] = array_merge($this->_data['fields'], $data);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogVirtualProduct($this->_dataConfig, $this->_data);
 }
 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('type_id' => 'downloadable', 'constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'downloadable', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = array('is_virtual' => ['value' => '', 'group' => null], 'price' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS], 'qty' => array('value' => 1000, 'group' => static::GROUP_PRODUCT_DETAILS, 'input_name' => 'product[quantity_and_stock_status][qty]'), 'quantity_and_stock_status' => array('value' => 'In Stock', 'input_value' => 1, 'group' => static::GROUP_PRODUCT_DETAILS, 'input_name' => 'product[quantity_and_stock_status][is_in_stock]'), 'product_website_1' => array('value' => 'Yes', 'input_value' => 1, 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'product[website_ids][]'));
     $this->_data['fields'] = $data + $this->_data['fields'];
     $this->_repository = Factory::getRepositoryFactory()->getMagentoDownloadableDownloadableProduct($this->_dataConfig, $this->_data);
 }
 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'downloadable', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = array('is_virtual' => ['value' => '', 'group' => null], 'price' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS]);
     $this->_data['fields'] = $data + $this->_data['fields'];
     $this->_repository = Factory::getRepositoryFactory()->getMagentoDownloadableDownloadableProduct($this->_dataConfig, $this->_data);
 }
Example #5
0
 /**
  * Initialize fixture data
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = ['type_id' => 'bundle', 'constraint' => 'Success', 'create_url_params' => ['type' => 'bundle', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID], 'input_prefix' => 'product'];
     $this->_repository = Factory::getRepositoryFactory()->getMagentoBundleBundle($this->_dataConfig, $this->_data);
 }
Example #6
0
 /**
  * Init Data
  *
  * @return void
  *
  * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = ['type_id' => 'configurable', 'constraint' => 'Success', 'create_url_params' => ['type' => Repository::CONFIGURABLE, 'set' => static::DEFAULT_ATTRIBUTE_SET_ID]];
     $data = ['fields' => ['price' => ['value' => '10', 'group' => static::GROUP_PRODUCT_DETAILS], 'tax_class_id' => ['value' => 'Taxable Goods', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select', 'input_value' => '2'], 'weight' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS], 'product_website_1' => ['value' => 'Yes', 'input_value' => [1], 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'website_ids'], 'configurable_attributes_data' => ['value' => ['0' => ['label' => ['value' => '%attribute_label_1%'], '0' => ['option_label' => ['value' => '%attribute_1_option_label_1%'], 'pricing_value' => ['value' => '1'], 'is_percent' => ['value' => 'No'], 'include' => ['value' => 'Yes']], '1' => ['option_label' => ['value' => '%attribute_1_option_label_2%'], 'pricing_value' => ['value' => '2'], 'is_percent' => ['value' => 'No'], 'include' => ['value' => 'Yes']]]], 'group' => static::GROUP], 'variations-matrix' => ['value' => ['0' => ['configurable_attribute' => ['0' => ['attribute_option' => '%attribute_1_option_label_1%']], 'value' => ['display' => ['value' => 'Yes', 'input' => 'checkbox'], 'name' => ['value' => 'Variation 0-%isolation%'], 'sku' => ['value' => 'Variation 0-%isolation%'], 'qty' => ['value' => '100']]], '1' => ['configurable_attribute' => ['0' => ['attribute_option' => '%attribute_1_option_label_2%']], 'value' => ['display' => ['value' => 'Yes', 'input' => 'checkbox'], 'name' => ['value' => 'Variation 1-%isolation%'], 'sku' => ['value' => 'Variation 1-%isolation%'], 'qty' => ['value' => '200']]]], 'group' => static::GROUP]], 'checkout_data' => ['options' => ['configurable_options' => [['title' => '0', 'value' => '0']], 'qty' => 1], 'special_price' => '10']];
     $this->_data = array_merge_recursive($this->_data, $data);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoConfigurableProductConfigurableProduct($this->_dataConfig, $this->_data);
 }