From 85bee87920e4848a5cc5b3d35db279ba0def22bd Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 7 Feb 2012 13:37:37 +0000 Subject: [PATCH] // Fix bug when fixtures are disabled + move install type (fixtures or not) to configure step --- install-dev/controllers/http/configure.php | 4 ++++ install-dev/controllers/http/database.php | 6 +----- install-dev/controllers/http/process.php | 3 +-- install-dev/theme/js/process.js | 4 ++-- install-dev/theme/view.css | 6 +++++- install-dev/theme/views/configure.phtml | 16 ++++++++++++++++ install-dev/theme/views/database.phtml | 14 -------------- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/install-dev/controllers/http/configure.php b/install-dev/controllers/http/configure.php index 243929407..7ffd38861 100644 --- a/install-dev/controllers/http/configure.php +++ b/install-dev/controllers/http/configure.php @@ -38,6 +38,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp // Save shop configuration $this->session->shop_name = trim(Tools::getValue('shop_name')); $this->session->shop_activity = Tools::getValue('shop_activity'); + $this->session->install_type = Tools::getValue('db_mode'); $this->session->shop_country = Tools::getValue('shop_country'); $this->session->shop_timezone = Tools::getValue('shop_timezone'); @@ -420,6 +421,9 @@ class InstallControllerHttpConfigure extends InstallControllerHttp sort($list_activities); $this->list_activities = $list_activities; + // Install type + $this->install_type = ($this->session->install_type) ? $this->session->install_type : 'full'; + $this->displayTemplate('configure'); } diff --git a/install-dev/controllers/http/database.php b/install-dev/controllers/http/database.php index 86c3f8410..2edd6308c 100644 --- a/install-dev/controllers/http/database.php +++ b/install-dev/controllers/http/database.php @@ -54,8 +54,6 @@ class InstallControllerHttpDatabase extends InstallControllerHttp */ public function processNextStep() { - $this->session->install_type = Tools::getValue('db_mode'); - // Save database config $this->session->database_server = trim(Tools::getValue('dbServer')); $this->session->database_name = trim(Tools::getValue('dbName')); @@ -151,7 +149,7 @@ class InstallControllerHttpDatabase extends InstallControllerHttp */ public function display() { - if (!$this->session->install_type) + if (!$this->session->database_server) { if (file_exists(_PS_ROOT_DIR_.'/config/settings.inc.php')) { @@ -174,7 +172,6 @@ class InstallControllerHttpDatabase extends InstallControllerHttp } $this->database_clear = true; - $this->install_type = 'full'; $this->use_smtp = false; $this->smtp_server = 'smtp.'; $this->smtp_encryption = 'off'; @@ -192,7 +189,6 @@ class InstallControllerHttpDatabase extends InstallControllerHttp $this->database_prefix = $this->session->database_prefix; $this->database_clear = $this->session->database_clear; - $this->install_type = $this->session->install_type; $this->use_smtp = $this->session->use_smtp; $this->smtp_server = $this->session->smtp_server; $this->smtp_encryption = $this->session->smtp_encryption; diff --git a/install-dev/controllers/http/process.php b/install-dev/controllers/http/process.php index 10c21eb1b..dfb0126a4 100644 --- a/install-dev/controllers/http/process.php +++ b/install-dev/controllers/http/process.php @@ -91,7 +91,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp $this->processInstallModules(); else if (Tools::getValue('installFixtures') && !empty($this->session->process_validated['installModules'])) $this->processInstallFixtures(); - else if (Tools::getValue('installTheme') && !empty($this->session->process_validated['installFixtures'])) + else if (Tools::getValue('installTheme') && !empty($this->session->process_validated['installModules'])) $this->processInstallTheme(); else { @@ -220,7 +220,6 @@ class InstallControllerHttpProcess extends InstallControllerHttp $this->model_install->xml_loader_ids = $this->session->xml_loader_ids; if (!$this->model_install->installFixtures() || $this->model_install->getErrors()) $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); - $this->session->process_validated['installFixtures'] = true; $this->ajaxJsonAnswer(true); } diff --git a/install-dev/theme/js/process.js b/install-dev/theme/js/process.js index 413b54fa8..dcf397d6e 100644 --- a/install-dev/theme/js/process.js +++ b/install-dev/theme/js/process.js @@ -12,7 +12,7 @@ function start_install() if (is_installing) return; is_installing = true; - + $('.process_step').removeClass('fail').removeClass('success').hide(); $('.error_log').hide(); $('#progress_bar').show(); @@ -88,7 +88,7 @@ function install_error(step, errors) var list_errors = errors; if ($.type(list_errors) == 'string') list_errors = [list_errors]; - + var display = '
    '; $.each(list_errors, function(k, v) { diff --git a/install-dev/theme/view.css b/install-dev/theme/view.css index 13e14e782..d314a88f4 100644 --- a/install-dev/theme/view.css +++ b/install-dev/theme/view.css @@ -215,9 +215,13 @@ div.field { width:245px; vertical-align: top; } + div.field div.contentinput label { + display:inline; + margin-right: 10px; + } div.field .userInfos { display:inline-block; - width:200px; + width:210px; font-size:11px; font-family:Georgia; font-style:italic; diff --git a/install-dev/theme/views/configure.phtml b/install-dev/theme/views/configure.phtml index f51374093..dbe4bf5fa 100644 --- a/install-dev/theme/views/configure.phtml +++ b/install-dev/theme/views/configure.phtml @@ -34,6 +34,22 @@ var default_iso = 'session->shop_country ?>';

    l('This information is not required, it will only be used for statistical purposes. This information does not change anything in your store.') ?>

    + +
    + +
    + + +
    +

    l('Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.') ?>

    +
    +
    diff --git a/install-dev/theme/views/database.phtml b/install-dev/theme/views/database.phtml index dd1d53649..716ddc5d4 100644 --- a/install-dev/theme/views/database.phtml +++ b/install-dev/theme/views/database.phtml @@ -57,20 +57,6 @@
    - -
    -
    -

    l('Installation type') ?>

    -

    - install_type == 'lite'): ?>checked="checked" /> -
    - - install_type == 'full'): ?>checked="checked" /> - -

    -
    -
    -

    l('E-mail delivery set-up') ?>