diff --git a/admin-dev/tabs/AdminShop.php b/admin-dev/tabs/AdminShop.php index e62ef29fc..c44345b8c 100755 --- a/admin-dev/tabs/AdminShop.php +++ b/admin-dev/tabs/AdminShop.php @@ -43,11 +43,12 @@ class AdminShop extends AdminTab $this->_group = 'GROUP BY a.id_shop'; $this->fieldsDisplay = array( - 'id_shop' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), - 'name' => array('title' => $this->l('Shop'), 'width' => 130, 'filter_key' => 'b!name'), - 'group_shop_name' => array('title' => $this->l('Group Shop'), 'width' => 70), - 'category_name' => array('title' => $this->l('Category Root'), 'width' => 70), - 'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'active')); + 'id_shop' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Shop'), 'width' => 130, 'filter_key' => 'b!name'), + 'group_shop_name' => array('title' => $this->l('Group Shop'), 'width' => 70), + 'category_name' => array('title' => $this->l('Category Root'), 'width' => 70), + 'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'active'), + ); $this->optionTitle = $this->l('Shops options'); $this->_fieldsOptions = array('PS_SHOP_DEFAULT' => array('title' => $this->l('Default shop:'), 'desc' => $this->l('The default shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_shop', 'list' => Shop::getShops(), 'visibility' => Shop::CONTEXT_ALL)); @@ -58,10 +59,7 @@ class AdminShop extends AdminTab public function afterAdd($newShop) { if (Tools::getValue('useImportData') && ($importData = Tools::getValue('importData')) && is_array($importData)) - { - $shop = new Shop((int)$newShop->id); - $shop->copyShopData((int)Tools::getValue('importFromShop'), $importData); - } + $newShop->copyShopData((int)Tools::getValue('importFromShop'), $importData); } public function postProcess() @@ -84,10 +82,10 @@ class AdminShop extends AdminTab if (!($obj = $this->loadObject(true))) return; - if (Shop::getTotalShops() > 1 AND $obj->id) + $disabled = ''; + if (Shop::getTotalShops() > 1 && $obj->id) $disabled = 'disabled="disabled"'; - else - $disabled = ''; + echo '
@@ -114,17 +112,8 @@ class AdminShop extends AdminTab echo ' - '; - echo ' -
- -
'; - echo ' - + +
getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/> @@ -133,6 +122,27 @@ class AdminShop extends AdminTab

'.$this->l('Enable or disable shop').'

'; + // Theme list + echo ' +
'; + foreach (Theme::getThemes() as $i => $theme) + { + $checked = ((!$obj->id && $i == 0) || $obj->id_theme == $theme['id_theme']) ? true : false; + echo '
'; + echo ucfirst($theme['name']).'
'; + echo ''.$theme['name'].'
'; + echo ''; + echo '
'; + } + echo '
'; + + + echo '
+ +
+
* '.$this->l('Required field').'
+

'; + if (Tools::getValue('addshop') !== false) { $importData = array( @@ -161,10 +171,11 @@ class AdminShop extends AdminTab 'zone' => $this->l('Zones'), ); - echo ''; + echo '
'.$this->l('Import data from another shop').''; + echo ''; echo '
'; echo ' '; - echo $this->l('Duplicate data from'); + echo $this->l('Duplicate data from shop'); echo ' '.$lang.''; echo '
'; echo '

'.$this->l('Use this option to associate data (products, modules, etc.) the same way as the selected shop').'

'; - echo ''; - } - - echo '
+ echo '
-
-
* '.$this->l('Required field').'
-
-
'; + '; + echo ''; + } + + echo ''; } protected function displayAddButton() diff --git a/admin-dev/tabs/AdminThemes.php b/admin-dev/tabs/AdminThemes.php index b736c6137..f5fd1406e 100644 --- a/admin-dev/tabs/AdminThemes.php +++ b/admin-dev/tabs/AdminThemes.php @@ -104,9 +104,6 @@ class AdminThemes extends AdminPreferences 'PS_STORES_ICON' => array('title' => $this->l('Store icon:'), 'desc' => $this->l('Will appear on the store locator (inside Google Maps)').'
'.$this->l('Suggested size: 30x30, Transparent GIF'), 'type' => 'file', 'thumb' => array('file' => _PS_IMG_.'logo_stores-'.(int)$id_shop.'.gif?date='.time(), 'pos' => 'before')), 'PS_NAVIGATION_PIPE' => array('title' => $this->l('Navigation pipe:'), 'desc' => $this->l('Used for navigation path inside categories/product'), 'cast' => 'strval', 'type' => 'text', 'size' => 20), ); - $this->_fieldsTheme = array( - 'PS_THEME' => array('title' => $this->l('Theme'), 'validation' => 'isGenericName', 'type' => 'image', 'list' => $this->_getThemesList(), 'max' => 3) - ); parent::__construct(); } @@ -123,8 +120,6 @@ class AdminThemes extends AdminPreferences header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); $this->_displayForm('appearance', $this->_fieldsAppearance, $this->l('Appearance'), 'width3', 'appearance'); echo '

'; - $this->_displayForm('themes', $this->_fieldsTheme, $this->l('Themes'), 'width3', 'themes'); - echo '

'; if (@ini_get('allow_url_fopen') AND @fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)) echo '