Skip to content

Commit

Permalink
MAGETWO-86544: MAGETWO-49985: product custom options export in revers…
Browse files Browse the repository at this point in the history
…e order fixed #95

 - Merge Pull Request magento-engcom/import-export-improvements#95 from umarch-rltsquare/magento2:71-reverse-export-custom-options-fix
 - Merged commits:
   1. e1b5040
   2. 558f714
  • Loading branch information
dmanners committed Jan 10, 2018
2 parents e150a7e + 558f714 commit dd0a66a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions app/code/Magento/CatalogImportExport/Model/Export/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1315,16 +1315,12 @@ protected function getCustomOptionsData($productIds)
}
$options = $this->_optionColFactory->create();
/* @var \Magento\Catalog\Model\ResourceModel\Product\Option\Collection $options*/
$options->addOrder('sort_order');
$options->reset()->addOrder('sort_order')->addTitleToResult(
$storeId
)->addPriceToResult(
$storeId
)->addProductToFilter(
$productIds
)->addValuesToResult(
$storeId
);
$options->reset();
$options->addOrder('sort_order', 'ASC');
$options->addTitleToResult($storeId);
$options->addPriceToResult($storeId);
$options->addProductToFilter($productIds);
$options->addValuesToResult($storeId);

foreach ($options as $option) {
$row = [];
Expand Down

0 comments on commit dd0a66a

Please sign in to comment.