From c574b04a636d9a687b99206633e497e076289088 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Wed, 11 Dec 2013 16:22:33 +0100 Subject: [PATCH] [*] FO : Move header modules to new hook, last part 2/2 --- .../cart_rules/helpers/list/list_header.tpl | 2 +- .../customers/helpers/list/list_header.tpl | 2 +- .../template/controllers/modules/page.tpl | 2 +- modules/blockbanner/blockbanner.tpl | 3 +- modules/blockcontact/blockcontact.php | 20 +- modules/blockcontact/config.xml | 2 +- modules/blockcontact/upgrade/install-1.1.php | 9 + modules/blockcurrencies/blockcurrencies.php | 13 +- modules/blockcurrencies/config.xml | 6 +- .../blockcurrencies/upgrade/install-0.2.php | 9 + modules/blocklanguages/blocklanguages.php | 16 +- modules/blocklanguages/config.xml | 2 +- .../blocklanguages/upgrade/install-1.2.php | 9 + themes/default-bootstrap/404.tpl | 2 +- themes/default-bootstrap/address.tpl | 34 +- themes/default-bootstrap/addresses.tpl | 12 +- themes/default-bootstrap/authentication.tpl | 12 +- themes/default-bootstrap/breadcrumb.tpl | 2 +- themes/default-bootstrap/category.tpl | 4 +- themes/default-bootstrap/css/global.css | 5 +- .../css/jquery/jquery.bxslider.css | 256 +++---- .../css/modules/blockcart/blockcart.css | 530 ++------------- .../css/modules/blockcontact/blockcontact.css | 25 +- .../css/modules/homeslider/bx_styles.css | 340 +++++----- themes/default-bootstrap/css/product_list.css | 625 +++--------------- themes/default-bootstrap/discount.tpl | 4 +- themes/default-bootstrap/guest-tracking.tpl | 4 +- themes/default-bootstrap/header.tpl | 4 +- themes/default-bootstrap/history.tpl | 14 +- themes/default-bootstrap/identity.tpl | 4 +- .../js/jquery/resonsive_utilites.js | 9 +- .../templates/front/payment_execution.tpl | 4 +- .../bankwire/views/templates/hook/payment.tpl | 2 +- .../views/templates/hook/payment_return.tpl | 4 +- .../modules/blockcart/blockcart-json.tpl | 4 +- .../modules/blockcart/blockcart.tpl | 20 +- .../modules/blockcms/blockcms.tpl | 22 +- .../modules/blockcontact/blockcontact.tpl | 12 +- .../blockcurrencies/blockcurrencies.tpl | 47 ++ .../modules/blocklanguages/blocklanguages.tpl | 70 ++ .../blockmanufacturer/blockmanufacturer.tpl | 6 +- .../modules/blockmyaccount/blockmyaccount.tpl | 16 +- .../blockmyaccountfooter.tpl | 14 +- .../blocknewsletter/blocknewsletter.tpl | 2 +- .../modules/blocksearch/blocksearch-top.tpl | 4 +- .../modules/blocksearch/blocksearch.tpl | 2 +- .../modules/blocksocial/blocksocial.tpl | 6 +- .../modules/blockspecials/blockspecials.tpl | 8 +- .../modules/blockstore/blockstore.tpl | 6 +- .../modules/blocksupplier/blocksupplier.tpl | 6 +- .../modules/blocktags/blocktags.tpl | 2 +- .../modules/blocktopmenu/blocktopmenu.tpl | 2 +- .../modules/blockuserinfo/blockuserinfo.tpl | 2 +- .../modules/blockuserinfo/nav.tpl | 6 +- .../modules/blockviewed/blockviewed.tpl | 6 +- .../blockwishlist/blockwishlist-ajax.tpl | 4 +- .../modules/blockwishlist/blockwishlist.tpl | 4 +- .../modules/blockwishlist/managewishlist.tpl | 8 +- .../modules/blockwishlist/view.tpl | 10 +- .../views/templates/front/mywishlist.tpl | 4 +- .../templates/front/payment_execution.tpl | 4 +- .../cheque/views/templates/hook/payment.tpl | 2 +- .../views/templates/hook/payment_return.tpl | 4 +- .../loyalty/views/templates/front/loyalty.tpl | 6 +- .../views/templates/hook/my-account.tpl | 2 +- .../productcomments/productcomments.tpl | 2 +- .../productscategory/productscategory.tpl | 4 +- .../views/templates/front/program.tpl | 12 +- .../views/templates/hook/my-account.tpl | 2 +- .../views/templates/hook/shopping-cart.tpl | 2 +- .../sendtoafriend/sendtoafriend-extra.tpl | 2 +- .../modules/stripejs/order-confirmation.tpl | 6 +- .../modules/stripejs/payment.tpl | 4 +- themes/default-bootstrap/my-account.tpl | 14 +- themes/default-bootstrap/nbr-product-page.tpl | 2 +- .../order-address-multishipping.tpl | 10 +- .../order-address-product-line.tpl | 8 +- themes/default-bootstrap/order-address.tpl | 12 +- themes/default-bootstrap/order-carrier.tpl | 8 +- .../default-bootstrap/order-confirmation.tpl | 4 +- themes/default-bootstrap/order-detail.tpl | 12 +- themes/default-bootstrap/order-follow.tpl | 10 +- .../order-opc-new-account.tpl | 4 +- themes/default-bootstrap/order-payment.tpl | 8 +- themes/default-bootstrap/order-return.tpl | 6 +- themes/default-bootstrap/order-slip.tpl | 8 +- themes/default-bootstrap/order-steps.tpl | 6 +- themes/default-bootstrap/pagination.tpl | 2 +- themes/default-bootstrap/password.tpl | 4 +- themes/default-bootstrap/product-compare.tpl | 2 +- themes/default-bootstrap/product-list.tpl | 8 +- themes/default-bootstrap/product.tpl | 40 +- .../default-bootstrap/products-comparison.tpl | 16 +- themes/default-bootstrap/scenes.tpl | 2 +- .../shopping-cart-product-line.tpl | 8 +- themes/default-bootstrap/shopping-cart.tpl | 12 +- themes/default-bootstrap/sitemap.tpl | 28 +- 97 files changed, 858 insertions(+), 1712 deletions(-) create mode 100644 modules/blockcontact/upgrade/install-1.1.php create mode 100644 modules/blockcurrencies/upgrade/install-0.2.php create mode 100644 modules/blocklanguages/upgrade/install-1.2.php create mode 100644 themes/default-bootstrap/modules/blockcurrencies/blockcurrencies.tpl create mode 100644 themes/default-bootstrap/modules/blocklanguages/blocklanguages.tpl diff --git a/admin-dev/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl index 396a824b6..e37acba66 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl @@ -26,7 +26,7 @@ {block name='override_header'} {if $submit_form_ajax} diff --git a/admin-dev/themes/default/template/controllers/customers/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/customers/helpers/list/list_header.tpl index 38b9eecff..50f7bb5f5 100644 --- a/admin-dev/themes/default/template/controllers/customers/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/customers/helpers/list/list_header.tpl @@ -27,7 +27,7 @@ {block name='override_header'} {if $submit_form_ajax} diff --git a/admin-dev/themes/default/template/controllers/modules/page.tpl b/admin-dev/themes/default/template/controllers/modules/page.tpl index efd10729f..243738042 100644 --- a/admin-dev/themes/default/template/controllers/modules/page.tpl +++ b/admin-dev/themes/default/template/controllers/modules/page.tpl @@ -72,7 +72,7 @@ {l s='An upgrade is available for some of your modules!'} diff --git a/modules/blockbanner/blockbanner.tpl b/modules/blockbanner/blockbanner.tpl index 9604d6c1a..da0b77b28 100644 --- a/modules/blockbanner/blockbanner.tpl +++ b/modules/blockbanner/blockbanner.tpl @@ -22,7 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - + \ No newline at end of file diff --git a/modules/blockcontact/blockcontact.php b/modules/blockcontact/blockcontact.php index b11a3e0d6..3fddf9ce1 100644 --- a/modules/blockcontact/blockcontact.php +++ b/modules/blockcontact/blockcontact.php @@ -33,9 +33,9 @@ class Blockcontact extends Module { $this->name = 'blockcontact'; $this->tab = 'front_office_features'; - $this->version = '1.0'; + $this->version = '1.1'; - $this->bootstrap = true; + $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Contact Block'); @@ -47,7 +47,7 @@ class Blockcontact extends Module return parent::install() && Configuration::updateValue('blockcontact_telnumber', '') && Configuration::updateValue('blockcontact_email', '') - && $this->registerHook('displayRightColumn') + && $this->registerHook('displayNav') && $this->registerHook('displayHeader'); } @@ -74,12 +74,12 @@ class Blockcontact extends Module return $html; } - public function hookDisplayHeader() + public function hookDisplayHeader($params) { $this->context->controller->addCSS(($this->_path).'blockcontact.css', 'all'); } - public function hookDisplayRightColumn() + public function hookDisplayRightColumn($params) { global $smarty; if (!$this->isCached('blockcontact.tpl', $this->getCacheId())) @@ -90,9 +90,15 @@ class Blockcontact extends Module return $this->display(__FILE__, 'blockcontact.tpl', $this->getCacheId()); } - public function hookDisplayLeftColumn() + public function hookDisplayLeftColumn($params) { - return $this->hookDisplayRightColumn(); + return $this->hookDisplayRightColumn($params); + } + + public function hookDisplayNav($params) + { + + return $this->hookDisplayRightColumn($params); } public function renderForm() diff --git a/modules/blockcontact/config.xml b/modules/blockcontact/config.xml index 967c3ddaa..2bb59c1ae 100644 --- a/modules/blockcontact/config.xml +++ b/modules/blockcontact/config.xml @@ -2,7 +2,7 @@ blockcontact - + diff --git a/modules/blockcontact/upgrade/install-1.1.php b/modules/blockcontact/upgrade/install-1.1.php new file mode 100644 index 000000000..33ef44c89 --- /dev/null +++ b/modules/blockcontact/upgrade/install-1.1.php @@ -0,0 +1,9 @@ +unregisterHook('displayRightColumn') && $object->registerHook('displayNav')); +} diff --git a/modules/blockcurrencies/blockcurrencies.php b/modules/blockcurrencies/blockcurrencies.php index 34eda8b86..8376e8bd3 100644 --- a/modules/blockcurrencies/blockcurrencies.php +++ b/modules/blockcurrencies/blockcurrencies.php @@ -33,7 +33,7 @@ class BlockCurrencies extends Module { $this->name = 'blockcurrencies'; $this->tab = 'front_office_features'; - $this->version = 0.1; + $this->version = 0.2; $this->author = 'PrestaShop'; $this->need_instance = 0; @@ -45,7 +45,7 @@ class BlockCurrencies extends Module public function install() { - return parent::install() && $this->registerHook('top') && $this->registerHook('header'); + return parent::install() && $this->registerHook('displayNav') && $this->registerHook('displayHeader'); } private function _prepareHook($params) @@ -67,13 +67,18 @@ class BlockCurrencies extends Module * @param array $params Parameters * @return string Content */ - public function hookTop($params) + public function hookDisplayTop($params) { if ($this->_prepareHook($params)) return $this->display(__FILE__, 'blockcurrencies.tpl'); } - public function hookHeader($params) + public function hookDisplayNav($params) + { + return $this->hookDisplayTop($params); + } + + public function hookDisplayHeader($params) { if (Configuration::get('PS_CATALOG_MODE')) return; diff --git a/modules/blockcurrencies/config.xml b/modules/blockcurrencies/config.xml index f5ba1e9fb..2f1a202c1 100755 --- a/modules/blockcurrencies/config.xml +++ b/modules/blockcurrencies/config.xml @@ -1,9 +1,9 @@ blockcurrencies - - - + + + 0 diff --git a/modules/blockcurrencies/upgrade/install-0.2.php b/modules/blockcurrencies/upgrade/install-0.2.php new file mode 100644 index 000000000..9f76b7b77 --- /dev/null +++ b/modules/blockcurrencies/upgrade/install-0.2.php @@ -0,0 +1,9 @@ +unregisterHook('top') && $object->registerHook('displayNav')); +} diff --git a/modules/blocklanguages/blocklanguages.php b/modules/blocklanguages/blocklanguages.php index 351102cdb..e460daad3 100644 --- a/modules/blocklanguages/blocklanguages.php +++ b/modules/blocklanguages/blocklanguages.php @@ -33,19 +33,19 @@ class BlockLanguages extends Module { $this->name = 'blocklanguages'; $this->tab = 'front_office_features'; - $this->version = 1.1; + $this->version = 1.2; $this->author = 'PrestaShop'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Language block'); - $this->description = $this->l('Adds a block allowing customers to select a website language. '); + $this->description = $this->l('Adds a block allowing customers to select a website language.'); } public function install() { - return (parent::install() && $this->registerHook('top') && $this->registerHook('header')); + return (parent::install() && $this->registerHook('displayNav') && $this->registerHook('displayHeader')); } private function _prepareHook($params) @@ -94,14 +94,20 @@ class BlockLanguages extends Module * @param array $params Parameters * @return string Content */ - public function hookTop($params) + public function hookDisplayTop($params) { if (!$this->_prepareHook($params)) return; return $this->display(__FILE__, 'blocklanguages.tpl'); } - public function hookHeader($params) + public function hookDisplayNav($params) + { + + return $this->hookDisplayTop($params); + } + + public function hookDisplayHeader($params) { $this->context->controller->addCSS($this->_path.'blocklanguages.css', 'all'); } diff --git a/modules/blocklanguages/config.xml b/modules/blocklanguages/config.xml index c83d813dc..463e60398 100755 --- a/modules/blocklanguages/config.xml +++ b/modules/blocklanguages/config.xml @@ -2,7 +2,7 @@ blocklanguages - + diff --git a/modules/blocklanguages/upgrade/install-1.2.php b/modules/blocklanguages/upgrade/install-1.2.php new file mode 100644 index 000000000..1fee978f9 --- /dev/null +++ b/modules/blocklanguages/upgrade/install-1.2.php @@ -0,0 +1,9 @@ +unregisterHook('top') && $object->registerHook('displayNav')); +} diff --git a/themes/default-bootstrap/404.tpl b/themes/default-bootstrap/404.tpl index d29bb86cb..0afd5b4a4 100644 --- a/themes/default-bootstrap/404.tpl +++ b/themes/default-bootstrap/404.tpl @@ -33,7 +33,7 @@

