Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 114f6a9

Browse files
committed
Merge branch '2.2-develop' into MAGETWO-67048
2 parents 57b20fb + a89d82f commit 114f6a9

File tree

93 files changed

+3173
-1114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3173
-1114
lines changed

app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use \Magento\Framework\App\ObjectManager;
1212
use \Magento\Bundle\Model\Product\Price as BundlePrice;
1313
use \Magento\Catalog\Model\Product\Type\AbstractType;
14+
use Magento\CatalogImportExport\Model\Import\Product;
1415

1516
/**
1617
* Class Bundle
@@ -173,7 +174,7 @@ protected function parseSelections($rowData, $entityId)
173174
$rowData['bundle_values']
174175
);
175176
$selections = explode(
176-
\Magento\CatalogImportExport\Model\Import\Product::PSEUDO_MULTI_LINE_SEPARATOR,
177+
Product::PSEUDO_MULTI_LINE_SEPARATOR,
177178
$rowData['bundle_values']
178179
);
179180
foreach ($selections as $selection) {
@@ -343,7 +344,7 @@ public function saveData()
343344
$newSku = $this->_entityModel->getNewSku();
344345
while ($bunch = $this->_entityModel->getNextBunch()) {
345346
foreach ($bunch as $rowNum => $rowData) {
346-
$productData = $newSku[$rowData[\Magento\CatalogImportExport\Model\Import\Product::COL_SKU]];
347+
$productData = $newSku[strtolower($rowData[Product::COL_SKU])];
347348
$productIds[] = $productData[$this->getProductEntityLinkField()];
348349
}
349350
$this->deleteOptionsAndSelections($productIds);
@@ -355,7 +356,7 @@ public function saveData()
355356
if (!$this->_entityModel->isRowAllowedToImport($rowData, $rowNum)) {
356357
continue;
357358
}
358-
$productData = $newSku[$rowData[\Magento\CatalogImportExport\Model\Import\Product::COL_SKU]];
359+
$productData = $newSku[strtolower($rowData[Product::COL_SKU])];
359360
if ($this->_type != $productData['type_id']) {
360361
continue;
361362
}

app/code/Magento/BundleImportExport/Test/Unit/Model/Import/Product/Type/BundleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ public function testSaveDataProvider()
299299
'bunch' => ['bundle_values' => 'value1', 'sku' => 'sku', 'name' => 'name'],
300300
'allowImport' => true
301301
],
302+
[
303+
'skus' => ['newSku' => ['sku' => ['sku' => 'SKU', 'entity_id' => 3, 'type_id' => 'bundle']]],
304+
'bunch' => ['bundle_values' => 'value1', 'sku' => 'SKU', 'name' => 'name'],
305+
'allowImport' => true
306+
],
302307
[
303308
'skus' => ['newSku' => ['sku' => ['sku' => 'sku', 'entity_id' => 3, 'type_id' => 'simple']]],
304309
'bunch' => ['bundle_values' => 'value1', 'sku' => 'sku', 'name' => 'name'],

app/code/Magento/Catalog/Api/Data/EavAttributeInterface.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,30 @@ public function getIsVisibleInGrid();
139139
*/
140140
public function getIsFilterableInGrid();
141141

142+
/**
143+
* Set is attribute used in grid
144+
*
145+
* @param bool|null $isUsedInGrid
146+
* @return $this
147+
*/
148+
public function setIsUsedInGrid($isUsedInGrid);
149+
150+
/**
151+
* Set is attribute visible in grid
152+
*
153+
* @param bool|null $isVisibleInGrid
154+
* @return $this
155+
*/
156+
public function setIsVisibleInGrid($isVisibleInGrid);
157+
158+
/**
159+
* Set is attribute filterable in grid
160+
*
161+
* @param bool|null $isFilterableInGrid
162+
* @return $this
163+
*/
164+
public function setIsFilterableInGrid($isFilterableInGrid);
165+
142166
/**
143167
* Set whether it is used in search results layered navigation
144168
*

app/code/Magento/Catalog/Model/Category/Attribute.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,4 +361,31 @@ public function setScope($scope)
361361
return $this;
362362
}
363363
}
364+
365+
/**
366+
* @inheritdoc
367+
*/
368+
public function setIsUsedInGrid($isUsedInGrid)
369+
{
370+
$this->setData(self::IS_USED_IN_GRID, $isUsedInGrid);
371+
return $this;
372+
}
373+
374+
/**
375+
* @inheritdoc
376+
*/
377+
public function setIsVisibleInGrid($isVisibleInGrid)
378+
{
379+
$this->setData(self::IS_VISIBLE_IN_GRID, $isVisibleInGrid);
380+
return $this;
381+
}
382+
383+
/**
384+
* @inheritdoc
385+
*/
386+
public function setIsFilterableInGrid($isFilterableInGrid)
387+
{
388+
$this->setData(self::IS_FILTERABLE_IN_GRID, $isFilterableInGrid);
389+
return $this;
390+
}
364391
}

app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,4 +848,31 @@ public function __wakeup()
848848
$this->_productFlatIndexerHelper = $objectManager->get(\Magento\Catalog\Helper\Product\Flat\Indexer::class);
849849
$this->attrLockValidator = $objectManager->get(LockValidatorInterface::class);
850850
}
851+
852+
/**
853+
* @inheritdoc
854+
*/
855+
public function setIsUsedInGrid($isUsedInGrid)
856+
{
857+
$this->setData(self::IS_USED_IN_GRID, $isUsedInGrid);
858+
return $this;
859+
}
860+
861+
/**
862+
* @inheritdoc
863+
*/
864+
public function setIsVisibleInGrid($isVisibleInGrid)
865+
{
866+
$this->setData(self::IS_VISIBLE_IN_GRID, $isVisibleInGrid);
867+
return $this;
868+
}
869+
870+
/**
871+
* @inheritdoc
872+
*/
873+
public function setIsFilterableInGrid($isFilterableInGrid)
874+
{
875+
$this->setData(self::IS_FILTERABLE_IN_GRID, $isFilterableInGrid);
876+
return $this;
877+
}
851878
}

0 commit comments

Comments
 (0)