Example #1
0
 /**
  * Custom constructor to create bundle product with assigned simple products
  *
  * @param Config $configuration
  * @param array $placeholders
  */
 public function __construct(Config $configuration, $placeholders = [])
 {
     parent::__construct($configuration, $placeholders);
     $this->_placeholders['item1_simple1::getName'] = [$this, 'productProvider'];
     $this->_placeholders['item1_simple1::getProductId'] = [$this, 'productProvider'];
     $this->_placeholders['item1_virtual2::getName'] = [$this, 'productProvider'];
     $this->_placeholders['item1_virtual2::getProductId'] = [$this, 'productProvider'];
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function __construct(Config $configuration, $placeholders = [])
 {
     parent::__construct($configuration, $placeholders);
     $this->_placeholders[$this->assignType . '_simple::getSku'] = [$this, 'productProvider'];
     $this->_placeholders[$this->assignType . '_simple::getName'] = [$this, 'productProvider'];
     $this->_placeholders[$this->assignType . '_configurable::getSku'] = [$this, 'productProvider'];
     $this->_placeholders[$this->assignType . '_configurable::getName'] = [$this, 'productProvider'];
 }
Example #3
0
 /**
  * Custom constructor to create Grouped product
  *
  * @param Config $configuration
  * @param array $placeholders
  */
 public function __construct(Config $configuration, $placeholders = [])
 {
     parent::__construct($configuration, $placeholders);
     $this->_placeholders['simple::getName'] = [$this, 'productProvider'];
     $this->_placeholders['virtual::getName'] = [$this, 'productProvider'];
     $this->_placeholders['downloadable::getName'] = [$this, 'productProvider'];
     $this->_placeholders['simple::getProductId'] = [$this, 'productProvider'];
     $this->_placeholders['virtual::getProductId'] = [$this, 'productProvider'];
     $this->_placeholders['downloadable::getProductId'] = [$this, 'productProvider'];
 }
Example #4
0
 /**
  * Custom constructor to create product with assigned category
  *
  * @param Config $configuration
  * @param array $placeholders
  */
 public function __construct(Config $configuration, $placeholders = array())
 {
     $this->_placeholders[self::PRICE_VALUE] = 10;
     parent::__construct($configuration, $placeholders);
 }
Example #5
0
 /**
  * Custom constructor to create configurable product with attribute
  *
  * @param Config $configuration
  * @param array $placeholders
  */
 public function __construct(Config $configuration, $placeholders = [])
 {
     parent::__construct($configuration, $placeholders);
     $this->_placeholders['attribute_label_1'] = [$this, 'attributeProvider'];
 }