{l s='To find a product, please type its name in the field below.'}

-
+
diff --git a/themes/default-bootstrap/address.tpl b/themes/default-bootstrap/address.tpl index de0121b8f..cf839321e 100644 --- a/themes/default-bootstrap/address.tpl +++ b/themes/default-bootstrap/address.tpl @@ -73,7 +73,7 @@ {if isset($smarty.post.alias)} "{$smarty.post.alias}" {else} - {if isset($address->alias)}"{$address->alias|escape:'html'}"{/if} + {if isset($address->alias)}"{$address->alias|escape:'html':'UTF-8'}"{/if} {/if} {else} {l s='To add a new address, please fill out the form below.'} @@ -82,11 +82,11 @@ {include file="$tpl_dir./errors.tpl"}

*{l s='Required field'}

- +
- + {l s='DNI / NIF / NIE'}
{assign var="stateExist" value="false"} @@ -95,7 +95,7 @@ {if $field_name eq 'company'}
- +
{/if} {if $field_name eq 'vat_number'} @@ -103,7 +103,7 @@
- +
@@ -111,38 +111,38 @@ {if $field_name eq 'firstname'}
- +
{/if} {if $field_name eq 'lastname'}
- +
{/if} {if $field_name eq 'address1'}
- +
{/if} {if $field_name eq 'address2'}
- +
{/if} {if $field_name eq 'postcode'} {assign var="postCodeExist" value="true"}
- +
{/if} {if $field_name eq 'city'}
- +
{* if customer hasn't update his layout address, country has to be verified but it's deprecated *} {/if} @@ -191,7 +191,7 @@ {if $postCodeExist eq "false"}
- +
{/if} {if $stateExist eq "false"} @@ -204,11 +204,11 @@ {/if}
- +
- +
{if isset($one_phone_at_least) && $one_phone_at_least}

