Skip to content

Commit

Permalink
AdminThemes: update config.xml after copying of theme, part 3.
Browse files Browse the repository at this point in the history
This is related to #655.
  • Loading branch information
Traumflug committed Sep 6, 2019
1 parent b5bb206 commit fc1c228
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions controllers/admin/AdminThemesController.php
Expand Up @@ -559,6 +559,21 @@ public function processAdd()
$variation->attributes()['name'] = Tools::getValue('name');
$variation->attributes()['directory'] = $newDir;

$value = Tools::getValue('product_per_page');
if ($value) {
$variation->attributes()['product_per_page'] = (int) $value;
}
foreach ([
'responsive',
'default_left_column',
'default_right_column',
] as $key) {
$value = Tools::getValue($key);
if ($value !== false) {
$variation->attributes()[$key] = (int) $value;
}
}

// Write XML coming with the package into the theme.
// Use DOMDocument to get formatted output.
$dom = new DOMDocument();
Expand Down

0 comments on commit fc1c228

Please sign in to comment.