Skip to content

Commit 5c66668

Browse files
author
Roman Lytvynenko
committed
MC-19661: Export Products bug. I can't exclude attributes from CSV file.
1 parent bc26eb1 commit 5c66668

File tree

1 file changed

+5
-1
lines changed
  • app/code/Magento/CatalogImportExport/Model/Export

1 file changed

+5
-1
lines changed

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,10 @@ public function _getHeaderColumns()
724724
*/
725725
protected function setHeaderColumns($customOptionsData, $stockItemRows)
726726
{
727+
$exportAttributes = count($this->_parameters["skip_attr"]) ?
728+
$this->_getExportAttrCodes() :
729+
$this->_getExportMainAttrCodes();
730+
727731
if (!$this->_headerColumns) {
728732
$this->_headerColumns = array_merge(
729733
[
@@ -734,7 +738,7 @@ protected function setHeaderColumns($customOptionsData, $stockItemRows)
734738
self::COL_CATEGORY,
735739
self::COL_PRODUCT_WEBSITES,
736740
],
737-
$this->_getExportAttrCodes(),
741+
$exportAttributes,
738742
[self::COL_ADDITIONAL_ATTRIBUTES],
739743
reset($stockItemRows) ? array_keys(end($stockItemRows)) : [],
740744
[

0 commit comments

Comments
 (0)