{l s='You must register at least one phone number.'}

@@ -216,11 +216,11 @@
- +
- +

{if isset($id_address)}{/if} @@ -240,7 +240,7 @@

{/foreach} {else} -

{l s='No addresses are available.'} {l s='Add a new address'}

+

{l s='No addresses are available.'} {l s='Add a new address'}

{/if} diff --git a/themes/default-bootstrap/authentication.tpl b/themes/default-bootstrap/authentication.tpl index b595f47f3..87e579b32 100644 --- a/themes/default-bootstrap/authentication.tpl +++ b/themes/default-bootstrap/authentication.tpl @@ -25,7 +25,7 @@ {capture name=path} {if !isset($email_create)}{l s='Authentication'}{else} - {l s='Authentication'} + {l s='Authentication'} {$navigationPipe}{l s='Create your account'} {/if} {/capture} @@ -149,7 +149,7 @@ {/if}-->
- +

{l s='Create an account'}

{l s='Please enter your email address to create an account.'}

@@ -172,7 +172,7 @@
-
+

{l s='Already registered?'}

@@ -183,7 +183,7 @@
-

{l s='Forgot your password?'}

+

{l s='Forgot your password?'}

{if isset($back)}{/if}

{if isset($inOrderProcess) && $inOrderProcess && $PS_GUEST_CHECKOUT_ENABLED} - +
@@ -395,7 +395,7 @@
{/if}--> - + {$HOOK_CREATE_ACCOUNT_TOP}