/** * Set up the common elements and individual content of various * settings pages * * Includes VAT, shipping, countries, zones and more * @access private * @static */ static function view_settings() { global $_ARRAYLANG; \Cx\Core\Setting\Controller\Setting::init('Shop', 'config'); if (ShopSettings::storeSettings() === false) { // Triggers update ShopSettings::errorHandler(); \Cx\Core\Setting\Controller\Setting::init('Shop', 'config'); } // $success may also be '', in which case no changed setting has // been detected. // Refresh the Settings, so changes are made visible right away \Cx\Core\Setting\Controller\Setting::init('Shop', 'config'); self::$pageTitle = $_ARRAYLANG['TXT_SETTINGS']; self::$objTemplate->loadTemplateFile('module_shop_settings.html'); if (empty($_GET['tpl'])) { $_GET['tpl'] = ''; } switch ($_GET['tpl']) { case 'currency': self::view_settings_currency(); break; case 'payment': Payment::view_settings(self::$objTemplate); break; case 'shipment': self::view_settings_shipment(); break; case 'countries': self::view_settings_countries(); break; case 'zones': self::view_settings_zones(); break; case 'mail': self::view_settings_mail(); break; case 'vat': self::view_settings_vat(); break; case 'coupon': self::$objTemplate->addBlockfile('SHOP_SETTINGS_FILE', 'settings_block', 'module_shop_discount_coupon.html'); Coupon::edit(self::$objTemplate); break; default: self::view_settings_general(); break; } }