Skip to content

Commit

Permalink
Merge branch 'develop' into FearlessKiwis-MAGETWO-54779-Watermarks-ca…
Browse files Browse the repository at this point in the history
…nt-be-set-mainline
  • Loading branch information
cpartica committed Aug 26, 2016
2 parents 453aab6 + 9a4a7eb commit c17970c
Show file tree
Hide file tree
Showing 261 changed files with 428 additions and 665 deletions.
8 changes: 8 additions & 0 deletions app/code/Magento/CatalogImportExport/Model/Export/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,14 @@ protected function getCustomOptionsData($productIds)
$row['max_characters'] = $option['max_characters'];
}

foreach (['file_extension', 'image_size_x', 'image_size_y'] as $fileOptionKey) {
if (!isset($option[$fileOptionKey])) {
continue;
}

$row[$fileOptionKey] = $option[$fileOptionKey];
}

$values = $option->getValues();

if ($values) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
'radio' => true,
'checkbox' => true,
'multiple' => true,
'file' => ['sku', 'file_extension', 'image_size_x', 'image_size_y'],
];

/**
Expand Down Expand Up @@ -1136,6 +1137,28 @@ private function processOptionRow($name, $optionRow)
$result[$this->columnMaxCharacters] = $optionRow['max_characters'];
}

$result = $this->addFileOptions($result, $optionRow);

return $result;
}

/**
* Add file options
*
* @param array $result
* @param array $optionRow
* @return array
*/
private function addFileOptions($result, $optionRow)
{
foreach (['file_extension', 'image_size_x', 'image_size_y'] as $fileOptionKey) {
if (!isset($optionRow[$fileOptionKey])) {
continue;
}

$result[self::COLUMN_PREFIX . $fileOptionKey] = $optionRow[$fileOptionKey];
}

return $result;
}

Expand Down
118 changes: 59 additions & 59 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dev/tests/functional/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"magento/mtf": "1.0.0-rc46",
"magento/mtf": "1.0.0-rc47",
"php": "~5.6.0|7.0.2|~7.0.6",
"phpunit/phpunit": "4.1.0",
"phpunit/phpunit-selenium": ">=1.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class ExpireAdminSessionTest extends Injectable
{
/* tags */
const MVP = 'no';
const DOMAIN = 'PS';
/* end tags */

protected $systemConfigEdit;
Expand Down
Loading

0 comments on commit c17970c

Please sign in to comment.