diff --git a/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl index c6eb62f1a..528f1043c 100644 --- a/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl @@ -70,7 +70,8 @@ { if (msg) { - var infos = msg.infos.split('_'); + var infos = msg.infos.replace("\\'", "'").split('_'); + $('input[name=firstname]').val(infos[0]); $('input[name=lastname]').val(infos[1]); $('input[name=company]').val(infos[2]); diff --git a/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl index 1bb90cd1d..f50f3effb 100644 --- a/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl @@ -29,6 +29,9 @@ {if $input.type == 'color'}
{/if} + {if $input.type == 'closediv'} +
+ {/if} {$smarty.block.parent} {/block} diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl new file mode 100644 index 000000000..f487e9120 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl @@ -0,0 +1,58 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} +{block name="script"} + var string_price = '{l s='Will be applied when the price is' js=1}'; + var string_weight = '{l s='Will be applied when the weight is' js=1}'; +{/block} + +{block name="field"} + {if $input.name == 'zones'} + + {include file='controllers/carrier_wizard/helpers/form/form_ranges.tpl'} + +
+ {l s='Add new range'} +
+ {/if} + {if $input.name == 'logo'} +
+ + +

+ {l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'} +
{l s='Current size:'} {l s='undefined'}. +

+
+ {/if} + {$smarty.block.parent} +{/block} diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl new file mode 100644 index 000000000..3d6d015b9 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl @@ -0,0 +1,61 @@ + +
+ + + + + {foreach from=$ranges key=r item=range} + + {foreachelse} + + {/foreach} + + + + + {foreach from=$ranges key=r item=range} + + {foreachelse} + + {/foreach} + + + + + {foreach from=$ranges key=r item=range} + + {foreachelse} + + {/foreach} + + {foreach from=$zones key=i item=zone} + + + + {foreach from=$ranges key=r item=range} + + {/foreach} + + {/foreach} + + + + {foreach from=$ranges name=ranges key=r item=range} + {if $smarty.foreach.ranges.first} + + {else} + +
>=*  {$PS_WEIGHT_UNIT}  {$currency_sign}*  {$PS_WEIGHT_UNIT}  {$currency_sign}
<*  {$PS_WEIGHT_UNIT}  {$currency_sign}*  {$PS_WEIGHT_UNIT}  {$currency_sign}
All + + + +
+ + +   {$currency_sign} +
   
+
diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/index.php b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/index.php new file mode 100644 index 000000000..30839633c --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/index.php b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/index.php new file mode 100644 index 000000000..063209789 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/index.php b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/index.php new file mode 100644 index 000000000..30839633c --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl new file mode 100644 index 000000000..8a6ff6d5c --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} +{block name="override_tpl"} + +
+ + {foreach from=$wizard_contents.contents key=step_nbr item=content} +
+ {$content} +
+ {/foreach} +
+{/block} diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl new file mode 100644 index 000000000..f947c9762 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl @@ -0,0 +1,91 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @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/admin-dev/themes/default/template/controllers/carrier_wizard/summary.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/summary.tpl new file mode 100644 index 000000000..2e0b782a4 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/summary.tpl @@ -0,0 +1,70 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
+
+ {l s='Carrier name:'} +
 
+
+
 
+
+
 
+
+
 
+
+ {l s='It will be displayed only for the following zones:'} +
    +
    +
     
    +
    + {l s='It will be displayed only for the following groups:'} +
      +
      + {if $is_multishop} +
       
      +
      + {l s='It will be displayed only for the following shops:'} +
        +
        + {/if} +
         
        + {$active_form} +
        +
        +
         
        + diff --git a/admin-dev/themes/default/template/controllers/carriers/helpers/list/list_content.tpl b/admin-dev/themes/default/template/controllers/carriers/helpers/list/list_content.tpl new file mode 100644 index 000000000..a106c0b2f --- /dev/null +++ b/admin-dev/themes/default/template/controllers/carriers/helpers/list/list_content.tpl @@ -0,0 +1,40 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_content.tpl"} + {block name="open_td"} + + {else} + > + {/if} + {/block} diff --git a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl index d40584eff..8efd56ba6 100644 --- a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl @@ -103,8 +103,6 @@ {l s='Edit'} - -
        {l s='Orders'} {count($orders)} @@ -542,6 +540,5 @@ {/if}
        - -{/block} +{/block} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl index 12a8f5850..618d1a819 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl @@ -58,7 +58,7 @@
        - {l s='Skip'} {l s='lines'} + {l s='Skip'} {l s='lines'} diff --git a/admin-dev/themes/default/template/controllers/modules_positions/form.tpl b/admin-dev/themes/default/template/controllers/modules_positions/form.tpl index 02bcc6c5c..fb519cbe5 100644 --- a/admin-dev/themes/default/template/controllers/modules_positions/form.tpl +++ b/admin-dev/themes/default/template/controllers/modules_positions/form.tpl @@ -26,7 +26,8 @@ {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
        {block name="leadin"}{/block}
        - + + {if $display_key} {/if} @@ -55,20 +56,21 @@ -
        - {if !$except_diff} - {$exception_list} - {else} - {foreach $exception_list_diff as $value} - {$value} - {/foreach} - {/if}
        -

        {l s='Please specify the files for which you do not want the module to be displayed.'}.

        -

        {l s='Please input each filename, separated by a comma.'}.

        +

        + {l s='Please specify the files for which you do not want the module to be displayed.'}
        + {l s='Please input each filename, separated by a comma.'}
        + {if !$except_diff} + {$exception_list} + {else} + {foreach $exception_list_diff as $value} + {$value} + {/foreach} + {/if} +

        @@ -80,42 +82,43 @@ {/if} -

        - * - {l s='Required field'} -

        - - - -
        \ No newline at end of file + + diff --git a/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl index ea4425102..75380fbf4 100644 --- a/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl @@ -186,7 +186,7 @@ return false; }); - $('input[name="smarty_force_compile"], input[name="smarty_cache"], input[name="smarty_console"]').change(function(){ + $('input[name="smarty_force_compile"], input[name="smarty_cache"], input[name="smarty_console"], input[name="smarty_console_key"]').change(function(){ $('#smarty_up').val(1); }); diff --git a/admin-dev/themes/default/template/controllers/products/input_text_lang.tpl b/admin-dev/themes/default/template/controllers/products/input_text_lang.tpl index 1dc4b5790..b9ada580f 100644 --- a/admin-dev/themes/default/template/controllers/products/input_text_lang.tpl +++ b/admin-dev/themes/default/template/controllers/products/input_text_lang.tpl @@ -46,4 +46,5 @@ -{/foreach} \ No newline at end of file +{/foreach} + diff --git a/admin-dev/themes/default/template/controllers/products/pack.tpl b/admin-dev/themes/default/template/controllers/products/pack.tpl index 3728721bd..b422ea1b5 100644 --- a/admin-dev/themes/default/template/controllers/products/pack.tpl +++ b/admin-dev/themes/default/template/controllers/products/pack.tpl @@ -24,8 +24,8 @@ *}

        {l s='Pack'}

        diff --git a/admin-dev/themes/default/template/controllers/products/shipping.tpl b/admin-dev/themes/default/template/controllers/products/shipping.tpl index df35fb7dc..5db1e3312 100644 --- a/admin-dev/themes/default/template/controllers/products/shipping.tpl +++ b/admin-dev/themes/default/template/controllers/products/shipping.tpl @@ -47,7 +47,7 @@ {$bullet_common_field} - +
        diff --git a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl index da734f23b..7cbc61b89 100755 --- a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl @@ -284,7 +284,7 @@ $(document).ready(function() { $('#id_attribute_group option[value="{$condition.id_attribute_group}"]').attr('selected', true); $('#id_attribute_{$condition.id_attribute_group} option[value="{$condition.value}"]').attr('selected', true); {elseif $condition.type == 'feature'} - $('#id_feature[value="{$condition.id_feature}"]').attr('selected', true); + $('#id_feature option[value="{$condition.id_feature}"]').attr('selected', true); $('#id_feature_{$condition.id_feature} option[value="{$condition.value}"]').attr('selected', true); {else} $('#id_{$condition.type} option[value="{$condition.value}"]').attr('selected', true); diff --git a/admin-dev/themes/default/template/controllers/stats/calendar.tpl b/admin-dev/themes/default/template/controllers/stats/calendar.tpl index 31e607224..7e96f3a7e 100644 --- a/admin-dev/themes/default/template/controllers/stats/calendar.tpl +++ b/admin-dev/themes/default/template/controllers/stats/calendar.tpl @@ -25,7 +25,7 @@
        -
        + @@ -51,4 +51,4 @@ }); }); -
        \ No newline at end of file +
        diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index aced831df..84d1f2a4f 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -31,7 +31,7 @@ {if isset($fields.title)}

        {$fields.title}

        {/if} {block name="defaultForm"} - + {if $form_id} {/if} @@ -339,6 +339,7 @@
        {/if} {/if} +<<<<<<< HEAD
        @@ -370,6 +371,22 @@ }); +======= + + {if isset($input.lang) AND $input.lang} +
        + {foreach $languages as $language} +
        + + +
        + {/foreach} +
        + {else} + + {/if} + {if !empty($input.hint)}{$input.hint} {/if} +>>>>>>> f610b0d844c37cc9b1dc1b94c17f3d0e5a3ca21a {elseif $input.type == 'password'} {elseif $input.type == 'date'} diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index b730d8ba4..6b32ab4c6 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -59,7 +59,7 @@ {block name="td_content"} {if isset($params.prefix)}{$params.prefix}{/if} {if isset($params.color) && isset($tr[$params.color])} - + {/if} {if isset($tr.$key)} {if isset($params.active)} diff --git a/admin-dev/themes/default/template/helpers/list/list_header.tpl b/admin-dev/themes/default/template/helpers/list/list_header.tpl index 73241a34b..d88f8e6bf 100644 --- a/admin-dev/themes/default/template/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_header.tpl @@ -24,46 +24,51 @@ *} {if !$simple_header} - -{* Display column names and arrows for ordering (ASC, DESC) *} -{if $is_order_position} - - -{/if} - -{/if} + {* Display column names and arrows for ordering (ASC, DESC) *} + {if $is_order_position} + + + + {/if} + + + + +{/if}{* End if simple_header *} {if $show_toolbar} {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} {/if} {if !$simple_header} -
        {block name="leadin"}{/block}
        +
        {block name="leadin"}{/block}
        {/if} -{hook h='displayAdminListBefore'} +{block name="override_header"}{/block} + +{hook h='displayAdminListBefore'} {if isset($name_controller)} {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture} {hook h=$hookName} @@ -72,130 +77,147 @@ {hook h=$hookName} {/if} + {if !$simple_header} - -
        - {block name="override_header"}{/block} + - {if $show_filters} - - - - - - {/if} + {block name="override_form_extra"}{/block} + + {/if} - - - - +
        -
        + {if !$simple_header} + + + + {/if} + + +
        + + {if $page > 1} +   + + {/if} + {l s='Page'} {$page} / {$total_pages} + {if $page < $total_pages} +   + + {/if} + | {l s='Display'} + + / {$list_total} {l s='result(s)'} + + + + + + +
        + {foreach $fields_display AS $key => $params} - + {/foreach} {if $shop_link_type} - + {/if} {if $has_actions} - + {/if} - - {if !$simple_header && $show_filters} - - - - {* Filters (input, select, date or bool) *} - {foreach $fields_display AS $key => $params} - + + + {foreach $fields_display AS $key => $params} + + {/foreach} + {if $shop_link_type} + {/if} - {/if} - - {/foreach} + {if $has_actions} + + {/if} + + {if !$simple_header} + + - {if $shop_link_type} - - {/if} - {if $has_actions} - - {/if} - - {/if} - \ No newline at end of file + {* Filters (input, select, date or bool) *} + {foreach $fields_display AS $key => $params} + + {/foreach} + + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + {/if} + diff --git a/admin-dev/themes/default/template/layout.tpl b/admin-dev/themes/default/template/layout.tpl index f52a53389..9ae8172ee 100644 --- a/admin-dev/themes/default/template/layout.tpl +++ b/admin-dev/themes/default/template/layout.tpl @@ -33,7 +33,7 @@ {if count($errors) == 1} - {$errors[0]} + {reset($errors)} {else} {l s='%d errors' sprintf=$errors|count}
        diff --git a/admin-dev/themes/default/template/toolbar.tpl b/admin-dev/themes/default/template/toolbar.tpl index 830a30ecf..5eb947d72 100644 --- a/admin-dev/themes/default/template/toolbar.tpl +++ b/admin-dev/themes/default/template/toolbar.tpl @@ -36,167 +36,166 @@ {block name=toolbarBox} - - {/block} + //]]> + + {/block} - - {block name=pageBreadcrumb} - - {/block} +{block name=pageBreadcrumb} + +{/block} diff --git a/cache/class_index.php b/cache/class_index.php index db38cb6e9..b8dafbd7f 100644 --- a/cache/class_index.php +++ b/cache/class_index.php @@ -25,6 +25,8 @@ 'AdminAttributesGroupsControllerCore' => 'controllers/admin/AdminAttributesGroupsController.php', 'AdminBackupController' => '', 'AdminBackupControllerCore' => 'controllers/admin/AdminBackupController.php', + 'AdminCarrierWizardController' => '', + 'AdminCarrierWizardControllerCore' => 'controllers/admin/AdminCarrierWizardController.php', 'AdminCarriersController' => '', 'AdminCarriersControllerCore' => 'controllers/admin/AdminCarriersController.php', 'AdminCartRulesController' => '', diff --git a/classes/Address.php b/classes/Address.php index cb1fef134..10600c1cf 100644 --- a/classes/Address.php +++ b/classes/Address.php @@ -313,11 +313,10 @@ class AddressCore extends ObjectModel { $key = 'address_exists_'.(int)$id_address; if (!Cache::isStored($key)) - Cache::store( - $key, Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' - SELECT `id_address` - FROM '._DB_PREFIX_.'address a - WHERE a.`id_address` = '.(int)$id_address)); + { + $id_address = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_address` FROM '._DB_PREFIX_.'address a WHERE a.`id_address` = '.(int)$id_address); + Cache::store($key, (bool)$id_address); + } return Cache::retrieve($key); } diff --git a/classes/Carrier.php b/classes/Carrier.php index 869bb11df..9f8f8b8a5 100644 --- a/classes/Carrier.php +++ b/classes/Carrier.php @@ -165,6 +165,14 @@ class CarrierCore extends ObjectModel public function __construct($id = null, $id_lang = null) { parent::__construct($id, $id_lang); + + /** + * keep retrocompatibility SHIPPING_METHOD_DEFAULT + * @deprecated 1.5.5 + */ + if ($this->shipping_method == Carrier::SHIPPING_METHOD_DEFAULT) + $this->shipping_method = ((int)Configuration::get('PS_SHIPPING_METHOD') ? Carrier::SHIPPING_METHOD_WEIGHT : Carrier::SHIPPING_METHOD_PRICE); + /** * keep retrocompatibility id_tax_rules_group * @deprecated 1.5.0 @@ -370,13 +378,12 @@ class CarrierCore extends ObjectModel */ public static function getDeliveryPriceByRanges($range_table, $id_carrier) { - $range_table = pSQL($range_table); - $sql = 'SELECT d.id_'.$range_table.', d.id_carrier, d.id_zone, d.price + $sql = 'SELECT d.`id_'.bqSQL($range_table).'`, d.id_carrier, d.id_zone, d.price FROM '._DB_PREFIX_.'delivery d - LEFT JOIN '._DB_PREFIX_.$range_table.' r ON r.id_'.$range_table.' = d.id_'.$range_table.' + LEFT JOIN `'._DB_PREFIX_.bqSQL($range_table).'` r ON r.`id_'.bqSQL($range_table).'` = d.`id_'.bqSQL($range_table).'` WHERE d.id_carrier = '.(int)$id_carrier.' - AND d.id_'.$range_table.' IS NOT NULL - AND d.id_'.$range_table.' != 0 + AND d.`id_'.bqSQL($range_table).'` IS NOT NULL + AND d.`id_'.bqSQL($range_table).'` != 0 '.Carrier::sqlDeliveryRangeShop($range_table).' ORDER BY r.delimiter1'; return Db::getInstance()->executeS($sql); @@ -456,6 +463,22 @@ class CarrierCore extends ObjectModel return $carriers; } + public static function getIdTaxRulesGroupMostUsed() + { + return Db::getInstance()->getValue(' + SELECT id_tax_rules_group + FROM ( + SELECT COUNT(*) n, c.id_tax_rules_group + FROM '._DB_PREFIX_.'carrier c + JOIN '._DB_PREFIX_.'tax_rules_group trg ON (c.id_tax_rules_group = trg.id_tax_rules_group) + WHERE trg.active = 1 + GROUP BY c.id_tax_rules_group + ORDER BY n DESC + LIMIT 1 + ) most_used' + ); + } + public static function getDeliveredCountries($id_lang, $active_countries = false, $active_carriers = false, $contain_states = null) { if (!Validate::isBool($active_countries) || !Validate::isBool($active_carriers)) @@ -712,7 +735,7 @@ class CarrierCore extends ObjectModel */ public function deleteDeliveryPrice($range_table) { - $where = '`id_carrier` = '.(int)$this->id.' AND (`id_'.$range_table.'` IS NOT NULL OR `id_'.$range_table.'` = 0) '; + $where = '`id_carrier` = '.(int)$this->id.' AND (`id_'.bqSQL($range_table).'` IS NOT NULL OR `id_'.bqSQL($range_table).'` = 0) '; if (Shop::getContext() == Shop::CONTEXT_ALL) $where .= 'AND id_shop IS NULL AND id_shop_group IS NULL'; @@ -730,7 +753,7 @@ class CarrierCore extends ObjectModel * @param array $priceList Prices list in multiple arrays (changed to array since 1.5.0) * @return boolean Insertion result */ - public function addDeliveryPrice($price_list) + public function addDeliveryPrice($price_list, $delete = false) { if (!$price_list) return false; @@ -749,6 +772,17 @@ class CarrierCore extends ObjectModel if (!isset($values['id_shop_group'])) $values['id_shop_group'] = (Shop::getContext() != Shop::CONTEXT_ALL) ? Shop::getContextShopGroupID() : null; + if ($delete) + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'delivery` + WHERE id_shop = '.(int)$values['id_shop'].' + AND id_shop_group='.(int)$values['id_shop_group'].' + AND id_carrier='.(int)$values['id_carrier']. + ($values['id_range_price'] !== null ? ' AND id_range_price='.(int)$values['id_range_price'] : ''). + ($values['id_range_weight'] !== null ? ' AND id_range_weight='.(int)$values['id_range_weight'] : '').' + AND id_zone='.(int)$values['id_zone'] + ); + $sql .= '('; foreach ($values as $v) { @@ -912,9 +946,11 @@ class CarrierCore extends ObjectModel return false; } - public function getRangeObject() + public function getRangeObject($shipping_method = false) { - $shipping_method = $this->getShippingMethod(); + if (!$shipping_method) + $shipping_method = $this->getShippingMethod(); + if ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT) return new RangeWeight(); elseif ($shipping_method == Carrier::SHIPPING_METHOD_PRICE) @@ -1032,9 +1068,9 @@ class CarrierCore extends ObjectModel $sql = 'AND '.$alias.'.id_delivery = ( SELECT d2.id_delivery FROM '._DB_PREFIX_.'delivery d2 - WHERE d2.id_carrier = '.$alias.'.id_carrier - AND d2.id_zone = '.$alias.'.id_zone - AND d2.id_'.$range_table.' = '.$alias.'.id_'.$range_table.' + WHERE d2.id_carrier = `'.bqSQL($alias).'`.id_carrier + AND d2.id_zone = `'.bqSQL($alias).'`.id_zone + AND d2.`id_'.bqSQL($range_table).'` = `'.bqSQL($alias).'`.`id_'.bqSQL($range_table).'` '.$where.' ORDER BY d2.id_shop DESC, d2.id_shop_group DESC LIMIT 1 @@ -1250,5 +1286,17 @@ class CarrierCore extends ObjectModel return true; } -} + + public function setGroups($groups, $delete = true) + { + if ($delete) + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$this->id); + if (!count($groups)) + return true; + $sql = 'INSERT INTO '._DB_PREFIX_.'carrier_group (id_carrier, id_group) VALUES '; + foreach ($groups as $id_group) + $sql .= '('.(int)$this->id.', '.(int)$id_group.'),'; + return Db::getInstance()->execute(rtrim($sql, ',')); + } +} diff --git a/classes/Cart.php b/classes/Cart.php index ecbf3bad3..e57509cc3 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -134,6 +134,7 @@ class CartCore extends ObjectModel 'cart_rows' => array('resource' => 'cart_row', 'virtual_entity' => true, 'fields' => array( 'id_product' => array('required' => true, 'xlink_resource' => 'products'), 'id_product_attribute' => array('required' => true, 'xlink_resource' => 'combinations'), + 'id_address_delivery' => array('required' => true, 'xlink_resource' => 'addresses'), 'quantity' => array('required' => true), ) ), @@ -209,7 +210,7 @@ class CartCore extends ObjectModel if (!isset($this->id_address_invoice) || $this->id_address_invoice == $id_address) { $to_update = true; - $this->context->cart->id_address_invoice = $id_address_new; + $this->id_address_invoice = $id_address_new; } if (!isset($this->id_address_delivery) || $this->id_address_delivery == $id_address) { @@ -764,6 +765,9 @@ class CartCore extends ObjectModel if (!Validate::isLoadedObject($cartRule)) return false; + if (Db::getInstance()->getValue('SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$this->id)) + return false; + // Add the cart rule to the cart if (!Db::getInstance()->insert('cart_cart_rule', array( 'id_cart_rule' => (int)$id_cart_rule, @@ -3030,8 +3034,10 @@ class CartCore extends ObjectModel public function addTextFieldToProduct($id_product, $index, $type, $text_value) { $text_value = str_replace(array("\n", "\r"), '', nl2br($text_value)); - $text_value = str_replace('\\', '\\\\', $text_value); - $text_value = str_replace('\'', '\\\'', $text_value); + if (!_PS_MAGIC_QUOTES_GPC_){ + $text_value = str_replace('\\', '\\\\', $text_value); + $text_value = str_replace('\'', '\\\'', $text_value); + } return $this->_addCustomization($id_product, 0, $index, $type, $text_value, 0); } @@ -3207,25 +3213,24 @@ class CartCore extends ObjectModel public function getWsCartRows() { - $query = ' + return Db::getInstance()->executeS(' SELECT id_product, id_product_attribute, quantity FROM `'._DB_PREFIX_.'cart_product` - WHERE id_cart = '.(int)$this->id.' - AND id_shop = '.(int)Context::getContext()->shop->id; - - $result = Db::getInstance()->executeS($query); - return $result; + WHERE id_cart = '.(int)$this->id.' AND id_shop = '.(int)Context::getContext()->shop->id + ); } public function setWsCartRows($values) { if ($this->deleteAssociations()) { - $query = 'INSERT INTO `'._DB_PREFIX_.'cart_product`(`id_cart`, `id_product`, `id_product_attribute`, `quantity`, `date_add`, `id_shop`) VALUES '; + $query = 'INSERT INTO `'._DB_PREFIX_.'cart_product`(`id_cart`, `id_product`, `id_product_attribute`, `id_address_delivery`, `quantity`, `date_add`, `id_shop`) VALUES '; foreach ($values as $value) $query .= '('.(int)$this->id.', '.(int)$value['id_product'].', '. - (isset($value['id_product_attribute']) ? (int)$value['id_product_attribute'] : 'NULL').', '.(int)$value['quantity'].', NOW(), '.(int)Context::getContext()->shop->id.'),'; + (isset($value['id_product_attribute']) ? (int)$value['id_product_attribute'] : 'NULL').', '. + (isset($value['id_address_delivery']) ? (int)$value['id_address_delivery'] : 0).', '. + (int)$value['quantity'].', NOW(), '.(int)Context::getContext()->shop->id.'),'; Db::getInstance()->execute(rtrim($query, ',')); } diff --git a/classes/CartRule.php b/classes/CartRule.php index 001e8cd22..778865855 100644 --- a/classes/CartRule.php +++ b/classes/CartRule.php @@ -10,7 +10,7 @@ * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy 502immediately. +* to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * @@ -495,36 +495,14 @@ class CartRuleCore extends ObjectModel $cartTotal = $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::ONLY_PRODUCTS); if ($this->minimum_amount_shipping) $cartTotal += $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::ONLY_SHIPPING); + $products = $context->cart->getProducts(); + $cart_rules = $context->cart->getCartRules(); - // If a product is given for free in this rule and already in the cart, the price is subtracted - if ($this->gift_product && $alreadyInCart) - { - $query = new DbQuery(); - - $query->select('id_product'); - $query->from('cart_product'); - $query->where('id_product = '.(int)$this->gift_product); - $query->where('id_cart = '.(int)$context->cart->id); - - if ((int)$this->gift_product_attribute) - $query->where('id_product_attribute = '.(int)$this->gift_product_attribute); - - if (Db::getInstance()->getValue($query)) - { - $ref = false; - $product_price = Product::getPriceStatic( - $this->gift_product, - $this->minimum_amount_tax, - $this->gift_product_attribute, - null, null, false, true, 1, null, - $context->cart->id_customer ? $context->cart->id_customer : null, - $context->cart->id, - (int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} ? (int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} : null, - $ref, true, true, $context, true - ); - $cartTotal -= $product_price; - } - } + foreach ($cart_rules as &$cart_rule) + if ($cart_rule['gift_product']) + foreach ($products as $key => &$product) + if (empty($product['gift']) && $product['id_product'] == $cart_rule['gift_product'] && $product['id_product_attribute'] == $cart_rule['gift_product_attribute']) + $cartTotal = Tools::ps_round($cartTotal - $product[$this->minimum_amount_tax ? 'price_wt' : 'price'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); if ($cartTotal < $minimum_amount) return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher'); @@ -1130,7 +1108,7 @@ class CartRuleCore extends ObjectModel WHERE `id_cart` = '.(int)$context->cart->id.' ) ) - AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.') + AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.') ORDER BY priority'; $result = Db::getInstance()->executeS($sql); if ($result) diff --git a/classes/Collection.php b/classes/Collection.php index 7f8094059..64d47ec60 100644 --- a/classes/Collection.php +++ b/classes/Collection.php @@ -74,6 +74,16 @@ class CollectionCore implements Iterator, ArrayAccess, Countable * @var int Total of elements for iteration */ protected $total; + + /** + * @var int Page number + */ + protected $page_number = 0; + + /** + * @var int Size of a page + */ + protected $page_size = 0; protected $fields = array(); protected $alias = array(); @@ -334,6 +344,11 @@ class CollectionCore implements Iterator, ArrayAccess, Countable break; } } + + // All limit clause + if ($this->page_size) + $this->query->limit($this->page_size, $this->page_number * $this->page_size); + // Shall we display query for debug ? if ($display_query) @@ -659,6 +674,34 @@ class CollectionCore implements Iterator, ArrayAccess, Countable } return $this->fields[$field]; } + + /** + * Set the page number + * + * @param int $page_number + * @return Collection + */ + public function setPageNumber($page_number) + { + $page_number = (int)$page_number; + if ($page_number > 0) + $page_number--; + + $this->page_number = $page_number; + return $this; + } + + /** + * Set the nuber of item per page + * + * @param int $page_size + * @return Collection + */ + public function setPageSize($page_size) + { + $this->page_size = (int)$page_size; + return $this; + } /** * Generate uniq alias from association name diff --git a/classes/ConfigurationTest.php b/classes/ConfigurationTest.php index 7fac9df94..dab5e37d2 100644 --- a/classes/ConfigurationTest.php +++ b/classes/ConfigurationTest.php @@ -49,7 +49,6 @@ class ConfigurationTestCore 'mysql_support' => false, 'config_dir' => 'config', 'cache_dir' => 'cache', - 'sitemap' => 'sitemap.xml', 'log_dir' => 'log', 'img_dir' => 'img', 'mails_dir' => 'mails', diff --git a/classes/Cookie.php b/classes/Cookie.php index 7fbec5303..8d358c6be 100644 --- a/classes/Cookie.php +++ b/classes/Cookie.php @@ -298,7 +298,11 @@ class CookieCore //checks if the language exists, if not choose the default language if (!$this->_standalone && !Language::getLanguage((int)$this->id_lang)) + { $this->id_lang = Configuration::get('PS_LANG_DEFAULT'); + // set detect_language to force going through Tools::setCookieLanguage to figure out browser lang + $this->detect_language = true; + } } diff --git a/classes/Hook.php b/classes/Hook.php index 069af7942..451b3b31b 100644 --- a/classes/Hook.php +++ b/classes/Hook.php @@ -126,7 +126,9 @@ class HookCore extends ObjectModel FROM `'._DB_PREFIX_.'hook_alias` ha INNER JOIN `'._DB_PREFIX_.'hook` h ON ha.name = h.name'); foreach ($result as $row) + { $hook_ids[$row['name']] = $row['id_hook']; + } Cache::store($cache_id, $hook_ids); } else @@ -147,9 +149,23 @@ class HookCore extends ObjectModel FROM `'._DB_PREFIX_.'hook` WHERE `id_hook` = '.(int)$hook_id) ); - return Cache::retrieve($cache_id); } + + /** + * Return hook live edit bool from ID + */ + public static function getLiveEditById($hook_id) + { + $cache_id = 'hook_live_editbyid_'.$hook_id; + if (!Cache::isStored($cache_id)) + Cache::store($cache_id, Db::getInstance()->getValue(' + SELECT `live_edit` + FROM `'._DB_PREFIX_.'hook` + WHERE `id_hook` = '.(int)$hook_id) + ); + return Cache::retrieve($cache_id); + } /** * Get list of hook alias @@ -315,15 +331,9 @@ class HookCore extends ObjectModel $sql->orderBy('hm.`position`'); - // Store results per hook name - $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); $list = array(); - - // Get all available payment module - $payment_modules = array(); - - if ($results) - foreach ($results as $row) + if ($result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach ($result as $row) { $row['hook'] = strtolower($row['hook']); if (!isset($list[$row['hook']])) @@ -353,14 +363,17 @@ class HookCore extends ObjectModel $hook_name = strtolower($hook_name); $return = array(); + $inserted_modules = array(); if (isset($list[$hook_name])) $return = $list[$hook_name]; + foreach ($return as $module) + $inserted_modules[] = $module['id_module']; if (isset($list[$retro_hook_name])) - $return = array_merge($return, $list[$retro_hook_name]); + foreach ($list[$retro_hook_name] as $retro_module_call) + if (!in_array($retro_module_call['id_module'], $inserted_modules)) + $return[] = $retro_module_call; - if (count($return) > 0) - return $return; - return false; + return (count($return) > 0 ? $return : false); } else return $list; @@ -404,6 +417,7 @@ class HookCore extends ObjectModel // Look on modules list $altern = 0; $output = ''; + foreach ($module_list as $array) { // Check errors @@ -417,7 +431,7 @@ class HookCore extends ObjectModel { $exceptions = $moduleInstance->getExceptions($array['id_hook']); $controller = Dispatcher::getInstance()->getController(); - + if (in_array($controller, $exceptions)) continue; @@ -425,7 +439,7 @@ class HookCore extends ObjectModel $matching_name = array( 'authentication' => 'auth', 'compare' => 'products-comparison', - ); + ); if (isset($matching_name[$controller]) && in_array($matching_name[$controller], $exceptions)) continue; if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee)) @@ -459,7 +473,7 @@ class HookCore extends ObjectModel if ($array_return) return $output; else - return ($live_edit ? ' + return ($live_edit ? '
        ' : '').$output.($live_edit ? '
        ' : '');// Return html string } @@ -468,13 +482,13 @@ class HookCore extends ObjectModel return '
        - - ' + + ' .Tools::safeOutput($moduleInstance->displayName).' - + '.$display.'
        '; } diff --git a/classes/ImageManager.php b/classes/ImageManager.php index c7500c8fd..c647b6ea3 100644 --- a/classes/ImageManager.php +++ b/classes/ImageManager.php @@ -407,6 +407,7 @@ class ImageManagerCore case 'jpeg': default: $quality = (Configuration::get('PS_JPEG_QUALITY') === false ? 90 : Configuration::get('PS_JPEG_QUALITY')); + imageinterlace($resource,1); /// make it PROGRESSIVE $success = imagejpeg($resource, $filename, (int)$quality); break; } diff --git a/classes/Language.php b/classes/Language.php index 0228a63ac..7a0726c88 100644 --- a/classes/Language.php +++ b/classes/Language.php @@ -192,7 +192,7 @@ class LanguageCore extends ObjectModel public function add($autodate = true, $nullValues = false, $only_add = false) { - if (!parent::add($autodate)) + if (!parent::add($autodate, $nullValues)) return false; if ($only_add) @@ -202,10 +202,9 @@ class LanguageCore extends ObjectModel $this->_generateFiles(); // @todo Since a lot of modules are not in right format with their primary keys name, just get true ... - $resUpdateSQL = $this->loadUpdateSQL(); - $resUpdateSQL = true; - Tools::generateHtaccess(); - return $resUpdateSQL; + $this->loadUpdateSQL(); + + return Tools::generateHtaccess(); } public function toggleStatus() @@ -488,7 +487,8 @@ class LanguageCore extends ObjectModel // Files deletion foreach (Language::getFilesList($this->iso_code, _THEME_NAME_, false, false, false, true, true) as $key => $file) if (file_exists($key)) - unlink($key); + unlink($key); + $modList = scandir(_PS_MODULE_DIR_); foreach ($modList as $mod) { @@ -510,37 +510,32 @@ class LanguageCore extends ObjectModel Language::recurseDeleteDir(_PS_MAIL_DIR_.$this->iso_code); if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code)) Language::recurseDeleteDir(_PS_TRANSLATIONS_DIR_.$this->iso_code); - } - - if (!parent::delete()) - return false; - if (!$this->hasMultishopEntries() || Shop::getContext() == Shop::CONTEXT_ALL) - { - // delete images - $files_copy = array( - '/en.jpg', - '/en-default-'.ImageType::getFormatedName('thickbox').'.jpg', - '/en-default-'.ImageType::getFormatedName('home').'.jpg', - '/en-default-'.ImageType::getFormatedName('large').'.jpg', - '/en-default-'.ImageType::getFormatedName('medium').'.jpg', - '/en-default-'.ImageType::getFormatedName('small').'.jpg' + + $images = array( + '.jpg', + '-default-'.ImageType::getFormatedName('thickbox').'.jpg', + '-default-'.ImageType::getFormatedName('home').'.jpg', + '-default-'.ImageType::getFormatedName('large').'.jpg', + '-default-'.ImageType::getFormatedName('medium').'.jpg', + '-default-'.ImageType::getFormatedName('small').'.jpg' ); - $tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_); - foreach ($tos as $to) - foreach ($files_copy as $file) + $image_directories = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_); + foreach ($images_directories as $image_directory) + foreach ($images as $image) { - $name = str_replace('/en', ''.$this->iso_code, $file); - - if (file_exists($to.$name)) - unlink($to.$name); + if (file_exists($image_directory.$this->iso_code.$image)) + unlink($image_directory.$this->iso_code.$image); if (file_exists(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg')) unlink(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg'); } } + + if (!parent::delete()) + return false; + return Tools::generateHtaccess(); } - public function deleteSelection($selection) { if (!is_array($selection)) @@ -549,11 +544,10 @@ class LanguageCore extends ObjectModel $result = true; foreach ($selection as $id) { - $this->id = (int)($id); - $result = $result && $this->delete(); + $language = new Language($id); + $result = $result && $language->delete(); } - Tools::generateHtaccess(); return $result; } diff --git a/classes/Link.php b/classes/Link.php index e5019b07a..7946e2044 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -91,10 +91,10 @@ class LinkCore if (!$id_lang) $id_lang = Context::getContext()->language->id; - if ($id_shop === null) - $shop = Context::getContext()->shop; - else + if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && $id_shop !== null) $shop = new Shop($id_shop); + else + $shop = Context::getContext()->shop; $url = 'http://'.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang); diff --git a/classes/LocalizationPack.php b/classes/LocalizationPack.php index bfa03e301..5a738b1a4 100644 --- a/classes/LocalizationPack.php +++ b/classes/LocalizationPack.php @@ -70,8 +70,16 @@ class LocalizationPackCore return $res; } foreach ($selection as $selected) - if (!Validate::isLocalizationPackSelection($selected) || !$this->{'_install'.ucfirst($selected)}($xml)) - return false; + if (strtolower((string)$selected) == 'currencies') + { + if (!Validate::isLocalizationPackSelection($selected) || !$this->{'_install'.ucfirst($selected)}($xml, true)) + return false; + } + else + { + if (!Validate::isLocalizationPackSelection($selected) || !$this->{'_install'.ucfirst($selected)}($xml)) + return false; + } return true; } @@ -239,8 +247,6 @@ class LocalizationPackCore { if (isset($xml->currencies->currency)) { - - foreach ($xml->currencies->currency as $data) { $attributes = $data->attributes(); diff --git a/classes/Mail.php b/classes/Mail.php index 76a3de1d8..69c8ca91f 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -52,7 +52,8 @@ class MailCore * @param bool $die */ public static function Send($id_lang, $template, $subject, $template_vars, $to, - $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null) + $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, + $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null) { $configuration = Configuration::getMultiple(array( 'PS_SHOP_EMAIL', @@ -146,7 +147,10 @@ class MailCore if ($to_name == null) $to_name = $addr; /* Encode accentuated chars */ - $to_list->addTo($addr, '=?UTF-8?B?'.base64_encode($to_name).'?='); + if (function_exists('mb_encode_mimeheader')) + $to_list->addTo($addr, mb_encode_mimeheader($to_name, 'utf-8')); + else + $to_list->addTo($addr, '=?UTF-8?B?'.base64_encode($to_name).'?='); } $to_plugin = $to[0]; $to = $to_list; @@ -155,7 +159,10 @@ class MailCore $to_plugin = $to; if ($to_name == null) $to_name = $to; - $to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($to_name).'?='); + if (function_exists('mb_encode_mimeheader')) + $to = new Swift_Address($to, mb_encode_mimeheader($to_name, 'utf-8')); + else + $to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($to_name).'?='); } try { /* Connect with the appropriate configuration */ @@ -230,6 +237,8 @@ class MailCore /* Create mail and attach differents parts */ $message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject); + $message->setCharset('utf-8'); + /* Set Message-ID - getmypid() is blocked on some hosting */ $message->setId(Mail::generateId()); diff --git a/classes/Media.php b/classes/Media.php index 31b960cf9..eb73c8232 100755 --- a/classes/Media.php +++ b/classes/Media.php @@ -224,7 +224,7 @@ class MediaCore $url_data = parse_url($css_uri); $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); // check if css files exists - if (!@filemtime($file_uri)) + if (!@filemtime($file_uri) && !array_key_exists('host', $url_data)) return false; if (Context::getContext()->controller->controller_type == 'admin') @@ -386,6 +386,7 @@ class MediaCore { //inits $css_files_by_media = array(); + $external_css_files = array(); $compressed_css_files = array(); $compressed_css_files_not_found = array(); $compressed_css_files_infos = array(); @@ -400,6 +401,13 @@ class MediaCore $infos = array(); $infos['uri'] = $filename; $url_data = parse_url($filename); + + if(array_key_exists('host', $url_data)) + { + $external_css_files[$filename] = $media; + continue; + } + $infos['path'] = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, '/', $url_data['path']); $css_files_by_media[$media]['files'][] = $infos; if (!array_key_exists('date', $css_files_by_media[$media])) @@ -461,7 +469,7 @@ class MediaCore $url = str_replace(_PS_THEME_DIR_, _THEMES_DIR_._THEME_NAME_.'/', $filename); $css_files[$protocol_link.Tools::getMediaServer($url).$url] = $media; } - return $css_files; + return array_merge($external_css_files, $css_files); } public static function getBackTrackLimit() diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index d1cd8f5ad..20be99921 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -535,28 +535,28 @@ abstract class ObjectModelCore return false; $object_id = Db::getInstance()->Insert_ID(); - + if (isset($definition['multilang']) && $definition['multilang']) { - $res = Db::getInstance()->executeS(' - SELECT * - FROM `'._DB_PREFIX_.bqSQL($definition['table']).'_lang` - WHERE `'.bqSQL($definition['primary']).'` = '.(int)$this->id - ); - - if (!$res) + $result = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.bqSQL($definition['table']).'_lang` + WHERE `'.bqSQL($definition['primary']).'` = '.(int)$this->id); + if (!$result) return false; - - foreach ($res as $field => &$value) - if (isset($definition['fields'][$field])) - $value = ObjectModel::formatValue($value, $definition['fields'][$field]['type']); - - foreach ($res as $row) + + foreach ($result as &$row) + foreach ($row as $field => &$value) + if (isset($definition['fields'][$field])) + $value = ObjectModel::formatValue($value, $definition['fields'][$field]['type']); + + // Keep $row2, you cannot use $row because there is an unexplicated conflict with the previous usage of this variable + foreach ($result as $row2) { - $row[$definition['primary']] = (int)$object_id; - if (!Db::getInstance()->insert($definition['table'].'_lang', $row)) + $row2[$definition['primary']] = (int)$object_id; + if (!Db::getInstance()->insert($definition['table'].'_lang', $row2)) return false; - } + } } $object_duplicated = new $definition['classname']((int)$object_id); @@ -857,8 +857,12 @@ abstract class ObjectModelCore continue; $values = $this->$field; + + // If the object has not been loaded in multilanguage, then the value is the one for the current language of the object if (!is_array($values)) $values = array($this->id_lang => $values); + + // The value for the default must always be set, so we put an empty string if it does not exists if (!isset($values[Configuration::get('PS_LANG_DEFAULT')])) $values[Configuration::get('PS_LANG_DEFAULT')] = ''; @@ -979,17 +983,18 @@ abstract class ObjectModelCore $required_fields_database = (isset(self::$fieldsRequiredDatabase[get_class($this)])) ? self::$fieldsRequiredDatabase[get_class($this)] : array(); foreach ($this->def['fields'] as $field => $data) { + $value = Tools::getValue($field, $this->{$field}); // Check if field is required by user if (in_array($field, $required_fields_database)) $data['required'] = true; // Checking for required fields - if (isset($data['required']) && $data['required'] && ($value = Tools::getValue($field, $this->{$field})) == false && (string)$value != '0') + if (isset($data['required']) && $data['required'] && empty($value) && $value !== '0') if (!$this->id || $field != 'passwd') $errors[$field] = ''.self::displayFieldName($field, get_class($this), $htmlentities).' '.Tools::displayError('is required.'); // Checking for maximum fields sizes - if (isset($data['size']) && ($value = Tools::getValue($field, $this->{$field})) && Tools::strlen($value) > $data['size']) + if (isset($data['size']) && !empty($value) && Tools::strlen($value) > $data['size']) $errors[$field] = sprintf( Tools::displayError('%1$s is too long. Maximum length: %2$d'), self::displayFieldName($field, get_class($this), $htmlentities), @@ -998,7 +1003,7 @@ abstract class ObjectModelCore // Checking for fields validity // Hack for postcode required for country which does not have postcodes - if (($value = Tools::getValue($field, $this->{$field})) || ($field == 'postcode' && $value == '0')) + if (!empty($value) || $value === '0' || ($field == 'postcode' && $value == '0')) { if (isset($data['validate']) && !Validate::$data['validate']($value) && (!empty($value) || $data['required'])) $errors[$field] = ''.self::displayFieldName($field, get_class($this), $htmlentities).' '.Tools::displayError('is invalid.'); @@ -1322,7 +1327,7 @@ abstract class ObjectModelCore * @param string $specific_where Only executed for common table * @return bool */ - public static function updateMultishopTable($classname, $data, $where, $specific_where = '') + public static function updateMultishopTable($classname, $data, $where = '', $specific_where = '') { $def = ObjectModel::getDefinition($classname); $update_data = array(); @@ -1342,8 +1347,8 @@ abstract class ObjectModelCore $sql = 'UPDATE '._DB_PREFIX_.$def['table'].' a '.Shop::addSqlAssociation($def['table'], 'a', true, null, true).' - SET '.implode(', ', $update_data).' - WHERE '.$where; + SET '.implode(', ', $update_data). + (!empty($where) ? ' WHERE '.$where : ''); return Db::getInstance()->execute($sql); } @@ -1632,4 +1637,4 @@ abstract class ObjectModelCore { $this->update_fields = $fields; } -} +} \ No newline at end of file diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 9b4994ee6..022e580ec 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -348,7 +348,8 @@ abstract class PaymentModuleCore extends Module // Construct order detail table for the email $products_list = ''; $virtual_product = true; - foreach ($products as $key => $product) + + foreach ($order->product_list as $key => $product) { $price = Product::getPriceStatic((int)$product['id_product'], false, ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), 6, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $price_wt = Product::getPriceStatic((int)$product['id_product'], true, ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), 2, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); @@ -604,7 +605,8 @@ abstract class PaymentModuleCore extends Module '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $this->context->currency, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $this->context->currency, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false), - '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false)); + '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false), + '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $this->context->currency, false)); if (is_array($extra_vars)) $data = array_merge($data, $extra_vars); diff --git a/classes/Product.php b/classes/Product.php index 8ae6adc76..d2d49913e 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -364,7 +364,7 @@ class ProductCore extends ObjectModel ), 'type' => array( 'getter' => 'getWsType', - 'setter' => false, + 'setter' => 'setWsType', ), ), 'associations' => array( @@ -668,6 +668,45 @@ class ProductCore extends ObjectModel return false; } + /** + * For a given id_product and id_product_attribute, return available date + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @return string/null + */ + public static function getAvailableDate($id_product, $id_product_attribute = null) + { + $sql = 'SELECT'; + + if ($id_product_attribute === null) + $sql .= ' p.`available_date`'; + else + $sql .= ' IF(pa.`available_date` = "0000-00-00", p.`available_date`, pa.`available_date`) AS available_date'; + + $sql .= ' FROM `'._DB_PREFIX_.'product` p'; + + if ($id_product_attribute !== null) + $sql .= ' LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product` = p.`id_product`)'; + + $sql .= Shop::addSqlAssociation('product', 'p'); + + if ($id_product_attribute !== null) + $sql .= Shop::addSqlAssociation('product_attribute', 'pa'); + + $sql .= ' WHERE p.`id_product` = '.(int)$id_product; + + if ($id_product_attribute !== null) + $sql .= ' AND pa.`id_product` = '.(int)$id_product.' AND pa.`id_product_attribute` = '.(int)$id_product_attribute; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + + if ($result == '0000-00-00') + $result = null; + + return $result; + } + public static function updateIsVirtual($id_product) { Db::getInstance()->update('product', array( @@ -1300,7 +1339,7 @@ class ProductCore extends ObjectModel } /** - * Sets Supplier Reference + * Sets or updates Supplier Reference * * @param int $id_supplier * @param int $id_product_attribute @@ -1313,30 +1352,25 @@ class ProductCore extends ObjectModel //in some case we need to add price without supplier reference if ($supplier_reference === null) $supplier_reference = ''; - + //Try to set the default supplier reference - if ($id_supplier > 0) + if (($id_supplier > 0) && ($id_product > 0)) { $id_product_supplier = (int)ProductSupplier::getIdByProductAndSupplier($this->id, $id_product_attribute, $id_supplier); + $product_supplier = new ProductSupplier($id_product_supplier); + if (!$id_product_supplier) { - //create new record - $product_supplier_entity = new ProductSupplier(); - $product_supplier_entity->id_product = (int)$this->id; - $product_supplier_entity->id_product_attribute = (int)$id_product_attribute; - $product_supplier_entity->id_supplier = (int)$id_supplier; - $product_supplier_entity->product_supplier_reference = pSQL($supplier_reference); - $product_supplier_entity->product_supplier_price_te = (int)$price; - $product_supplier_entity->id_currency = (int)$id_currency; - $product_supplier_entity->save(); - } - else - { - $product_supplier = new ProductSupplier((int)$id_product_supplier); - $product_supplier->product_supplier_reference = pSQL($supplier_reference); - $product_supplier->update(); + $product_supplier->id_product = (int)$this->id; + $product_supplier->id_product_attribute = (int)$id_product_attribute; + $product_supplier->id_supplier = (int)$id_supplier; } + + $product_supplier->product_supplier_reference = pSQL($supplier_reference); + $product_supplier->product_supplier_price_te = (float)$price; + $product_supplier->id_currency = (int)$id_currency; + $product_supplier->save(); } } @@ -1978,13 +2012,7 @@ class ProductCore extends ObjectModel FROM `'._DB_PREFIX_.'product` p '.Shop::addSqlAssociation('product', 'p').' WHERE product_shop.`active` = 1 - AND DATEDIFF( - product_shop.`date_add`, - DATE_SUB( - NOW(), - INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY - ) - ) > 0 + AND product_shop.`date_add` > "'.date('Y-m-d', strtotime('-'.(Configuration::get('PS_NB_DAYS_NEW_PRODUCT') ? (int)Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY')).'" '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' AND p.`id_product` IN ( SELECT cp.`id_product` @@ -1999,13 +2027,7 @@ class ProductCore extends ObjectModel $sql->select( 'p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` AS manufacturer_name, - DATEDIFF( - product_shop.`date_add`, - DATE_SUB( - NOW(), - INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY - ) - ) > 0 AS new' + product_shop.`date_add` > "'.date('Y-m-d', strtotime('-'.(Configuration::get('PS_NB_DAYS_NEW_PRODUCT') ? (int)Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY')).'" as new' ); $sql->from('product', 'p'); @@ -2020,25 +2042,15 @@ class ProductCore extends ObjectModel $sql->leftJoin('manufacturer', 'm', 'm.`id_manufacturer` = p.`id_manufacturer`'); $sql->where('product_shop.`active` = 1'); - if ($front) $sql->where('product_shop.`visibility` IN ("both", "catalog")'); - $sql->where(' - DATEDIFF( - product_shop.`date_add`, - DATE_SUB( - NOW(), - INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY - ) - ) > 0' - ); - + $sql->where('product_shop.`date_add` > "'.date('Y-m-d', strtotime('-'.(Configuration::get('PS_NB_DAYS_NEW_PRODUCT') ? (int)Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY')).'"'); $sql->where('p.`id_product` IN ( SELECT cp.`id_product` FROM `'._DB_PREFIX_.'category_group` cg LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) - WHERE cg.`id_group` '.$sql_groups.')' - ); + WHERE cg.`id_group` '.$sql_groups.' + )'); $sql->groupBy('product_shop.id_product'); $sql->orderBy((isset($order_by_prefix) ? pSQL($order_by_prefix).'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way)); @@ -2372,8 +2384,14 @@ class ProductCore extends ObjectModel WHERE id_product = '.(int)$this->id.' AND id_shop = '.(int)$this->id_shop ); - if (count($data)) - Db::getInstance()->insert('product_carrier', $data); + + $uniqueArray = array(); + foreach($data as $subArray) + if(!in_array($subArray, $uniqueArray)) + $uniqueArray[] = $subArray; + + if (count($uniqueArray)) + Db::getInstance()->insert('product_carrier', $uniqueArray, false, true, Db::INSERT_IGNORE); } /** @@ -4740,6 +4758,44 @@ class ProductCore extends ObjectModel FROM `'._DB_PREFIX_.'product_tag` WHERE `id_product` = '.(int)$this->id); } + + /** + * Webservice setter : set tag ids of current product for association + * + * @param $tag_ids tag ids + */ + public function setWsTags($tag_ids) + { + $ids = array(); + foreach ($tag_ids as $value) + $ids[] = $value['id']; + if ($this->deleteWsTags()) + { + if ($ids) + { + $sql_values = ''; + $ids = array_map('intval', $ids); + foreach ($ids as $position => $id) + $sql_values[] = '('.(int)$this->id.', '.(int)$id.')'; + $result = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_tag` (`id_product`, `id_tag`) + VALUES '.implode(',', $sql_values) + ); + return $result; + } + } + return true; + } + + /** + * Delete products tags entries without delete tags for webservice usage + * + * @return array Deletion result + */ + public function deleteWsTags() + { + return Db::getInstance()->delete('product_tag', 'id_product = '.(int)$this->id); + } public function getWsManufacturerName() @@ -4751,7 +4807,7 @@ class ProductCore extends ObjectModel { return ObjectModel::updateMultishopTable('product', array( 'ecotax' => 0, - ), ''); + )); } /** @@ -5344,6 +5400,41 @@ class ProductCore extends ObjectModel public function getWsProductBundle() { - return Db::getInstance()->executeS('SELECT id_product_item as id, quantity FROM '._DB_PREFIX_.'pack where id_product_pack = '.(int)$this->id); + return Db::getInstance()->executeS('SELECT id_product_item as id, quantity FROM '._DB_PREFIX_.'pack WHERE id_product_pack = '.(int)$this->id); } -} \ No newline at end of file + + public function setWsType($type_str) + { + $reverse_type_information = array( + 'simple' => Product::PTYPE_SIMPLE, + 'pack' => Product::PTYPE_PACK, + 'virtual' => Product::PTYPE_VIRTUAL, + ); + + if (!isset($reverse_type_information[$type_str])) + return false; + + $type = $reverse_type_information[$type_str]; + + if (Pack::isPack((int)$this->id) && $type != Product::PTYPE_PACK) + Pack::deleteItems($this->id); + + $this->cache_is_pack = ($type == Product::PTYPE_PACK); + $this->is_virtual = ($type == Product::PTYPE_VIRTUAL); + + return true; + } + + public function setWsProductBundle($items) + { + if($this->is_virtual) + return false; + + Pack::deleteItems($this->id); + + foreach ($items as $item) + if((int)$item['id'] > 0) + Pack::addItem($this->id, (int)$item['id'], (int)$item['quantity']); + return true; + } +} diff --git a/classes/ProductDownload.php b/classes/ProductDownload.php index 9936e635a..a52441f62 100644 --- a/classes/ProductDownload.php +++ b/classes/ProductDownload.php @@ -299,10 +299,10 @@ class ProductDownloadCore extends ObjectModel */ public static function getNewFilename() { - $ret = sha1(microtime()); - if (file_exists(_PS_DOWNLOAD_DIR_.$ret)) - $ret = ProductDownload::getNewFilename(); - return $ret; + do { + $filename = sha1(microtime()); + } while (file_exists(_PS_DOWNLOAD_DIR_.$filename)); + return $filename; } /** @@ -314,4 +314,4 @@ class ProductDownloadCore extends ObjectModel { return Configuration::get('PS_VIRTUAL_PROD_FEATURE_ACTIVE'); } -} \ No newline at end of file +} diff --git a/classes/ProductSale.php b/classes/ProductSale.php index d264a1ef9..cc1922ef0 100644 --- a/classes/ProductSale.php +++ b/classes/ProductSale.php @@ -67,7 +67,7 @@ class ProductSaleCore if ($nb_products < 1) $nb_products = 10; $final_order_by = $order_by; if (is_null($order_by) || $order_by == 'position' || $order_by == 'price') $order_by = 'sales'; - if (is_null($order_way) || $order_by == 'sales') $order_way == 'DESC'; + if (is_null($order_way) || $order_by == 'sales') $order_way = 'DESC'; $groups = FrontController::getCurrentCustomerGroups(); $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); $interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20; diff --git a/classes/Search.php b/classes/Search.php index 54e600011..eb3f0985e 100644 --- a/classes/Search.php +++ b/classes/Search.php @@ -410,7 +410,7 @@ class SearchCore { $db->execute('TRUNCATE '._DB_PREFIX_.'search_index'); $db->execute('TRUNCATE '._DB_PREFIX_.'search_word'); - ObjectModel::updateMultishopTable('Product', array('indexed' => 0), '1'); + ObjectModel::updateMultishopTable('Product', array('indexed' => 0)); } else { diff --git a/classes/Tools.php b/classes/Tools.php index 6a1acbbeb..bf8becb99 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -343,8 +343,8 @@ class ToolsCore $cookie->id_lang = null; } - /* Automatically detect language if not already defined */ - if (!$cookie->id_lang && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + /* Automatically detect language if not already defined, detect_language is set in Cookie::update */ + if ((!$cookie->id_lang || isset($cookie->detect_language)) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'])); if (Tools::strlen($array[0]) > 2) @@ -358,9 +358,17 @@ class ToolsCore { $lang = new Language(Language::getIdByIso($string)); if (Validate::isLoadedObject($lang) && $lang->active) + { + $language = new Language((int)$lang->id); + if (Validate::isLoadedObject($language)) + Context::getContext()->language = $language; $cookie->id_lang = (int)$lang->id; + } } } + + if (isset($cookie->detect_language)) + unset($cookie->detect_language); /* If language file not present, you must use default language file */ if (!$cookie->id_lang || !Validate::isUnsignedId($cookie->id_lang)) @@ -769,6 +777,33 @@ class ToolsCore { return (Tools::dieObject($object, $kill)); } + + public static function debug_backtrace($start = 0, $limit = null) + { + $backtrace = debug_backtrace(); + array_shift($backtrace); + for ($i = 0; $i < $start; ++$i) + array_shift($backtrace); + + echo ' +
        +
          '; + $i = 0; + foreach ($backtrace as $id => $trace) + { + if ((int)$limit && (++$i > $limit )) + break; + $relative_file = (isset($trace['file'])) ? 'in /'.ltrim(str_replace(array(_PS_ROOT_DIR_, '\\'), array('', '/'), $trace['file']), '/') : ''; + $current_line = (isset($trace['line'])) ? ':'.$trace['line'] : ''; + + echo '
        • + '.((isset($trace['class'])) ? $trace['class'] : '').((isset($trace['type'])) ? $trace['type'] : '').$trace['function'].' + '.$relative_file.$current_line.' +
        • '; + } + echo '
        +
        '; + } /** * ALIAS OF dieObject() - Display an error with detailed object but don't stop the execution @@ -1388,13 +1423,13 @@ class ToolsCore /** * Translates a string with underscores into camel case (e.g. first_name -> firstName) - * @prototype string public static function toCamelCase(string $str[, bool $catapitalise_first_char = false]) + * @prototype string public static function toCamelCase(string $str[, bool $capitalise_first_char = false]) */ public static function toCamelCase($str, $catapitalise_first_char = false) { - $str = strtolower($str); + $str = Tools::strtolower($str); if ($catapitalise_first_char) - $str = ucfirst($str); + $str = Tools::ucfirst($str); return preg_replace_callback('/_+([a-z])/', create_function('$c', 'return strtoupper($c[1]);'), $str); } @@ -2528,7 +2563,7 @@ exit; $fileAttachment = null; if (isset($_FILES[$input]['name']) && !empty($_FILES[$input]['name']) && !empty($_FILES[$input]['tmp_name'])) { - $fileAttachment['rename'] = uniqid(). self::strtolower(substr($_FILES[$input]['name'], -5)); + $fileAttachment['rename'] = uniqid(). Tools::strtolower(substr($_FILES[$input]['name'], -5)); $fileAttachment['content'] = file_get_contents($_FILES[$input]['tmp_name']); $fileAttachment['tmp_name'] = $_FILES[$input]['tmp_name']; $fileAttachment['name'] = $_FILES[$input]['name']; diff --git a/classes/Validate.php b/classes/Validate.php index 02fbe77d1..fa4a4872d 100644 --- a/classes/Validate.php +++ b/classes/Validate.php @@ -174,7 +174,7 @@ class ValidateCore */ public static function isMailName($mail_name) { - return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;=#{}]*$/u'), $mail_name); + return (is_string($mail_name) && preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;=#{}]*$/u'), $mail_name)); } /** @@ -592,7 +592,7 @@ class ValidateCore */ public static function isOrderBy($order) { - return preg_match('/^[a-zA-Z0-9._-]+$/', $order); + return preg_match('/^[a-zA-Z0-9.!_-]+$/', $order); } /** diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 1e47f497e..8e803008c 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -48,6 +48,8 @@ class AdminControllerCore extends Controller /** @var string Associated table name */ public $table; + public $list_id; + /** @var string Object identifier inside the associated table */ protected $identifier = false; @@ -380,6 +382,39 @@ class AdminControllerCore extends Controller break; } $this->toolbar_title = $bread_extended; + + if (Tools::isSubmit('submitFilter')) + { + $filter = ''; + foreach ($this->fields_list AS $field => $t) + { + if ($val = Tools::getValue($this->table.'Filter_'.$field)) + { + if(!is_array($val) && !empty($val)) + $filter .= ($filter ? ', ' : $this->l(' filter by ')).$t['title'].' : '; + + if (isset($t['type']) && $t['type'] == 'bool') + $filter .= ((bool)$val) ? $this->l('yes') : $this->l('no'); + elseif(is_string($val)) + $filter .= $val; + elseif(is_array($val)) + { + $tmp = ''; + foreach($val as $v) + if(is_string($v) && !empty($v)) + $tmp .= ' - '.$v; + if(Tools::strlen($tmp)) + { + $tmp = ltrim($tmp, ' - '); + $filter .= ($filter ? ', ' : $this->l(' filter by ')).$t['title'].' : '; + $filter .= $tmp; + } + } + } + } + if ($filter) + $this->toolbar_title[] = $filter; + } } /** @@ -430,29 +465,33 @@ class AdminControllerCore extends Controller */ public function processFilter() { + if (!isset($this->list_id)) + $this->list_id = $this->table; + $prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this))); // Filter memorization - if (isset($_POST) && !empty($_POST) && isset($this->table)) + if (isset($_POST) && !empty($_POST) && isset($this->list_id)) foreach ($_POST as $key => $value) { - if (stripos($key, $this->table.'Filter_') === 0) + if (stripos($key, $this->list_id.'Filter_') === 0) $this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : serialize($value); elseif(stripos($key, 'submitFilter') === 0) $this->context->cookie->$key = !is_array($value) ? $value : serialize($value); } - if (isset($_GET) && !empty($_GET) && isset($this->table)) + if (isset($_GET) && !empty($_GET) && isset($this->list_id)) foreach ($_GET as $key => $value) - if (stripos($key, $this->table.'OrderBy') === 0 || stripos($key, $this->table.'Orderway') === 0) + if (stripos($key, $this->list_id.'OrderBy') === 0 || stripos($key, $this->list_id.'Orderway') === 0) $this->context->cookie->{$prefix.$key} = $value; - $filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_'); + $filters = $this->context->cookie->getFamily($prefix.$this->list_id.'Filter_'); + foreach ($filters as $key => $value) { /* Extracting filters from $_POST on key filter_ */ - if ($value != null && !strncmp($key, $prefix.$this->table.'Filter_', 7 + Tools::strlen($prefix.$this->table))) + if ($value != null && !strncmp($key, $prefix.$this->list_id.'Filter_', 7 + Tools::strlen($prefix.$this->list_id))) { - $key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->table)); + $key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->list_id)); /* Table alias could be specified using a ! eg. alias!field */ $tmp_tab = explode('!', $key); $filter = count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]; @@ -888,30 +927,32 @@ class AdminControllerCore extends Controller /** * Cancel all filters for this tab */ - public function processResetFilters() + public function processResetFilters($list_id = null) { + if (!isset($list_id)) + $list_id = isset($this->list_id) ? $this->list_id : $this->table; + $prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this))); - $filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_'); + $filters = $this->context->cookie->getFamily($prefix.$list_id.'Filter_'); + foreach ($filters as $cookie_key => $filter) - if (strncmp($cookie_key, $prefix.$this->table.'Filter_', 7 + Tools::strlen($prefix.$this->table)) == 0) + if (strncmp($cookie_key, $prefix.$list_id.'Filter_', 7 + Tools::strlen($prefix.$list_id)) == 0) { - $key = substr($cookie_key, 7 + Tools::strlen($prefix.$this->table)); - /* Table alias could be specified using a ! eg. alias!field */ - $tmp_tab = explode('!', $key); - $key = (count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]); + $key = substr($cookie_key, 7 + Tools::strlen($prefix.$list_id)); if (is_array($this->fields_list) && array_key_exists($key, $this->fields_list)) + $this->context->cookie->$cookie_key = null; unset($this->context->cookie->$cookie_key); } - if (isset($this->context->cookie->{'submitFilter'.$this->table})) - unset($this->context->cookie->{'submitFilter'.$this->table}); + if (isset($this->context->cookie->{'submitFilter'.$list_id})) + unset($this->context->cookie->{'submitFilter'.$list_id}); - if (isset($this->context->cookie->{$prefix.$this->table.'Orderby'})) - unset($this->context->cookie->{$prefix.$this->table.'Orderby'}); + if (isset($this->context->cookie->{$prefix.$list_id.'Orderby'})) + unset($this->context->cookie->{$prefix.$list_id.'Orderby'}); - if (isset($this->context->cookie->{$prefix.$this->table.'Orderway'})) - unset($this->context->cookie->{$prefix.$this->table.'Orderway'}); + if (isset($this->context->cookie->{$prefix.$list_id.'Orderway'})) + unset($this->context->cookie->{$prefix.$list_id.'Orderway'}); unset($_POST); $this->_filter = false; @@ -1287,7 +1328,7 @@ class AdminControllerCore extends Controller $current_id = Tab::getCurrentParentId(); foreach ($tabs as $index => $tab) { - if ($tab['class_name'] == 'AdminStock' && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 0) + if (($tab['class_name'] == 'AdminStock' && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 0) || $tab['class_name'] == 'AdminCarrierWizard') { unset($tabs[$index]); continue; @@ -1327,7 +1368,7 @@ class AdminControllerCore extends Controller foreach ($sub_tabs as $index2 => $sub_tab) { // class_name is the name of the class controller - if (Tab::checkTabRights($sub_tab['id_tab']) === true && (bool)$sub_tab['active']) + if (Tab::checkTabRights($sub_tab['id_tab']) === true && (bool)$sub_tab['active'] && $sub_tab['class_name'] != 'AdminCarrierWizard') { $sub_tabs[$index2]['href'] = $this->context->link->getAdminLink($sub_tab['class_name']); $sub_tabs[$index2]['current'] = ($sub_tab['class_name'].'Controller' == get_class($this)); @@ -1471,6 +1512,8 @@ class AdminControllerCore extends Controller */ protected function initTabModuleList() { + if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400)) + @file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have')); if (!$this->isFresh(Module::CACHE_FILE_TAB_MODULES_LIST, 604800)) $this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, 'http://'.Tab::TAB_MODULE_LIST_URL); @@ -1691,6 +1734,7 @@ class AdminControllerCore extends Controller $helper->row_hover = $this->row_hover; $helper->position_identifier = $this->position_identifier; $helper->controller_name = $this->controller_name; + $helper->list_id = isset($this->list_id) ? $this->list_id : $this->table; // For each action, try to add the corresponding skip elements list $helper->list_skip_actions = $this->list_skip_actions; @@ -1898,11 +1942,14 @@ class AdminControllerCore extends Controller */ public function initProcess() { + if (!isset($this->list_id)) + $this->list_id = $this->table; + // Manage list filtering - if (Tools::isSubmit('submitFilter'.$this->table) - || $this->context->cookie->{'submitFilter'.$this->table} !== false - || Tools::getValue($this->table.'Orderby') - || Tools::getValue($this->table.'Orderway')) + if (Tools::isSubmit('submitFilter'.$this->list_id) + || $this->context->cookie->{'submitFilter'.$this->list_id} !== false + || Tools::getValue($this->list_id.'Orderby') + || Tools::getValue($this->list_id.'Orderway')) $this->filter = true; $this->id_object = (int)Tools::getValue($this->identifier); @@ -2004,7 +2051,7 @@ class AdminControllerCore extends Controller $this->action = 'export'; } /* Cancel all filters for this tab */ - elseif (isset($_POST['submitReset'.$this->table])) + elseif (isset($_POST['submitReset'.$this->list_id])) $this->action = 'reset_filters'; /* Submit options list */ elseif (Tools::getValue('submitOptions'.$this->table) || Tools::getValue('submitOptions')) @@ -2058,14 +2105,17 @@ class AdminControllerCore extends Controller */ public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) { + if (!isset($this->list_id)) + $this->list_id = $this->table; + /* Manage default params values */ $use_limit = true; if ($limit === false) $use_limit = false; elseif (empty($limit)) { - if (isset($this->context->cookie->{$this->table.'_pagination'}) && $this->context->cookie->{$this->table.'_pagination'}) - $limit = $this->context->cookie->{$this->table.'_pagination'}; + if (isset($this->context->cookie->{$this->list_id.'_pagination'}) && $this->context->cookie->{$this->list_id.'_pagination'}) + $limit = $this->context->cookie->{$this->list_id.'_pagination'}; else $limit = $this->_pagination[1]; } @@ -2075,8 +2125,8 @@ class AdminControllerCore extends Controller $prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this))); if (empty($order_by)) { - if ($this->context->cookie->{$prefix.$this->table.'Orderby'}) - $order_by = $this->context->cookie->{$prefix.$this->table.'Orderby'}; + if ($this->context->cookie->{$prefix.$this->list_id.'Orderby'}) + $order_by = $this->context->cookie->{$prefix.$this->list_id.'Orderby'}; elseif ($this->_orderBy) $order_by = $this->_orderBy; else @@ -2085,16 +2135,16 @@ class AdminControllerCore extends Controller if (empty($order_way)) { - if ($this->context->cookie->{$prefix.$this->table.'Orderway'}) - $order_way = $this->context->cookie->{$prefix.$this->table.'Orderway'}; + if ($this->context->cookie->{$prefix.$this->list_id.'Orderway'}) + $order_way = $this->context->cookie->{$prefix.$this->list_id.'Orderway'}; elseif ($this->_orderWay) $order_way = $this->_orderWay; else $order_way = $this->_defaultOrderWay; } - $limit = (int)Tools::getValue('pagination', $limit); - $this->context->cookie->{$this->table.'_pagination'} = $limit; + $limit = (int)Tools::getValue($this->list_id.'_pagination', $limit); + $this->context->cookie->{$this->list_id.'_pagination'} = $limit; /* Check params validity */ if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way) @@ -2106,24 +2156,23 @@ class AdminControllerCore extends Controller $order_by = $this->fields_list[$order_by]['filter_key']; /* Determine offset from current page */ - if ((isset($_POST['submitFilter'.$this->table]) || - isset($_POST['submitFilter'.$this->table.'_x']) || - isset($_POST['submitFilter'.$this->table.'_y'])) && - !empty($_POST['submitFilter'.$this->table]) && - is_numeric($_POST['submitFilter'.$this->table])) - $start = ((int)$_POST['submitFilter'.$this->table] - 1) * $limit; + if ((isset($_POST['submitFilter'.$this->list_id]) || + isset($_POST['submitFilter'.$this->list_id.'_x']) || + isset($_POST['submitFilter'.$this->list_id.'_y'])) && + !empty($_POST['submitFilter'.$this->list_id]) && + is_numeric($_POST['submitFilter'.$this->list_id])) + $start = ((int)$_POST['submitFilter'.$this->list_id] - 1) * $limit; /* Cache */ $this->_lang = (int)$id_lang; + $this->_orderBy = $order_by; if (preg_match('/[.!]/', $order_by)) { $order_by_split = preg_split('/[.!]/', $order_by); $order_by = pSQL($order_by_split[0]).'.`'.pSQL($order_by_split[1]).'`'; - $this->_orderBy = (isset($order_by_split) && isset($order_by_split[1])) ? $order_by_split[1] : $order_by; } - else - $this->_orderBy = $order_by; + $this->_orderWay = Tools::strtoupper($order_way); /* SQL table : orders, but class name is Order */ @@ -2222,6 +2271,7 @@ class AdminControllerCore extends Controller ($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : ''). (($use_limit === true) ? ' LIMIT '.(int)$start.','.(int)$limit : ''); + $this->_listTotal = 0; if (!($this->_list = Db::getInstance()->executeS($this->_listsql))) $this->_list_error = Db::getInstance()->getMsgError(); else @@ -2384,7 +2434,7 @@ class AdminControllerCore extends Controller foreach ($rules['required'] as $field) if (($value = Tools::getValue($field)) == false && (string)$value != '0') if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture')) - $this->errors[] = sprintf( + $this->errors[$field] = sprintf( Tools::displayError('The %s field is required.'), call_user_func(array($class_name, 'displayFieldName'), $field, $class_name) ); @@ -2393,7 +2443,7 @@ class AdminControllerCore extends Controller if (isset($rules['requiredLang']) && is_array($rules['requiredLang'])) foreach ($rules['requiredLang'] as $field_lang) if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty)) - $this->errors[] = sprintf( + $this->errors[$field_lang.'_'.$default_language->id] = sprintf( Tools::displayError('The field %1$s is required at least in %2$s.'), call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name), $default_language->name @@ -2403,7 +2453,7 @@ class AdminControllerCore extends Controller if (isset($rules['size']) && is_array($rules['size'])) foreach ($rules['size'] as $field => $max_length) if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length) - $this->errors[] = sprintf( + $this->errors[$field] = sprintf( Tools::displayError('The %1$s field is too long (%2$d chars max).'), call_user_func(array($class_name, 'displayFieldName'), $field, $class_name), $max_length @@ -2416,7 +2466,7 @@ class AdminControllerCore extends Controller { $field_lang_value = Tools::getValue($field_lang.'_'.$language['id_lang']); if ($field_lang_value !== false && Tools::strlen($field_lang_value) > $max_length) - $this->errors[] = sprintf( + $this->errors[$field_lang.'_'.$language['id_lang']] = sprintf( Tools::displayError('The field %1$s (%2$s) is too long (%3$d chars max, html chars including).'), call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name), $language['name'], @@ -2431,7 +2481,7 @@ class AdminControllerCore extends Controller foreach ($rules['validate'] as $field => $function) if (($value = Tools::getValue($field)) !== false && ($field != 'passwd')) if (!Validate::$function($value) && !empty($value)) - $this->errors[] = sprintf( + $this->errors[$field] = sprintf( Tools::displayError('The %s field is invalid.'), call_user_func(array($class_name, 'displayFieldName'), $field, $class_name) ); @@ -2440,12 +2490,12 @@ class AdminControllerCore extends Controller if (($value = Tools::getValue('passwd')) != false) { if ($class_name == 'Employee' && !Validate::isPasswdAdmin($value)) - $this->errors[] = sprintf( + $this->errors['passwd'] = sprintf( Tools::displayError('The %s field is invalid.'), call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name) ); elseif ($class_name == 'Customer' && !Validate::isPasswd($value)) - $this->errors[] = sprintf( + $this->errors['passwd'] = sprintf( Tools::displayError('The %s field is invalid.'), call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name) ); @@ -2457,7 +2507,7 @@ class AdminControllerCore extends Controller foreach ($languages as $language) if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value)) if (!Validate::$function($value)) - $this->errors[] = sprintf( + $this->errors[$field_lang.'_'.$language['id_lang']] = sprintf( Tools::displayError('The %1$s field (%2$s) is invalid.'), call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name), $language['name'] diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index 52c090097..eee97a66a 100755 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -114,18 +114,15 @@ class FrontControllerCore extends Controller $css_files = $this->css_files; $js_files = $this->js_files; - if ($this->ssl && !Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) + // If we call a SSL controller without SSL or a non SSL controller with SSL, we redirect with the right protocol + if (Configuration::get('PS_SSL_ENABLED') && ($_SERVER['REQUEST_METHOD'] != 'POST') && $this->ssl != Tools::usingSecureMode()) { header('HTTP/1.1 301 Moved Permanently'); header('Cache-Control: no-cache'); - header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); - exit(); - } - elseif (Configuration::get('PS_SSL_ENABLED') && Tools::usingSecureMode() && !($this->ssl)) - { - header('HTTP/1.1 301 Moved Permanently'); - header('Cache-Control: no-cache'); - header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']); + if ($this->ssl) + header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); + else + header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']); exit(); } @@ -808,7 +805,7 @@ class FrontControllerCore extends Controller // 'orderwaydefault' => Tools::getProductsOrder('way'), $stock_management = Configuration::get('PS_STOCK_MANAGEMENT') ? true : false; // no display quantity order if stock management disabled - $order_by_values = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity'); + $order_by_values = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity', 7 => 'reference'); $order_way_values = array(0 => 'asc', 1 => 'desc'); $this->orderBy = Tools::strtolower(Tools::getValue('orderby', $order_by_values[(int)Configuration::get('PS_PRODUCTS_ORDER_BY')])); $this->orderWay = Tools::strtolower(Tools::getValue('orderway', $order_way_values[(int)Configuration::get('PS_PRODUCTS_ORDER_WAY')])); @@ -1140,4 +1137,4 @@ class FrontControllerCore extends Controller 'logo_url' => $logo ); } -} +} \ No newline at end of file diff --git a/classes/controller/ModuleAdminController.php b/classes/controller/ModuleAdminController.php index ba0ac7c11..45375251b 100644 --- a/classes/controller/ModuleAdminController.php +++ b/classes/controller/ModuleAdminController.php @@ -51,9 +51,10 @@ abstract class ModuleAdminControllerCore extends AdminController public function createTemplate($tpl_name) { - if (file_exists($this->getTemplatePath().$this->override_folder.$tpl_name) && $this->viewAccess()) + if (file_exists(_PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/admin/'.$tpl_name) && $this->viewAccess()) + return $this->context->smarty->createTemplate(_PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/admin/'.$tpl_name, $this->context->smarty); + elseif (file_exists($this->getTemplatePath().$this->override_folder.$tpl_name) && $this->viewAccess()) return $this->context->smarty->createTemplate($this->getTemplatePath().$this->override_folder.$tpl_name, $this->context->smarty); - return parent::createTemplate($tpl_name); } diff --git a/classes/controller/ModuleFrontController.php b/classes/controller/ModuleFrontController.php index 0ab4932a5..f2db4a085 100644 --- a/classes/controller/ModuleFrontController.php +++ b/classes/controller/ModuleFrontController.php @@ -55,6 +55,8 @@ class ModuleFrontControllerCore extends FrontController { if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template)) $this->template = _PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template; + elseif (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/front/'.$template)) + $this->template = _PS_THEME_DIR_.'modules/'.$this->module->name.'/views/templates/front/'.$template; elseif (Tools::file_exists_cache($this->getTemplatePath().$template)) $this->template = $this->getTemplatePath().$template; else diff --git a/classes/exception/PrestaShopException.php b/classes/exception/PrestaShopException.php index 1476cd612..465bf0ddd 100644 --- a/classes/exception/PrestaShopException.php +++ b/classes/exception/PrestaShopException.php @@ -51,7 +51,7 @@ class PrestaShopExceptionCore extends Exception '; echo '
        '; echo '

        ['.get_class($this).']

        '; - echo $this->getExentedMessage(); + echo $this->getExtendedMessage(); $this->displayFileDebug($this->getFile(), $this->getLine()); @@ -145,14 +145,23 @@ class PrestaShopExceptionCore extends Exception { $logger = new FileLogger(); $logger->setFilename(_PS_ROOT_DIR_.'/log/'.date('Ymd').'_exception.log'); - $logger->logError($this->getExentedMessage(false)); + $logger->logError($this->getExtendedMessage(false)); + } + + /** + * @deprecated 1.5.5 + */ + protected function getExentedMessage($html = true) + { + Tools::displayAsDeprecated(); + return $this->getExtendedMessage($html); } /** * Return the content of the Exception * @return string content of the exception */ - protected function getExentedMessage($html = true) + protected function getExtendedMessage($html = true) { $format = '

        %s
        at line %d in file %s

        '; if (!$html) diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index caa1fc99e..04f128998 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -486,18 +486,21 @@ class HelperListCore extends Helper */ public function displayListHeader() { + if (!isset($this->list_id)) + $this->list_id = $this->table; + $id_cat = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category'); if (!isset($token) || empty($token)) $token = $this->token; /* Determine total page number */ - if (isset($this->context->cookie->{$this->table.'_pagination'}) && $this->context->cookie->{$this->table.'_pagination'}) - $default_pagination = $this->context->cookie->{$this->table.'_pagination'}; + if (isset($this->context->cookie->{$this->list_id.'_pagination'}) && $this->context->cookie->{$this->list_id.'_pagination'}) + $default_pagination = $this->context->cookie->{$this->list_id.'_pagination'}; else $default_pagination = $this->_pagination[0]; - $total_pages = ceil($this->listTotal / Tools::getValue('pagination', ($default_pagination))); + $total_pages = ceil($this->listTotal / Tools::getValue($this->list_id.'_pagination', ($default_pagination))); if (!$total_pages) $total_pages = 1; @@ -510,14 +513,13 @@ class HelperListCore extends Helper $action = $this->currentIndex.$identifier.'&token='.$token.$order.'#'.$this->table; /* Determine current page number */ - $page = (int)Tools::getValue('submitFilter'.$this->table); + $page = (int)Tools::getValue('submitFilter'.$this->list_id); if (!$page) $page = 1; /* Choose number of results per page */ - $selected_pagination = Tools::getValue( - 'pagination', - isset($this->context->cookie->{$this->table.'_pagination'}) ? $this->context->cookie->{$this->table.'_pagination'} : null + $selected_pagination = Tools::getValue($this->list_id.'_pagination', + isset($this->context->cookie->{$this->list_id.'_pagination'}) ? $this->context->cookie->{$this->list_id.'_pagination'} : null ); // Cleaning links @@ -535,7 +537,7 @@ class HelperListCore extends Helper { if (!isset($params['type'])) $params['type'] = 'text'; - $value = Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.(array_key_exists('filter_key', $params) && $key != 'active' ? $params['filter_key'] : $key)}; + $value = Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.(array_key_exists('filter_key', $params) && $key != 'active' ? $params['filter_key'] : $key)}; switch ($params['type']) { case 'bool': @@ -547,7 +549,7 @@ class HelperListCore extends Helper $value = Tools::unSerialize($value); if (!Validate::isCleanHtml($value[0]) || !Validate::isCleanHtml($value[1])) $value = ''; - $name = $this->table.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key); + $name = $this->list_id.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key); $name_id = str_replace('!', '__', $name); $params['id_date'] = $name_id; @@ -559,9 +561,9 @@ class HelperListCore extends Helper case 'select': foreach ($params['list'] as $option_value => $option_display) { - if (isset(Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']}) - && Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} == $option_value - && Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} != '') + if (isset(Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']}) + && Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']} == $option_value + && Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']} != '') $this->fields_list[$key]['select'][$option_value]['selected'] = 'selected'; } break; @@ -620,7 +622,8 @@ class HelperListCore extends Helper 'table_dnd' => isset($table_dnd) ? $table_dnd : null, 'name' => isset($name) ? $name : null, 'name_id' => isset($name_id) ? $name_id : null, - 'row_hover' => $this->row_hover + 'row_hover' => $this->row_hover, + 'list_id' => isset($this->list_id) ? $this->list_id : $this->table ))); return $this->header_tpl->fetch(); diff --git a/classes/module/Module.php b/classes/module/Module.php index 225f492bf..b323204b6 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -669,12 +669,14 @@ abstract class ModuleCore return false; // Retrocompatibility + $hook_name_bak = $hook_name; if ($alias = Hook::getRetroHookName($hook_name)) $hook_name = $alias; Hook::exec('actionModuleRegisterHookBefore', array('object' => $this, 'hook_name' => $hook_name)); // Get hook id $id_hook = Hook::getIdByName($hook_name); + $live_edit = Hook::getLiveEditById((int)Hook::getIdByName($hook_name_bak)); // If hook does not exist, we create it if (!$id_hook) @@ -682,6 +684,7 @@ abstract class ModuleCore $new_hook = new Hook(); $new_hook->name = pSQL($hook_name); $new_hook->title = pSQL($hook_name); + $new_hook->live_edit = pSQL($live_edit); $new_hook->add(); $id_hook = $new_hook->id; if (!$id_hook) @@ -1538,7 +1541,7 @@ abstract class ModuleCore Cache::store($cache_id, $exceptionsCache); } else - $exceptionsCache = !Cache::retrieve($cache_id); + $exceptionsCache = Cache::retrieve($cache_id); $key = $id_hook.'-'.$this->id; $array_return = array(); @@ -1600,7 +1603,11 @@ abstract class ModuleCore protected static function _isTemplateOverloadedStatic($module_name, $template) { if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/'.$template)) - return true; + return _PS_THEME_DIR_.'modules/'.$module_name.'/'.$template; + elseif (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/hook/'.$template)) + return _PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/hook/'.$template; + elseif (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/front/'.$template)) + return _PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/front/'.$template; elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/views/templates/hook/'.$template)) return false; elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$template)) @@ -1615,9 +1622,16 @@ abstract class ModuleCore protected function getCacheId($name = null) { - if ($name === null) - $name = $this->name; - return $name.'|'.(int)Tools::usingSecureMode().'|'.(int)$this->context->shop->id.'|'.(int)Group::getCurrent()->id.'|'.(int)$this->context->language->id.'|'.(int)$this->context->currency->id; + $cache_array = array( + $name !== null ? $name : $this->name, + (int)Tools::usingSecureMode(), + (int)$this->context->shop->id, + (int)Group::getCurrent()->id, + (int)$this->context->language->id, + (int)$this->context->currency->id, + (int)$this->context->country->id + ); + return implode('|', $cache_array); } public function display($file, $template, $cacheId = null, $compileId = null) @@ -1661,8 +1675,9 @@ abstract class ModuleCore $overloaded = $this->_isTemplateOverloaded($template); if ($overloaded === null) return null; + if ($overloaded) - return _PS_THEME_DIR_.'modules/'.$this->name.'/'.$template; + return $overloaded; else if (file_exists(_PS_MODULE_DIR_.$this->name.'/views/templates/hook/'.$template)) return _PS_MODULE_DIR_.$this->name.'/views/templates/hook/'.$template; else diff --git a/classes/order/Order.php b/classes/order/Order.php index 5d716146a..a4d4db1b0 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -254,7 +254,7 @@ class OrderCore extends ObjectModel public function __construct($id = null, $id_lang = null) { parent::__construct($id, $id_lang); - + $is_admin = (is_object(Context::getContext()->controller) && Context::getContext()->controller->controller_type == 'admin'); if ($this->id_customer && !$is_admin) { diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php index 232dab50b..bfd5f44f0 100644 --- a/classes/order/OrderHistory.php +++ b/classes/order/OrderHistory.php @@ -64,6 +64,9 @@ class OrderHistoryCore extends ObjectModel 'id_order_state' => array('required' => true, 'xlink_resource'=> 'order_states'), 'id_order' => array('xlink_resource' => 'orders'), ), + 'objectMethods' => array( + 'add' => 'addWs', + ), ); /** @@ -376,7 +379,7 @@ class OrderHistoryCore extends ObjectModel return false; $result = Db::getInstance()->getRow(' - SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name` + SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state` FROM `'._DB_PREFIX_.'order_history` oh LEFT JOIN `'._DB_PREFIX_.'orders` o ON oh.`id_order` = o.`id_order` LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` @@ -408,9 +411,23 @@ class OrderHistoryCore extends ObjectModel $data['{order_name}'] = $order->getUniqReference(); if (Validate::isLoadedObject($order)) + { + // Join PDF invoice if order state is "payment accepted" + if ((int)$result['id_order_state'] === 2 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) + { + $context = Context::getContext(); + $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $context->smarty); + $file_attachement['content'] = $pdf->render(false); + $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; + $file_attachement['mime'] = 'application/pdf'; + } + else + $file_attachement = null; + Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'], - null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); - + null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); + } + ShopUrl::resetMainDomainCache(); } @@ -445,4 +462,27 @@ class OrderHistoryCore extends ObjectModel AND os.`logable` = 1'); } -} + /** + * Add method for webservice create resource Order History + * If sendemail=1 GET parameter is present sends email to customer otherwise does not + * @return bool + */ + public function addWs() + { + $sendemail = (bool)Tools::getValue('sendemail', false); + if ($sendemail) + { + //Mail::Send requires link object on context and is not set when getting here + $context = Context::getContext(); + if ($context->link == null) + { + $protocol_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; + $protocol_content = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; + $context->link = new Link($protocol_link, $protocol_content); + } + return $this->addWithemail(); + } + else + return $this->add(); + } +} \ No newline at end of file diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index da7a42e6c..4ca5cf8f4 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -187,18 +187,16 @@ class ShopCore extends ObjectModel public function setUrl() { - $sql = 'SELECT su.physical_uri, su.virtual_uri, - su.domain, su.domain_ssl, t.id_theme, t.name, t.directory - FROM '._DB_PREFIX_.'shop s - LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop) - LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme) - WHERE s.id_shop = '.(int)$this->id.' - AND s.active = 1 - AND s.deleted = 0 - AND su.main = 1'; - - if (!$row = Db::getInstance()->getRow($sql)) - return; + $row = Db::getInstance()->getRow(' + SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.id_theme, t.name, t.directory + FROM '._DB_PREFIX_.'shop s + LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop) + LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme) + WHERE s.id_shop = '.(int)$this->id.' + AND s.active = 1 AND s.deleted = 0 AND su.main = 1'); + + if (!$row) + return false; $this->theme_id = $row['id_theme']; $this->theme_name = $row['name']; diff --git a/classes/stock/StockAvailable.php b/classes/stock/StockAvailable.php index fbdaa1a2f..12e23cd39 100644 --- a/classes/stock/StockAvailable.php +++ b/classes/stock/StockAvailable.php @@ -680,7 +680,7 @@ class StockAvailableCore extends ObjectModel // if there is no $id_shop, gets the context one // get shop group too - if ($shop === null) + if ($shop === null || $shop === $context->shop->id) { if (Shop::getContext() == Shop::CONTEXT_GROUP) $shop_group = Shop::getContextShopGroup(); diff --git a/classes/webservice/WebserviceRequest.php b/classes/webservice/WebserviceRequest.php index c90e3a43a..378138a32 100644 --- a/classes/webservice/WebserviceRequest.php +++ b/classes/webservice/WebserviceRequest.php @@ -513,7 +513,6 @@ class WebserviceRequestCore $this->setError(501, sprintf('The specific management class is not implemented for the "%s" entity.', $this->urlSegment[0]), 124); else { - $this->setFieldsToDisplay(); $this->objectSpecificManagement = new $specificObjectName(); $this->objectSpecificManagement->setObjectOutput($this->objOutput) ->setWsObject($this); diff --git a/config/config.inc.php b/config/config.inc.php index 21fb9b780..763f3a135 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -94,17 +94,11 @@ try { $context->shop = Shop::initialize(); } -catch(Exception $e) +catch (PrestaShopException $e) { - header('HTTP/1.1 503 temporarily overloaded'); - - define('_PS_SMARTY_DIR_', _PS_TOOL_DIR_.'smarty/'); - require_once(_PS_SMARTY_DIR_.'Smarty.class.php'); - $context->smarty = new Smarty(); - $context->smarty->display('error500.html'); - - exit; + $e->displayMessage(); } + define('_THEME_NAME_', $context->shop->getTheme()); define('__PS_BASE_URI__', $context->shop->getBaseURI()); diff --git a/config/smarty.config.inc.php b/config/smarty.config.inc.php index 128900a6d..392b42a58 100644 --- a/config/smarty.config.inc.php +++ b/config/smarty.config.inc.php @@ -44,7 +44,10 @@ $smarty->debugging = false; $smarty->debugging_ctrl = 'NONE'; if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_) +{ $smarty->debugging_ctrl = 'URL'; + $smarty->smarty_debug_id = Configuration::get('PS_SMARTY_CONSOLE_KEY'); +} else if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_) $smarty->debugging = true; @@ -176,6 +179,7 @@ function smartyHook($params, &$smarty) { $id_module = null; $hook_params = $params; + $hook_params['smarty'] = $smarty; if (!empty($params['mod'])) { $module = Module::getInstanceByName($params['mod']); diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 9c41fc1c5..967d9cca3 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -52,6 +52,8 @@ class AdminAttributesGroupsControllerCore extends AdminController 'count_values' => array( 'title' => $this->l('Values count'), 'align' => 'center', + 'orderby' => false, + 'search' => false ), 'position' => array( 'title' => $this->l('Position'), @@ -322,6 +324,11 @@ class AdminAttributesGroupsControllerCore extends AdminController 'label' => $this->l('Current texture:'), 'name' => 'current_texture' ); + + $this->fields_form['input'][] = array( + 'type' => 'closediv', + 'name' => '' + ); $this->fields_form['submit'] = array( 'title' => $this->l('Save '), diff --git a/controllers/admin/AdminCarrierWizardController.php b/controllers/admin/AdminCarrierWizardController.php new file mode 100644 index 000000000..0b8eeea69 --- /dev/null +++ b/controllers/admin/AdminCarrierWizardController.php @@ -0,0 +1,933 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class AdminCarrierWizardControllerCore extends AdminController +{ + protected $wizard_access; + + public function __construct() + { + $this->display = 'view'; + $this->table = 'carrier'; + $this->identifier = 'id_carrier'; + $this->className = 'Carrier'; + $this->lang = false; + $this->deleted = true; + $this->step_number = 0; + + $this->fieldImageSettings = array( + 'name' => 'logo', + 'dir' => 's' + ); + + parent::__construct(); + + $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, Tab::getIdFromClassName('AdminCarriers')); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin('smartWizard'); + $this->addJqueryPlugin('typewatch'); + $this->addJs(_PS_JS_DIR_.'admin_carrier_wizard.js'); + } + + public function initWizard() + { + $this->wizard_steps = array( + 'name' => 'carrier_wizard', + 'steps' => array( + array( + 'title' => $this->l('General settings'), + ), + array( + 'title' => $this->l('Shipping locations and costs'), + ), + array( + 'title' => $this->l('Size, weight, and group access'), + ), + array( + 'title' => $this->l('Summary'), + ), + + )); + + if (Shop::isFeatureActive()) + { + $multistore_step = array( + array( + 'title' => $this->l('MultiStore'), + 'desc' => $this->l('MultiStore'), + ) + ); + array_splice($this->wizard_steps['steps'], 1, 0, $multistore_step); + } + } + + public function renderView() + { + $this->initWizard(); + + if (Tools::getValue('id_carrier') && $this->tabAccess['edit']) + $carrier = $this->loadObject(); + elseif ($this->tabAccess['add']) + $carrier = new Carrier(); + + if ((!$this->tabAccess['edit'] && Tools::getValue('id_carrier')) || (!$this->tabAccess['add'] && !Tools::getValue('id_carrier'))) + { + $this->errors[] = Tools::displayError('You do not have permission to use this wizard.'); + return ; + } + $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + $this->tpl_view_vars = array( + 'currency_sign' => $currency->sign, + 'PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'), + 'enableAllSteps' => Validate::isLoadedObject($carrier), + 'wizard_steps' => $this->wizard_steps, + 'validate_url' => $this->context->link->getAdminLink('AdminCarrierWizard'), + 'carrierlist_url' => $this->context->link->getAdminLink('AdminCarriers').'&conf='.((int)Validate::isLoadedObject($carrier) ? 4 : 3), + 'wizard_contents' => array( + 'contents' => array( + 0 => $this->renderStepOne($carrier), + 1 => $this->renderStepThree($carrier), + 2 => $this->renderStepFour($carrier), + 3 => $this->renderStepFive($carrier), + )), + 'labels' => array('next' => $this->l('Next'), 'previous' => $this->l('Previous'), 'finish' => $this->l('Finish')) + ); + + + if (Shop::isFeatureActive()) + array_splice($this->tpl_view_vars['wizard_contents']['contents'], 1, 0, array(0 => $this->renderStepTwo($carrier))); + + $this->context->smarty->assign(array( + 'carrier_logo' => (Validate::isLoadedObject($carrier) && file_exists(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg') ? _THEME_SHIP_DIR_.$carrier->id.'.jpg' : false) + )); + $this->content .= $this->createTemplate('logo.tpl')->fetch(); + $this->addjQueryPlugin(array('ajaxfileupload')); + + return parent::renderView(); + } + + public function initToolbarTitle() + { + $bread_extended = array_unique($this->breadcrumbs); + + if (Tools::getValue('id_carrier')) + $bread_extended[1] = $this->l('Edit'); + else + $bread_extended[1] = $this->l('Add new'); + + $this->toolbar_title = $bread_extended; + } + + public function initToolbar() + { + parent::initToolbar(); + $this->toolbar_btn['back']['href'] = $this->context->link->getAdminLink('AdminCarriers'); + } + + public function renderStepOne($carrier) + { + $this->fields_form = array( + 'form' => array( + 'id_form' => 'step_carrier_general', + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Carrier name:'), + 'name' => 'name', + 'size' => 25, + 'required' => true, + 'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'), + 'desc' => array( + $this->l('Carrier name displayed during checkout'), + $this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name.') + ) + ), + array( + 'type' => 'text', + 'label' => $this->l('Transit time:'), + 'name' => 'delay', + 'lang' => true, + 'required' => true, + 'size' => 41, + 'maxlength' => 128, + 'desc' => $this->l('Estimated delivery time will be displayed during checkout.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Speed grade:'), + 'name' => 'grade', + 'required' => false, + 'size' => 1, + 'desc' => $this->l('Enter "0" for a longest shipping delay, or "9" for the shortest shipping delay.') + ), + array( + 'type' => 'logo', + 'label' => $this->l('Logo:'), + 'name' => 'logo', + ), + array( + 'type' => 'text', + 'label' => $this->l('Tracking URL:'), + 'name' => 'url', + 'size' => 40, + 'desc' => $this->l('Delivery tracking URL: Type \'@\' where the tracking number should appear. It will then be automatically replaced by the tracking number.') + ), + )), + ); + + $tpl_vars = array('max_image_size' => (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE') / 1024 / 1024); + $fields_value = $this->getStepOneFieldsValues($carrier); + return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value, $tpl_vars); + } + + public function renderStepTwo($carrier) + { + $this->fields_form = array( + 'form' => array( + 'id_form' => 'step_carrier_shops', + 'input' => array( + array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ), + )) + ); + $fields_value = $this->getStepTwoFieldsValues($carrier); + return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value); + } + + public function renderStepThree($carrier) + { + $this->fields_form = array( + 'form' => array( + 'id_form' => 'step_carrier_ranges', + 'input' => array( + array( + 'type' => 'radio', + 'label' => $this->l('Shipping and handling:'), + 'name' => 'shipping_handling', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'shipping_handling_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'shipping_handling_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Include the shipping and handling costs in the carrier price.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Apply shipping cost:'), + 'name' => 'is_free', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'is_free_off', + 'value' => 0, + 'label' => ''.$this->l('Yes').'' + ), + array( + 'id' => 'is_free_on', + 'value' => 1, + 'label' => ''.$this->l('No').'' + ) + ), + 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Billing:'), + 'name' => 'shipping_method', + 'required' => false, + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'billing_price', + 'value' => Carrier::SHIPPING_METHOD_PRICE, + 'label' => $this->l('According to total price') + ), + array( + 'id' => 'billing_weight', + 'value' => Carrier::SHIPPING_METHOD_WEIGHT, + 'label' => $this->l('According to total weight') + ) + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('Tax:'), + 'name' => 'id_tax_rules_group', + 'options' => array( + 'query' => TaxRulesGroup::getTaxRulesGroups(true), + 'id' => 'id_tax_rules_group', + 'name' => 'name', + 'default' => array( + 'label' => $this->l('No Tax'), + 'value' => 0 + ) + ) + ), + array( + 'type' => 'zone', + 'name' => 'zones' + ), + array( + 'type' => 'select', + 'label' => $this->l('Out-of-range behavior:'), + 'name' => 'range_behavior', + 'options' => array( + 'query' => array( + array( + 'id' => 0, + 'name' => $this->l('Apply the cost of the highest defined range') + ), + array( + 'id' => 1, + 'name' => $this->l('Disable carrier') + ) + ), + 'id' => 'id', + 'name' => 'name' + ), + 'desc' => $this->l('Out-of-range behavior occurs when no defined range matches the customer\'s cart (e.g. when the weight of the cart is greater than the highest weight limit defined by the weight ranges)') + ) + ), + + )); + + $tpl_vars = array(); + $tpl_vars['PS_WEIGHT_UNIT'] = Configuration::get('PS_WEIGHT_UNIT'); + $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + $tpl_vars['currency_sign'] = $currency->sign; + + $fields_value = $this->getStepThreeFieldsValues($carrier); + + $this->getTplRangesVarsAndValues($carrier, $tpl_vars, $fields_value); + return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value, $tpl_vars); + } + + public function renderStepFour($carrier) + { + $this->fields_form = array( + 'form' => array( + 'id_form' => 'step_carrier_conf', + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Maximum package height ('.Configuration::get('PS_DIMENSION_UNIT').'):'), + 'name' => 'max_height', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum height managed by this carrier. Set the value to "0", or leave this field blank to ignore.').' '.$this->l('The value must be an integer +.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximum package width ('.Configuration::get('PS_DIMENSION_UNIT').'):'), + 'name' => 'max_width', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum width managed by this carrier. Set the value to "0", or leave this field blank to ignore.').' '.$this->l('The value must be an integer +.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximum package depth ('.Configuration::get('PS_DIMENSION_UNIT').'):'), + 'name' => 'max_depth', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum depth managed by this carrier. Set the value to "0", or leave this field blank to ignore.').' '.$this->l('The value must be an integer +.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximum package weight ('.Configuration::get('PS_WEIGHT_UNIT').'):'), + 'name' => 'max_weight', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum weight managed by this carrier. Set the value to "0", or leave this field blank to ignore.') + ), + array( + 'type' => 'group', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'values' => Group::getGroups(Context::getContext()->language->id), + 'desc' => $this->l('Mark the groups that are allowed access to this carrier.') + ) + ) + )); + + $fields_value = $this->getStepFourFieldsValues($carrier); + + // Added values of object Group + $carrier_groups = $carrier->getGroups(); + $carrier_groups_ids = array(); + if (is_array($carrier_groups)) + foreach ($carrier_groups as $carrier_group) + $carrier_groups_ids[] = $carrier_group['id_group']; + + $groups = Group::getGroups($this->context->language->id); + + foreach ($groups as $group) + $fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $carrier_groups_ids) || empty($carrier_groups_ids) && !$carrier->id)); + + return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value); + } + + public function renderStepFive($carrier) + { + $this->fields_form = array( + 'form' => array( + 'id_form' => 'step_carrier_summary', + 'input' => array( + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable the carrier in the Front Office') + ) + ) + )); + + $template = $this->createTemplate('controllers/carrier_wizard/summary.tpl'); + + $fields_value = $this->getStepFiveFieldsValues($carrier); + + $active_form = $this->renderGenericForm(array('form' => $this->fields_form), $fields_value); + + $active_form = str_replace(array('
        ', '
        '), '', $active_form); + + $template->assign('active_form', $active_form); + + return $template->fetch('controllers/carrier_wizard/summary.tpl'); + } + + protected function getTplRangesVarsAndValues($carrier, &$tpl_vars, &$fields_value) + { + $tpl_vars['zones'] = Zone::getZones(false); + $carrier_zones = $carrier->getZones(); + $carrier_zones_ids = array(); + if (is_array($carrier_zones)) + foreach ($carrier_zones as $carrier_zone) + $carrier_zones_ids[] = $carrier_zone['id_zone']; + + $range_table = $carrier->getRangeTable(); + $shipping_method = $carrier->getShippingMethod(); + + $zones = Zone::getZones(false); + foreach ($zones as $zone) + $fields_value['zones'][$zone['id_zone']] = Tools::getValue('zone_'.$zone['id_zone'], (in_array($zone['id_zone'], $carrier_zones_ids))); + + if ($shipping_method == Carrier::SHIPPING_METHOD_FREE) + { + $range_obj = $carrier->getRangeObject($carrier->shipping_method); + $price_by_range = array(); + } + else + { + $range_obj = $carrier->getRangeObject(); + $price_by_range = Carrier::getDeliveryPriceByRanges($range_table, (int)$carrier->id); + } + + foreach ($price_by_range as $price) + $tpl_vars['price_by_range'][$price['id_'.$range_table]][$price['id_zone']] = $price['price']; + + $tmp_range = $range_obj->getRanges((int)$carrier->id); + $tpl_vars['ranges'] = array(); + if ($shipping_method != Carrier::SHIPPING_METHOD_FREE) + foreach ($tmp_range as $id => $range) + { + $tpl_vars['ranges'][$range['id_'.$range_table]] = $range; + $tpl_vars['ranges'][$range['id_'.$range_table]]['id_range'] = $range['id_'.$range_table]; + } + + // init blank range + if (!count($tpl_vars['ranges'])) + $tpl_vars['ranges'][] = array('id_range' => 0, 'delimiter1' => 0, 'delimiter2' => 0); + } + + public function renderGenericForm($fields_form, $fields_value, $tpl_vars = array()) + { + $helper = new HelperForm(); + $helper->show_toolbar = false; + $helper->table = $this->table; + $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + $helper->default_form_language = $lang->id; + $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; + $this->fields_form = array(); + $helper->id = (int)Tools::getValue('id_carrier'); + $helper->identifier = $this->identifier; + $helper->tpl_vars = array_merge(array( + 'fields_value' => $fields_value, + 'languages' => $this->getLanguages(), + 'id_language' => $this->context->language->id + ), $tpl_vars); + $helper->override_folder = 'carrier_wizard/'; + + return $helper->generateForm($fields_form); + } + + public function getStepOneFieldsValues($carrier) + { + return array( + 'id_carrier' => $this->getFieldValue($carrier, 'id_carrier'), + 'name' => $this->getFieldValue($carrier, 'name'), + 'delay' => $this->getFieldValue($carrier, 'delay'), + 'grade' => $this->getFieldValue($carrier, 'grade'), + 'url' => $this->getFieldValue($carrier, 'url'), + ); + } + + public function getStepTwoFieldsValues($carrier) + { + return array('shop' => $this->getFieldValue($carrier, 'shop')); + + } + + public function getStepThreeFieldsValues($carrier) + { + $id_tax_rules_group = (is_object($this->object) && !$this->object->id) ? Carrier::getIdTaxRulesGroupMostUsed() : $this->getFieldValue($carrier, 'id_tax_rules_group'); + + $shipping_handling = (is_object($this->object) && !$this->object->id) ? 0 : $this->getFieldValue($carrier, 'shipping_handling'); + + return array( + 'is_free' => $this->getFieldValue($carrier, 'is_free'), + 'id_tax_rules_group' => (int)$id_tax_rules_group, + 'shipping_handling' => $shipping_handling, + 'shipping_method' => $this->getFieldValue($carrier, 'shipping_method'), + 'range_behavior' => $this->getFieldValue($carrier, 'range_behavior'), + 'zones' => $this->getFieldValue($carrier, 'zones'), + ); + } + + public function getStepFourFieldsValues($carrier) + { + return array( + 'range_behavior' => $this->getFieldValue($carrier, 'range_behavior'), + 'max_height' => $this->getFieldValue($carrier, 'max_height'), + 'max_width' => $this->getFieldValue($carrier, 'max_width'), + 'max_depth' => $this->getFieldValue($carrier, 'max_depth'), + 'max_weight' => $this->getFieldValue($carrier, 'max_weight'), + 'group' => $this->getFieldValue($carrier, 'group'), + ); + } + + public function getStepFiveFieldsValues($carrier) + { + return array('active' => $this->getFieldValue($carrier, 'active')); + } + + public function ajaxProcessChangeRanges() + { + if ((Validate::isLoadedObject($this->object) && !$this->tabAccess['edit']) || !$this->tabAccess['add']) + { + $this->errors[] = Tools::displayError('You do not have permission to use this wizard.'); + return; + } + if ((!(int)$shipping_method = Tools::getValue('shipping_method')) || !in_array($shipping_method, array(Carrier::SHIPPING_METHOD_PRICE, Carrier::SHIPPING_METHOD_WEIGHT))) + return ; + + $carrier = $this->loadObject(true); + $carrier->shipping_method = $shipping_method; + + $tpl_vars = array(); + $fields_value = $this->getStepThreeFieldsValues($carrier); + $this->getTplRangesVarsAndValues($carrier, $tpl_vars, $fields_value); + $template = $this->createTemplate('controllers/carrier_wizard/helpers/form/form_ranges.tpl'); + $template->assign($tpl_vars); + $template->assign('change_ranges', 1); + + $template->assign('fields_value', $fields_value); + $template->assign('input', array('type' => 'zone', 'name' => 'zones' )); + + $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + $template->assign('currency_sign', $currency->sign); + $template->assign('PS_WEIGHT_UNIT', Configuration::get('PS_WEIGHT_UNIT')); + + die($template->fetch()); + } + + public function ajaxProcessValidateStep() + { + $step_number = (int)Tools::getValue('step_number'); + $return = array('has_error' => false); + + if (!$this->tabAccess['edit']) + $this->errors[] = Tools::displayError('You do not have permission to use this wizard.'); + else + { + if (Shop::isFeatureActive() && $step_number == 2) + { + if (!Tools::getValue('checkBoxShopAsso_carrier')) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('You must choose at least one shop or group shop.'); + } + } + else + $this->validateRules('AdminCarrierWizardControllerCore'); + } + + if (count($this->errors)) + { + $return['has_error'] = true; + $return['errors'] = $this->errors; + } + die(Tools::jsonEncode($return)); + } + + public function processRanges($id_carrier) + { + if (!$this->tabAccess['edit'] || !$this->tabAccess['add']) + { + $this->errors[] = Tools::displayError('You do not have permission to use this wizard.'); + return; + } + + $carrier = new Carrier((int)$id_carrier); + if (!Validate::isLoadedObject($carrier)) + return false; + + $range_inf = Tools::getValue('range_inf'); + $range_sup = Tools::getValue('range_sup'); + $range_type = Tools::getValue('shipping_method'); + + $fees = Tools::getValue('fees'); + + $carrier->deleteDeliveryPrice($carrier->getRangeTable()); + if ($range_type != Carrier::SHIPPING_METHOD_FREE) + { + foreach ($range_inf as $key => $delimiter1) + { + if (!isset($range_sup[$key])) + continue; + $add_range = true; + if ($range_type == Carrier::SHIPPING_METHOD_WEIGHT) + { + if (!RangeWeight::rangeExist((int)$carrier->id, (float)$delimiter1, (float)$range_sup[$key])) + $range = new RangeWeight(); + else + { + $range = new RangeWeight((int)$key); + $add_range = false; + } + } + + if ($range_type == Carrier::SHIPPING_METHOD_PRICE) + { + if (!RangePrice::rangeExist((int)$carrier->id, (float)$delimiter1, (float)$range_sup[$key])) + $range = new RangePrice(); + else + { + $range = new RangePrice((int)$key); + $add_range = false; + } + } + if ($add_range) + { + $range->id_carrier = (int)$carrier->id; + $range->delimiter1 = (float)$delimiter1; + $range->delimiter2 = (float)$range_sup[$key]; + $range->save(); + } + + if (!Validate::isLoadedObject($range)) + return false; + $price_list = array(); + if (is_array($fees) && count($fees)) + { + foreach ($fees as $id_zone => $fee) + $price_list[] = array( + 'id_range_price' => ($range_type == Carrier::SHIPPING_METHOD_PRICE ? (int)$range->id : null), + 'id_range_weight' => ($range_type == Carrier::SHIPPING_METHOD_WEIGHT ? (int)$range->id : null), + 'id_carrier' => (int)$carrier->id, + 'id_zone' => (int)$id_zone, + 'price' => (float)$fee[$key] + ); + } + + if (count($price_list) && !$carrier->addDeliveryPrice($price_list, true)) + return false; + } + } + return true; + } + + public function ajaxProcessUploadLogo() + { + if (!$this->tabAccess['edit']) + die(''); + + $allowedExtensions = array('jpeg', 'gif', 'png', 'jpg'); + + $logo = (isset($_FILES['carrier_logo_input']) ? $_FILES['carrier_logo_input'] : false); + if ($logo && !empty($logo['tmp_name']) && $logo['tmp_name'] != 'none' + && (!isset($logo['error']) || !$logo['error']) + && preg_match('/\.(jpe?g|gif|png)$/', $logo['name']) + && is_uploaded_file($logo['tmp_name'])) + { + $file = $logo['tmp_name']; + do $tmp_name = uniqid().'.jpg'; + while (file_exists(_PS_TMP_IMG_DIR_.$tmp_name)); + if (!ImageManager::resize($file, _PS_TMP_IMG_DIR_.$tmp_name)) + die(''); + @unlink($file); + die(''); + } + else + die(''); + } + + public function ajaxProcessFinishStep() + { + $return = array('has_error' => false); + + if (!$this->tabAccess['edit']) + $return = array( + 'has_error' => true, + $return['errors'][] = Tools::displayError('You do not have permission to use this wizard.') + ); + else + { + if ($id_carrier = Tools::getValue('id_carrier')) + { + $current_carrier = new Carrier((int)$id_carrier); + // if update we duplicate current Carrier + $new_carrier = $current_carrier->duplicateObject(); + if (Validate::isLoadedObject($new_carrier)) + { + // Set flag deteled to true for historization + $current_carrier->deleted = true; + $current_carrier->update(); + + // Fill the new carrier object + $this->copyFromPost($new_carrier, $this->table); + $new_carrier->position = $current_carrier->position; + $new_carrier->update(); + + $this->updateAssoShop((int)$new_carrier->id); + $this->duplicateLogo((int)$new_carrier->id, (int)$current_carrier->id); + $this->changeGroups((int)$new_carrier->id); + // Call of hooks + Hook::exec('actionCarrierUpdate', array( + 'id_carrier' => (int)$current_carrier->id, + 'carrier' => $new_carrier + )); + $this->postImage($new_carrier->id); + $this->changeZones($new_carrier->id); + $new_carrier->setTaxRulesGroup((int)Tools::getValue('id_tax_rules_group')); + $carrier = $new_carrier; + } + } + else + { + $carrier = new Carrier(); + $this->copyFromPost($carrier, $this->table); + if (!$carrier->add()) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving this carrier.'); + } + } + + if ($carrier->is_free) + { + //if carrier is free delete shipping cost + $carrier->deleteDeliveryPrice('range_weight'); + $carrier->deleteDeliveryPrice('range_price'); + } + + if (Validate::isLoadedObject($carrier)) + { + if (!$this->changeGroups((int)$carrier->id)) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving carrier groups.'); + } + + if (!$this->changeZones((int)$carrier->id)) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving carrier zones.'); + } + + if (!$carrier->is_free) + if (!$this->processRanges((int)$carrier->id)) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving carrier ranges.'); + } + + if (Shop::isFeatureActive() && !$this->updateAssoShop((int)$carrier->id)) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving associations of shops.'); + } + + if (!$carrier->setTaxRulesGroup((int)Tools::getValue('id_tax_rules_group'))) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving the tax rules group.'); + } + + if (Tools::getValue('logo')) + { + if (Tools::getValue('logo') == 'null' && file_exists(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg')) + unlink(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg'); + else + { + $logo = basename(Tools::getValue('logo')); + if (!file_exists(_PS_TMP_IMG_DIR_.$logo) || !copy(_PS_TMP_IMG_DIR_.$logo, _PS_SHIP_IMG_DIR_.$carrier->id.'.jpg')) + { + $return['has_error'] = true; + $return['errors'][] = $this->l('An error occurred while saving carrier logo.'); + } + } + } + $return['id_carrier'] = $carrier->id; + } + } + die(Tools::jsonEncode($return)); + } + + protected function changeGroups($id_carrier, $delete = true) + { + $carrier = new Carrier((int)$id_carrier); + if (!Validate::isLoadedObject($carrier)) + return false; + + return $carrier->setGroups(Tools::getValue('groupBox')); + } + + public function changeZones($id) + { + $return = true; + $carrier = new Carrier($id); + if (!Validate::isLoadedObject($carrier)) + die (Tools::displayError('The object cannot be loaded.')); + $zones = Zone::getZones(false); + foreach ($zones as $zone) + if (count($carrier->getZone($zone['id_zone']))) + { + if (!isset($_POST['zone_'.$zone['id_zone']]) || !$_POST['zone_'.$zone['id_zone']]) + $return &= $carrier->deleteZone((int)$zone['id_zone']); + } + else + if (isset($_POST['zone_'.$zone['id_zone']]) && $_POST['zone_'.$zone['id_zone']]) + $return &= $carrier->addZone((int)$zone['id_zone']); + + return $return; + } + + public static function getValidationRules() + { + $step_number = Tools::getValue('step_number'); + + if ($step_number == 4 && !Shop::isFeatureActive() || $step_number == 5 && Shop::isFeatureActive()) + return array(); + + $step_fields = array( + 1 => array('name', 'delay', 'grade', 'url'), + 2 => array('is_free', 'id_tax_rules_group', 'shipping_handling', 'shipping_method', 'range_behavior'), + 3 => array('range_behavior', 'max_height', 'max_width', 'max_depth', 'max_weight'), + ); + + if (Shop::isFeatureActive()) + { + $multistore_field = array(array('shop')); + $tmp = $step_fields; + $step_fields = array(1 => $tmp[1]) + $multistore_field; + array_shift($tmp); + foreach ($tmp as $row) + $step_field[] = $row; + } + + $rules = Carrier::getValidationRules('Carrier'); + + foreach ($rules as $key_r => $rule) + foreach ($rule as $key_f => $field) + { + if (in_array($key_r, array('required', 'requiredLang'))) + { + if(!in_array($field, $step_fields[$step_number])) + unset($rules[$key_r][$key_f]); + } + else if(!in_array($key_f, $step_fields[$step_number])) + unset($rules[$key_r][$key_f]); + } + return $rules; + } + + public static function displayFieldName($field) + { + return $field; + } + + public function duplicateLogo($new_id, $old_id) + { + $old_logo = _PS_SHIP_IMG_DIR_.'/'.(int)$old_id.'.jpg'; + if (file_exists($old_logo)) + copy($old_logo, _PS_SHIP_IMG_DIR_.'/'.(int)$new_id.'.jpg'); + + $old_tmp_logo = _PS_TMP_IMG_DIR_.'/carrier_mini_'.(int)$old_id.'.jpg'; + if (file_exists($old_tmp_logo)) + { + if (!isset($_FILES['logo'])) + copy($old_tmp_logo, _PS_TMP_IMG_DIR_.'/carrier_mini_'.$new_id.'.jpg'); + unlink($old_tmp_logo); + } + } +} diff --git a/controllers/admin/AdminCarriersController.php b/controllers/admin/AdminCarriersController.php index c671ad2ac..23dcff8fb 100644 --- a/controllers/admin/AdminCarriersController.php +++ b/controllers/admin/AdminCarriersController.php @@ -83,11 +83,7 @@ class AdminCarriersControllerCore extends AdminController 'is_free' => array( 'title' => $this->l('Free Shipping'), 'align' => 'center', - 'icon' => array( - 0 => 'disabled.gif', - 1 => 'enabled.gif', - 'default' => 'disabled.gif' - ), + 'active' => 'isFree', 'type' => 'bool', 'orderby' => false, ), @@ -150,33 +146,16 @@ class AdminCarriersControllerCore extends AdminController parent::__construct(); } + public function initToolbar() + { + parent::initToolbar(); + + if (isset($this->toolbar_btn['new'])) + $this->toolbar_btn['new']['href'] = $this->context->link->getAdminLink('AdminCarrierWizard'); + } + public function renderList() { - $this->displayInformation( - ' '.$this->l('How do I create a new carrier?').' -
        -
          -
        • '.$this->l('Click "Add New."').'
        • -
        • '.$this->l('Fill in the fields and click "Save."').'
        • -
        • '. - $this->l('You need to set a price range -- or weight range -- for which the new carrier will be available.').' '. - $this->l('Under the "Shipping" menu, click either "Price ranges" or "Weight ranges.".').' -
        • -
        • '.$this->l('Click "Add New."').'
        • -
        • '. - $this->l('Select the name of the carrier before defining the price or weight range.').' '. - $this->l('For example, the carrier can be made available for a weight range between 0 and 5lbs. Another carrier can have a range between 5 and 10lbs.').' -
        • -
        • '.$this->l('When you\'re done, click "Save."').'
        • -
        • '.$this->l('Click on the "Shipping" menu.').'
        • -
        • '. - $this->l('You need to set the fees that will be applied for this carrier.').' '. - $this->l('At the bottom on the page -- in the "Fees" section -- select the name of the carrier.').' -
        • -
        • '.$this->l('For each zone, enter a price and then click "Save."').'
        • -
        • '.$this->l('You\'re all set! The new carrier will now be displayed to customers.').'
        • -
        ' - ); $this->_select = 'b.*'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier'.Shop::addSqlRestrictionOnLang('b').' LEFT JOIN `'._DB_PREFIX_.'carrier_tax_rules_group_shop` ctrgs ON (a.`id_carrier` = ctrgs.`id_carrier` @@ -537,6 +516,10 @@ class AdminCarriersControllerCore extends AdminController else $this->errors[] = Tools::displayError('You do not have permission to edit this.'); } + else if (isset($_GET['isFree'.$this->table])) + { + $this->processIsFree(); + } else { if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox'))) @@ -569,6 +552,17 @@ class AdminCarriersControllerCore extends AdminController } } + public function processIsFree() + { + $carrier = new Carrier($this->id_object); + if (!Validate::isLoadedObject($carrier)) + $this->errors[] = Tools::displayError('An error occurred while updating carrier information.'); + $carrier->is_free = $carrier->is_free ? 0 : 1; + if (!$carrier->update()) + $this->errors[] = Tools::displayError('An error occurred while updating carrier information.'); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + /** * Overload the property $fields_value * @@ -682,6 +676,22 @@ class AdminCarriersControllerCore extends AdminController } } + public function displayEditLink($token = null, $id, $name = null) + { + if ($this->tabAccess['edit'] == 1) + return ''; + else + return; + } + + public function displayDeleteLink($token = null, $id, $name = null) + { + if ($this->tabAccess['delete'] == 1) + return ''; + else + return; + } + } diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index f8b22cd2a..12825f7d9 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -38,6 +38,8 @@ class AdminCategoriesControllerCore extends AdminController /** @var boolean does the product have to be disable during the delete process */ public $disable_products = false; + private $original_filter = ''; + public function __construct() { $this->bootstrap = true; @@ -130,7 +132,7 @@ class AdminCategoriesControllerCore extends AdminController $id_parent = $this->context->shop->id_category; $this->_select = 'sa.position position'; - $this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' '; + $this->original_filter = $this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' '; if (Shop::getContext() == Shop::CONTEXT_SHOP) $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = '.(int)$this->context->shop->id.') '; @@ -174,6 +176,9 @@ class AdminCategoriesControllerCore extends AdminController public function renderList() { + if (isset($this->_filter) && trim($this->_filter) == '') + $this->_filter = $this->original_filter; + $this->addRowAction('edit'); $this->addRowAction('delete'); $this->addRowAction('add'); @@ -388,25 +393,6 @@ class AdminCategoriesControllerCore extends AdminController 'use_context' => true, ) ), - array( - 'type' => 'switch', - 'label' => $this->l('Root Category:'), - 'name' => 'is_root_category', - 'required' => false, - 'is_bool' => true, - 'values' => array( - array( - 'id' => 'is_root_on', - 'value' => 1, - 'label' => $this->l('Yes') - ), - array( - 'id' => 'is_root_off', - 'value' => 0, - 'label' => $this->l('No') - ) - ) - ), array( 'type' => 'textarea', 'label' => $this->l('Description:'), @@ -471,12 +457,36 @@ class AdminCategoriesControllerCore extends AdminController $this->tpl_form_vars['shared_category'] = Validate::isLoadedObject($obj) && $obj->hasMultishopEntries(); $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); + + // Display this field only if multistore option is enabled + if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) + $this->fields_form['input'][] = array( + 'type' => 'switch', + 'label' => $this->l('Root Category:'), + 'name' => 'is_root_category', + 'required' => false, + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'is_root_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'is_root_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ) + ); + // Display this field only if multistore option is enabled AND there are several stores configured if (Shop::isFeatureActive()) $this->fields_form['input'][] = array( 'type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso', ); + // remove category tree and radio button "is_root_category" if this category has the root category as parent category to avoid any conflict if ($this->_category->id_parent == Category::getTopCategory()->id && Tools::isSubmit('updatecategory')) foreach ($this->fields_form['input'] as $k => $input) diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php index 6487d10be..8d03fef71 100644 --- a/controllers/admin/AdminCountriesController.php +++ b/controllers/admin/AdminCountriesController.php @@ -140,7 +140,8 @@ class AdminCountriesControllerCore extends AdminController array('address2'), array('postcode', 'city'), array('Country:name'), - array('phone')); + array('phone'), + array('phone_mobile')); foreach ($default_layout_tab as $line) $default_layout .= implode(' ', $line)."\r\n"; diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php index 57e0bb0ef..ee8de0732 100644 --- a/controllers/admin/AdminFeaturesController.php +++ b/controllers/admin/AdminFeaturesController.php @@ -459,7 +459,7 @@ class AdminFeaturesControllerCore extends AdminController * AdminController::getList() override * @see AdminController::getList() */ - public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = false, $id_lang_shop = false) { if ($this->table == 'feature_value') $this->_where .= ' AND a.custom = 0'; diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php index 67ff97695..45797273e 100644 --- a/controllers/admin/AdminHomeController.php +++ b/controllers/admin/AdminHomeController.php @@ -71,10 +71,15 @@ class AdminHomeControllerCore extends AdminController $indexRebuiltAfterUpdate = 2; $smartyOptimized = 0; + // Forcing compilation is not good, really slow if (in_array(Configuration::get('PS_SMARTY_FORCE_COMPILE'), array(_PS_SMARTY_CHECK_COMPILE_, _PS_SMARTY_NO_COMPILE_))) ++$smartyOptimized; + // Enabling cache is better if (Configuration::get('PS_SMARTY_CACHE')) ++$smartyOptimized; + // If the console is enabled, not good for production + if (Configuration::get('PS_SMARTY_CONSOLE') != _PS_SMARTY_CONSOLE_CLOSE_) + $smartyOptimized = 0; $cccOptimized = Configuration::get('PS_CSS_THEME_CACHE'); $cccOptimized += Configuration::get('PS_JS_THEME_CACHE'); @@ -170,10 +175,16 @@ class AdminHomeControllerCore extends AdminController $shop = Context::getContext()->shop; if ($_SERVER['HTTP_HOST'] != $shop->domain && $_SERVER['HTTP_HOST'] != $shop->domain_ssl && Tools::getValue('ajax') == false) - $this->displayWarning($this->l('You are currently connected under the following domain name:').' '.$_SERVER['HTTP_HOST'].'
        '. - $this->l('This is different from the main shop domain name set in the "Multistore" page under the "Advanced Parameters" menu:').' '.$shop->domain.'
        - '. - $this->l('Click here if you want to modify your main shop\'s domain name.').''); + { + $warning = $this->l('You are currently connected under the following domain name:').' '.$_SERVER['HTTP_HOST'].'
        '; + if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) + $warning .= sprintf($this->l('This is different from the shop domain name set in the Multistore settings: "%s".'), $shop->domain).' + '.preg_replace('@{link}(.*){/link}@', '$1', $this->l('If this is your main domain, please {link}change it now{/link}.')); + else + $warning .= $this->l('This is different from the domain name set in the "SEO & URLs" tab.').' + '.preg_replace('@{link}(.*){/link}@', '$1', $this->l('If this is your main domain, please {link}change it now{/link}.')); + $this->displayWarning($warning); + } } protected function getQuickLinks() @@ -475,7 +486,7 @@ class AdminHomeControllerCore extends AdminController $result = array(); $content = ''; - $protocol = Tools::usingSecureMode() ? 'https' : 'http'; + $protocol = Tools::getCurrentUrlProtocolPrefix(); $isoUser = Context::getContext()->language->iso_code; $isoCountry = Context::getContext()->country->iso_code; $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 2))); @@ -483,16 +494,15 @@ class AdminHomeControllerCore extends AdminController // SCREENCAST $result['screencast'] = 'OK'; - // PREACTIVATION $result['partner_preactivation'] = $this->getBlockPartners(); // DISCOVER PRESTASHOP $result['discover_prestashop'] = '
        '.$this->getBlockDiscover().'
        '; - $result['discover_prestashop'] .= '
        '; + $result['discover_prestashop'] .= '
        '; // SHOW TIPS OF THE DAY - $content = Tools::file_get_contents($protocol.'://api.prestashop.com/partner/tipsoftheday/?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser), false, $stream_context); + $content = Tools::file_get_contents($protocol.'api.prestashop.com/partner/tipsoftheday/?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser), false, $stream_context); $content = explode('|', $content); if ($content[0] == 'OK' && Validate::isCleanHtml($content[1])) $result['discover_prestashop'] .= '
        '.$content[1].'
        '; @@ -518,7 +528,7 @@ class AdminHomeControllerCore extends AdminController { // Init var $return = ''; - $protocol = Tools::getShopProtocol(); + $protocol = Tools::getCurrentUrlProtocolPrefix(); $isoCountry = Context::getContext()->country->iso_code; $isoUser = Context::getContext()->language->iso_code; @@ -526,7 +536,7 @@ class AdminHomeControllerCore extends AdminController if (is_writable('../config/xml/') && (!file_exists('../config/xml/preactivation.xml') || (time() - filemtime('../config/xml/preactivation.xml')) > 86400)) { $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT))); - $content = Tools::file_get_contents('http://api.prestashop.com/partner/premium/get_partners.php?protocol='.$protocol.'&iso_country='.Tools::strtoupper($isoCountry).'&iso_lang='.Tools::strtolower($isoUser).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&host='.urlencode($_SERVER['HTTP_HOST']).'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')), false, $stream_context); + $content = Tools::file_get_contents($protocol.'api.prestashop.com/partner/premium/get_partners.php?iso_country='.Tools::strtoupper($isoCountry).'&iso_lang='.Tools::strtolower($isoUser).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&host='.urlencode($_SERVER['HTTP_HOST']), false, $stream_context); @unlink('../config/xml/preactivation.xml'); file_put_contents('../config/xml/preactivation.xml', $content); } @@ -658,15 +668,12 @@ class AdminHomeControllerCore extends AdminController $smarty->assign('protocol', $protocol); $isoUser = $this->context->language->iso_code; $smarty->assign('isoUser', $isoUser); - $upgrade = null; $tpl_vars['refresh_check_version'] = 0; - if (@ini_get('allow_url_fopen')) - { - $upgrade = new Upgrader(true); - // if this information is outdated, the version will be checked after page loading - if (Configuration::get('PS_LAST_VERSION_CHECK') < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS)) - $tpl_vars['refresh_check_version'] = 1; - } + $upgrade = new Upgrader(true); + + // if this information is outdated, the version will be checked after page loading + if (Configuration::get('PS_LAST_VERSION_CHECK') < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS)) + $tpl_vars['refresh_check_version'] = 1; if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400)) file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native')); diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php index 9500a07c1..9164a93e6 100644 --- a/controllers/admin/AdminImagesController.php +++ b/controllers/admin/AdminImagesController.php @@ -529,18 +529,16 @@ class AdminImagesControllerCore extends AdminController protected function _regenerateNoPictureImages($dir, $type, $languages) { $errors = false; - foreach ($type as $imageType) - { + foreach ($type as $image_type) foreach ($languages as $language) { $file = $dir.$language['iso_code'].'.jpg'; if (!file_exists($file)) - $file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)(Configuration::get('PS_LANG_DEFAULT'))).'.jpg'; - if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg')) - if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg', (int)$imageType['width'], (int)$imageType['height'])) + $file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')).'.jpg'; + if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($image_type['name']).'.jpg')) + if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($image_type['name']).'.jpg', (int)$image_type['width'], (int)$image_type['height'])) $errors = true; } - } return $errors; } diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php index 79d62dc5e..cac2807d8 100644 --- a/controllers/admin/AdminManufacturersController.php +++ b/controllers/admin/AdminManufacturersController.php @@ -117,43 +117,22 @@ class AdminManufacturersControllerCore extends AdminController $this->content .= parent::renderList(); } - - public function initListManufacturerAddresses() + + protected function getAddressFieldsList() { - $this->toolbar_title = $this->l('Addresses'); - // reset actions and query vars - $this->actions = array(); - unset($this->fields_list, $this->_select, $this->_join, $this->_group, $this->_filterHaving, $this->_filter); - - $this->table = 'address'; - $this->identifier = 'id_address'; - $this->deleted = true; - $this->_orderBy = null; - - $this->addRowAction('editaddresses'); - $this->addRowAction('delete'); - - // test if a filter is applied for this list - if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false) - $this->filter = true; - - // test if a filter reset request is required for this list - if (isset($_POST['submitReset'.$this->table])) - $this->action = 'reset_filters'; - else - $this->action = ''; - // Sub tab addresses $countries = Country::getCountries($this->context->language->id); foreach ($countries as $country) $this->countries_array[$country['id_country']] = $country['name']; - $this->fields_list = array( + return array( 'id_address' => array( 'title' => $this->l('ID') ), 'manufacturer_name' => array( - 'title' => $this->l('Manufacturer') + 'title' => $this->l('Manufacturer'), + 'width' => 'auto', + 'filter_key' => 'm!name' ), 'firstname' => array( 'title' => $this->l('First name') @@ -176,6 +155,32 @@ class AdminManufacturersControllerCore extends AdminController 'filter_key' => 'cl!id_country' ) ); + } + + public function initListManufacturerAddresses() + { + $this->toolbar_title = $this->l('Addresses'); + // reset actions and query vars + $this->actions = array(); + unset($this->fields_list, $this->_select, $this->_join, $this->_group, $this->_filterHaving, $this->_filter); + + $this->table = 'address'; + $this->list_id = 'address'; + $this->identifier = 'id_address'; + $this->deleted = true; + $this->_orderBy = null; + + $this->addRowAction('editaddresses'); + $this->addRowAction('delete'); + + // test if a filter is applied for this list + if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false) + $this->filter = true; + + // test if a filter reset request is required for this list + $this->action = (isset($_POST['submitReset'.$this->table]) ? 'reset_filters' : ''); + + $this->fields_list = $this->getAddressFieldsList(); $this->_select = 'cl.`name` as country, m.`name` AS manufacturer_name'; $this->_join = ' @@ -671,12 +676,13 @@ class AdminManufacturersControllerCore extends AdminController public function initProcess() { - if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress') || Tools::isSubmit('submitBulkdeleteaddress')) + if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress') || Tools::isSubmit('submitBulkdeleteaddress') || Tools::isSubmit('exportaddress')) { $this->table = 'address'; $this->className = 'Address'; $this->identifier = 'id_address'; $this->deleted = true; + $this->fields_list = $this->getAddressFieldsList(); } parent::initProcess(); } diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php index 85c3b0035..556a3b25e 100644 --- a/controllers/admin/AdminMetaController.php +++ b/controllers/admin/AdminMetaController.php @@ -479,11 +479,21 @@ class AdminMetaControllerCore extends AdminController public function updateOptionPsRewritingSettings() { Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS')); - Tools::generateHtaccess($this->ht_file, null, null, '', Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'), false, Tools::getValue('PS_HTACCESS_DISABLE_MODSEC')); - - Tools::enableCache(); - Tools::clearCache($this->context->smarty); - Tools::restoreCacheSettings(); + if (Tools::generateHtaccess($this->ht_file, null, null, '', Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'), false, Tools::getValue('PS_HTACCESS_DISABLE_MODSEC'))) + { + Tools::enableCache(); + Tools::clearCache($this->context->smarty); + Tools::restoreCacheSettings(); + } + else + { + Configuration::updateValue('PS_REWRITING_SETTINGS', 0); + // Message copied/pasted from the information tip + $message = $this->l('Before being able to use this tool, you need to:'); + $message .= '
        - '.$this->l('Create a blank .htaccess in your root directory.'); + $message .= '
        - '.$this->l('Give it write permissions (CHMOD 666 on Unix system)'); + $this->errors[] = $message; + } } public function updateOptionPsRouteProductRule() diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index c4964d2e4..53e062db7 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -768,6 +768,11 @@ class AdminModulesControllerCore extends AdminController Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name').$params); Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params); } + + if(isset($_GET['update'])) + { + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params); + } } public function postProcess() @@ -1014,6 +1019,14 @@ class AdminModulesControllerCore extends AdminController // Browse modules list foreach ($modules as $km => $module) { + //Add succes message for one module update + if (Tools::getValue('updated') && Tools::getValue('module_name')) + { + if ($module->name === (string)Tools::getValue('module_name')) + $module_success[] = array('name' => $module->displayName, 'message' => array( + 0 => $this->l('Current version:').$module->version)); + } + //if we are in favorites view we only display installed modules if (Tools::getValue('select') == 'favorites' && !$module->id) { diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php index dea9c3742..10b8e1ded 100644 --- a/controllers/admin/AdminModulesPositionsController.php +++ b/controllers/admin/AdminModulesPositionsController.php @@ -399,20 +399,31 @@ class AdminModulesPositionsControllerCore extends AdminController if (!is_array($file_list)) $file_list = ($file_list) ? array($file_list) : array(); - $content = '

        '; + $content = '

        '; + if ($shop_id) { $shop = new Shop($shop_id); $content .= ' ('.$shop->name.')'; } + $content .= '

        - + '; // @todo do something better with controllers $controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_); ksort($controllers); + + foreach ($file_list as $k => $v) + if ( ! array_key_exists ($v, $controllers)) + $content .= ''; + + $content .= ''; + foreach ($controllers as $k => $v) $content .= ''; + $content .= '

        diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 44e3e6b5c..ab3f3ac5e 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -298,7 +298,7 @@ class AdminOrdersControllerCore extends AdminController '{shipping_number}' => $order->shipping_number, '{order_name}' => $order->getUniqReference() ); - if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars, + if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit'), $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop)) { diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php index 2aa580b9a..519013a9d 100644 --- a/controllers/admin/AdminPPreferencesController.php +++ b/controllers/admin/AdminPPreferencesController.php @@ -117,7 +117,8 @@ class AdminPPreferencesControllerCore extends AdminController array('id' => '3', 'name' => $this->l('Product modified date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), - array('id' => '6', 'name' => $this->l('Product quantity')) + array('id' => '6', 'name' => $this->l('Product quantity')), + array('id' => '7', 'name' => $this->l('Product reference')) ), 'identifier' => 'id' ), diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php index 8d72fc181..34dc9ec08 100644 --- a/controllers/admin/AdminPerformanceController.php +++ b/controllers/admin/AdminPerformanceController.php @@ -116,12 +116,20 @@ class AdminPerformanceControllerCore extends AdminController ) ) ), + array( + 'type' => 'text', + 'label' => $this->l('Debug console Key'), + 'name' => 'smarty_console_key', + 'size' => 30, + 'desc' => $this->l('SMARTY_DEBUG parameter in the URL.') + ), ) ); $this->fields_value['smarty_force_compile'] = Configuration::get('PS_SMARTY_FORCE_COMPILE'); $this->fields_value['smarty_cache'] = Configuration::get('PS_SMARTY_CACHE'); $this->fields_value['smarty_console'] = Configuration::get('PS_SMARTY_CONSOLE'); + $this->fields_value['smarty_console_key'] = Configuration::get('PS_SMARTY_CONSOLE_KEY'); } public function initFieldsetFeaturesDetachables() @@ -456,24 +464,6 @@ class AdminPerformanceControllerCore extends AdminController $this->tpl_form_vars['servers'] = CacheMemcache::getMemcachedServers(); } - public function initFieldsetCloudCache() - { - if (!class_exists('CloudCache')) - $this->fields_form[6]['form'] = array( - 'legend' => array( - 'title' => $this->l('CloudCache'), - 'icon' => 'icon-cloud' - ), - 'desc' => - '

        -

        '.$this->l('Performance matters! Improve speed and conversions the easy way.').'

        '. - '

        '.$this->l('CloudCache supercharges your site in minutes through its state-of-the-art content delivery network.').'

        '. - '

        '.$this->l('Subscribe now using the code "presta25" and get an exclusive 25% monthly discount on every available package.').'

        -

        > '.$this->l('Click here to install the CloudCache module for PrestaShop').'

        -
        ' - ); - } - public function renderForm() { // Initialize fieldset for a form @@ -483,7 +473,6 @@ class AdminPerformanceControllerCore extends AdminController $this->initFieldsetMediaServer(); $this->initFieldsetCiphering(); $this->initFieldsetCaching(); - $this->initFieldsetCloudCache(); // Activate multiple fieldset $this->multiple_fieldsets = true; @@ -590,7 +579,8 @@ class AdminPerformanceControllerCore extends AdminController Configuration::updateValue('PS_SMARTY_FORCE_COMPILE', Tools::getValue('smarty_force_compile', _PS_SMARTY_NO_COMPILE_)); Configuration::updateValue('PS_SMARTY_CACHE', Tools::getValue('smarty_cache', 0)); Configuration::updateValue('PS_SMARTY_CONSOLE', Tools::getValue('smarty_console', 0)); - $redirectAdmin = true; + Configuration::updateValue('PS_SMARTY_CONSOLE_KEY', Tools::getValue('smarty_console_key', 'SMARTY_DEBUG')); + $redirecAdmin = true; } else $this->errors[] = Tools::displayError('You do not have permission to edit this.'); @@ -821,4 +811,4 @@ class AdminPerformanceControllerCore extends AdminController die; } -} \ No newline at end of file +} diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 9b2da912e..ccc1e840a 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -800,8 +800,7 @@ class AdminProductsControllerCore extends AdminController { if ($this->tabAccess['edit'] === '1') { - - if ($this->isProductFieldUpdated('available_date_attribute') && !Validate::isDateFormat(Tools::getValue('available_date_attribute'))) + if ($this->isProductFieldUpdated('available_date_attribute') && (Tools::getValue('available_date_attribute') != '' &&!Validate::isDateFormat(Tools::getValue('available_date_attribute')))) $this->errors[] = Tools::displayError('Invalid date format.'); else { @@ -2408,18 +2407,23 @@ class AdminProductsControllerCore extends AdminController { if ($product = $this->loadObject(true)) { + if ($this->tabAccess['edit']) + { + $this->toolbar_btn['save'] = array( + 'short' => 'Save', + 'href' => '#', + 'desc' => $this->l('Save'), + ); + + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + ); + } + if ((bool)$product->id) { - // adding button for delete this product - if ($this->tabAccess['delete'] && $this->display != 'add') - $this->toolbar_btn['delete'] = array( - 'short' => 'Delete', - 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&deleteproduct', - 'desc' => $this->l('Delete this product.'), - 'confirm' => 1, - 'js' => 'if (confirm(\''.$this->l('Delete product?').'\')){return true;}else{event.preventDefault();}' - ); - // adding button for duplicate this product if ($this->tabAccess['add'] && $this->display != 'add') $this->toolbar_btn['duplicate'] = array( @@ -2453,22 +2457,17 @@ class AdminProductsControllerCore extends AdminController 'desc' => $this->l('New combination'), 'class' => 'toolbar-new' ); - } - - if ($this->tabAccess['edit']) - { - $this->toolbar_btn['save'] = array( - 'short' => 'Save', - 'href' => '#', - 'desc' => $this->l('Save'), - ); - - $this->toolbar_btn['save-and-stay'] = array( - 'short' => 'SaveAndStay', - 'href' => '#', - 'desc' => $this->l('Save and stay'), - ); - } + + // adding button for delete this product + if ($this->tabAccess['delete'] && $this->display != 'add') + $this->toolbar_btn['delete'] = array( + 'short' => 'Delete', + 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&deleteproduct', + 'desc' => $this->l('Delete this product.'), + 'confirm' => 1, + 'js' => 'if (confirm(\''.$this->l('Delete product?').'\')){return true;}else{event.preventDefault();}' + ); + } } } else diff --git a/controllers/admin/AdminShippingController.php b/controllers/admin/AdminShippingController.php index 7200f51b5..4382bbfca 100644 --- a/controllers/admin/AdminShippingController.php +++ b/controllers/admin/AdminShippingController.php @@ -69,75 +69,11 @@ class AdminShippingControllerCore extends AdminController
      • '.$this->l('Coupons are not taken into account when calculating free shipping').'
      • ', 'submit' => array() - ), - 'billing' => array( - 'title' => $this->l('Billing'), - 'icon' => 'money', - 'fields' => array( - 'PS_SHIPPING_METHOD' => array( - 'title' => $this->l('Billing'), - 'cast' => 'intval', - 'type' => 'radio', - 'choices' => array( - 0 => $this->l('According to total price'), - 1 => $this->l('According to total weight') - ), - 'validation' => 'isBool' - ), - ) - ), + ) ); } - public function initContent() - { - $array_carrier = array(); - $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); - foreach ($carriers as $key => $carrier) - if ($carrier['is_free']) - unset($carriers[$key]); - else - $array_carrier[] = $carrier['id_carrier']; - $id_carrier = (int)Tools::getValue('id_carrier'); - - if (count($carriers) && isset($array_carrier[0])) - { - if (!$id_carrier) - $id_carrier = (int)$array_carrier[0]; - - $carrierSelected = new Carrier((int)$id_carrier); - } - else - $carrierSelected = new Carrier((int)$id_carrier); - - $currency = $this->context->currency; - $rangeObj = $carrierSelected->getRangeObject(); - $rangeTable = $carrierSelected->getRangeTable(); - $suffix = $carrierSelected->getRangeSuffix(); - - $rangeIdentifier = 'id_'.$rangeTable; - $ranges = $rangeObj->getRanges($id_carrier); - $delivery = Carrier::getDeliveryPriceByRanges($rangeTable, $id_carrier); - $deliveryArray = array(); - foreach ($delivery as $deliv) - $deliveryArray[$deliv['id_zone']][$deliv['id_carrier']][$deliv[$rangeIdentifier]] = $deliv['price']; - - $this->context->smarty->assign(array( - 'zones' => $carrierSelected->getZones(), - 'carriers' => $carriers, - 'ranges' => $ranges, - 'currency' => $currency, - 'deliveryArray' => $deliveryArray, - 'carrierSelected' => $carrierSelected, - 'id_carrier' => $id_carrier, - 'suffix' => $suffix, - 'rangeIdentifier' => $rangeIdentifier, - 'action_fees' => self::$currentIndex.'&token='.$this->token - )); - - parent::initContent(); - } public function postProcess() { diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index f094b40a4..ffb47b720 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -225,14 +225,6 @@ class AdminStatusesControllerCore extends AdminController } public function renderForm() - { - if (Tools::isSubmit('updateorder_state') || Tools::isSubmit('addorder_state')) - return $this->renderOrderStatusForm(); - else if (Tools::isSubmit('updateorder_return_state') || Tools::isSubmit('addorder_return_state')) - return $this->renderOrderReturnsForm(); - } - - protected function renderOrderStatusForm() { $this->fields_form = array( 'tinymce' => true, @@ -362,7 +354,17 @@ class AdminStatusesControllerCore extends AdminController 'class' => 'button' ) ); - + + if (Tools::isSubmit('updateorder_state') || Tools::isSubmit('addorder_state')) + return $this->renderOrderStatusForm(); + else if (Tools::isSubmit('updateorder_return_state') || Tools::isSubmit('addorder_return_state')) + return $this->renderOrderReturnsForm(); + else + return parent::renderForm(); + } + + protected function renderOrderStatusForm() + { if (!($obj = $this->loadObject(true))) return; diff --git a/controllers/admin/AdminStockInstantStateController.php b/controllers/admin/AdminStockInstantStateController.php index 46059805c..ec9da4672 100644 --- a/controllers/admin/AdminStockInstantStateController.php +++ b/controllers/admin/AdminStockInstantStateController.php @@ -67,7 +67,7 @@ class AdminStockInstantStateControllerCore extends AdminController ), 'valuation' => array( 'title' => $this->l('Valuation'), - 'orderby' => true, + 'orderby' => false, 'search' => false, 'type' => 'price', 'currency' => true, @@ -88,7 +88,7 @@ class AdminStockInstantStateControllerCore extends AdminController 'real_quantity' => array( 'title' => $this->l('Real quantity'), 'width' => 80, - 'orderby' => true, + 'orderby' => false, 'search' => false, 'hint' => $this->l('Physical quantity (usable) - Client orders + Supply Orders'), ), diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php index c1b77a2f8..18865cb3b 100644 --- a/controllers/admin/AdminSupplyOrdersController.php +++ b/controllers/admin/AdminSupplyOrdersController.php @@ -40,6 +40,7 @@ class AdminSupplyOrdersControllerCore extends AdminController $this->bootstrap = true; $this->context = Context::getContext(); $this->table = 'supply_order'; + $this->className = 'SupplyOrder'; $this->identifier = 'id_supply_order'; $this->lang = false; @@ -457,6 +458,8 @@ class AdminSupplyOrdersControllerCore extends AdminController $this->_where .= ' AND st.enclosed != 1'; self::$currentIndex .= '&filter_status=on'; } + + $this->list_id = 'orders'; $first_list = parent::renderList(); if (Tools::isSubmit('csv_orders') || Tools::isSubmit('csv_orders_details') || Tools::isSubmit('csv_order_details')) @@ -509,6 +512,8 @@ class AdminSupplyOrdersControllerCore extends AdminController 'href' => self::$currentIndex.'&add'.$this->table.'&mod=template&token='.$this->token, 'desc' => $this->l('Add new template') ); + + $this->list_id = 'templates'; // inits list $second_list = parent::renderList(); @@ -1061,9 +1066,12 @@ class AdminSupplyOrdersControllerCore extends AdminController $this->errors[] = Tools::displayError($this->l('The date you specified cannot be in the past.')); // gets threshold - $quantity_threshold = null; - if (Tools::getValue('load_products') && Validate::isInt(Tools::getValue('load_products'))) - $quantity_threshold = (int)Tools::getValue('load_products'); + $quantity_threshold = Tools::getValue('load_products'); + + if (is_numeric($quantity_threshold)) + $quantity_threshold = (int)$quantity_threshold; + else + $quantity_threshold = null; if (!count($this->errors)) { @@ -1082,15 +1090,14 @@ class AdminSupplyOrdersControllerCore extends AdminController //specific discount check $_POST['discount_rate'] = (float)str_replace(array(' ', ','), array('', '.'), Tools::getValue('discount_rate', 0)); - } // manage each associated product $this->manageOrderProducts(); // if the threshold is defined and we are saving the order - if (Tools::isSubmit('submitAddsupply_order') && $quantity_threshold != null) - $this->loadProducts($quantity_threshold); + if (Tools::isSubmit('submitAddsupply_order') && Validate::isInt($quantity_threshold)) + $this->loadProducts((int)$quantity_threshold); } // Manage state change @@ -1349,7 +1356,7 @@ class AdminSupplyOrdersControllerCore extends AdminController // first, converts the price to the default currency $price_converted_to_default_currency = Tools::convertPrice($supply_order_detail->unit_price_te, $supply_order->id_currency, false); - // then, converts the newly calculated price from the default currency to the needed currency + // then, converts the newly calculated pri-ce from the default currency to the needed currency $price = Tools::ps_round(Tools::convertPrice($price_converted_to_default_currency, $warehouse->id_currency, true), @@ -1365,14 +1372,27 @@ class AdminSupplyOrdersControllerCore extends AdminController $price, true, $supply_order->id); - if ($res) // if product has been added + + if (!$res) + $this->errors[] = Tools::displayError($this->l('Something went wrong when adding products to the warehouse.')); + + $location = Warehouse::getProductLocation($supply_order_detail->id_product, + $supply_order_detail->id_product_attribute, + $warehouse->id); + + $res = Warehouse::setProductlocation($supply_order_detail->id_product, + $supply_order_detail->id_product_attribute, + $warehouse->id, + $location ? $location : ''); + + if ($res) { $supplier_receipt_history->add(); $supply_order_detail->save(); $supply_order->save(); } else - $this->errors[] = Tools::displayError($this->l('Something went wrong when adding products to the warehouse.')); + $this->errors[] = Tools::displayError($this->l('Something went wrong when setting warehouse on product record')); } } } @@ -1951,7 +1971,7 @@ class AdminSupplyOrdersControllerCore extends AdminController */ protected function afterAdd($object) { - if (Tools::getValue('load_products') && Validate::isInt(Tools::getValue('load_products'))) + if (is_numeric(Tools::getValue('load_products'))) $this->loadProducts((int)Tools::getValue('load_products')); $this->object = $object; @@ -2024,7 +2044,7 @@ class AdminSupplyOrdersControllerCore extends AdminController $diff = (int)$threshold - (int)$real_quantity; } - if ($diff > 0) + if ($diff >= 0) { // sets supply_order_detail $supply_order_detail = new SupplyOrderDetail(); @@ -2037,7 +2057,7 @@ class AdminSupplyOrdersControllerCore extends AdminController $supply_order_detail->name = Product::getProductName($item['id_product'], $item['id_product_attribute'], $supply_order->id_lang); $supply_order_detail->ean13 = $item['ean13']; $supply_order_detail->upc = $item['upc']; - $supply_order_detail->quantity_expected = (int)$diff; + $supply_order_detail->quantity_expected = ((int)$diff == 0) ? 1 : (int)$diff; $supply_order_detail->exchange_rate = $order_currency->conversion_rate; $product_currency = new Currency($item['id_currency']); diff --git a/controllers/admin/AdminTrackingController.php b/controllers/admin/AdminTrackingController.php index 3083e6f6d..4149e1952 100644 --- a/controllers/admin/AdminTrackingController.php +++ b/controllers/admin/AdminTrackingController.php @@ -78,6 +78,7 @@ class AdminTrackingControllerCore extends AdminController public function getCustomListCategoriesEmpty() { $this->table = 'category'; + $this->list_id = 'empty_categories'; $this->lang = true; $this->className = 'Category'; $this->identifier = 'id_category'; @@ -118,6 +119,7 @@ class AdminTrackingControllerCore extends AdminController return; $this->table = 'product'; + $this->list_id = 'no_stock_products_attributes'; $this->lang = true; $this->identifier = 'id_product'; $this->_orderBy = 'id_product'; @@ -162,6 +164,7 @@ class AdminTrackingControllerCore extends AdminController return; $this->table = 'product'; + $this->list_id = 'no_stock_products'; $this->className = 'Product'; $this->lang = true; $this->identifier = 'id_product'; @@ -202,13 +205,13 @@ class AdminTrackingControllerCore extends AdminController public function getCustomListProductsDisabled() { $this->table = 'product'; + $this->list_id = 'disabled_products'; $this->className = 'Product'; $this->lang = true; $this->identifier = 'id_product'; $this->_orderBy = 'id_product'; $this->_orderWay = 'DESC'; $this->_filter = 'AND product_shop.`active` = 0'; - $this->list_no_filter = true; $this->tpl_list_vars = array('sub_title' => $this->l('List of disabled products:')); $this->show_toolbar = false; $this->_list_index = 'index.php?controller=AdminProducts'; @@ -265,8 +268,17 @@ class AdminTrackingControllerCore extends AdminController protected function clearFilters() { - if ((Tools::isSubmit('submitResetcategory') && $this->table == 'category' ) || (Tools::isSubmit('submitResetproduct') && $this->table == 'product' )) - $this->processResetFilters(); + if (Tools::isSubmit('submitResetcategory')) + $this->processResetFilters('empty_categories'); + + if (Tools::isSubmit('submitResetproduct')) + $this->processResetFilters('no_stock_products_attributes'); + + if (Tools::isSubmit('submitResetno_stock_products')) + $this->processResetFilters('no_stock_products'); + + if (Tools::isSubmit('submitResetdisabled_products')) + $this->processResetFilters('disabled_products'); } public function clearListOptions() @@ -280,7 +292,6 @@ class AdminTrackingControllerCore extends AdminController $this->_filter = ''; $this->_group = ''; $this->_where = ''; - $this->list_no_filter = true; $this->list_title = $this->l('Product disabled'); } diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 1719dc4f2..df739904a 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -723,9 +723,8 @@ class AdminTranslationsControllerCore extends AdminController $arr_import_lang = explode('|', Tools::getValue('params_import_language')); /* 0 = Language ISO code, 1 = PS version */ if (Validate::isLangIsoCode($arr_import_lang[0])) { - if ($content = Tools::file_get_contents( - 'http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip', false, - @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5))))) + $content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip'); + if ($content) { $file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip'; if ((bool)@file_put_contents($file, $content)) @@ -2355,7 +2354,8 @@ class AdminTranslationsControllerCore extends AdminController foreach ($files_by_directiories['php'] as $dir => $files) foreach ($files as $file) - if (Tools::file_exists_cache($dir.$file) && is_file($dir.$file) && !in_array($file, self::$ignore_folder) && preg_match('/\.php$/', $file)) + // If file exist and is not in ignore_folder, in the next step we check if a folder or mail + if (Tools::file_exists_cache($dir.$file) && !in_array($file, self::$ignore_folder)) $subject_mail = $this->getSubjectMail($dir, $file, $subject_mail); // Get path of directory for find a good path of translation file @@ -2411,30 +2411,37 @@ class AdminTranslationsControllerCore extends AdminController */ protected function getSubjectMail($dir, $file, $subject_mail) { - $content = file_get_contents($dir.'/'.$file); - $content = str_replace("\n", ' ', $content); + // If is file and is not in ignore_folder + if (is_file($dir.'/'.$file) && !in_array($file, self::$ignore_folder) && preg_match('/\.php$/', $file)) + { + $content = file_get_contents($dir.'/'.$file); + $content = str_replace("\n", ' ', $content); - // Subject must match with a template, therefor we first grep the Mail::Send() function then the Mail::l() inside. - if (preg_match_all('/Mail::Send([^;]*);/si', $content, $tab)) - for ($i = 0; isset($tab[1][$i]); $i++) + // Subject must match with a template, therefor we first grep the Mail::Send() function then the Mail::l() inside. + if (preg_match_all('/Mail::Send([^;]*);/si', $content, $tab)) { - $tab2 = explode(',', $tab[1][$i]); - if (is_array($tab2) && isset($tab2[1])) + for ($i = 0; isset($tab[1][$i]); $i++) { - $template = trim(str_replace('\'', '', $tab2[1])); - foreach ($tab2 as $tab3) - if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'\)/Us', $tab3.')', $matches)) - { - if (!isset($subject_mail[$template])) - $subject_mail[$template] = array(); - if (!in_array($matches[1], $subject_mail[$template])) - $subject_mail[$template][] = $matches[1]; - } + $tab2 = explode(',', $tab[1][$i]); + if (is_array($tab2) && isset($tab2[1])) + { + $template = trim(str_replace('\'', '', $tab2[1])); + foreach ($tab2 as $tab3) + if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'\)/Us', $tab3.')', $matches)) + { + if (!isset($subject_mail[$template])) + $subject_mail[$template] = array(); + if (!in_array($matches[1], $subject_mail[$template])) + $subject_mail[$template][] = $matches[1]; + } + } } } - - if (!in_array($file, self::$ignore_folder) && is_dir($dir.'/'.$file)) - $subject_mail = $this->getSubjectMail($dir, $file, $subject_mail); + } + // Of if is colder, we scan colder for check if find in folder and subfolder + else if (!in_array($file, self::$ignore_folder) && is_dir($dir.'/'.$file)) + foreach( scandir($dir.'/'.$file ) as $temp ) + $subject_mail = $this->getSubjectMail($dir.'/'.$file, $temp, $subject_mail); return $subject_mail; } diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php index 699a37287..eb17888ce 100644 --- a/controllers/front/AddressController.php +++ b/controllers/front/AddressController.php @@ -303,7 +303,9 @@ class AddressControllerCore extends FrontController $selected_country = (int)$this->_address->id_country; else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + // get all countries as language (xy) or language-country (wz-XY) + $array = array(); + preg_match("#(?<=-)\w\w|\w\w(?!-)#",$_SERVER['HTTP_ACCEPT_LANGUAGE'],$array); if (!Validate::isLanguageIsoCode($array[0]) || !($selected_country = Country::getByIso($array[0]))) $selected_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); } diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 717937594..1129f2f8e 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -103,7 +103,9 @@ class AuthControllerCore extends FrontController if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + // get all countries as language (xy) or language-country (wz-XY) + $array = array(); + preg_match("#(?<=-)\w\w|\w\w(?!-)#",$_SERVER['HTTP_ACCEPT_LANGUAGE'],$array); if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0]))) $sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); } diff --git a/controllers/front/CartController.php b/controllers/front/CartController.php index 828238c7c..1a24c151b 100644 --- a/controllers/front/CartController.php +++ b/controllers/front/CartController.php @@ -34,6 +34,8 @@ class CartControllerCore extends FrontController protected $customization_id; protected $qty; + public $ssl = true; + protected $ajax_refresh = false; /** diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php index 33dfc3bf3..166ce0d2d 100644 --- a/controllers/front/CategoryController.php +++ b/controllers/front/CategoryController.php @@ -205,5 +205,13 @@ class CategoryControllerCore extends FrontController $this->context->smarty->assign('nb_products', $this->nbProducts); } + + /** + * Get instance of current category + */ + public function getCategory() + { + return $this->category; + } } diff --git a/controllers/front/OrderController.php b/controllers/front/OrderController.php index 37b5d90b8..3704de6d3 100644 --- a/controllers/front/OrderController.php +++ b/controllers/front/OrderController.php @@ -155,14 +155,18 @@ class OrderControllerCore extends ParentOrderController Tools::redirect('index.php?controller=order&step=2'); Context::getContext()->cookie->check_cgv = true; - // Check the delivery option is setted + // Check the delivery option is set if (!$this->context->cart->isVirtualCart()) { if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier) Tools::redirect('index.php?controller=order&step=2'); elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier) { - foreach (Tools::getValue('delivery_option') as $delivery_option) + $deliveries_options = Tools::getValue('delivery_option'); + if (!$deliveries_options) { + $deliveries_options = $this->context->cart->delivery_option; + } + foreach ($deliveries_options as $delivery_option) if (empty($delivery_option)) Tools::redirect('index.php?controller=order&step=2'); } diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php index 7063114dc..a5f9321c1 100644 --- a/controllers/front/OrderDetailController.php +++ b/controllers/front/OrderDetailController.php @@ -114,6 +114,7 @@ class OrderDetailControllerCore extends FrontController if (Tools::getValue('ajax') != 'true') Tools::redirect('index.php?controller=order-detail&id_order='.(int)$idOrder); + $this->context->smarty->assign('message_confirmation', true); } else $this->errors[] = Tools::displayError('Order not found'); diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index 9c152b127..2c5ff6540 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -28,6 +28,8 @@ class OrderOpcControllerCore extends ParentOrderController { public $php_self = 'order-opc'; public $isLogged; + + protected $ajax_refresh = false; /** * Initialize order opc controller @@ -199,8 +201,28 @@ class OrderOpcControllerCore extends ParentOrderController } // Address has changed, so we check if the cart rules still apply + $cart_rules = $this->context->cart->getCartRules(); CartRule::autoRemoveFromCart($this->context); CartRule::autoAddToCart($this->context); + if ((int)Tools::getValue('allow_refresh')) + { + // If the cart rules has changed, we need to refresh the whole cart + $cart_rules2 = $this->context->cart->getCartRules(); + if (count($cart_rules2) != count($cart_rules)) + $this->ajax_refresh = true; + else + { + $rule_list = array(); + foreach ($cart_rules2 as $rule) + $rule_list[] = $rule['id_cart_rule']; + foreach ($cart_rules as $rule) + if (!in_array($rule['id_cart_rule'], $rule_list)) + { + $this->ajax_refresh = true; + break; + } + } + } if (!$this->context->cart->isMultiAddressDelivery()) $this->context->cart->setNoMultishipping(); // As the cart is no multishipping, set each delivery address lines with the main delivery address @@ -215,7 +237,8 @@ class OrderOpcControllerCore extends ParentOrderController 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), 'HOOK_PAYMENT' => $this->_getPaymentMethods(), 'gift_price' => Tools::displayPrice(Tools::convertPrice(Product::getTaxCalculationMethod() == 1 ? $wrapping_fees : $wrapping_fees_tax_inc, new Currency((int)($this->context->cookie->id_currency)))), - 'carrier_data' => $this->_getCarrierList()), + 'carrier_data' => $this->_getCarrierList(), + 'refresh' => (bool)$this->ajax_refresh), $this->getFormatedSummaryDetail() ); die(Tools::jsonEncode($result)); diff --git a/controllers/front/PageNotFoundController.php b/controllers/front/PageNotFoundController.php index a2483d4ca..98babe654 100644 --- a/controllers/front/PageNotFoundController.php +++ b/controllers/front/PageNotFoundController.php @@ -40,6 +40,20 @@ class PageNotFoundControllerCore extends FrontController if (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('png', 'jpg', 'gif'))) { + if ((bool)Configuration::get('PS_REWRITING_SETTINGS')) + preg_match('#([0-9]+)(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/(.+)\.(png|jpg|gif)$#', $_SERVER['REQUEST_URI'], $matches); + if ((!isset($matches[2]) || empty($matches[2])) && !(bool)Configuration::get('PS_REWRITING_SETTINGS')) + preg_match('#/([0-9]+)(\-[_a-zA-Z]*)\.(png|jpg|gif)$#', $_SERVER['REQUEST_URI'], $matches); + + if (is_array($matches) && !empty($matches[2]) && Tools::strtolower(substr($matches[2], -8)) != '_default' && is_numeric($matches[1])) + { + $matches[2] = substr($matches[2], 1, Tools::strlen($matches[2])).'_default'; + if (!isset($matches[4])) + $matches[4] = ''; + header('Location: '.$this->context->link->getImageLink($matches[4], $matches[1], $matches[2]), true, 302); + exit; + } + header('Content-Type: image/gif'); readfile(_PS_IMG_DIR_.'404.gif'); exit; diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index a60f194b1..10e17bb85 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -399,6 +399,7 @@ class ParentOrderControllerCore extends FrontController // Getting a list of formated address fields with associated values $formatedAddressFieldsValuesList = array(); + foreach ($customerAddresses as $i => $address) { if (!Address::isCountryActiveById((int)($address['id_address']))) @@ -411,6 +412,10 @@ class ParentOrderControllerCore extends FrontController unset($tmpAddress); } + + if (key($customerAddresses) != 0) + $customerAddresses = array_values($customerAddresses); + $this->context->smarty->assign(array( 'addresses' => $customerAddresses, 'formatedAddressFieldsValuesList' => $formatedAddressFieldsValuesList)); diff --git a/controllers/front/PasswordController.php b/controllers/front/PasswordController.php index e36d84a9a..650b8fabf 100644 --- a/controllers/front/PasswordController.php +++ b/controllers/front/PasswordController.php @@ -40,6 +40,7 @@ class PasswordControllerCore extends FrontController $this->errors[] = Tools::displayError('Invalid email address.'); else { + $customer = new Customer(); $customer->getByemail($email); if (!Validate::isLoadedObject($customer)) @@ -57,7 +58,7 @@ class PasswordControllerCore extends FrontController '{url}' => $this->context->link->getPageLink('password', true, null, 'token='.$customer->secure_key.'&id_customer='.(int)$customer->id) ); if (Mail::Send($this->context->language->id, 'password_query', Mail::l('Password query confirmation'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname)) - $this->context->smarty->assign(array('confirmation' => 2, 'email' => $customer->email)); + $this->context->smarty->assign(array('confirmation' => 2, 'customer_email' => $customer->email)); else $this->errors[] = Tools::displayError('An error occurred while sending the email.'); } @@ -90,7 +91,7 @@ class PasswordControllerCore extends FrontController '{passwd}' => $password ); if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname)) - $this->context->smarty->assign(array('confirmation' => 1, 'email' => $customer->email)); + $this->context->smarty->assign(array('confirmation' => 1, 'customer_email' => $customer->email)); else $this->errors[] = Tools::displayError('An error occurred while sending the email.'); } diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 46aa593c9..438974ca9 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -158,8 +158,7 @@ class ProductControllerCore extends FrontController $this->category = new Category($regs[5], (int)$this->context->cookie->id_lang); } } - if ( ! isset($this->category)) - // Set default product category + if (!isset($this->category)) $this->category = new Category($this->product->id_category_default, (int)$this->context->cookie->id_lang); } } @@ -659,4 +658,9 @@ class ProductControllerCore extends FrontController } return $specific_prices; } + + public function getProduct() + { + return $this->product; + } } \ No newline at end of file diff --git a/css/admin.css b/css/admin.css index 8b551ab1e..683c35638 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1 +1,2666 @@ -#nobootstrap *{font-family:Arial,Verdana,Helvetica,sans-serif}#nobootstrap body{margin:0;padding:0;font-size:12px;color:#000}#nobootstrap .float{float:left}#nobootstrap .floatr{float:right}#nobootstrap a img{border:0}#nobootstrap a{color:#000;text-decoration:none;outline:0pt}#nobootstrap a:hover{color:#222;text-decoration:none}#nobootstrap a.link,#nobootstrap a.link:hover{color:#999999}#nobootstrap a.link{text-decoration:underline}#nobootstrap .warn a{text-decoration:underline}#nobootstrap img{vertical-align:middle}#nobootstrap input{vertical-align:middle}#nobootstrap p{margin:0.5em 0;color:#585A69}#nobootstrap hr{border:none;padding:0;margin-top:10px;margin-bottom:10px}#nobootstrap .block{display:block}#nobootstrap .bold{font-weight:bold}#nobootstrap legend,#nobootstrap th{font-family:Arial,Helvetica,sans-serif}#nobootstrap h1,#nobootstrap h2,#nobootstrap h3,#nobootstrap h4,#nobootstrap h5,#nobootstrap h6{font-family:Arial,Helvetica,sans-serif}#nobootstrap h1{font-size:1.6em;margin:0 0 .67em 0}#nobootstrap h2{font-size:1.4em}#nobootstrap h3{font-size:1.1em}#nobootstrap h5{font-size:0.83em}#nobootstrap h6{font-size:0.67em}#nobootstrap h3.blue{color:#268CCD}#nobootstrap .red{color:red}#nobootstrap form{margin:0;padding:0}#nobootstrap form p{margin:0.5em 0 0 0;padding:0 0 0.5em 0}#nobootstrap form sup{color:#CC0000;font-weight:bold;vertical-align:text-top}#nobootstrap form .simulate-disable-input{min-width:127px;display:inline-block;padding:3px;border:1px solid #E0D0B1;background-color:#dddddd;color:#666666;font-size:12px}#nobootstrap .block-mail{margin:0 0 20px 0}#nobootstrap .mail-form{margin:0 0 0 220px;width:auto;color:#7F7F7F;font-size:0.85em}#nobootstrap .label-subject{padding:0;margin:0 0 10px 0;text-align:left}#nobootstrap .label-subject input{width:555px}#nobootstrap .mail-label table{width:555px}#nobootstrap .mails_field{margin:0;background:none repeat scroll 0 0 #FFF;border:1px solid #CCCCCC;font-size:1.1em;margin:20px 0 20px 0;padding:0;position:relative;border-radius:3px}#nobootstrap .mails_field h3{background:-moz-linear-gradient(center top, #f9f9f9, #ececec) repeat-x scroll left top #ececec;color:#333333;font-size:13px;padding:4px 6px;text-align:left;text-shadow:0 1px 0 #FFFFFF;margin:0;font-size:1em;padding:10px 5px;display:block}#nobootstrap .style-themeModuleMail{margin:0;padding:0.2em 0.5em;border:1px solid #DFD5C3;background:#FFF6D3;font-weight:bold;text-align:left;cursor:pointer;font-size:12px}#nobootstrap .style-themeModuleName{margin:0;padding:0.2em 0.5em;border:1px solid #DFD5C3;background:#FFF6D3;font-weight:bold;text-align:left;cursor:pointer;font-size:12px}#nobootstrap .margin-form{padding:0 0 1em 260px;color:#7F7F7F;font-size:0.85em}#nobootstrap .margin-form .normal-text{display:block;padding-top:0.2em;font-size:1.2em;color:black}#nobootstrap fieldset.width1 .margin-form{margin:0 0 1em 130px}#nobootstrap fieldset img{padding:0 4px 0 0;vertical-align:bottom}#nobootstrap label{float:left;width:250px;padding:0.2em 0.5em 0 0;text-align:right;font-weight:bold}#nobootstrap #preview_import label{float:left;font-weight:bold;padding:0.2em 0 0;text-align:left;width:320px}#nobootstrap label.t{float:none;clear:none;padding:0 5px 0;margin:0px;font-weight:normal;font-size:12px;text-shadow:none}#nobootstrap label.child{float:none;clear:none;padding:0px;margin:0px;font-weight:normal;font-size:12px}#nobootstrap label.std{float:none;margin:0px;width:170px;display:block;font-size:12px;text-align:right;font-weight:bold}#nobootstrap form div.std{margin-top:-2em}#nobootstrap fieldset.width1 label{width:110px}#nobootstrap label:after{clear:both}#nobootstrap input,#nobootstrap textarea,#nobootstrap option{color:#000;font-size:12px;margin:0;padding:0}#nobootstrap input[type="text"],#nobootstrap input[type="password"],#nobootstrap input[type="file"],#nobootstrap textarea{padding:2px 4px;box-shadow:0 1px 2px rgba(0,0,0,0.1) inset}#nobootstrap input[type="radio"],#nobootstrap input[type="checkbox"]{background-color:transparent}#nobootstrap input:focus,#nobootstrap textarea:focus{border:1px solid #3293D6}#nobootstrap fieldset{_position:relative}#nobootstrap legend{_position:relative;_top:-2em;_margin-top:12px}#nobootstrap select optgroup{background:#fff;padding:2px;color:#000}#nobootstrap select optgroup option{padding:0 9px;color:#000}#nobootstrap .lab_modules_positions{float:none;text-align:left;font-weight:normal;padding:0;cursor:pointer;display:block;width:500px}#nobootstrap .lab_modules{float:none;text-align:left;font-weight:normal;padding-left:10px;cursor:pointer;display:block;width:500px}#nobootstrap .lab_modules_positions img{float:left}#nobootstrap #container{margin:0 auto 2em auto;text-align:left}#nobootstrap #main{clear:left;min-height:600px;background:#fff}#nobootstrap #content{padding:1.25em;padding-bottom:0.5em;position:relative}#nobootstrap #news{width:640px;border:1px solid #E0D0B1}#nobootstrap #help{float:right;width:150px;padding:4px;border:1px solid #DFD5C3;font-size:0.9em}#nobootstrap #image{float:none;padding:6px;background:#fff;border:1px solid #DFD5C3;font-size:0.9em;text-align:center}#nobootstrap #image img{margin:0;padding:0}#nobootstrap #id_image_attr{list-style:none}#nobootstrap #product_link{width:240px;float:right;padding:4px;margin-top:8px;font-size:0.9em;text-align:center;clear:right}#nobootstrap #help:after,#nobootstrap #image:after{clear:both}#nobootstrap #nav{float:right;margin:1em 0;font-size:1.1em;font-weight:bold;vertical-align:middle}#nobootstrap #nav li{display:inline;list-style:none;margin:0 0 0 2em}#nobootstrap #nav img{vertical-align:bottom}#nobootstrap .warn .pico{vertical-align:middle;padding:0;margin:0}#nobootstrap #content .alert{width:auto;margin:0 0 15px 0;padding:10px 15px;border-top:1px solid #DF7B7B;border-bottom:1px solid #DF7B7B;background-color:#FFE6E6}#nobootstrap #content .warning{margin:0 0 15px 0;line-height:20px;padding:10px 20px 10px 20px;border-top:1px solid #FF9900;border-bottom:1px solid #FF9900;background-color:#FFEBCC}#nobootstrap #unhook_button_position_bottom{overflow:hidden;width:100%;padding-top:10px}#nobootstrap #unhook_button_position_top{overflow:hidden;width:100%}#nobootstrap #content .conf,#nobootstrap #content .warn,#nobootstrap #content .error{color:#383838;font-size:12px;font-weight:normal;margin:0 0 10px 0;line-height:20px;padding:13px 5px 5px 40px;min-height:28px;border-radius:3px}#nobootstrap #content .error-inline{color:#ff0000;font-weight:bold}#nobootstrap #content .conf{background:#dff2bf url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px;border:1px solid #4F8A10;color:#4F8A10}#nobootstrap #content .conf img,#nobootstrap #content .warn img,#nobootstrap #content .error img{margin:0 5px 0 0}#nobootstrap #content .error{background:#ffbaba url(../img/admin/icon-cancel.png) no-repeat scroll 6px 6px;border:1px solid #CC0000;color:#D8000C}#nobootstrap #content .conf a,#nobootstrap #content .warn a,#nobootstrap #content .error a{color:#D8000C;font-weight:bold}#nobootstrap #content .conf a:hover,#nobootstrap #content .warn a:hover,#nobootstrap #content .error a:hover{text-decoration:underline}#nobootstrap #ajax_confirmation .error{background:#ffbaba url(../img/admin/icon-cancel.png) no-repeat scroll 6px 6px;border:1px solid #CC0000;color:#D8000C;padding:20px 40px;position:fixed;bottom:0;width:100%;left:0}#nobootstrap #ajax_confirmation .conf{background:#dff2bf url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px;border:1px solid #4F8A10;color:#4F8A10;padding:20px 40px;position:fixed;bottom:0;width:100%;left:0}#nobootstrap #content .warn{background:#feefb3 url(../img/admin/icon-attention.png) no-repeat scroll 6px 6px;border:1px solid #9e6014;color:#9e6014}#nobootstrap #content .warn h2{margin:0}#nobootstrap #content .warn ul li,#nobootstrap #content .warn p,#nobootstrap #content .warn a{color:#9e6014}#nobootstrap #content .warn ul li label{font-weight:normal;color:#9e6014;text-shadow:none}#nobootstrap #content .error ol{clear:both;margin-top:5px;padding-bottom:0}#nobootstrap #content .error ol li{font-weight:200;margin-left:30px}#nobootstrap #content .confirm{background:#dff2bf url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px;border:1px solid #4F8A10;color:#4F8A10;border-radius:3px}#nobootstrap #content .confirm h3{padding:0 0 0 20px;background:url(../img/admin/ok.gif) no-repeat 0 0}#nobootstrap #content .warn h3{padding:0 0 0 20px;background:url(../img/admin/warning.gif) no-repeat 0 0}#nobootstrap #blockNewVersionCheck .warn h3{padding:0 0 0 5px;margin:0px;background:none}#nobootstrap #content .error h3{padding:0 0 0 20px;background:url(../img/admin/warning.gif) no-repeat 0 0}#nobootstrap .column{float:left;width:173px;margin:0 50px 1.5em 0;padding:10px;-moz-border-radius:20px;text-align:center}#nobootstrap #col_1{height:235px;color:#FFFFFF;background:#ff8c76 url(../img/admin/col_1.gif) no-repeat}#nobootstrap #col_2{height:235px;color:#FFFFFF;background:#ffc44f url(../img/admin/col_2.gif) no-repeat}#nobootstrap #col_3{height:235px;color:#FFFFFF;background:#8cff70 url(../img/admin/col_3.gif) no-repeat}#nobootstrap #news img{padding:0 6px 0 0;vertical-align:middle}#nobootstrap #news .infos,#nobootstrap #news .content{margin:0;padding:4px;font-family:Arial,Helvetica,sans-serif;font-weight:normal}#nobootstrap .table tr.last td{border-bottom:none}#nobootstrap .footer_link,#nobootstrap .footer_link:hover{color:#812143;font-weight:bold;text-decoration:underline}#nobootstrap h3.title{clear:both;margin:0;padding:4px 10px;border:1px solid #E0D0B1;border:none}#nobootstrap h3.subtitle{color:#FF8D42;font-size:1.2em}#nobootstrap p.infos{float:right;margin:0;padding:0;font-size:0.9em;line-height:1em;vertical-align:top}#nobootstrap .width1{width:350px}#nobootstrap .width2{width:500px}#nobootstrap .width3{width:600px}#nobootstrap .width4{width:745px}#nobootstrap .width5{width:655px}#nobootstrap .widthfull{width:100%}#nobootstrap tr.deleted td{background-color:#EEEEEE}#nobootstrap .contextnav{margin:10px 0;padding:3px 6px;line-height:1.30em;border:1px solid #E0D0B1}#nobootstrap .contextnav img{vertical-align:text-top}#nobootstrap .contextnavleft{float:left;width:6em}#nobootstrap .contextnavcenter{text-align:center}#nobootstrap .contextnavcenter a,#nobootstrap .contextnavcenter b{letter-spacing:6pt}#nobootstrap .contextnavright{float:right;width:6em;text-align:right}#nobootstrap .hidden{height:1px;border-width:1px 0 0 0;border-style:solid;border-color:#fff}#nobootstrap .clear{clear:both}#nobootstrap .flatclear{clear:both;height:0px;line-height:0px}#nobootstrap .space{margin-top:13px}#nobootstrap .pspace{padding-top:1em}#nobootstrap .double-space{margin-top:2em}#nobootstrap .space-bottom{margin-bottom:1em}#nobootstrap .double-bottom-space{margin-bottom:2em}#nobootstrap .left{text-align:left}#nobootstrap .center{text-align:center !important}#nobootstrap .right{text-align:right}#nobootstrap .small{font-size:0.85em}#nobootstrap .uppercase{text-transform:uppercase}#nobootstrap .noborder{border:none}#nobootstrap .highlight{background-color:#FFFF66;font-weight:bold}#nobootstrap .discount_name{background:#FFEBCC;padding:2px;text-transform:uppercase}#nobootstrap .displayed_flag{float:left;margin:4px 0 0 4px}#nobootstrap .language_flags{display:none;float:left;background:#FFF;margin:4px;padding:8px;width:80px;border:1px solid #555}#nobootstrap .pointer{cursor:pointer}#nobootstrap .imgm{margin:3px 0px 3px 0px}#nobootstrap .green{color:forestgreen}#nobootstrap .bullet{display:list-item;list-style:disc;margin-left:30px}#nobootstrap #ajax_confirmation{padding-top:3px;padding-bottom:6px}#nobootstrap .hint{display:none;position:absolute;margin-top:4px;margin-bottom:2px;border:1px solid #00529B;padding:15px 5px 15px 40px;color:#00529B;background:#bde5f8 url(../img/admin/icon-info.png) no-repeat 6px 5px;border-radius:3px;min-height:15px;z-index:10}#nobootstrap .hint p{color:#00529B}#nobootstrap .hint .addImageDescription{font-weight:bold;font-size:16px}#nobootstrap span.hint{position:relative}#nobootstrap div.hint{position:relative}#nobootstrap div.hint ul li{color:#00529B;padding-left:5px}#nobootstrap table tr th .hint{display:none;position:absolute;margin:30px 5px 5px 5px;width:400px;border:1px solid #ECE52F;padding:8px 6px 8px 34px;color:#383838;background:#fffbe5 url(../img/admin/icon-info.png) no-repeat 6px 5px;border-radius:3px}#nobootstrap .hintGroup{position:relative;margin-top:10px;margin-bottom:10px;border:1px solid #50B0EC;padding:8px 6px 8px 40px;color:#383838;background:#dde9f7 url(../img/admin/help2.png) no-repeat 6px 5px}#nobootstrap .hint .hint-pointer{position:absolute;left:-10px;top:5px;width:10px;height:19px}#nobootstrap #flagsLanguage img{padding:3px;margin-bottom:-4px}#nobootstrap #flagsLanguage .selected_language{border:1px solid #BBB;padding:2px;margin-bottom:-4px}#nobootstrap .disable,#nobootstrap .disable:hover{background-color:#CCCCCC;color:#AAAAAA}#nobootstrap .ajax-warning,#nobootstrap .ajax-success,#nobootstrap .ajax-error{border:1px solid #CCCCCC;padding:5px 20px;margin:5px;width:70%}#nobootstrap .ajax-warning{background-color:#FFBD6F}#nobootstrap .ajax-success{background-color:#9FDF8B}#nobootstrap .ajax-error{background-color:#FF7F84}#nobootstrap .ajax-loader{margin:5px 10px}#nobootstrap .productFieldComment{color:#7F7F7F;font-size:0.8em}#nobootstrap a.confirm_yes,#nobootstrap a.confirm_no{width:50px;margin-left:60px;padding:10px;border-style:solid;border-width:1px;text-align:center;font-weight:bold;color:white}#nobootstrap a.confirm_yes{border-color:red;background-color:red}#nobootstrap a.confirm_no{border-color:green;background-color:green}#nobootstrap form#import_form{padding-bottom:22px;margin-left:15px;margin-bottom:20px}#nobootstrap .table_overflow{width:900px;height:500px;overflow:auto}#nobootstrap .new_message{background-color:#FFE35C}#nobootstrap .myDragClass{background-color:#FFAA55}#nobootstrap .dragHandle{cursor:move}#nobootstrap p#mailResultCheck{margin:2px 0;padding-left:18px;font-size:12px}#nobootstrap p.ok{background:url("../img/admin/enabled.gif") no-repeat top left;color:green}#nobootstrap p.fail{background:url("../img/admin/disabled.gif") no-repeat top left;font-weight:bold;color:red}#nobootstrap #lang_pack_msg{border:1px solid #DFD5C3;padding:10px;margin-bottom:10px}#nobootstrap span.defaultSkin .mceToolbar{height:auto}#nobootstrap span.defaultSkin table.mceLayout tr.mceFirst td{float:left}#nobootstrap table.permissions{border:1px solid #DFD5C3}#nobootstrap table.permissions th{background:#FFF6D3;text-align:center;height:20px}#nobootstrap table.permissions td{padding:5px;text-align:center}#nobootstrap .path_bar{background-color:#EFEFEF;font-family:Arial;font-size:13px;margin-bottom:20px;padding:5px}#nobootstrap .path_bar a{font-weight:700}#nobootstrap .adminHeader h1{font-family:Arial;color:#812143;font-size:18pt;margin:0}#nobootstrap #adminHeader hr{background-color:#812143;margin:0}#nobootstrap #header_shoplist{background-image:url("../img/t/AdminShop.gif");background-position:0 3px;background-repeat:no-repeat;padding-left:17px;height:20px}#nobootstrap #header_shoplist select.shopList option{padding:2px}#nobootstrap #header_shoplist select.shopList .first{font-weight:bold;background-color:#408BD5;color:#ffffff}#nobootstrap #header_shoplist select.shopList .group{font-weight:bold;font-style:italic;padding-left:10px;background-color:#C6DEFC}#nobootstrap #header_shoplist select.shopList .shop{padding-left:20px;background-color:#EAF2FC}#nobootstrap .multishop_info{margin-top:4px;margin-bottom:10px;border:1px solid #00529B;padding:13px 5px 0 40px;color:#00529B;background:#bde5f8 url(../img/admin/icon-info.png) no-repeat 6px 5px;border-radius:3px;min-height:32px}#nobootstrap .assoShop{width:100%;max-width:600px;max-height:300px;overflow:auto}#nobootstrap .clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}#nobootstrap .clearfix{display:inline-block}#nobootstrap html[xmlns] .clearfix{display:block}#nobootstrap * html .clearfix{height:1%}#nobootstrap #adminHeader #help_img{float:right;margin-top:5px}#nobootstrap #adminpresentation{position:relative;width:100%}#nobootstrap #listpresentation{float:left;width:100px}#nobootstrap #iframe{width:450px;height:220px;float:left;margin:10px;background:#DDD;border:1px solid #666}#nobootstrap #adminpresentation ul li{list-style:none}#nobootstrap #list_video{float:left;width:220px}#nobootstrap #list_video h3{color:#882F4F;font-size:12pt;padding-top:25px;margin:0}#nobootstrap #list_video ul{text-align:left;padding:0;margin:0}#nobootstrap #list_video ul li{float:left;width:195px;text-decoration:underline;padding-left:25px;margin-top:5px}#nobootstrap #footer{padding-top:5px}#nobootstrap #footer_iframe_home{position:absolute;top:0;right:0}#nobootstrap #footer_iframe_home label{float:none;color:#585A69;font-weight:normal;line-height:15px}#nobootstrap #footer_iframe_home input{margin-left:10px}#nobootstrap #footer_iframe_home a{float:right;margin:0px 15px 0px 0px;text-decoration:underline;color:#903E5B}#nobootstrap #column_left{width:49.1%;float:left;padding-top:5px}#nobootstrap #column_right{width:49.1%;float:right;padding:0}#nobootstrap #column_right .table_info{width:48.1%;float:left}#nobootstrap #column_right #table_info_last.table_info{width:48.1%;float:right}#nobootstrap .F_list{list-style:none;padding:0;margin:0}#nobootstrap #first_block a,#nobootstrap #second_block a,#nobootstrap #third_block a,#nobootstrap #fourth_block a,#nobootstrap #fifth_block a,#nobootstrap #sixth_block a,#nobootstrap #seventh_block a,#nobootstrap #eighth_block a{background:#F8F8F8 none no-repeat scroll center 25px}#nobootstrap #first_block a{background-image:url("../img/admin/package_go.png")}#nobootstrap #second_block a{background-image:url("../img/admin/cart_add.png")}#nobootstrap #third_block a{background-image:url("../img/admin/book.png")}#nobootstrap #fourth_block a{background-image:url("../img/admin/package_add.png")}#nobootstrap #fifth_block a{background-image:url("../img/admin/plugin_add.png")}#nobootstrap #sixth_block a{background-image:url("../img/admin/cart_remove.png")}#nobootstrap #seventh_block a{background-image:url("../img/admin/page_white_add.png")}#nobootstrap #eighth_block a{background-image:url("../img/admin/abandonedcart.png")}#nobootstrap .F_list li{float:left;margin-right:15px;margin-bottom:15px;display:block}#nobootstrap .F_list li h4{width:95px;font-size:11px;font-weight:normal;margin-top:55px;margin-bottom:0;line-height:15px}#nobootstrap .F_list a{float:left;color:#333;width:95px;border:1px solid #ccc;padding:5px;height:95px;text-align:center;border-radius:3px}#nobootstrap .F_list a:hover{border:1px solid #666}#nobootstrap .F_list li p{font-size:8pt;display:none}#nobootstrap .table_info{float:left;padding:0;margin:0;border:1px solid #ccc;border-radius:3px;background-color:#fff}#nobootstrap .table_info h5{font-size:16px;font-weight:normal;color:#000;margin:0;padding:6px;text-shadow:0 1px 0 #fff;display:block;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);background:-webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#ececec)) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"}#nobootstrap .table_info h5 a,#nobootstrap .admin-box1 h5 a{color:#000;font-size:8pt;float:right;text-decoration:underline;font-weight:normal;padding-right:10px}#nobootstrap .admin-box2 h5 a{color:#FFFFFF;font-size:8pt;float:right;text-decoration:underline;font-weight:normal;padding-right:10px}#nobootstrap .admin-box1 a#optimizationTipsFold img{padding:5px 0}#nobootstrap #table_info_last{margin-left:0;float:left}#nobootstrap .table_info_details{border-collapse:collapse;border:none}#nobootstrap .table_info_details tr{height:30px;width:290px;color:#000000;font-weight:bold;padding-left:5px;width:100%;text-align:center;border:none}#nobootstrap .tr_odd{background-color:#eff4f9}#nobootstrap .table_info_details tr td.td_align_left{font-weight:normal;text-align:left;padding-left:10px;font-size:13px}#nobootstrap .table_info_details tr td{font-size:16px;text-align:right;padding-right:10px;white-space:nowrap}#nobootstrap #table_info_large{margin-top:20px;margin-bottom:20px;width:100%;float:left;padding:0;border:1px solid #ccc;border-radius:3px;background-color:#fff}#nobootstrap #table_info_large h5{background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);background:-webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#ececec)) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')";color:#000;margin:0;line-height:29px;padding-left:15px;font-size:12pt;font-weight:normal;display:block}#nobootstrap #table_info_large h5 a{color:#000;float:right;font-size:8pt;text-decoration:underline;font-weight:normal;padding-right:8px}#nobootstrap #stat_google{width:586px;height:175px;background-color:#fff;margin:15px auto;text-align:center}#nobootstrap .admin-box1{background-color:#F8F8F8;width:48.1%;float:left;padding:0;border:1px solid #ccc;font-size:8pt;margin-bottom:20px;border-radius:3px}#nobootstrap .admin-box1 h5{background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);background:-webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#ececec)) repeat scroll 0 0 transparent;color:#333;text-shadow:0 1px 0 #fff;margin:0;padding:0;line-height:29px;padding-left:15px;font-size:12pt;font-weight:normal}#nobootstrap .admin-box2{float:right;padding:0;border:1px solid #CCCCCC;font-size:8pt;margin-bottom:20px;background-color:#f2f2f2;border-radius:3px;width:100%}#nobootstrap .admin-box2 h5{background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);background:-webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#ececec)) repeat scroll 0 0 transparent;color:#333;text-shadow:0 1px 0 #fff;margin:0;padding:0;line-height:29px;padding-left:15px;font-size:12pt;font-weight:normal}#nobootstrap #discover_prestashop{width:48.1% !important;float:right !important}#nobootstrap .admin-home-box-list li img{margin:0 5px}#nobootstrap .admin-home-box-list{padding-left:0;margin:0px;list-style:none}#nobootstrap #prestashop_link{background:transparent none no-repeat 0px 0px}#nobootstrap .admin-home-box-list li{margin:1px;padding:5px 0}#nobootstrap #prestashop_link li{height:58px;margin:0px}#nobootstrap .admin-home-box-list li p{font-family:Georgia, 'Lucida Grande', Arial;font-style:italic;font-size:13px;margin:2px 0;padding:0px 5px 0px 15px}#nobootstrap .admin-home-box-list li a{color:#812143;line-height:18px;font-size:12px;text-align:left}#nobootstrap #prestashop_link li a{color:#3A6EA7;margin-left:15px;font-weight:bold;text-decoration:underline;line-height:18px;font-size:8.5pt;text-align:left;float:left}#nobootstrap #table_customer{border:1px solid #ccc;padding:0px;border-spacing:0px;border-radius:3px;background-color:#fff}#nobootstrap #table_customer thead span{background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);background:-webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#ececec)) repeat scroll 0 0 transparent;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')";color:#000;text-shadow:0 1px 0 #fff;line-height:35px;display:block;height:39px;border-left:none;border-right:none}#nobootstrap #table_customer thead span.first{text-align:center}#nobootstrap #table_customer thead th{margin:0}#nobootstrap #order_id{width:52px;text-align:center}#nobootstrap #order_customer{width:175px}#nobootstrap #order_status{width:130px}#nobootstrap #order_total{width:100px}#nobootstrap .order_action{text-align:center}#nobootstrap #order_line1{background-color:#EFEFEF}#nobootstrap #table_customer tbody{font-size:8pt}#nobootstrap #table_customer tbody tr td.order_td_first{text-align:center;padding:0;height:35px}#nobootstrap #table_customer tbody tr td{border:none;height:35px;font-size:12px}#nobootstrap #table_info_news{width:310px;float:left;padding:1px;border:1px solid #8E8E8E;margin-top:20px;font-size:8pt}#nobootstrap #table_info_news h5{background-color:#7Ab51D;color:#FFFFFF;margin:0;line-height:29px;padding-left:15px;font-size:12pt}#nobootstrap #table_info_news h5 a{color:#FFFFFF;float:right;font-size:8pt;text-decoration:underline;font-weight:normal;padding-right:10px}#nobootstrap #table_info_news ul{list-style:none outside none;padding:0;margin:0}#nobootstrap #block_news_first{background-color:#E1EBD2;padding:5px}#nobootstrap #block_news_first a{color:#812143;font-weight:bold;text-decoration:underline;line-height:18px}#nobootstrap #block_news_first p{line-height:12px;padding-left:10px;margin:0}#nobootstrap #block_news_first p a{color:#812143;font-weight:bold;margin-right:8px;margin-left:200px}#nobootstrap #table_info_news ul li a{line-height:25px;padding-left:10px;margin:0;text-decoration:underline}#nobootstrap .block_news_odd{background-color:#DEDEDE;line-height:25px}#nobootstrap #block_news_last{background-color:#EFEFEF}#nobootstrap #see_newsletter{margin-left:5px;background:url(../img/admin/email.gif) no-repeat left center}#nobootstrap #follow_on_facebook{margin-left:5px;background:url(../img/admin/facebook.jpg) no-repeat left center}#nobootstrap #follow_on_twitter{margin-left:5px;background:url(../img/admin/twitter.jpg) no-repeat left center}#nobootstrap #block_news_last ul li a{color:#812143;padding-left:20px}#nobootstrap .viewed{background:url("../img/admin/enabled.gif") no-repeat left center}#nobootstrap .clear{clear:both}#nobootstrap a.blue{color:blue}#nobootstrap a.blue:hover{color:#0000AA}#nobootstrap .cluetip-help-button{width:auto;text-align:left;background-color:white;padding:10px;border:1px solid gray;background:#f1f2f4 url(../img/admin/block_bg.jpg) repeat-x scroll left bottom;opacity:0.75}#nobootstrap .ac_results ul{list-style:none;text-align:left;background:white;padding:0}#nobootstrap .ac_results li{padding:5px}#nobootstrap .ac_even{background:#EFEFEF}#nobootstrap .ac_over{background:#ECEADE;color:#585A69}#nobootstrap .button-translate{padding:0px;margin:0 0 0 10px;height:15px;width:15px;cursor:pointer}#nobootstrap #importList label{float:none}#nobootstrap #importList ul{list-style-type:none}#nobootstrap .multishop_config{position:absolute;margin-left:-10px}#nobootstrap .multishop_config div{background-color:#DFFAD3;border:1px solid #DFD5C3;display:none;margin-top:2px;padding:5px;width:200px}#nobootstrap .multishop_product_checkbox{position:absolute}#nobootstrap a.action_module_delete{color:#CB1C00;text-decoration:underline;margin-right:30px}#nobootstrap .select_theme{text-align:center;width:220px;float:left;margin:10px;padding:10px;cursor:pointer;border:1px solid #FFFFF0;color:#000000;font-weight:bold}#nobootstrap .select_theme_choice{background-color:#FAEEC2;border:1px dotted #000000}#nobootstrap fieldset .optionsDescription,#nobootstrap fieldset p.description,#nobootstrap .info{background:url("../img/admin/icon-info.png") no-repeat scroll 6px 6px #bde5f8;border:1px solid #00529B;color:#00529B;font-family:Arial,Verdana,Helvetica,sans-serif;font-size:12px;margin-bottom:15px;padding:10px 5px 5px 40px;border-radius:3px;min-height:32px}#nobootstrap fieldset .optionsDescription ul li{color:#00529B;margin:0;padding:0}#nobootstrap p.product_description{font-family:Georgia, Arial, 'sans-serif';font-style:italic;clear:both;text-align:left;color:#7F7F7F;text-align:right}#nobootstrap p.preference_description{font-family:Georgia, Arial, 'sans-serif';font-style:italic;clear:both;text-align:left;width:500px;color:#7F7F7F;font-size:11px}#nobootstrap p.preference_description .light-warning{color:red;font-weight:bold}#nobootstrap .preference_default_multishop{float:left;padding-right:5px;margin-top:4px}#nobootstrap .multishop_warning{background-image:url("../img/admin/warning.gif");background-repeat:no-repeat;color:#FE2744;font-weight:bold;padding-left:22px;padding-top:1px}#nobootstrap .warning_mod_rewrite{background:#feefb3 url(../img/admin/warning.gif) 2px 0 no-repeat;color:#9E6014;font-weight:bold;padding-left:22px;padding-top:2px;padding-bottom:2px;padding-right:5px;height:20px;line-height:20px}#nobootstrap label.conf_title{width:235px}#nobootstrap input.disable_me[disabled=disabled]{background-color:red}#nobootstrap div.progressBarImage{float:left;height:15px;margin-left:3px;width:233px}#nobootstrap #showCounter{font-weight:bold;float:left;margin-left:25px;margin-top:1px}#nobootstrap #listImage{list-style:none outside none;margin-bottom:10px;margin-top:10px}#nobootstrap #listImage li{clear:both;float:left;font-weight:bold;margin-top:10px}#nobootstrap #listImage li p.errorImg{background:none repeat scroll 0 0 #FAE2E3;border:1px solid #EC9B9B;clear:both;margin-bottom:18px;padding:6px;display:none}#nobootstrap #progressBarImage div.ui-progressbar-value{height:100%}#nobootstrap #createImageDescription ul.smallImage li{list-style-type:none;display:block;text-align:center;float:left;margin-bottom:15px;margin-right:20px}#nobootstrap #menu .submenu_size .submenu{display:none;position:absolute}#nobootstrap #menu .submenu_size:hover>.submenu{display:block}#nobootstrap .submenu li{float:none;clear:left}#nobootstrap #fancybox-content{text-align:left}#nobootstrap #customers{display:block;position:relative}#nobootstrap #customer_form #fieldset_0{text-align:left}#nobootstrap #customer_part #customers ul{float:left}#nobootstrap #customer_part #customers ul li{background-color:#fff;display:inline;list-style-type:none;float:left;margin:10px;border:1px solid #ccc;padding:5px;width:200px;border-radius:3px}#nobootstrap #customer_part #customers ul li div.customerName{background-color:#eee;font-size:14px;text-shadow:0 1px 0 #fff;padding:2px}#nobootstrap #customer_part #customers ul li div.customerName a{font-weight:bold}#nobootstrap #customer_part #customers ul li div.customerName .customerBirthday{font-size:12px;float:right}#nobootstrap #customer_part #customers ul li div.customerEmail a{font-size:12px;color:#666666;display:block;line-height:20px}#nobootstrap #customer_part #customers ul li a.id_customer.button{float:right}#nobootstrap #products_part #products_found{display:none}#nobootstrap #vouchers_part #voucher_list{display:none}#nobootstrap #vouchers_part #vouchers_err{display:none}#nobootstrap #address_part #address_delivery,#nobootstrap #address_part #address_invoice{width:400px;float:left}#nobootstrap #address_part #address_delivery h3,#nobootstrap #address_part #address_invoice h3{margin-top:0}#nobootstrap #address_part #address_delivery{border-right:1px solid #cccccc}#nobootstrap #address_part #address_invoice{border-left:1px solid #ffffff;padding-left:20px}#nobootstrap #address_part #address_delivery_detail,#nobootstrap #address_invoice #address_invoice_detail{font-size:12px;line-height:18px;color:#585A69;padding:10px 0}#nobootstrap #address_part a#new_address{clear:both;float:left;margin:20px 0}#nobootstrap #summary_part b{float:left;display:block;border:1px solid red}#nobootstrap #summary_part #total_products,#nobootstrap #summary_part #total_vouchers,#nobootstrap #summary_part #total_shipping,#nobootstrap #summary_part #total_without_taxes,#nobootstrap #summary_part #total_taxes,#nobootstrap #summary_part #total_with_taxes{font-size:20px;font-weight:normal;color:#000}#nobootstrap #summary_part .currency_sign{font-weight:normal}#nobootstrap #summary_part .order_message_right{float:left;border-left:1px solid #ccc}#nobootstrap #cart_summary{float:left;border-right:1px solid #fff;width:400px}#nobootstrap #cart_summary ul li{float:left;position:relative;width:185px;margin-bottom:20px;padding:5px}#nobootstrap #cart_summary ul li .total_cart{display:block;font-size:12px}#nobootstrap #loader_container{display:none;z-index:100;position:absolute;top:0;left:0;height:100%;width:100%;background:transparent url("../img/bg_loader.png") repeat 0 0}#nobootstrap #loader{display:none;margin:0 auto;height:24px;width:24px;color:#fff;background:url(../img/loader.gif)}#nobootstrap ul.connectedSortable{padding-left:0}#nobootstrap ul.connectedSortable li.module_list{margin:0 5px 5px 5px;padding:5px;font-size:1.2em;border:1px solid #CCC;background:#F6F6F6;font-weight:bold;color:#1C94C4;outline:none}#nobootstrap .input-error{color:#D8000C;font-size:12px;font-weight:normal;margin:0 0 10px 0;line-height:20px;padding:10px 15px;display:none}#nobootstrap #CustomerThreadContacts div.blocSAV{float:left;margin:0 10px 10px 0;min-height:178px;width:24%;border:1px solid #ccc;background-color:#f8f8f8}#nobootstrap #MeaningStatus{float:left}#nobootstrap #CustomerThreadContacts p{font-family:Georgia,Arial, Helvetica;font-style:italic;overflow:hidden;font-size:13px;line-height:18px;height:45px;margin:0;padding:10px;border-top:1px solid #fff;border-bottom:1px solid #ccc;text-align:center;margin:0 auto}#nobootstrap #CustomerThreadContacts .message-mail{display:block;text-align:center;padding:25px 10px;border-top:1px solid #fff;margin:0 auto}#nobootstrap #CustomerThreadContacts h3{font-size:16px;font-weight:normal;overflow:hidden;line-height:25px;height:25px;margin:0;padding:5px 10px;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);background:-webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#ececec)) repeat scroll 0 0 transparent;border-bottom:1px solid #ccc}#nobootstrap #CustomerThreadContacts a{padding:0 5px;display:block;height:23px;line-height:23px;border:0}#nobootstrap #CustomerThreadContacts h4{margin:0;line-height:23px;height:23px;border:0;padding:0 5px}#nobootstrap #CustomerThreadContacts div#CustomerService{float:left;background:none;border:none;width:24%}#nobootstrap #CustomerThreadContacts div#CustomerService table.table{width:100%}#nobootstrap #CustomerThreadContacts div#CustomerService table.table thead{margin:0;line-height:23px;height:23px;border:0;padding:0 5px;font-weight:bold;text-align:center}#nobootstrap #CustomerThreadContacts div#CustomerService table.table tr td span{font-weight:bold;font-size:14px}#nobootstrap #CustomerThreadContacts div#MeaningStatus{float:left}#nobootstrap #ChangeStatus{float:right;margin:20px 20px 0 0;right:10px}#nobootstrap #CustomerService table{border-collapse:collapse}#nobootstrap #CustomerService .table tr.alt_row{background-color:#EFF4F9}#nobootstrap #CustomerService .table tr td{border:none}#nobootstrap div#scrollTop a{display:none;background:url("../img/admin/scroll_top.png");width:40px;height:40px;position:fixed;bottom:30px;right:30px;border-radius:10px;opacity:0.2}#nobootstrap div#scrollTop a:hover{opacity:0.8}#nobootstrap .loader{display:none;margin:450px 0 0 440px;height:128px;width:128px;color:#fff;background-image:url(../img/loader.gif)}#nobootstrap .category-filter{background-color:#dde0e9;padding:5px 10px;min-height:20px}#nobootstrap .category-filter span{float:left;line-height:18px;color:#585A69}#nobootstrap .category-filter a{color:#585A69;float:left;line-height:20px;padding:0 5px}#nobootstrap .category-filter #filternameForm{float:left;margin-left:10px;color:#585A69}#nobootstrap .current-edit{background-color:#e9f1f6}#nobootstrap .edit-note{width:98%;height:100px}#nobootstrap .payment_information{background-color:#bde5f8}#nobootstrap #conditions .condition_separator{font-size:16px;margin:10px 0}#nobootstrap #conditions .condition_group h3{margin:0 0 10px 0}#nobootstrap #conditions a#add_condition_group{font-size:16px}#nobootstrap #conditions #condition_list .row{position:relative;height:25px;padding:10px 0;background-color:transparent}#nobootstrap #conditions #condition_list h4{margin:0 0 10px 0}#nobootstrap #conditions #condition_list select{float:left;margin-right:10px;width:200px}#nobootstrap #conditions #condition_list a{float:left}#nobootstrap .container-command{width:100%}#nobootstrap .container-command-top-spacing{margin-top:25px}#nobootstrap .bloc-command{background-color:#EBEDF4;border:1px solid #CCCED7;margin-bottom:10px}#nobootstrap .button-command{float:right;padding:10px}#nobootstrap .button-command-prev-next{float:right;margin-bottom:10px;margin-right:10px}#nobootstrap .history-status{border-radius:0}#nobootstrap .history-status tr th{background:#eee none}#nobootstrap .metadata-command dl{float:left;margin-left:10px}#nobootstrap .metadata-command dl dt,#nobootstrap .metadata-command dl dd{color:#585A69;float:left;margin:0;padding-right:10px}#nobootstrap .metadata-command dl dd{font-weight:bold}#nobootstrap #content #customers .warn{margin:10px 0 0 0}#nobootstrap #customers li{background-color:#ABDFF7;border:1px solid #ccc;float:left;margin:5px;padding:5px}#nobootstrap #customers li .button{display:block;margin-top:5px}#nobootstrap #container-customer{background-color:#EBEDF4;border:1px solid #CCCED7;color:#585A69;padding:10px}#nobootstrap #container-customer h2{color:#000;font-weight:normal;margin:0}#nobootstrap #container-customer h2 img{margin-right:5px}#nobootstrap #container-customer .info-customer-left{float:left;width:47%;min-height:120px;border-right:1px solid #fff;padding-right:15px}#nobootstrap #container-customer .info-customer-right{float:left;width:49%;border-left:1px solid #ccc;min-height:120px;padding-left:15px}#nobootstrap #container-customer .info-customer-left h2,#nobootstrap #container-customer .info-customer-right h2{margin-bottom:7px}#nobootstrap .infoCustomer dl{margin:7px 0}#nobootstrap .infoCustomer dl dt{font-weight:bold;float:left;padding-right:5px}#nobootstrap .infoCustomer dl dd{margin:0;padding:0}#nobootstrap #container-carts{background-color:#EBEDF4;border:1px solid #CCCED7;padding:10px}#nobootstrap #cart_rule_form h4{font-size:18px;font-weight:normal;margin-top:0}#nobootstrap #ajax_running{display:none;position:fixed;top:0;left:40%;z-index:10000;background-color:#FFF1A8;border:1px solid #FFD96F;color:#000;font-weight:bold;font-size:14px;padding:5px 20px;border-radius:0 0 3px 3px;-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;width:300px}#nobootstrap #container_category_tree{border:1px solid #ccc;border-radius:3px;padding:5px}#nobootstrap #container_category_tree a{font-weight:bold}#nobootstrap #container_category_tree a input{margin-right:3px}#nobootstrap #block_tips{float:right;width:48.1%}#nobootstrap #block_discover{float:left;width:48.1%}#nobootstrap #block_partner_tips{float:right;width:48.1%}#nobootstrap .row-news{width:100%;float:left}#nobootstrap #table_info_news{border:1px solid #ccc}#nobootstrap .multishop-left{float:left;width:250px;border:1px solid #CCCED7;background-color:#F9F9F9;overflow:auto;padding:3px;max-height:400px;min-height:200px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}#nobootstrap .multishop-left .multishop-title{border-bottom:1px solid #CCCED7;color:#333333;background-color:#F0F0F0;font-size:14px;font-weight:bold;text-align:left;padding:2px;width:247px}#nobootstrap .multishop-right{margin-left:270px}#nobootstrap #container-multishop{background-color:#EBEDF4;border:1px solid #CCCED7;color:#585A69;padding:10px}#nobootstrap #multishop-tree{font-size:13px;margin-top:3px;background-color:#F9F9F9}#nobootstrap #multishop-tree a.selected{background-color:#49B2FF;padding:3px;color:#FFFFFF}#nobootstrap .datepicker{position:relative;z-index:20}#nobootstrap #BoxUseSpecialSyntax{position:fixed;z-index:10;width:100%;bottom:50px;display:none}#nobootstrap #BoxUseSpecialSyntax .warn{margin:0 auto;width:500px}#nobootstrap #BoxUseSpecialSyntax ul{margin-left:30px;list-style-type:disc}#nobootstrap .id_customization .customization_field{min-width:205px;width:205px} +/* CSS Admin PrestaShop */ +* {font-family: Arial,Verdana,Helvetica,sans-serif} + +body { + margin: 0; + padding: 0; + font-size: 12px; + color: #000; +/* text-align: center; + behavior: url(csshover.htc); */ +} + +.float {float:left} +.floatr {float:right} + +a img { + border: 0; +} + +a { + color: #000; + text-decoration: none; + outline: 0pt; +} + +a:hover { + color: #222; + text-decoration: none; +} + +a.link, a.link:hover { + color: #999999; +} +a.link { + text-decoration: underline; +} +.warn a{ + text-decoration: underline; +} + +img { + vertical-align: middle; +} + +input { + vertical-align: middle; +} + +p { + margin: 0.5em 0; + color:#585A69; +} + +hr { + border: none; + padding: 0; + margin-top: 10px; + margin-bottom: 10px; +} + +.block { + display: block; +} + +/* FONTS */ + +.bold { + font-weight: bold; +} + +legend, th { + font-family : Arial,Helvetica,sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family : Arial,Helvetica,sans-serif; +} + +h1 { + font-size: 1.6em; + margin: 0 0 .67em 0; +} +h2 { + font-size: 1.4em; +} +h3 { + font-size: 1.1em; +} +h4 { +} +h5 { + font-size: 0.83em; +} +h6 { + font-size: 0.67em; +} + +h3.blue { + color: #268CCD; +} + +.red { + color: red; +} + +form { + margin: 0; + padding: 0; +} + +form p { + margin: 0.5em 0 0 0; + padding: 0 0 0.5em 0; +} + +form sup { + color: #CC0000; + font-weight: bold; + vertical-align: text-top; +} +form .simulate-disable-input{ + min-width:127px; + display:inline-block; + padding:3px; + border:1px solid #E0D0B1; + background-color:#dddddd; + color:#666666; + font-size:12px; +} + +.block-mail { + margin:0 0 20px 0; +} +.mail-form { + margin:0 0 0 220px; + width:auto; + color: #7F7F7F; + font-size: 0.85em; +} +.label-subject { + padding:0; + margin:0 0 10px 0; + text-align:left; +} +.label-subject input{ + width:555px; +} +.mail-label table { + width:555px; +} +.mails_field { + margin:0; + background: none repeat scroll 0 0 #FFF; + border: 1px solid #CCCCCC; + font-size: 1.1em; + margin: 20px 0 20px 0; + padding:0; + position:relative; + border-radius:3px; +} + +.mails_field h3{ +background: -moz-linear-gradient(center top , #F9F9F9, #ECECEC) repeat-x scroll left top #ECECEC; + color: #333333; + font-size: 13px; + padding: 4px 6px; + text-align: left; + text-shadow: 0 1px 0 #FFFFFF; + margin:0; + font-size:1em; + padding: 10px 5px; + display:block; +} + +.style-themeModuleMail { + margin: 0; + padding: 0.2em 0.5em; + border: 1px solid #DFD5C3; + background: #FFF6D3; + font-weight: bold; + text-align: left; + cursor : pointer; + font-size: 12px; +} + +.style-themeModuleName { + margin: 0; + padding: 0.2em 0.5em; + border: 1px solid #DFD5C3; + background: #FFF6D3; + font-weight: bold; + text-align: left; + cursor : pointer; + font-size: 12px; +} + +.margin-form { + padding: 0 0 1em 260px; + color: #7F7F7F; + font-size: 0.85em; +} + + +.margin-form .normal-text { + display: block; + padding-top: 0.2em; + font-size: 1.2em; + color: black; +} + +fieldset.width1 .margin-form { + margin: 0 0 1em 130px; +} + +fieldset img { + padding: 0 4px 0 0; + vertical-align: bottom; +} + +label { + float: left; + width: 250px; + padding: 0.2em 0.5em 0 0; + text-align: right; + font-weight: bold; +} + +#preview_import label { + float:left; + font-weight:bold; + padding:0.2em 0 0; + text-align:left; + width:320px; +} + +label.t { + float: none; + clear: none; + padding: 0 5px 0; + margin: 0px; + font-weight: normal; + font-size: 12px; + text-shadow:none; +} +label.child { + float: none; + clear: none; + padding: 0px; + margin: 0px; + font-weight: normal; + font-size: 12px; +} +label.std { + float: none; + margin: 0px; + width: 170px; + display: block; + font-size: 12px; + text-align: right; + font-weight: bold; +} +form div.std { + margin-top: -2em; +} + +fieldset.width1 label { + width: 110px; +} + +label:after { + clear: both; +} + +input, textarea, option { + color: #000; + font-size: 12px; + margin: 0; + padding: 0; +} + +input[type="text"], input[type="password"], input[type="file"], textarea { + padding: 2px 4px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset; +} + +input[type="radio"], input[type="checkbox"] { + background-color:transparent; +} + +input:focus, textarea:focus { + border:1px solid #3293D6; +} + +fieldset { + _position: relative; +} + +legend { + _position: relative; + _top: -2em; + _margin-top: 12px; +} +select optgroup { + background: #fff; + padding: 2px; + color: #000 +} +select optgroup option { + padding: 0 9px; + color: #000 +} + +.lab_modules_positions { + float: none; + text-align: left; + font-weight: normal; + padding: 0; + cursor: pointer; + display: block; + width: 500px; +} + +.lab_modules { + float: none; + text-align: left; + font-weight: normal; + padding-left: 10px; + cursor: pointer; + display: block; + width: 500px; +} + +.lab_modules_positions img { + float:left; + width:32px; + height:32px; +} + + +/* STRUCTURE */ + +#container { + + margin: 0 auto 2em auto; + text-align: left; +} + +#main { + clear: left; + min-height: 600px; + background:#fff; + /*border: 1px solid #999; + border-bottom: none;*/ +} + +#content { + padding: 1.25em; + padding-bottom: 0.5em; + position: relative; +} + +#news { + width: 640px; + border: 1px solid #E0D0B1; +} + +#help { + float: right; + width: 150px; + padding: 4px; + border: 1px solid #DFD5C3; + font-size: 0.9em; +} + +#image { + float: none; + padding: 6px; + background: #fff; + border: 1px solid #DFD5C3; + font-size: 0.9em; + text-align: center; +} +#image img { margin: 0; padding: 0 } + +#id_image_attr +{ + list-style: none; +} + +#product_link { + width: 240px; + float: right; + padding: 4px; + margin-top: 8px; + font-size: 0.9em; + text-align: center; + clear: right; +} + +#help:after, +#image:after { + clear: both; +} + +/* NAV */ + +#nav { + float: right; + margin: 1em 0; + font-size: 1.1em; + font-weight: bold; + vertical-align: middle; +} + +#nav li { + display: inline; + list-style: none; + margin: 0 0 0 2em +} + +#nav img { + vertical-align: bottom; +} + +.warn .pico { + vertical-align: middle; + padding: 0; + margin: 0 +} + +#content .alert { + width: auto; + margin: 0 0 15px 0; + padding: 10px 15px; + border-top: 1px solid #DF7B7B; + border-bottom: 1px solid #DF7B7B; + background-color: #FFE6E6; +} + +#content .warning { + margin: 0 0 15px 0; + line-height: 20px; + padding: 10px 20px 10px 20px; + border-top: 1px solid #FF9900; + border-bottom: 1px solid #FF9900; + background-color: #FFEBCC; +} + +#unhook_button_position_bottom { + overflow: hidden; + width: 100%; + padding-top: 10px; +} + +#unhook_button_position_top { + overflow: hidden; + width: 100%; +} + +#content .conf, #content .warn, #content .error { + color:#383838; + font-size:12px; + font-weight:normal; + margin: 0 0 10px 0; + line-height: 20px; + padding: 13px 5px 5px 40px; + min-height:28px; + border-radius:3px; +} + +#content .error-inline { + color:#ff0000; + font-weight:bold; +} + +#content .conf { + background: #DFF2BF url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px; + border: 1px solid #4F8A10; + color:#4F8A10; +} + +#content .conf img, #content .warn img, #content .error img { + margin:0 5px 0 0; +} + +#content .error { + background: #FFBABA url(../img/admin/icon-cancel.png) no-repeat scroll 6px 6px; + border: 1px solid #CC0000; + color:#D8000C; +} + +#content .conf a, #content .warn a, #content .error a { + color:#D8000C; + font-weight: bold; +} +#content .conf a:hover, #content .warn a:hover, #content .error a:hover { + text-decoration: underline; +} + +#ajax_confirmation .error { + background: #FFBABA url(../img/admin/icon-cancel.png) no-repeat scroll 6px 6px; + border: 1px solid #CC0000; + color:#D8000C; + padding:20px 40px; + position:fixed; + bottom:0; + width:100%; + left:0; +} + +#ajax_confirmation .conf { + background: #DFF2BF url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px; + border: 1px solid #4F8A10; + color:#4F8A10; + padding:20px 40px; + position:fixed; + bottom:0; + width:100%; + left:0; +} + +#content .warn { + background: #FEEFB3 url(../img/admin/icon-attention.png) no-repeat scroll 6px 6px; + border: 1px solid #9e6014; + color:#9e6014; +} + +#content .warn h2 { + margin:0; +} + +#content .warn ul li, #content .warn p, #content .warn a { + color:#9e6014; +} + +#content .warn ul li label { + font-weight:normal; + color:#9e6014; + text-shadow:none; +} + +#content .error ol { + clear: both; + margin-top: 5px; + padding-bottom: 0; +} + +#content .error ol li{ + font-weight:200; + margin-left:30px; +} + + +#content .confirm { + background: #DFF2BF url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px; + border: 1px solid #4F8A10; + color:#4F8A10; + border-radius:3px; + +} + + +#content .confirm h3 { + padding: 0 0 0 20px; + background: url(../img/admin/ok.gif) no-repeat 0 0; +} + +#content .warn h3 { + padding: 0 0 0 20px; + background: url(../img/admin/warning.gif) no-repeat 0 0; +} + +#blockNewVersionCheck .warn h3 { + padding: 0 0 0 5px; + margin: 0px; + background: none; +} + +#content .error h3 { + padding: 0 0 0 20px; + background: url(../img/admin/warning.gif) no-repeat 0 0; +} + +/* CONTENT - COLUMN */ + +.column { + float: left; + width: 173px; + margin: 0 50px 1.5em 0; + padding: 10px; + -moz-border-radius: 20px; + text-align: center; +} + +#col_1 { + height: 235px; + color: #FFFFFF; + background: #FF8C76 url(../img/admin/col_1.gif) no-repeat; +} + +#col_2 { + height: 235px; + color: #FFFFFF; + background: #FFC44F url(../img/admin/col_2.gif) no-repeat; +} + +#col_3 { + height: 235px; + color: #FFFFFF; + background: #8CFF70 url(../img/admin/col_3.gif) no-repeat; +} + +/* CONTENT - NEWS */ + +#news img { + padding: 0 6px 0 0; + vertical-align: middle; +} + +#news .infos, +#news .content { + margin: 0; + padding: 4px; + font-family: Arial,Helvetica,sans-serif; + font-weight: normal; +} + +.table tr.last td { + border-bottom: none; +} + +.footer_link, .footer_link:hover { + color: #812143; + font-weight: bold; + text-decoration: underline; +} + +/* CLASS */ + +h3.title { + clear: both; + margin: 0; + padding: 4px 10px; + border: 1px solid #E0D0B1; + border: none; +} + +h3.subtitle { + color: #FF8D42; + font-size: 1.2em; +} + +p.infos { + float: right; + margin: 0; + padding: 0; + font-size: 0.9em; + line-height: 1em; + vertical-align: top; +} + +.width1 { + width: 350px; +} + +.width2 { + width: 500px; +} + +.width3 { + width: 600px; +} + +.width4 { + width: 745px; +} + +.width5 { + width: 655px; +} + +.widthfull { + width: 100%; +} + +tr.deleted td { + background-color: #EEEEEE; +} + +.contextnav { + margin: 10px 0; + padding: 3px 6px; + line-height: 1.30em; + border: 1px solid #E0D0B1; +} + +.contextnav img { + vertical-align: text-top; +} + +.contextnavleft { + float: left; + width: 6em; +} + +.contextnavcenter { + text-align: center; +} + +.contextnavcenter a, +.contextnavcenter b { + letter-spacing: 6pt; +} + +.contextnavright { + float: right; + width: 6em; + text-align: right; +} + +.hidden { + height: 1px; + border-width: 1px 0 0 0; + border-style: solid; + border-color: #fff; +} + +.clear { + clear: both; +} + +.flatclear { + clear: both; + height:0px; + line-height:0px; +} + +.space { + margin-top: 13px; +} + +.pspace { + padding-top: 1em; +} + +.double-space { + margin-top: 2em ; +} + +.space-bottom { + margin-bottom: 1em; +} + +.double-bottom-space { + margin-bottom: 2em ; +} + +.left { + text-align: left; +} + +.center { + text-align: center !important; +} + +.right { + text-align: right; +} + +.small { + font-size: 0.85em; +} + +.row { +} + +.uppercase { + text-transform: uppercase; +} + +.noborder { + border: none; +} + +.highlight { + background-color: #FFFF66; + font-weight: bold; +} + +.discount_name { + background: #FFEBCC; + padding: 2px; + text-transform: uppercase; +} + +.displayed_flag { + float: left; + margin: 4px 0 0 4px; +} + +.language_flags { + display: none; + float: left; + background: #FFF; + margin: 4px; + padding: 8px; + width: 80px; + border: 1px solid #555; +} + +.pointer { + cursor: pointer; +} + +.imgm { + margin: 3px 0px 3px 0px; +} + +.green { + color: forestgreen; +} + +.bullet { + display: list-item; + list-style: disc; + margin-left: 30px; +} + +/* access management */ +#ajax_confirmation { + padding-top: 3px; + padding-bottom: 6px; +} + +/* help boxes */ +.hint { + display: none; + position: absolute; + margin-top: 4px; + margin-bottom: 2px; + border: 1px solid #00529B; + padding:15px 5px 15px 40px; + color: #00529B; + background: #BDE5F8 url(../img/admin/icon-info.png) no-repeat 6px 5px; + border-radius:3px; + min-height:15px; + z-index:10; +} +.hint p { + color: #00529B; +} + +.hint .addImageDescription { + font-weight:bold; + font-size:16px; +} + +span.hint {position: relative;} + +div.hint { + position: relative; +} + +div.hint ul li { + color: #00529B; + padding-left: 5px; +} + +table tr th .hint { + display: none; + position: absolute; + margin: 30px 5px 5px 5px; + width: 400px; + border: 1px solid #ECE52F; + padding: 8px 6px 8px 34px; + color: #383838; + background: #FFFBE5 url(../img/admin/icon-info.png) no-repeat 6px 5px; + border-radius:3px; +} + +.hintGroup{ + position: relative; + margin-top: 10px; + margin-bottom: 10px; + border: 1px solid #50B0EC; + padding: 8px 6px 8px 40px; + color: #383838; + background: #DDE9F7 url(../img/admin/help2.png) no-repeat 6px 5px; +} + + +/* The pointer image is added by using another span */ +.hint .hint-pointer { + position: absolute; + left: -10px; + top: 5px; + width: 10px; + height: 19px; +} + +#flagsLanguage img { + padding: 3px; + margin-bottom: -4px; +} + +#flagsLanguage .selected_language { + border: 1px solid #BBB; + padding: 2px; + margin-bottom: -4px; +} + +.disable, .disable:hover { + background-color: #CCCCCC; + color: #AAAAAA; +} + +/* Ajax classes */ +.ajax-warning, .ajax-success, .ajax-error { + border: 1px solid #CCCCCC; + padding: 5px 20px; + margin: 5px; + width: 70%; +} +.ajax-warning { + background-color: #FFBD6F; +} +.ajax-success { + background-color: #9FDF8B; +} +.ajax-error { + background-color: #FF7F84; +} +.ajax-loader { + margin: 5px 10px; +} + +/* tab: AdminProducts */ +.productFieldComment { + color: #7F7F7F; + font-size: 0.8em; +} + +/* Confirm box */ +a.confirm_yes, a.confirm_no { + width: 50px; + margin-left: 60px; + padding: 10px; + border-style: solid; + border-width: 1px; + text-align: center; + font-weight: bold; + color: white; +} +a.confirm_yes { + border-color: red; + background-color: red; +} +a.confirm_no { + border-color: green; + background-color: green; +} + +/* tab: AdminImport */ + +form#import_form { + padding-bottom:22px; + margin-left:15px; + margin-bottom:20px; +} +.table_overflow { + width:900px; + height:500px; + overflow:auto; +} + +.new_message{ + background-color:#FFE35C; +} +.myDragClass { + background-color: #FFAA55; +} +.dragHandle{ +cursor: move; +} + +p#mailResultCheck{ + margin:2px 0; + padding-left:18px; + font-size:12px; +} + +p.ok{ + background:url('../img/admin/enabled.gif') no-repeat top left; + color:green; +} + +p.fail{ + background:url('../img/admin/disabled.gif') no-repeat top left; + font-weight:bold; + color:red; +} +#lang_pack_msg { + border: 1px solid #DFD5C3; + padding:10px; + margin-bottom:10px; +} + +/* TinyMCE */ +span.defaultSkin .mceToolbar { height: auto } +span.defaultSkin table.mceLayout tr.mceFirst td { float: left } + +/* webservice */ +table.permissions { + border:1px solid #DFD5C3; +} +table.permissions th { + background:#FFF6D3; + text-align:center; + height:20px; +} +table.permissions td { + padding:5px; + text-align:center; +} + +/* */ +.path_bar{ + background-color:#EFEFEF; + font-family:Arial; + font-size:13px; + margin-bottom:20px; + padding:5px; +} + +.path_bar a{ + font-weight:700; +} +.adminHeader h1{ + font-family:Arial; + color:#812143; + font-size:18pt; + margin: 0; +} + +#adminHeader hr{ + background-color: #812143; + margin: 0; +} + +#header_shoplist{ + background-image: url("../img/t/AdminShop.gif"); + background-position: 0 3px; + background-repeat: no-repeat; + padding-left: 17px; + height: 20px; +} + + #header_shoplist select.shopList option{ + padding: 2px; + } + + #header_shoplist select.shopList .first{ + font-weight: bold; + background-color: #408BD5; + color: #ffffff; + } + + #header_shoplist select.shopList .group{ + font-weight: bold; + font-style: italic; + padding-left: 10px; + background-color: #C6DEFC; + } + + #header_shoplist select.shopList .shop{ + padding-left: 20px; + background-color: #EAF2FC; + } + +.multishop_info{ + margin-top: 4px; + margin-bottom: 10px; + border: 1px solid #00529B; + padding: 13px 5px 0 40px; + color: #00529B; + background: #BDE5F8 url(../img/admin/icon-info.png) no-repeat 6px 5px; + border-radius:3px; + min-height:32px; +} + +.assoShop{ + width: 100%; + max-width: 600px; + max-height: 300px; + overflow: auto; +} + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +.clearfix { + display: inline-block; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} + +#adminHeader #help_img{ + float: right; + margin-top: 5px; +} +#adminpresentation{ + position:relative; + width:100%; +} + +#listpresentation{ + float: left; + width: 100px; +} + +#iframe{ + width: 450px; + height: 220px; + float: left; + margin: 10px; + background: #DDD; + border: 1px solid #666; +} + +#adminpresentation ul li{ + list-style: none; +} + +#list_video{ + float: left; + width: 220px; +} + +#list_video h3{ + color: #882F4F; + font-size: 12pt; + padding-top: 25px; + margin: 0; +} + +#list_video ul{ + text-align: left; + padding: 0; + margin: 0; +} + +#list_video ul li{ + float: left; + width: 195px; + text-decoration: underline; + padding-left: 25px; + margin-top: 5px; +} + +#footer {padding-top:5px} + +#footer_iframe_home{ + position:absolute; + top:0; + right:0; +} + +#footer_iframe_home label{ + float: none; + color: #585A69; + font-weight:normal; + line-height: 15px; +} + +#footer_iframe_home input{ + margin-left: 10px; +} + +#footer_iframe_home a{ + float: right; + margin: 0px 15px 0px 0px; + text-decoration: underline; + color: #903E5B; +} + +#column_left{ + width: 49.1%; + float: left; + padding-top: 5px; +} + +#column_right{ + width: 49.1%; + float: right; + padding:0; +} + +#column_right .table_info { + width:48.1%; + float:left; +} + +#column_right #table_info_last.table_info { + width:48.1%; + float:right; +} + + +.F_list{ + list-style: none; + padding: 0; + margin: 0; +} + + +#first_block a, #second_block a, #third_block a, #fourth_block a, +#fifth_block a, #sixth_block a, #seventh_block a, #eighth_block a{ background: #F8F8F8 none no-repeat scroll center 25px;} + +#first_block a{ + background-image: url('../img/admin/package_go.png'); +} + +#second_block a{ + background-image: url('../img/admin/cart_add.png'); +} + +#third_block a { + background-image: url('../img/admin/book.png'); +} + +#fourth_block a{ + background-image: url('../img/admin/package_add.png'); +} + +#fifth_block a{ + background-image: url('../img/admin/plugin_add.png'); +} + +#sixth_block a{ + background-image: url('../img/admin/cart_remove.png'); +} + +#seventh_block a { + background-image: url('../img/admin/page_white_add.png'); +} + +#eighth_block a{ + background-image: url('../img/admin/abandonedcart.png'); +} + +.F_list li{ + float: left; + margin-right:15px; + margin-bottom:15px; + display: block; +} + +.F_list li h4{ + width: 95px; + font-size: 11px; + font-weight:normal; + margin-top: 55px; + margin-bottom: 0; + line-height: 15px; +} + +.F_list a{ + float:left; + color: #333; + width: 95px; + border: 1px solid #ccc; + padding: 5px; + height: 95px; + text-align:center; + border-radius:3px; +} + +.F_list a:hover{ + border:1px solid #666; +} + +.F_list li p{ + font-size: 8pt; + display:none; +} + +.table_info{ + float: left; + padding:0; + margin:0; + border: 1px solid #ccc; + border-radius:3px; + background-color:#fff; +} + +.table_info h5{ + font-size:16px; + font-weight:normal; + color:#000; + margin:0; + padding:6px; + text-shadow:0 1px 0 #fff; + display:block; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC'); /* IE6 & IE7 */ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"; /* IE8 */ +} + + +.table_info h5 a, +.admin-box1 h5 a{ + color: #000; + font-size: 8pt; + float: right; + text-decoration: underline; + font-weight: normal; + padding-right: 10px; +} + +.admin-box2 h5 a{ + color: #FFFFFF; + font-size: 8pt; + float: right; + text-decoration: underline; + font-weight: normal; + padding-right: 10px; +} + +.admin-box1 a#optimizationTipsFold img { + padding:5px 0; +} + + + +#table_info_last{ + margin-left: 0; + float: left; +} + +.table_info_details{ + border-collapse: collapse; + border: none; +} + +.table_info_details tr{ + height: 30px; + width: 290px; + color: #000000; + font-weight: bold; + padding-left: 5px; + width: 100%; + text-align: center; + border: none; +} + +.tr_odd { + background-color:#eff4f9; +} + + +.table_info_details tr td.td_align_left{ + font-weight:normal; + text-align: left; + padding-left: 10px; + font-size:13px; +} + +.table_info_details tr td{ + font-size:16px; + text-align: right; + padding-right: 10px; + white-space: nowrap; +} + +#table_info_large{ + margin-top: 20px; + margin-bottom: 20px; + width: 100%; + float: left; + padding: 0; + border: 1px solid #ccc; + border-radius:3px; + background-color:#fff; +} + +#table_info_large h5{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC'); /* IE6 & IE7 */ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"; /* IE8 */ + color: #000; + margin: 0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; + font-weight: normal; + display:block; +} + +#table_info_large h5 a{ + color: #000; + float: right; + font-size: 8pt; + text-decoration: underline; + font-weight: normal; + padding-right: 8px; +} + +#stat_google{ + width: 586px; + height: 175px; + background-color: #fff; + margin: 15px auto; + text-align: center; +} + +.admin-box1{ + background-color:#F8F8F8; + width: 48.1%; + float: left; + padding: 0; + border: 1px solid #ccc; + font-size: 8pt; + margin-bottom: 20px; + border-radius:3px; +} + +.admin-box1 h5{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + color: #333; + text-shadow: 0 1px 0 #fff; + margin: 0; + padding:0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; + font-weight:normal; + +} + +.admin-box2{ + float: right; + padding: 0; + border: 1px solid #CCCCCC; + font-size: 8pt; + margin-bottom: 20px; + background-color: #f2f2f2; + border-radius:3px; + width:100%; +} + +.admin-box2 h5{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + color: #333; + text-shadow: 0 1px 0 #fff; + margin: 0; + padding:0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; + font-weight:normal; +} + +#discover_prestashop { width:48.1% !important; float:right !important;} + +.admin-home-box-list li img{ + margin: 0 5px; +} +.admin-home-box-list{ + padding-left:0; + margin: 0px; + list-style: none; +} + +#prestashop_link{ + background: transparent none no-repeat 0px 0px; +} + +.admin-home-box-list li{ + margin: 1px; + padding:5px 0; +} + +#prestashop_link li{ + height: 58px; + margin: 0px; +} + +.admin-home-box-list li p{ + font-family: Georgia, 'Lucida Grande', Arial; + font-style:italic; + font-size:13px; + margin: 2px 0; + padding: 0px 5px 0px 15px; +} +.admin-home-box-list li a{ + color: #812143; + line-height: 18px; + font-size: 12px; + text-align: left; +} + +#prestashop_link li a{ + color: #3A6EA7; + margin-left: 15px; + font-weight: bold; + text-decoration: underline; + line-height: 18px; + font-size: 8.5pt; + text-align: left; + float:left; +} + +#table_customer{ + border:1px solid #ccc; + padding: 0px; + border-spacing: 0px; + border-radius:3px; + background-color:#fff; +} + +#table_customer thead span{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC'); /* IE6 & IE7 */ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"; /* IE8 */ + color: #000; + text-shadow: 0 1px 0 #fff; + line-height: 35px; + display: block; + height: 39px; + border-left: none; + border-right: none; +} + +#table_customer thead span.first{ +text-align: center; +} + +#table_customer thead span.last{ +} + +#table_customer thead th{ + margin: 0; +} + +#order_id{ + width: 52px; + text-align: center; +} + +#order_customer{ + width: 175px; +} + +#order_status{ + width: 130px; +} + +#order_total{ + width: 100px; +} + +.order_action{ + text-align: center; +} + +#order_line1{ + background-color: #EFEFEF; +} + +#table_customer tbody{ + font-size: 8pt; +} + +#table_customer tbody tr td.order_td_first{ + text-align: center; + padding: 0; + height: 35px; +} + +#table_customer tbody tr td{ + border: none; + height: 35px; + font-size:12px; +} + +#table_info_news{ + width: 310px; + float: left; + padding: 1px; + border: 1px solid #8E8E8E; + margin-top: 20px; + font-size: 8pt; +} + +#table_info_news h5{ + background-color: #7Ab51D; + color: #FFFFFF; + margin: 0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; +} + +#table_info_news h5 a{ + color: #FFFFFF; + float: right; + font-size: 8pt; + text-decoration: underline; + font-weight: normal; + padding-right: 10px; +} + +#table_info_news ul{ + list-style: none outside none; + padding: 0; + margin: 0; +} + +#block_news_first{ + background-color: #E1EBD2; + padding: 5px; +} +#block_news_first a{ + color: #812143; + font-weight: bold; + text-decoration: underline; + line-height: 18px; +} + +#block_news_first p{ + line-height: 12px; + padding-left: 10px; + margin: 0; +} + +#block_news_first p a{ + color: #812143; + font-weight: bold; + margin-right: 8px; + margin-left: 200px; +} + +#table_info_news ul li a{ + line-height: 25px; + padding-left: 10px; + margin: 0; + text-decoration: underline; +} + +.block_news_odd{ + background-color: #DEDEDE; + line-height: 25px; +} + +#block_news_last{ + background-color: #EFEFEF; +} + +#see_newsletter{ + margin-left: 5px; + background: url(../img/admin/email.gif) no-repeat left center; +} + +#follow_on_facebook{ + margin-left: 5px; + background: url(../img/admin/facebook.jpg) no-repeat left center; +} + +#follow_on_twitter{ + margin-left: 5px; + background: url(../img/admin/twitter.jpg) no-repeat left center; +} + +#block_news_last ul li a{ + color: #812143; + padding-left: 20px; +} + +.viewed{ + background: url('../img/admin/enabled.gif') no-repeat left center; +} + +.clear{ + clear: both; +} + +a.blue { + color:blue; +} + +a.blue:hover { + color:#0000AA; +} + + +/* help cluetip */ +.cluetip-help-button { + width: auto; + text-align:left; + background-color:white; + padding:10px; + border:1px solid gray; + background:#F1F2F4 url(../img/admin/block_bg.jpg) repeat-x scroll left bottom; + opacity:0.75; +} + +.ac_results ul { + list-style: none; + text-align: left; + background: white; + padding: 0; +} +.ac_results li { + padding: 5px; +} +.ac_even { + background: #EFEFEF; +} +.ac_over { + background: #ECEADE; + color:#585A69; +} +.button-translate { + padding:0px; + margin : 0 0 0 10px; + height:15px; + width:15px; + cursor:pointer; +} + +#importList label{ + float: none; +} + +#importList ul{ + list-style-type: none; +} + +.multishop_config{ + position: absolute; + margin-left: -10px; +} + +.multishop_config div{ + background-color: #DFFAD3; + border: 1px solid #DFD5C3; + display: none; + margin-top: 2px; + padding: 5px; + width: 200px; +} + +.multishop_product_checkbox{ + position: absolute; +} + +a.action_module_delete { + color: #CB1C00; + text-decoration: underline; + margin-right: 30px; +} + +.select_theme{ + text-align: center; + width: 220px; + float: left; + margin: 10px; + padding: 10px; + cursor: pointer; + border: 1px solid #FFFFF0; + color: #000000; + font-weight: bold; +} + +.select_theme_choice{ + background-color: #FAEEC2; + border: 1px dotted #000000; +} + +fieldset .optionsDescription, fieldset p.description, .info{ + background: url("../img/admin/icon-info.png") no-repeat scroll 6px 6px #BDE5F8; + border: 1px solid #00529B; + color: #00529B; + font-family: Arial,Verdana,Helvetica,sans-serif; + font-size: 12px; + margin-bottom: 15px; + padding: 10px 5px 5px 40px; + border-radius:3px; + min-height:32px; +} + +fieldset .optionsDescription ul li { + color: #00529B; + margin:0; + padding:0; +} + +p.product_description { +font-family:Georgia, Arial, 'sans-serif'; + font-style:italic; + clear: both; + text-align: left; + color:#7F7F7F; + text-align:right; +} + +p.preference_description{ + font-family:Georgia, Arial, 'sans-serif'; + font-style:italic; + clear: both; + text-align: left; + width: 500px; + color:#7F7F7F; + font-size:11px; +} + +p.preference_description .light-warning { + color: red; + font-weight: bold; +} + +.preference_default_multishop{ + float: left; + padding-right: 5px; + margin-top: 4px; +} + +.multishop_warning { + background-image: url("../img/admin/warning.gif"); + background-repeat: no-repeat; + color: #FE2744; + font-weight: bold; + padding-left: 22px; + padding-top: 1px; +} + +.warning_mod_rewrite{ + background: #FEEFB3 url(../img/admin/warning.gif) 2px 0 no-repeat; + color: #9E6014; + font-weight: bold; + padding-left: 22px; + padding-top: 2px; + padding-bottom: 2px; + padding-right: 5px; + height:20px; + line-height: 20px; +} + + +label.conf_title{ + width: 235px; +} + +.isDisabled{ +} + +input.disable_me[disabled=disabled]{ + background-color: red; +} + +div.progressBarImage +{ + float: left; + height: 15px; + margin-left: 3px; + width: 233px; + position:relative; +} +#showCounter +{ + font-weight: bold; + float: left; + margin-left: 25px; + margin-top: 1px; +} +#listImage +{ + list-style: none outside none; + margin-bottom: 10px; + margin-top: 10px; +} + +#listImage li +{ + clear: both; + float: left; + font-weight: bold; + margin-top: 10px; +} + +#listImage li p.errorImg +{ + background: none repeat scroll 0 0 #FAE2E3; + border: 1px solid #EC9B9B; + clear: both; + margin-bottom: 18px; + padding: 6px; + display: none; +} +#progressBarImage div.ui-progressbar-value +{ + height: 100%; +} + +#createImageDescription ul.smallImage li{ + list-style-type: none; + display: block; + text-align: center; + float: left; + margin-bottom:15px; + margin-right:20px; +} +#menu .submenu_size .submenu { display: none; position:absolute} +#menu .submenu_size:hover > .submenu { display: block; } +.submenu li{float:none;clear:left;} + +#fancybox-content { text-align:left;} + +/*customer_form*/ +#customers { display:block; position:relative;} +#customer_form #fieldset_0 { text-align:left;} +#customer_part #customers ul { + float:left; +} +#customer_part #customers ul li { + background-color:#fff; + display:inline; + list-style-type: none; + float:left; + margin:10px; + border:1px solid #ccc; + padding:5px; + width:200px; + border-radius:3px; + } +#customer_part #customers ul li div.customerName { background-color:#eee; font-size:14px; text-shadow:0 1px 0 #fff; padding:2px; } +#customer_part #customers ul li div.customerName a { font-weight:bold;} +#customer_part #customers ul li div.customerName .customerBirthday { font-size:12px;float:right;} +#customer_part #customers ul li div.customerEmail a { font-size:12px; color:#666666;display: block; line-height: 20px;} +#customer_part #customers ul li a.id_customer.button {float:right;} +#customer_part #customers ul li .id_customer {} + +#products_part #products_found {display:none;} +#vouchers_part #voucher_list {display:none;} +#vouchers_part #vouchers_err {display:none;} + +/*address_part*/ +#address_part #address_delivery, #address_part #address_invoice { width:400px; float:left;} +#address_part #address_delivery h3, #address_part #address_invoice h3 { margin-top:0;} +#address_part #address_delivery {border-right:1px solid #cccccc;} +#address_part #address_invoice { border-left: 1px solid #ffffff; padding-left:20px;} +#address_part #address_delivery_detail, #address_invoice #address_invoice_detail { font-size:12px; line-height:18px; color:#585A69; padding:10px 0;} +#address_part a#new_address {clear:both; float:left; margin:20px 0;} + + +/*summary_part*/ +#summary_part b { float:left; display:block; border:1px solid red;} +#summary_part #total_products, +#summary_part #total_vouchers, +#summary_part #total_shipping, +#summary_part #total_without_taxes, +#summary_part #total_taxes, +#summary_part #total_with_taxes { font-size:20px; font-weight:normal; color:#000;} +#summary_part .currency_sign { font-weight:normal;} +#summary_part .order_message_right { float:left; border-left: 1px solid #ccc; } + +/*cart_summary*/ +#cart_summary { float:left; border-right: 1px solid #fff; width:400px;} +#cart_summary ul li { float:left; position: relative; width:185px; margin-bottom:20px; padding:5px;} +#cart_summary ul li .total_cart { display:block; font-size:12px;} + + +#loader_container { + display:none; + z-index: 100; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background:transparent url('../img/bg_loader.png') repeat 0 0; +} +#loader { + display:none; + margin: 0 auto; + height:24px; + width:24px; + color:#fff; + background:url(../img/loader.gif); +} +ul.connectedSortable +{ + padding-left: 0; +} +ul.connectedSortable li.module_list { + margin: 0 5px 5px 5px; + padding: 5px; + font-size:1.2em; + border:1px solid #CCC; + background:#F6F6F6; + font-weight:bold; + color:#1C94C4; + outline:none; +} + +.input-error +{ + color:#D8000C; + font-size:12px; + font-weight:normal; + margin:0 0 10px 0; + line-height:20px; + padding:10px 15px; + display:none; +} + +/* Customer Thread */ +#CustomerThreadContacts{ + +} + +#CustomerThreadContacts div.blocSAV { + float:left; + margin:0 10px 10px 0; + min-height:178px; + width:24%; + border:1px solid #ccc; + background-color:#f8f8f8; +} + +#MeaningStatus { +float:left; +} + +#CustomerThreadContacts p { + font-family: Georgia,Arial, Helvetica; + font-style:italic; + overflow:hidden; + font-size:13px; + line-height:18px; + height:45px; + margin:0; + padding:10px; + border-top:1px solid #fff; + border-bottom:1px solid #ccc; + text-align:center; + margin:0 auto; +} + +#CustomerThreadContacts .message-mail { + display:block; + text-align:center; + padding:25px 10px; + border-top:1px solid #fff; + margin: 0 auto; +} + +#CustomerThreadContacts h3 { + font-size:16px; + font-weight:normal; + overflow:hidden; + line-height:25px; + height:25px; + margin:0; + padding:5px 10px; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + border-bottom: 1px solid #ccc; +} +#CustomerThreadContacts a { + padding:0 5px; + display:block; + height:23px; + line-height:23px; + border:0; +} +#CustomerThreadContacts h4 { + margin:0; + line-height:23px; + height:23px; + border:0; + padding:0 5px; +} +#CustomerThreadContacts div#CustomerService { + float:left; + background:none; + border:none; + width:24%; +} +#CustomerThreadContacts div#CustomerService table.table { +width:100%; + +} +#CustomerThreadContacts div#CustomerService table.table thead{ + margin:0; + line-height:23px; + height:23px; + border:0; + padding:0 5px; + font-weight:bold; + text-align:center; +} +#CustomerThreadContacts div#CustomerService table.table tr td span{ + font-weight:bold; + font-size:14px; +} + +#CustomerThreadContacts div#MeaningStatus{ + float:left; +} +#ChangeStatus{ + float:right; + margin:20px 20px 0 0; + right:10px; +} +#CustomerService table { +border-collapse: collapse; +} + +#CustomerService .table tr.alt_row { + background-color: #EFF4F9; +} + +#CustomerService .table tr td { + border:none; +} + +/* ScrollTop */ +div#scrollTop a{ + display:none; + background:url('../img/admin/scroll_top.png'); + width:40px; + height:40px; + position:fixed; + bottom:30px; + right:30px; + border-radius:10px; + opacity:0.2; +} +div#scrollTop a:hover{ + opacity:0.8; +} + +.loader{ + display:none; + margin: 450px 0 0 440px; + height:128px; + width:128px; + color:#fff; + background-image:url(../img/loader.gif); +} + +.category-filter { + background-color:#dde0e9; + padding: 5px 10px; + min-height:20px; +} +.category-filter span { float:left; line-height: 18px; color:#585A69;} +.category-filter a { + color:#585A69; + float:left; + line-height:20px; + padding:0 5px; +} + +.category-filter #filternameForm { float:left; margin-left:10px; color:#585A69;} + +.current-edit { background-color: #E9F1F6 } + +.edit-note { width: 98%; height: 100px; } + +.payment_information { background-color: #BDE5F8 } + + +/*conditions*/ +#conditions .condition_group {} +#conditions .condition_separator { font-size:16px; margin:10px 0;} +#conditions .condition_group h3 { margin:0 0 10px 0;} +#conditions a#add_condition_group { font-size:16px;} +#conditions #condition_list {} +#conditions #condition_list .row { position:relative; height:25px; padding:10px 0; background-color:transparent;} +#conditions #condition_list h4 { margin:0 0 10px 0;} +#conditions #condition_list select { float:left; margin-right:10px; width: 200px;} +#conditions #condition_list a { float:left;} + +/*commandes*/ +.container-command {width:100%} +.container-command-top-spacing {margin-top: 25px;} +.bloc-command {background-color:#EBEDF4; border:1px solid #CCCED7; margin-bottom:10px;} +.button-command {float:right; padding:10px;} +.button-command-prev-next {float:right;margin-bottom: 10px; margin-right: 10px} +/*history status*/ +.history-status { border-radius:0;} +.history-status tr th { + background: #eee none; +} +.metadata-command {} +.metadata-command dl { + float:left; + margin-left:10px; +} +.metadata-command dl dt, .metadata-command dl dd { + color:#585A69; + float:left; + margin:0; + padding-right:10px; +} +.metadata-command dl dd { + font-weight:bold; +} + + +#content #customers .warn {margin:10px 0 0 0;} +#customers li {background-color:#ABDFF7;border:1px solid #ccc;float:left;margin:5px;padding:5px;} +#customers li .button {display:block;margin-top:5px;} + + +/*container-customer*/ +#container-customer { + background-color:#EBEDF4; + border:1px solid #CCCED7; + color: #585A69; + padding:10px; +} + +#container-customer h2 { +color:#000; +font-weight:normal; +margin:0; +} + +#container-customer h2 img { +margin-right:5px; +} + +#container-customer .info-customer-left { + float:left; + width:47%; + min-height:120px; + border-right:1px solid #fff; + padding-right:15px; +} + +#container-customer .info-customer-right { + float:left; + width:49%; + border-left:1px solid #ccc; + min-height:120px; + padding-left:15px; + +} + +#container-customer .info-customer-left h2, +#container-customer .info-customer-right h2 { +margin-bottom:7px; +} + +#container-customer a { + +} + +/*infoCustomer*/ +.infoCustomer {} +.infoCustomer dl { margin: 7px 0;} +.infoCustomer dl dt {font-weight:bold; float:left; padding-right:5px;} +.infoCustomer dl dd { margin:0; padding:0;} + +/*container-carts*/ +#container-carts { background-color:#EBEDF4; border:1px solid #CCCED7; padding:10px;} + +/*cart_rule_form*/ +#cart_rule_form {} +#cart_rule_form h4 { font-size:18px; font-weight:normal; margin-top:0;} + +#ajax_running { + display: none; + position: fixed; + top: 0; + left: 40%; + z-index: 10000; + background-color: #FFF1A8; + border: 1px solid #FFD96F; + color: #000; + font-weight: bold; + font-size: 14px; + padding: 5px 20px; + border-radius: 0 0 3px 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + width: 300px; +} + + +#container_category_tree { + border: 1px solid #ccc; + border-radius: 3px; + padding: 5px; +} + +#container_category_tree a{ + font-weight: bold; +} + +#container_category_tree a input{ + margin-right: 3px; +} + + +#block_tips {float:right; width:48.1%} +#block_discover {float:left; width:48.1%} +#block_partner_tips {float:right; width:48.1%} +.row-news { width:100%;float:left;} +#table_info_news { border:1px solid #ccc;} + +.multishop-left{ + float: left; + width: 250px; + border: 1px solid #CCCED7; + background-color: #F9F9F9; + overflow: auto; + padding: 3px; + max-height: 400px; + min-height: 200px; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} + + .multishop-left .multishop-title{ + border-bottom: 1px solid #CCCED7; + color: #333333; + background-color: #F0F0F0; + font-size: 14px; + font-weight: bold; + text-align: left; + padding: 2px; + width: 247px; + } + +.multishop-right{ + margin-left: 270px; +} + +#container-multishop { + background-color:#EBEDF4; + border:1px solid #CCCED7; + color: #585A69; + padding:10px; +} + +#multishop-tree{ + font-size: 13px; + margin-top: 3px; + background-color: #F9F9F9; +} + +#multishop-tree a.selected{ + background-color: #49B2FF; + padding: 3px; + color: #FFFFFF; +} + +.datepicker{ + position: relative; + z-index:20; +} + +#BoxUseSpecialSyntax{ + position:fixed; + z-index:10; + width:100%; + bottom:50px; + display:none; +} + +#BoxUseSpecialSyntax .warn{ + margin:0 auto; + width:500px; +} + +#BoxUseSpecialSyntax ul{ + margin-left:30px; + list-style-type:disc; +} + +.id_customization .customization_field { + min-width: 205px; + width: 205px; +} + + +/******************** CSS Carrier Wizard ************************/ +#carrier_wizard.swMain { + position:relative; + display:block; + margin:0; + padding:0; + float:left; + min-width: 980px; + width: 100%; +} +#carrier_wizard.swMain .stepContainer { + display:block; + position: relative; + margin: 0; + padding:0; + overflow:hidden; + clear:both; +} +#carrier_wizard.swMain .stepContainer div.content { + width: 100%; + display:block; + position: absolute; + float:left; + margin: 0; + padding: 0; + text-align:left; + overflow:visible; + z-index:88; + clear:both; +} +#carrier_wizard.swMain div.actionBar { + display:block; + position: relative; + clear:both; + padding: 0; + text-align:left; + overflow:auto; + z-index:88; + background-color: #f7f8f7; + border: 1px solid #caccca; + height: 37px; + margin-bottom: 20px; +} +#carrier_wizard.swMain .stepContainer .StepTitle { + display:block; + position: relative; + margin:0; + padding:5px; + clear:both; + text-align:left; + z-index:88; + -webkit-border-radius: 5px; + -moz-border-radius : 5px; +} +#carrier_wizard.swMain ul.anchor { + position: relative; + display:block; + float:left; + list-style: none; + padding: 0; + margin: 0 0 10px 0; + clear: both; + width: 100%; +} +#carrier_wizard.swMain ul.anchor li{ + position: relative; + display:block; + margin: 0; + padding: 0; + float: left; + width: 25%; +} +#carrier_wizard.swMain ul.anchor li a { + height: 32px; + display:block; + position:relative; + margin: 0; + padding-right: 25px; + text-decoration: none; + outline-style:none; + z-index:99; + overflow: hidden; +} +#carrier_wizard.swMain ul.anchor li a .stepNumber{ + position:relative; + float:left; + width: 24px; + height: 32px; + text-align: center; + padding:0 5px; + padding-top:0; + font-size: 30px; + line-height: 32px; + color: #fffffe; + text-shadow: none; + font-weight: normal; + font-style: normal; +} +#carrier_wizard.swMain ul.anchor li a .stepDesc{ + position:relative; + text-align: left; + font-size: 15px; + height: 32px; + display: table-cell; + vertical-align: middle; + line-height: 13px; +} +#carrier_wizard.swMain ul.anchor li a.selected{ + color:#F8F8F8; + cursor:text; + background: #404956 url(../img/admin/steps-carrierwizard.png) no-repeat right -32px; +} +#carrier_wizard.swMain ul.anchor li a.done, +#carrier_wizard.swMain ul.anchor li.done.selected a.selected { + position:relative; + color:#FFF; + background: url(../img/admin/steps-carrierwizard.png) right 0 no-repeat #3f4856; + z-index:99; +} +#carrier_wizard.swMain ul.anchor li a.disabled { + cursor:text; + background: url(../img/admin/steps-carrierwizard.png) right -64px no-repeat #cbcccb; + color: #878787; +} +#carrier_wizard.swMain .buttonNext { + display:block; + float:right; + margin:5px 3px 0 3px; + padding:5px; + text-decoration: none; + text-align: center; + width:100px; + color:#FFF; + outline-style:none; + background-color: #5A5655; + border: 1px solid #5A5655; + -moz-border-radius : 5px; + -webkit-border-radius: 5px; +} +#carrier_wizard.swMain .buttonDisabled { + color:#F8F8F8 !important; + background-color: #CCCCCC !important; + border: 1px solid #CCCCCC !important; + cursor:text; +} +#carrier_wizard.swMain .buttonPrevious { + display:block; + float:right; + margin:5px 3px 0 3px; + padding:5px; + text-decoration: none; + text-align: center; + width:100px; + color:#FFF; + outline-style:none; + background-color: #5A5655; + border: 1px solid #5A5655; + -moz-border-radius : 5px; + -webkit-border-radius: 5px; +} +#carrier_wizard.swMain .buttonFinish { + display:block; + float:right; + margin:5px 10px 0 3px; + padding:5px; + text-decoration: none; + text-align: center; + width:100px; + color:#FFF; + outline-style:none; + background-color: #5A5655; + border: 1px solid #5A5655; + -moz-border-radius : 5px; + -webkit-border-radius: 5px; +} +#carrier_logo_block{ + position: absolute; + right: 10px; + padding: 0; + margin: 0; +} +#carrier_wizard.swMain .msgBox { + position:relative; + display:none; + float:left; + margin: 4px 0 0 5px; + padding:5px; + border: 1px solid #FFD700; + background-color: #FFFFDD; + color:#5A5655; + -moz-border-radius : 5px; + -webkit-border-radius: 5px; + z-index:999; + min-width:200px; +} +#carrier_wizard.swMain .msgBox .content { + padding: 0px; + float:left; +} +#carrier_wizard.swMain .msgBox .close { + border: 1px solid #CCC; + border-radius: 3px; + color: #CCC; + display: block; + float: right; + margin: 0 0 0 5px; + outline-style: none; + padding: 0 2px 0 2px; + position: relative; + text-align: center; + text-decoration: none; +} +#carrier_wizard.swMain .msgBox .close:hover{color: #EA8511;border: 1px solid #EA8511;} +#carrier_wizard.swMain ul.anchor li a.done .stepNumber {color: #A9B6C8;text-shadow: none;} +#carrier_wizard.swMain ul.anchor li a.done .stepDesc {color: #A9B6C8;text-shadow: none;} +#carrier_wizard .border_top {border-top:solid 1px #C0C0C0;} +#carrier_wizard .border_bottom {border-bottom:solid 1px #C0C0C0;} +#carrier_wizard .border_left {border-left:solid 1px #C0C0C0;} +#carrier_wizard .border_right {border-right:solid 1px #C0C0C0;} +#carrier_wizard .border_all {border:solid 1px #C0C0C0;} +#carrier_wizard input.field_error {border : solid 1px red; background-color:#FFCCCC;} +#carrier_wizard table td.center {text-align: center} +#carrier_wizard .new_range, #carrier_wizard .validate_range {float: left; margin: 35px 0 0 10px; width: 130px;} +#carrier_wizard tr.fees_all { background: #CCCCCC} +#carrier_wizard #zones_table input[type=text] {width: 45px;} +#carrier_wizard #fieldset_form { min-height: 190px} +#carrier_wizard #zone_ranges label { float: none; width: inherit } +#carrier_wizard #step_carrier_summary label {width: 40px} +#carrier_wizard #step_carrier_summary .margin-form {padding-left: 60px;} +#carrier_wizard #summary_zones, #carrier_wizard #summary_groups {margin-left: 20px; margin-top: 10px; list-style: disc} +#carrier_wizard .ranges_not_follow label {width: inherit; float:none} +#carrier_wizard .ranges_not_follow {width: 300px; margin-bottom: 0} + + +/*** IE10 ***/ +/*@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + #carrier_wizard.swMain ul.anchor li a{padding: 3px 19px 3px 19px;} + #carrier_wizard.swMain ul.anchor li{padding-right: 60px;} + #carrier_wizard.swMain ul.nbr_steps_3 li{ min-width: 30%;} + #carrier_wizard.swMain ul.nbr_steps_4 li{ min-width: 21.7%;} + #carrier_wizard.swMain ul.nbr_steps_5 li{ min-width: 16.7%;} + +} +.ie9 #carrier_wizard.swMain ul.anchor li a, +.ie8 #carrier_wizard.swMain ul.anchor li a{padding: 3px 19px 3px 19px;} +.ie9 #carrier_wizard.swMain ul.anchor li, +.ie8 #carrier_wizard.swMain ul.anchor li, +.ie7 #carrier_wizard.swMain ul.anchor li{padding-right: 60px;} +.ie7 #carrier_wizard.swMain ul.anchor li a{padding: 3px 19px 3px 19px;} +.ie9 #carrier_wizard.swMain ul.nbr_steps_3 li, +.ie8 #carrier_wizard.swMain ul.nbr_steps_3 li{ min-width: 30%;} +.ie9 #carrier_wizard.swMain ul.nbr_steps_4 li, +.ie8 #carrier_wizard.swMain ul.nbr_steps_4 li{ min-width: 21.7%;} +.ie9 #carrier_wizard.swMain ul.nbr_steps_5 li, +.ie8 #carrier_wizard.swMain ul.nbr_steps_5 li{ min-width: 16.7%;} +.ie7 #carrier_wizard.swMain ul.nbr_steps_3 li{ width: 312px;} +.ie7 #carrier_wizard.swMain ul.nbr_steps_4 li{ width: 312px;} +.ie7 #carrier_wizard.swMain ul.nbr_steps_5 li{ width: 312px;}*/ diff --git a/docs/csv_import/products_import.csv b/docs/csv_import/products_import.csv index b49f79225..7253bc2eb 100644 --- a/docs/csv_import/products_import.csv +++ b/docs/csv_import/products_import.csv @@ -1,3 +1,3 @@ -id;Active (0/1);Name*;Categories (x,y,z,...);Price tax excl. Or Price tax excl;Tax rules id;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyy-mm-dd);Discount to (yyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Weight;Quantity;Short description;Description;Tags (x,y,z,...);Meta-title;Meta-keywords;Meta-description;URL rewritten;Text when in-stock;Text if back-order allowed;Image URLs (x,y,z,...);Feature;Only available online -1;1;iPod Nano;Home, iPods;49;1;;1;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;;;;0.5;800;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;;;;ipod-nano;In stock;;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;; -2;1;iPod shuffle;Home, iPods;66.05;1;79;1;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;;;;0;500;iPod shuffle, the world’s most wearabl….;;ipod, shuffle;;;;ipod-shuffle;In stock;;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;; \ No newline at end of file +id;Active (0/1);Name*;Categories (x,y,z,...);Price tax excl. Or Price tax excl;Tax rules id;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyy-mm-dd);Discount to (yyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Weight;Quantity;Short description;Description;Tags (x,y,z,...);Meta-title;Meta-keywords;Meta-description;URL rewritten;Text when in-stock;Text if back-order allowed;Available for order (0 = No, 1 = Yes);Product creation date;Show price (0 = No, 1 = Yes);Image URLs (x,y,z,...);Delete existing images (0 = No, 1 = Yes);Feature (Name:Value:Position);Available online only (0 = No, 1 = Yes);Condition (new,used,refurbished);ID / Name of shop +1;1;iPod Nano;Home, iPods;49;1;;1;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;;;;0.5;800;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;;;;ipod-nano;In stock;Out stock;1;;1;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;1;;0;new;1 +2;1;iPod shuffle;Home, iPods;66.05;1;79;1;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;;;;0;500;iPod shuffle, the world’s most wearabl….;;ipod, shuffle;;;;ipod-shuffle;In stock;Out stock;1;;1;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;1;;0;new;1 diff --git a/img/admin/carrier-default.jpg b/img/admin/carrier-default.jpg new file mode 100644 index 000000000..5677b65c1 Binary files /dev/null and b/img/admin/carrier-default.jpg differ diff --git a/img/admin/steps-carrierwizard.png b/img/admin/steps-carrierwizard.png new file mode 100644 index 000000000..4c0d980be Binary files /dev/null and b/img/admin/steps-carrierwizard.png differ diff --git a/install-dev/classes/xmlLoader.php b/install-dev/classes/xmlLoader.php index b2c86ddc3..c2ca37576 100644 --- a/install-dev/classes/xmlLoader.php +++ b/install-dev/classes/xmlLoader.php @@ -81,12 +81,15 @@ class InstallXmlLoader $this->img_path = _PS_INSTALL_DATA_PATH_.'img/'; } - public function setFixturesPath() + public function setFixturesPath($path = null) { + if ($path === null) + $path = _PS_INSTALL_FIXTURES_PATH_.'apple/'; + $this->path_type = 'fixture'; - $this->data_path = _PS_INSTALL_FIXTURES_PATH_.'apple/data/'; - $this->lang_path = _PS_INSTALL_FIXTURES_PATH_.'apple/langs/'; - $this->img_path = _PS_INSTALL_FIXTURES_PATH_.'apple/img/'; + $this->data_path = $path.'data/'; + $this->lang_path = $path.'langs/'; + $this->img_path = $path.'img/'; } /** @@ -693,16 +696,12 @@ class InstallXmlLoader if (is_null($tables)) { - $sql = 'SHOW TABLES'; $tables = array(); - foreach (Db::getInstance()->executeS($sql) as $row) + foreach (Db::getInstance()->executeS('SHOW TABLES') as $row) { $table = current($row); if (preg_match('#^'._DB_PREFIX_.'(.+?)(_lang)?$#i', $table, $m)) - if (preg_match('#^'._DB_PREFIX_.'(.+?)_shop$#i', $table, $m2) && !isset($tables[$m2[1]])) - $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false; - else - $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false; + $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false; } } diff --git a/install-dev/controllers/console/process.php b/install-dev/controllers/console/process.php index 4fc78079b..48ac9e674 100644 --- a/install-dev/controllers/console/process.php +++ b/install-dev/controllers/console/process.php @@ -225,7 +225,7 @@ class InstallControllerConsoleProcess extends InstallControllerConsole $this->initializeContext(); $this->model_install->xml_loader_ids = $this->datas->xml_loader_ids; - $result = $this->model_install->installFixtures(); + $result = $this->model_install->installFixtures(null, array('shop_activity' => $this->datas->shop_activity, 'shop_country' => $this->datas->shop_country)); $this->datas->xml_loader_ids = $this->model_install->xml_loader_ids; return $result; } @@ -288,4 +288,4 @@ class InstallControllerConsoleProcess extends InstallControllerConsole { return $this->model_install->installModulesAddons(); } -} \ No newline at end of file +} diff --git a/install-dev/controllers/http/configure.php b/install-dev/controllers/http/configure.php index 1b35a3a9f..c600c04ad 100644 --- a/install-dev/controllers/http/configure.php +++ b/install-dev/controllers/http/configure.php @@ -56,7 +56,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp $params = http_build_query(array( 'email' => $this->session->admin_email, 'method' => 'addMemberToNewsletter', - 'language' => $this->session->lang, + 'language' => $this->language->getLanguageIso(), 'visitorType' => 1, 'source' => 'installer' )); diff --git a/install-dev/controllers/http/process.php b/install-dev/controllers/http/process.php index 38d497ce2..8ab8b0286 100644 --- a/install-dev/controllers/http/process.php +++ b/install-dev/controllers/http/process.php @@ -260,7 +260,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp $this->initializeContext(); $this->model_install->xml_loader_ids = $this->session->xml_loader_ids; - if (!$this->model_install->installFixtures(Tools::getValue('entity')) || $this->model_install->getErrors()) + if (!$this->model_install->installFixtures(Tools::getValue('entity', null), array('shop_activity' => $this->session->shop_activity, 'shop_country' => $this->session->shop_country)) || $this->model_install->getErrors()) $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); $this->session->xml_loader_ids = $this->model_install->xml_loader_ids; $this->ajaxJsonAnswer(true); diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql index b5b3ff8ed..d067ea6f0 100644 --- a/install-dev/data/db_structure.sql +++ b/install-dev/data/db_structure.sql @@ -1437,7 +1437,7 @@ CREATE TABLE IF NOT EXISTS `PREFIX_product_shop` ( `date_upd` datetime NOT NULL, PRIMARY KEY (`id_product`, `id_shop`), KEY `id_category_default` (`id_category_default`), - KEY `date_add` (`date_add`) + KEY `date_add` (`date_add` , `active` , `visibility`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; CREATE TABLE `PREFIX_product_attribute` ( diff --git a/install-dev/data/xml/access.xml b/install-dev/data/xml/access.xml index 97c2e66ea..9b71e93fc 100644 --- a/install-dev/data/xml/access.xml +++ b/install-dev/data/xml/access.xml @@ -51,6 +51,7 @@ + diff --git a/install-dev/data/xml/configuration.xml b/install-dev/data/xml/configuration.xml index 2494938f3..62ec8b354 100644 --- a/install-dev/data/xml/configuration.xml +++ b/install-dev/data/xml/configuration.xml @@ -771,6 +771,9 @@ Country 1 + + + SMARTY_DEBUG diff --git a/install-dev/data/xml/tab.xml b/install-dev/data/xml/tab.xml index efc6295cc..477d81b3d 100644 --- a/install-dev/data/xml/tab.xml +++ b/install-dev/data/xml/tab.xml @@ -156,11 +156,8 @@ AdminCarriers - - AdminRangePrice - - - AdminRangeWeight + + AdminCarrierWizard AdminLocalization diff --git a/install-dev/fixtures/apple/langs/nl/data/attribute.xml b/install-dev/fixtures/apple/langs/nl/data/attribute.xml new file mode 100644 index 000000000..f27df851c --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/attribute.xml @@ -0,0 +1,63 @@ + + + + 2GB + + + 4GB + + + Metal + + + Blue + + + Pink + + + Green + + + Orange + + + Optional 64GB solid-state drive + + + 80GB Parallel ATA Drive @ 4200 rpm + + + 1.60GHz Intel Core 2 Duo + + + 1.80GHz Intel Core 2 Duo + + + 80GB: 20,000 Songs + + + 160GB: 40,000 Songs + + + Black + + + 8GB + + + 16GB + + + 32GB + + + Purple + + + Yellow + + + Red + + diff --git a/install-dev/fixtures/apple/langs/nl/data/attribute_group.xml b/install-dev/fixtures/apple/langs/nl/data/attribute_group.xml new file mode 100644 index 000000000..221a81bc7 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/attribute_group.xml @@ -0,0 +1,15 @@ + + + + Disk space + Disk space + + + Color + Color + + + ICU + Processor + + diff --git a/install-dev/fixtures/apple/langs/nl/data/attributegroup.xml b/install-dev/fixtures/apple/langs/nl/data/attributegroup.xml new file mode 100644 index 000000000..977fceeb7 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/attributegroup.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/install-dev/fixtures/apple/langs/nl/data/carrier.xml b/install-dev/fixtures/apple/langs/nl/data/carrier.xml new file mode 100644 index 000000000..c59766e73 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/carrier.xml @@ -0,0 +1,6 @@ + + + + Delivery next day! + + diff --git a/install-dev/fixtures/apple/langs/nl/data/category.xml b/install-dev/fixtures/apple/langs/nl/data/category.xml new file mode 100644 index 000000000..eeae63831 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/category.xml @@ -0,0 +1,27 @@ + + + + iPods + Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater. + music-ipods + + + + + + Accessories + Wonderful accessories for your iPod + accessories-ipod + + + + + + Laptops + The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part. + laptops + Apple laptops + Apple laptops MacBook Air + Powerful and chic Apple laptops + + diff --git a/install-dev/fixtures/apple/langs/nl/data/feature.xml b/install-dev/fixtures/apple/langs/nl/data/feature.xml new file mode 100644 index 000000000..7682c6495 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/feature.xml @@ -0,0 +1,18 @@ + + + + Height + + + Width + + + Depth + + + Weight + + + Headphone + + diff --git a/install-dev/fixtures/apple/langs/nl/data/feature_value.xml b/install-dev/fixtures/apple/langs/nl/data/feature_value.xml new file mode 100644 index 000000000..d3a824d22 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/feature_value.xml @@ -0,0 +1,45 @@ + + + + Jack stereo + + + Mini-jack stereo + + + 2.75 in + + + 2.06 in + + + 49.2 g + + + 0.26 in + + + 1.07 in + + + 1.62 in + + + 15.5 g + + + 0.41 in (clip included) + + + 4.33 in + + + 2.76 in + + + 120g + + + 0.31 in + + diff --git a/install-dev/fixtures/apple/langs/nl/data/featurevalue.xml b/install-dev/fixtures/apple/langs/nl/data/featurevalue.xml new file mode 100644 index 000000000..d101bed96 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/featurevalue.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/install-dev/fixtures/apple/langs/nl/data/image.xml b/install-dev/fixtures/apple/langs/nl/data/image.xml new file mode 100644 index 000000000..49a836dc3 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/image.xml @@ -0,0 +1,81 @@ + + + + MacBook Air + + + MacBook Air + + + MacBook Air + + + MacBook Air + + + MacBook Air + + + MacBook Air SuperDrive + + + iPod touch + + + iPod touch + + + iPod touch + + + iPod touch + + + iPod touch + + + iPod touch + + + housse-portefeuille-en-cuir + + + Shure SE210 Sound-Isolating Earphones for iPod and iPhone + + + iPod Nano + + + iPod Nano + + + iPod Nano + + + iPod Nano + + + iPod Nano + + + iPod Nano + + + iPod Nano + + + iPod Nano + + + iPod shuffle + + + iPod shuffle + + + iPod shuffle + + + iPod shuffle + + diff --git a/admin-dev/themes/default/template/controllers/shipping/index.php b/install-dev/fixtures/apple/langs/nl/data/index.php similarity index 100% rename from admin-dev/themes/default/template/controllers/shipping/index.php rename to install-dev/fixtures/apple/langs/nl/data/index.php diff --git a/install-dev/fixtures/apple/langs/nl/data/manufacturer.xml b/install-dev/fixtures/apple/langs/nl/data/manufacturer.xml new file mode 100644 index 000000000..f06ff9661 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/manufacturer.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/install-dev/fixtures/apple/langs/nl/data/order_message.xml b/install-dev/fixtures/apple/langs/nl/data/order_message.xml new file mode 100644 index 000000000..93ad3b501 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/order_message.xml @@ -0,0 +1,12 @@ + + + + Delay + Hi, + +Unfortunately, an item on your order is currently out of stock. This may cause a slight delay in delivery. +Please accept our apologies and rest assured that we are working hard to rectify this. + +Best regards, + + diff --git a/install-dev/fixtures/apple/langs/nl/data/ordermessage.xml b/install-dev/fixtures/apple/langs/nl/data/ordermessage.xml new file mode 100644 index 000000000..e743f5d97 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/ordermessage.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/install-dev/fixtures/apple/langs/nl/data/product.xml b/install-dev/fixtures/apple/langs/nl/data/product.xml new file mode 100644 index 000000000..0c405b001 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/product.xml @@ -0,0 +1,135 @@ + + + + <p><strong><span style="font-size: small;">Curved ahead of the curve.</span></strong></p> +<p>For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass design and you won't want to put iPod nano down.</p> +<p><strong><span style="font-size: small;">Great looks. And brains, too.</span></strong></p> +<p>The new Genius feature turns iPod nano into your own highly intelligent, personal DJ. It creates playlists by finding songs in your library that go great together.</p> +<p><strong><span style="font-size: small;">Made to move with your moves.</span></strong></p> +<p>The accelerometer comes to iPod nano. Give it a shake to shuffle your music. Turn it sideways to view Cover Flow. And play games designed with your moves in mind.</p> + <p>New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.</p> + ipod-nano + + + + iPod Nano + In stock + + + + <p><span style="font-size: small;"><strong>Instant attachment.</strong></span></p> +<p>Wear up to 500 songs on your sleeve. Or your belt. Or your gym shorts. iPod shuffle is a badge of musical devotion. Now in new, more brilliant colors.</p> +<p><span style="font-size: small;"><strong>Feed your iPod shuffle.</strong></span></p> +<p>iTunes is your entertainment superstore. It’s your ultra-organized music collection and jukebox. And it’s how you load up your iPod shuffle in one click.</p> +<p><span style="font-size: small;"><strong>Beauty and the beat.</strong></span></p> +<p>Intensely colorful anodized aluminum complements the simple design of iPod shuffle. Now in blue, green, pink, red, and original silver.</p> + <p>iPod shuffle, the world’s most wearable music player, now clips on in more vibrant blue, green, pink, and red.</p> + ipod-shuffle + + + + iPod shuffle + In stock + + + + <p>MacBook Air is nearly as thin as your index finger. Practically every detail that could be streamlined has been. Yet it still has a 13.3-inch widescreen LED display, full-size keyboard, and large multi-touch trackpad. It’s incomparably portable without the usual ultraportable screen and keyboard compromises.</p><p>The incredible thinness of MacBook Air is the result of numerous size- and weight-shaving innovations. From a slimmer hard drive to strategically hidden I/O ports to a lower-profile battery, everything has been considered and reconsidered with thinness in mind.</p><p>MacBook Air is designed and engineered to take full advantage of the wireless world. A world in which 802.11n Wi-Fi is now so fast and so available, people are truly living untethered — buying and renting movies online, downloading software, and sharing and storing files on the web. </p> + MacBook Air is ultrathin, ultraportable, and ultra unlike anything else. But you don’t lose inches and pounds overnight. It’s the result of rethinking conventions. Of multiple wireless innovations. And of breakthrough design. With MacBook Air, mobile computing suddenly has a new standard. + macbook-air + + + + MacBook Air + + + + + Every MacBook has a larger hard drive, up to 250GB, to store growing media collections and valuable data.<br /><br />The 2.4GHz MacBook models now include 2GB of memory standard — perfect for running more of your favorite applications smoothly. + MacBook makes it easy to hit the road thanks to its tough polycarbonate case, built-in wireless technologies, and innovative MagSafe Power Adapter that releases automatically if someone accidentally trips on the cord. + macbook + + + + MacBook + + + + + <h3>Five new hands-on applications</h3> +<p>View rich HTML email with photos as well as PDF, Word, and Excel attachments. Get maps, directions, and real-time traffic information. Take notes and read stock and weather reports.</p> +<h3>Touch your music, movies, and more</h3> +<p>The revolutionary Multi-Touch technology built into the gorgeous 3.5-inch display lets you pinch, zoom, scroll, and flick with your fingers.</p> +<h3>Internet in your pocket</h3> +<p>With the Safari web browser, see websites the way they were designed to be seen and zoom in and out with a tap.<sup>2</sup> And add Web Clips to your Home screen for quick access to favorite sites.</p> +<h3>What's in the box</h3> +<ul> +<li><span></span>iPod touch</li> +<li><span></span>Earphones</li> +<li><span></span>USB 2.0 cable</li> +<li><span></span>Dock adapter</li> +<li><span></span>Polishing cloth</li> +<li><span></span>Stand</li> +<li><span></span>Quick Start guide</li> +</ul> + <ul> +<li>Revolutionary Multi-Touch interface</li> +<li>3.5-inch widescreen color display</li> +<li>Wi-Fi (802.11b/g)</li> +<li>8 mm thin</li> +<li>Safari, YouTube, Mail, Stocks, Weather, Notes, iTunes Wi-Fi Music Store, Maps</li> +</ul> + ipod-touch + + + + iPod touch + + + + + <p>Lorem ipsum</p> + <p>Lorem ipsum</p> + belkin-leather-folio-for-ipod-nano-black-chocolate + + + + Belkin Leather Folio for iPod nano - Black / Chocolate + + + + + <div class="product-overview-full">Using Hi-Definition MicroSpeakers to deliver full-range audio, the ergonomic and lightweight design of the SE210 earphones is ideal for premium on-the-go listening on your iPod or iPhone. They offer the most accurate audio reproduction from both portable and home stereo audio sources--for the ultimate in precision highs and rich low end. In addition, the flexible design allows you to choose the most comfortable fit from a variety of wearing positions. <br /> <br /> <strong>Features </strong> <br /> +<ul> +<li>Sound-isolating design </li> +<li> Hi-Definition MicroSpeaker with a single balanced armature driver </li> +<li> Detachable, modular cable so you can make the cable longer or shorter depending on your activity </li> +<li> Connector compatible with earphone ports on both iPod and iPhone </li> +</ul> +<strong>Specifications </strong><br /> +<ul> +<li>Speaker type: Hi-Definition MicroSpeaker </li> +<li> Frequency range: 25Hz-18.5kHz </li> +<li> Impedance (1kHz): 26 Ohms </li> +<li> Sensitivity (1mW): 114 dB SPL/mW </li> +<li> Cable length (with extension): 18.0 in./45.0 cm (54.0 in./137.1 cm) </li> +</ul> +<strong>In the box</strong><br /> +<ul> +<li>Shure SE210 earphones </li> +<li> Extension cable (36.0 in./91.4 cm) </li> +<li> Three pairs foam earpiece sleeves (small, medium, large) </li> +<li> Three pairs soft flex earpiece sleeves (small, medium, large) </li> +<li> One pair triple-flange earpiece sleeves </li> +<li> Carrying case </li> +</ul> +Warranty<br /> Two-year limited <br />(For details, please visit <br />www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm.) <br /><br /> Mfr. Part No.: SE210-A-EFS <br /><br />Note: Products sold through this website that do not bear the Apple Brand name are serviced and supported exclusively by their manufacturers in accordance with terms and conditions packaged with the products. Apple's Limited Warranty does not apply to products that are not Apple-branded, even if packaged or sold with Apple products. Please contact the manufacturer directly for technical support and customer service.</div> + <p>Evolved from personal monitor technology road-tested by pro musicians and perfected by Shure engineers, the lightweight and stylish SE210 delivers full-range audio that's free from outside noise.</p> + ecouteurs-a-isolation-sonore-shure-se210-blanc + + + + Shure SE210 Sound-Isolating Earphones for iPod and iPhone + + + + diff --git a/install-dev/fixtures/apple/langs/nl/data/profile.xml b/install-dev/fixtures/apple/langs/nl/data/profile.xml new file mode 100644 index 000000000..02aa4d76c --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/profile.xml @@ -0,0 +1,15 @@ + + + + Administrator + + + Logistician + + + Translator + + + Salesman + + diff --git a/install-dev/fixtures/apple/langs/nl/data/scene.xml b/install-dev/fixtures/apple/langs/nl/data/scene.xml new file mode 100644 index 000000000..f7270d3ff --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/scene.xml @@ -0,0 +1,12 @@ + + + + The iPods Nano + + + The iPods + + + The MacBooks + + diff --git a/install-dev/fixtures/apple/langs/nl/data/supplier.xml b/install-dev/fixtures/apple/langs/nl/data/supplier.xml new file mode 100644 index 000000000..e9db64034 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/supplier.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/install-dev/fixtures/apple/langs/nl/data/tag.xml b/install-dev/fixtures/apple/langs/nl/data/tag.xml new file mode 100644 index 000000000..b781c0ed2 --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/data/tag.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/install-dev/fixtures/apple/langs/nl/index.php b/install-dev/fixtures/apple/langs/nl/index.php new file mode 100644 index 000000000..67d9932bf --- /dev/null +++ b/install-dev/fixtures/apple/langs/nl/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../'); +exit; \ No newline at end of file diff --git a/install-dev/install_version.php b/install-dev/install_version.php index 5d86dc4df..0eb85db70 100644 --- a/install-dev/install_version.php +++ b/install-dev/install_version.php @@ -24,4 +24,4 @@ * International Registered Trademark & Property of PrestaShop SA */ -define('_PS_INSTALL_VERSION_', '1.5.4.1'); +define('_PS_INSTALL_VERSION_', '1.5.5.0'); diff --git a/install-dev/langs/br/data/tab.xml b/install-dev/langs/br/data/tab.xml index 27e2d2651..30029ce36 100644 --- a/install-dev/langs/br/data/tab.xml +++ b/install-dev/langs/br/data/tab.xml @@ -64,7 +64,6 @@ - @@ -100,6 +99,5 @@ - diff --git a/install-dev/langs/br/install.php b/install-dev/langs/br/install.php index e379bec88..719696301 100644 --- a/install-dev/langs/br/install.php +++ b/install-dev/langs/br/install.php @@ -211,7 +211,7 @@ return array( 'We are currently checking PrestaShop compatibility with your system environment' => 'Neste momento, nós estamos verificando a compatibilidade do PrestaShop com seu ambiente de sistema.', 'PrestaShop compatibility with your system environment has been verified!' => 'A compatibilidade do PrestaShop com seu ambiente de sistema foi verificada!', 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Ups! Por favor corrija o(s) item(s) abaixo, e depois clique “Atualizar Informação” para testar a compatibilidade do seu novo sistema.', - 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'A instalação do PrestaShop é rápida e fácil. Em alguns minutos, você vai se tornar parte de uma comunidade composta por mais de 130 mil comerciantes. Você está no caminho certo para criar sua própria loja virtual original que você pode gerenciar facilmente todos os dias.', + 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'A instalação do PrestaShop é rápida e fácil. Em alguns minutos, você vai se tornar parte de uma comunidade composta por mais de 150 mil comerciantes. Você está no caminho certo para criar sua própria loja virtual original que você pode gerenciar facilmente todos os dias.', 'Continue the installation in:' => 'Continue a instalação em:', 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'A seleção de idioma acima é válida somente para o Assistente de Instalação. Uma vez que a loja for instalada, você pode escolher o idioma da sua loja entre mais de %d traduções disponíveis, totalmente grátis!', 'The field %s is limited to %d characters' => 'O campo %s está limitado a %d caractéres', diff --git a/install-dev/langs/de/data/tab.xml b/install-dev/langs/de/data/tab.xml index fdda483e3..e09dc6cdc 100644 --- a/install-dev/langs/de/data/tab.xml +++ b/install-dev/langs/de/data/tab.xml @@ -64,7 +64,6 @@ - @@ -100,6 +99,5 @@ - diff --git a/install-dev/langs/de/install.php b/install-dev/langs/de/install.php index b09b8ac8b..b39302665 100644 --- a/install-dev/langs/de/install.php +++ b/install-dev/langs/de/install.php @@ -204,7 +204,7 @@ return array( 'Print my login information' => 'Meine Zugangsinformationen ausdrucken', 'We are currently checking PrestaShop compatibility with your system environment' => 'Wir überprüfen derzeit die Kompatibilität von PrestaShop mit Ihrer Systemumgebung.', 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Bitte korrigieren Sie untenstehende(n) Punkt(e) und klicken Sie anschließend auf den Refresh-Button, um erneut die Kompatibilität Ihres Systems zu überprüfen.', - 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'Die PrestaShop-Installation ist schnell und einfach. In nur wenigen Minuten werden Sie Teil einer Community aus über 130 000 Händlern und erstellen einen Onlineshop, der genau zu Ihnen passt und der einfach in der täglichen Verwaltung ist.', + 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'Die PrestaShop-Installation ist schnell und einfach. In nur wenigen Minuten werden Sie Teil einer Community aus über 150 000 Händlern und erstellen einen Onlineshop, der genau zu Ihnen passt und der einfach in der täglichen Verwaltung ist.', 'Continue the installation in:' => 'Die Installation fortführen als:', 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'Die untenstehende Sprachauswahl bezieht sich auf den Installationsassistenten. Sobald Ihr Shop installiert ist, können Sie aus %d Sprachen Ihre Shopsprache wählen!', 'An error occurred during logo copy.' => 'Beim Logo Copy ist ein Fehler aufgetreten.', diff --git a/install-dev/langs/en/data/tab.xml b/install-dev/langs/en/data/tab.xml index e6d9c8f35..565cd31ce 100644 --- a/install-dev/langs/en/data/tab.xml +++ b/install-dev/langs/en/data/tab.xml @@ -50,8 +50,6 @@ - - diff --git a/install-dev/langs/es/data/tab.xml b/install-dev/langs/es/data/tab.xml index 0d83e4f2a..80c679e73 100644 --- a/install-dev/langs/es/data/tab.xml +++ b/install-dev/langs/es/data/tab.xml @@ -64,7 +64,6 @@ - @@ -100,6 +99,5 @@ - diff --git a/install-dev/langs/es/install.php b/install-dev/langs/es/install.php index 78401e6cb..32f9ca37e 100644 --- a/install-dev/langs/es/install.php +++ b/install-dev/langs/es/install.php @@ -205,7 +205,7 @@ return array( 'Print my login information' => 'Imprimir la información e inicio de sesión', 'We are currently checking PrestaShop compatibility with your system environment' => 'Verificamos en este momento la compatibilidad de PrestaShop con tu entorno del sistema', 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => '¡Uups! Por favor corrija los siguientes puntos marcados como errores y después hacer Clic en el botón "Actualizar esta información" con el fin de probar de nuevo la compatibilidad de tu sistema.', - 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'La instalación de PrestaShop es rápida y fácil. En solo unos minutos, podrás unirte a una comunidad de más de 130.000 comerciantes electrónicos. Así podrás crear tu propia tienda Online con tu imagen corporativa y administrarla a diario de forma muy sencilla.', + 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'La instalación de PrestaShop es rápida y fácil. En solo unos minutos, podrás unirte a una comunidad de más de 150.000 comerciantes electrónicos. Así podrás crear tu propia tienda Online con tu imagen corporativa y administrarla a diario de forma muy sencilla.', 'Continue the installation in:' => 'Continuar la instalación en:', 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'La elección del idioma se realiza sólo al inicio y se aplica al asistente de instalación. Una vez que tu tienda Online está instalada, podrás elegir el idioma de tu tienda, ¡entre las más de %d traducciones disponibles, ¡todas ellas de forma gratuitas!', 'The field %s is limited to %d characters' => 'El campo %s está limitado a %d caracteres', diff --git a/install-dev/langs/fr/data/tab.xml b/install-dev/langs/fr/data/tab.xml index 0da00ee0b..81b51d5fc 100644 --- a/install-dev/langs/fr/data/tab.xml +++ b/install-dev/langs/fr/data/tab.xml @@ -64,7 +64,6 @@ - @@ -100,6 +99,5 @@ - diff --git a/install-dev/langs/fr/install.php b/install-dev/langs/fr/install.php index 2d78ecee2..c4a31b4f5 100644 --- a/install-dev/langs/fr/install.php +++ b/install-dev/langs/fr/install.php @@ -209,7 +209,7 @@ return array( 'PrestaShop compatibility with your system environment has been verified!' => 'La compatibilité de PrestaShop avec votre système a été vérifiée', 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Merci de bien vouloir corriger le(s) point(s) ci-dessous puis de cliquer sur le bouton "Rafraichir ces informations" afin de tester à nouveau la compatibilité de votre système.', 'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'PrestaShop nécessite au moins 32Mo de mémoire pour fonctionner, merci de vérifier la valeur de la directive memory_limit dans votre fichier php.ini ou de contacter votre hébergeur.', - 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installation de PrestaShop est simple et rapide. En quelques minutes seulement, vous rejoindrez une communauté de plus de 130 000 marchands pour créer une boutique en ligne à votre image et la gérer facilement au quotidien.', + 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installation de PrestaShop est simple et rapide. En quelques minutes seulement, vous rejoindrez une communauté de plus de 150 000 marchands pour créer une boutique en ligne à votre image et la gérer facilement au quotidien.', 'Continue the installation in:' => 'Continuer l\'installation en :', 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'Le choix de la langue ci-dessus s\'applique à l\'assistant d\'installation. Une fois votre boutique installée, vous pourrez choisir la langue de votre boutique parmi plus de %d traductions disponibles gratuitement !', 'To use PrestaShop, you must create a database to collect all of your store’s data-related activities.' => 'Pour utiliser PrestaShop, vous devez créer une base de données afin de rassembler l\'ensemble des données liées à l\'activité de votre boutique.', @@ -240,5 +240,13 @@ return array( 'Sign-up to the newsletter' => 'S\'inscrire à la newsletter de PrestaShop', 'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, please uncheck this box.' => 'PrestaShop peut vous guider de façon régulière en vous faisant parvenir des conseils afin d\'optimiser la gestion de votre boutique et développer votre activité. Si vous ne souhaitez pas recevoir ces conseils, nous vous invitons à décocher cette case.', 'Your PHP sessions path is not writable - check with your hosting provider:' => 'Le dossier de stockage n\'est pas accessible en écriture - consultez votre hébergeur', + 'Database is created' => 'Base de données créée', + 'Cannot create the database automatically' => 'Impossible de créer la base de données automatiquement', + 'Install modules Addons' => 'Installation des modules Addons', + 'Attempt to create the database automatically' => 'Essayer de créer la base de données automatiquement', + 'Country:' => 'Pays :', + 'Must be letters and numbers with at least 8 characters' => 'Lettres et chiffres avec au moins 8 caractères', + 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Pour installer PrestaShop, vous devez avoir JavaScript activé dans votre navigateur', + 'For security purposes, you must delete the "install" folder.' => 'Pour des raisons de sécurité, vous devez supprimer le dossier "install" manuellement.', ), -); +); \ No newline at end of file diff --git a/install-dev/langs/it/data/tab.xml b/install-dev/langs/it/data/tab.xml index cbf510160..35f568c1f 100644 --- a/install-dev/langs/it/data/tab.xml +++ b/install-dev/langs/it/data/tab.xml @@ -64,7 +64,6 @@ - @@ -100,6 +99,5 @@ - diff --git a/install-dev/langs/it/install.php b/install-dev/langs/it/install.php index 47bccfb0e..64f2d444c 100644 --- a/install-dev/langs/it/install.php +++ b/install-dev/langs/it/install.php @@ -231,7 +231,7 @@ return array( 'PrestaShop compatibility with your system environment has been verified!' => 'Abbiamo verificato la compatibilità del tuo sistema con PrestaShop!', 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Correggi i punti seguenti, quindi clicca sul pulsante "Aggiorna" per verificare la compatibilità di PrestaShop con il nuovo sistema.', 'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'L\'esecuzione di PrestaShop necessita di almeno 32M di memoria. Controlla i limiti della tua memoria in php.ini o contatta il tuo fornitore di hosting', - 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installazione di PrestaShop è semplice e veloce. Tra pochi minuti, farai parte di una comunità di oltre 130.000 commercianti. Potrai creare un negozio a tua immagina e facile da gestire giorno dopo giorno.', + 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installazione di PrestaShop è semplice e veloce. Tra pochi minuti, farai parte di una comunità di oltre 150.000 commercianti. Potrai creare un negozio a tua immagina e facile da gestire giorno dopo giorno.', 'Continue the installation in:' => 'Continua l\'installazione in:', 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'La selezione della lingua si applica solo all\'Assistente di Installazione. Una volta che il negozio è installato, potrai scegliere la lingua del negozio tra le oltre %d traduzioni disponibili gratuitamente!', 'Your PHP sessions path is not writable - check with your hosting provider:' => 'La cartella di backup non è accessibile per scrittura - consulta il nostro servizio di hosting', diff --git a/install-dev/langs/nl/data/carrier.xml b/install-dev/langs/nl/data/carrier.xml new file mode 100644 index 000000000..343fa6f51 --- /dev/null +++ b/install-dev/langs/nl/data/carrier.xml @@ -0,0 +1,6 @@ + + + + Pick up in-store + + diff --git a/install-dev/langs/nl/data/category.xml b/install-dev/langs/nl/data/category.xml new file mode 100644 index 000000000..87b90b95e --- /dev/null +++ b/install-dev/langs/nl/data/category.xml @@ -0,0 +1,19 @@ + + + + Root + + root + + + + + + Home + + home + + + + + diff --git a/install-dev/langs/nl/data/cms.xml b/install-dev/langs/nl/data/cms.xml new file mode 100644 index 000000000..37edee2c4 --- /dev/null +++ b/install-dev/langs/nl/data/cms.xml @@ -0,0 +1,45 @@ + + + + Delivery + Our terms and conditions of delivery + conditions, delivery, delay, shipment, pack + <h2>Shipments and returns</h2><h3>Your pack shipment</h3><p>Packages are generally dispatched within 2 days after receipt of payment and are shipped via UPS with tracking and drop-off without signature. If you prefer delivery by UPS Extra with required signature, an additional cost will be applied, so please contact us before choosing this method. Whichever shipment choice you make, we will provide you with a link to track your package online.</p><p>Shipping fees include handling and packing fees as well as postage costs. Handling fees are fixed, whereas transport fees vary according to total weight of the shipment. We advise you to group your items in one order. We cannot group two distinct orders placed separately, and shipping fees will apply to each of them. Your package will be dispatched at your own risk, but special care is taken to protect fragile objects.<br /><br />Boxes are amply sized and your items are well-protected.</p> + delivery + + + Legal Notice + Legal notice + notice, legal, credits + <h2>Legal</h2><h3>Credits</h3><p>Concept and production:</p><p>This Web site was created using <a href="http://www.prestashop.com">PrestaShop</a>&trade; open-source software.</p> + legal-notice + + + Terms and conditions of use + Our terms and conditions of use + conditions, terms, use, sell + <h2>Your terms and conditions of use</h2><h3>Rule 1</h3><p>Here is the rule 1 content</p> +<h3>Rule 2</h3><p>Here is the rule 2 content</p> +<h3>Rule 3</h3><p>Here is the rule 3 content</p> + terms-and-conditions-of-use + + + About us + Learn more about us + about us, informations + <h2>About us</h2> +<h3>Our company</h3><p>Our company</p> +<h3>Our team</h3><p>Our team</p> +<h3>Informations</h3><p>Informations</p> + about-us + + + Secure payment + Our secure payment mean + secure payment, ssl, visa, mastercard, paypal + <h2>Secure payment</h2> +<h3>Our secure payment</h3><p>With SSL</p> +<h3>Using Visa/Mastercard/Paypal</h3><p>About this services</p> + secure-payment + + diff --git a/install-dev/langs/nl/data/cms_category.xml b/install-dev/langs/nl/data/cms_category.xml new file mode 100644 index 000000000..ceb8cf491 --- /dev/null +++ b/install-dev/langs/nl/data/cms_category.xml @@ -0,0 +1,11 @@ + + + + Home + + home + + + + + diff --git a/install-dev/langs/nl/data/configuration.xml b/install-dev/langs/nl/data/configuration.xml new file mode 100644 index 000000000..ef31b5d07 --- /dev/null +++ b/install-dev/langs/nl/data/configuration.xml @@ -0,0 +1,21 @@ + + + + IN + + + DE + + + a|the|of|on|in|and|to + + + 0 + + + Dear Customer, + +Regards, +Customer service + + diff --git a/install-dev/langs/nl/data/contact.xml b/install-dev/langs/nl/data/contact.xml new file mode 100644 index 000000000..bdc0b24d9 --- /dev/null +++ b/install-dev/langs/nl/data/contact.xml @@ -0,0 +1,9 @@ + + + + If a technical problem occurs on this website + + + For any question about a product, an order + + diff --git a/install-dev/langs/nl/data/country.xml b/install-dev/langs/nl/data/country.xml new file mode 100644 index 000000000..d57ea1e36 --- /dev/null +++ b/install-dev/langs/nl/data/country.xml @@ -0,0 +1,735 @@ + + + + Germany + + + Austria + + + Belgium + + + Canada + + + China + + + Spain + + + Finland + + + France + + + Greece + + + Italy + + + Japan + + + Luxemburg + + + Netherlands + + + Poland + + + Portugal + + + Czech Republic + + + United Kingdom + + + Sweden + + + Switzerland + + + Denmark + + + United States + + + HongKong + + + Norway + + + Australia + + + Singapore + + + Ireland + + + New Zealand + + + South Korea + + + Israel + + + South Africa + + + Nigeria + + + Ivory Coast + + + Togo + + + Bolivia + + + Mauritius + + + Romania + + + Slovakia + + + Algeria + + + American Samoa + + + + Angola + + + Anguilla + + + Antigua and Barbuda + + + Argentina + + + Armenia + + + Aruba + + + Azerbaijan + + + Bahamas + + + Bahrain + + + Bangladesh + + + Barbados + + + Belarus + + + Belize + + + Benin + + + Bermuda + + + Bhutan + + + Botswana + + + Brazil + + + Brunei + + + Burkina Faso + + + Burma (Myanmar) + + + Burundi + + + Cambodia + + + Cameroon + + + Cape Verde + + + Central African Republic + + + Chad + + + Chile + + + Colombia + + + Comoros + + + Congo, Dem. Republic + + + Congo, Republic + + + Costa Rica + + + Croatia + + + Cuba + + + Cyprus + + + Djibouti + + + Dominica + + + Dominican Republic + + + East Timor + + + Ecuador + + + Egypt + + + El Salvador + + + Equatorial Guinea + + + Eritrea + + + Estonia + + + Ethiopia + + + Falkland Islands + + + Faroe Islands + + + Fiji + + + Gabon + + + Gambia + + + Georgia + + + Ghana + + + Grenada + + + Greenland + + + Gibraltar + + + Guadeloupe + + + Guam + + + Guatemala + + + Guernsey + + + Guinea + + + Guinea-Bissau + + + Guyana + + + Haiti + + + Heard Island and McDonald Islands + + + Vatican City State + + + Honduras + + + Iceland + + + India + + + Indonesia + + + Iran + + + Iraq + + + Man Island + + + Jamaica + + + Jersey + + + Jordan + + + Kazakhstan + + + Kenya + + + Kiribati + + + Korea, Dem. Republic of + + + Kuwait + + + Kyrgyzstan + + + Laos + + + Latvia + + + Lebanon + + + Lesotho + + + Liberia + + + Libya + + + Liechtenstein + + + Lithuania + + + Macau + + + Macedonia + + + Madagascar + + + Malawi + + + Malaysia + + + Maldives + + + Mali + + + Malta + + + Marshall Islands + + + Martinique + + + Mauritania + + + Hungary + + + Mayotte + + + Mexico + + + Micronesia + + + Moldova + + + Monaco + + + Mongolia + + + Montenegro + + + Montserrat + + + Morocco + + + Mozambique + + + Namibia + + + Nauru + + + Nepal + + + Netherlands Antilles + + + New Caledonia + + + Nicaragua + + + Niger + + + Niue + + + Norfolk Island + + + Northern Mariana Islands + + + Oman + + + Pakistan + + + Palau + + + Palestinian Territories + + + Panama + + + Papua New Guinea + + + Paraguay + + + Peru + + + Philippines + + + Pitcairn + + + Puerto Rico + + + Qatar + + + Reunion Island + + + Russian Federation + + + Rwanda + + + Saint Barthelemy + + + Saint Kitts and Nevis + + + Saint Lucia + + + Saint Martin + + + Saint Pierre and Miquelon + + + Saint Vincent and the Grenadines + + + Samoa + + + San Marino + + + São Tomé and Príncipe + + + Saudi Arabia + + + Senegal + + + Serbia + + + Seychelles + + + Sierra Leone + + + Slovenia + + + Solomon Islands + + + Somalia + + + South Georgia and the South Sandwich Islands + + + Sri Lanka + + + Sudan + + + Suriname + + + Svalbard and Jan Mayen + + + Swaziland + + + Syria + + + Taiwan + + + Tajikistan + + + Tanzania + + + Thailand + + + Tokelau + + + Tonga + + + Trinidad and Tobago + + + Tunisia + + + Turkey + + + Turkmenistan + + + Turks and Caicos Islands + + + Tuvalu + + + Uganda + + + Ukraine + + + United Arab Emirates + + + Uruguay + + + Uzbekistan + + + Vanuatu + + + Venezuela + + + Vietnam + + + Virgin Islands (British) + + + Virgin Islands (U.S.) + + + Wallis and Futuna + + + Western Sahara + + + Yemen + + + Zambia + + + Zimbabwe + + + Albania + + + Afghanistan + + + Antarctica + + + Bosnia and Herzegovina + + + Bouvet Island + + + British Indian Ocean Territory + + + Bulgaria + + + Cayman Islands + + + Christmas Island + + + Cocos (Keeling) Islands + + + Cook Islands + + + French Guiana + + + French Polynesia + + + French Southern Territories + + + Åland Islands + + diff --git a/install-dev/langs/nl/data/gender.xml b/install-dev/langs/nl/data/gender.xml new file mode 100644 index 000000000..75fc2ed2a --- /dev/null +++ b/install-dev/langs/nl/data/gender.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/install-dev/langs/nl/data/group.xml b/install-dev/langs/nl/data/group.xml new file mode 100644 index 000000000..2d1b70934 --- /dev/null +++ b/install-dev/langs/nl/data/group.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/install-dev/langs/nl/data/index.php b/install-dev/langs/nl/data/index.php new file mode 100644 index 000000000..10edbfe91 --- /dev/null +++ b/install-dev/langs/nl/data/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../'); +exit; \ No newline at end of file diff --git a/install-dev/langs/nl/data/meta.xml b/install-dev/langs/nl/data/meta.xml new file mode 100644 index 000000000..bae593782 --- /dev/null +++ b/install-dev/langs/nl/data/meta.xml @@ -0,0 +1,159 @@ + + + + 404 error + This page cannot be found + error, 404, not found + page-not-found + + + Best sales + Our best sales + best sales + best-sales + + + Contact us + Use our form to contact us + contact, form, e-mail + contact-us + + + + <description>Shop powered by PrestaShop</description> + <keywords>shop, prestashop</keywords> + <url_rewrite/> + </meta> + <meta id="manufacturer" id_shop="1"> + <title>Manufacturers + Manufacturers list + manufacturer + manufacturers + + + New products + Our new products + new, products + new-products + + + Forgot your password + Enter your e-mail address used to register in goal to get e-mail with your new password + forgot, password, e-mail, new, reset + password-recovery + + + Prices drop + Our special products + special, prices drop + prices-drop + + + Sitemap + Lost ? Find what your are looking for + sitemap + sitemap + + + Suppliers + Suppliers list + supplier + supplier + + + Address + + + address + + + Addresses + + + addresses + + + Authentication + + + authentication + + + Cart + + + cart + + + Discount + + + discount + + + Order history + + + order-history + + + Identity + + + identity + + + My account + + + my-account + + + Order follow + + + order-follow + + + Order slip + + + order-slip + + + Order + + + order + + + Search + + + search + + + Stores + + + stores + + + Order + + + quick-order + + + Guest tracking + + + guest-tracking + + + Order confirmation + + + order-confirmation + + diff --git a/install-dev/langs/nl/data/order_return_state.xml b/install-dev/langs/nl/data/order_return_state.xml new file mode 100644 index 000000000..37ad31de9 --- /dev/null +++ b/install-dev/langs/nl/data/order_return_state.xml @@ -0,0 +1,18 @@ + + + + Waiting for confirmation + + + Waiting for package + + + Package received + + + Return denied + + + Return completed + + diff --git a/install-dev/langs/nl/data/order_state.xml b/install-dev/langs/nl/data/order_state.xml new file mode 100644 index 000000000..c44dc3358 --- /dev/null +++ b/install-dev/langs/nl/data/order_state.xml @@ -0,0 +1,51 @@ + + + + Awaiting cheque payment + + + + Payment accepted + + + + Preparation in progress + + + + Shipped + + + + Delivered +
        - - - - {if isset($params.hint)} - - {$params.title} - - {else} - {$params.title} - {/if} - - {if (!isset($params.orderby) || $params.orderby) && !$simple_header} - - - - - - - - {/if} -
        - {if $shop_link_type == 'shop'} - {l s='Shop'} - {else} - {l s='Group shop'} - {/if} -
        {l s='Actions'}{if !$simple_header}{/if}
        - {if $has_bulk_actions} - -- - {/if} - - {if isset($params.search) && !$params.search} - -- - {else} - {if $params.type == 'bool'} - - {elseif $params.type == 'date' || $params.type == 'datetime'} - {l s='From'} - {l s='To'} - {elseif $params.type == 'select'} - {if isset($params.filter_key)} - +
        + {if $has_bulk_actions} + {/if} - {else} - + + {if isset($params.hint)}{$params.hint} {/if} + + {$params.title} + + {if (!isset($params.orderby) || $params.orderby) && !$simple_header} +
        + + + + + {elseif !$simple_header} +
          + {/if} +
        + {if $shop_link_type == 'shop'} + {l s='Shop'} + {else} + {l s='Group shop'} + {/if} +
          +
        {l s='Actions'}{if !$simple_header}
         {/if}
        + {if $has_bulk_actions} + -- + {/if} + ----
        + {if isset($params.search) && !$params.search} + -- + {else} + {if $params.type == 'bool'} + + {elseif $params.type == 'date' || $params.type == 'datetime'} + {l s='From'}
        + {l s='To'} + {elseif $params.type == 'select'} + {if isset($params.filter_key)} + + {/if} + {else} + + {/if} + {/if} +
        ----