|
@@ -180,7 +180,7 @@ discard block |
|
|
block discarded – undo |
|
180
|
180
|
{ |
|
181
|
181
|
$product = $this->createProduct($productName, $price); |
|
182
|
182
|
|
|
183
|
|
- $product->setDescription('Awesome '.$productName); |
|
|
183
|
+ $product->setDescription('Awesome ' . $productName); |
|
184
|
184
|
|
|
185
|
185
|
if ($this->sharedStorage->has('channel')) { |
|
186
|
186
|
$product->addChannel($this->sharedStorage->get('channel')); |
|
@@ -213,7 +213,7 @@ discard block |
|
|
block discarded – undo |
|
213
|
213
|
{ |
|
214
|
214
|
$product = $this->createProduct($productName, $price); |
|
215
|
215
|
|
|
216
|
|
- $product->setDescription('Awesome '.$productName); |
|
|
216
|
+ $product->setDescription('Awesome ' . $productName); |
|
217
|
217
|
|
|
218
|
218
|
foreach ($channels as $channel) { |
|
219
|
219
|
$product->addChannel($channel); |
|
@@ -250,7 +250,7 @@ discard block |
|
|
block discarded – undo |
|
250
|
250
|
$product->setCode(StringInflector::nameToUppercaseCode($productName)); |
|
251
|
251
|
$product->setSlug($this->slugGenerator->generate($productName)); |
|
252
|
252
|
|
|
253
|
|
- $product->setDescription('Awesome '.$productName); |
|
|
253
|
+ $product->setDescription('Awesome ' . $productName); |
|
254
|
254
|
|
|
255
|
255
|
if ($this->sharedStorage->has('channel')) { |
|
256
|
256
|
$channel = $this->sharedStorage->get('channel'); |
|
@@ -355,7 +355,7 @@ discard block |
|
|
block discarded – undo |
|
355
|
355
|
*/ |
|
356
|
356
|
public function thisProductHasAttributeWithValue(ProductInterface $product, $productAttributeType, $productAttributeName, $value) |
|
357
|
357
|
{ |
|
358
|
|
- $attribute = $this->createProductAttribute($productAttributeType,$productAttributeName); |
|
|
358
|
+ $attribute = $this->createProductAttribute($productAttributeType, $productAttributeName); |
|
359
|
359
|
$attributeValue = $this->createProductAttributeValue($value, $attribute); |
|
360
|
360
|
$product->addAttribute($attributeValue); |
|
361
|
361
|
|
|
@@ -367,8 +367,8 @@ discard block |
|
|
block discarded – undo |
|
367
|
367
|
*/ |
|
368
|
368
|
public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value) |
|
369
|
369
|
{ |
|
370
|
|
- $attribute = $this->createProductAttribute('percent',$productAttributeName); |
|
371
|
|
- $attributeValue = $this->createProductAttributeValue($value/100, $attribute); |
|
|
370
|
+ $attribute = $this->createProductAttribute('percent', $productAttributeName); |
|
|
371
|
+ $attributeValue = $this->createProductAttributeValue($value / 100, $attribute); |
|
372
|
372
|
$product->addAttribute($attributeValue); |
|
373
|
373
|
|
|
374
|
374
|
$this->objectManager->flush(); |
|
@@ -551,7 +551,7 @@ discard block |
|
|
block discarded – undo |
|
551
|
551
|
|
|
552
|
552
|
/** @var ImageInterface $productImage */ |
|
553
|
553
|
$productImage = $this->productImageFactory->createNew(); |
|
554
|
|
- $productImage->setFile(new UploadedFile($filesPath.$imagePath, basename($imagePath))); |
|
|
554
|
+ $productImage->setFile(new UploadedFile($filesPath . $imagePath, basename($imagePath))); |
|
555
|
555
|
$productImage->setCode($imageCode); |
|
556
|
556
|
$this->imageUploader->upload($productImage); |
|
557
|
557
|
|