Esempio n. 1
0
 /**
  * @Given the store has a :productName configurable product
  */
 public function storeHasAConfigurableProduct($productName)
 {
     $product = $this->productFactory->createNew();
     $product->setName($productName);
     $product->setCode($this->convertToCode($productName));
     $product->setDescription('Awesome ' . $productName);
     $this->saveProduct($product);
 }
Esempio n. 2
0
 /**
  * @Given the store has a :productName configurable product
  */
 public function storeHasAConfigurableProduct($productName)
 {
     /** @var ProductInterface $product */
     $product = $this->productFactory->createNew();
     $product->setName($productName);
     $product->setCode($this->convertToCode($productName));
     $product->setDescription('Awesome ' . $productName);
     if ($this->sharedStorage->has('channel')) {
         $channel = $this->sharedStorage->get('channel');
         $product->addChannel($channel);
     }
     $this->saveProduct($product);
 }
Esempio n. 3
0
 /**
  * @Given the store has a :productName configurable product
  */
 public function storeHasAConfigurableProduct($productName)
 {
     /** @var ProductInterface $product */
     $product = $this->productFactory->createNew();
     $product->setName($productName);
     $product->setCode(StringInflector::nameToUppercaseCode($productName));
     $product->setSlug($this->slugGenerator->generate($productName));
     $product->setDescription('Awesome ' . $productName);
     if ($this->sharedStorage->has('channel')) {
         $channel = $this->sharedStorage->get('channel');
         $product->addChannel($channel);
     }
     $this->saveProduct($product);
 }