diff --git a/.gitignore b/.gitignore index c72b887a2..beb165d67 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,10 @@ themes/default/cache/*.js themes/default/cache/*.css modules/*/translations/*.php !modules/*/translations/index.php +mails/* +!mails/en +modules/*/mails/* +!modules/*/mails/en +translations/* +!translations/*.gzip diff --git a/admin-dev/functions.php b/admin-dev/functions.php index d24502367..d64c3e3e8 100644 --- a/admin-dev/functions.php +++ b/admin-dev/functions.php @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ - +require_once(dirname(__FILE__).'/../images.inc.php'); function bindDatepicker($id, $time) { if ($time) diff --git a/admin-dev/themes/default/css/admin.css b/admin-dev/themes/default/css/admin.css index 5ff97f4e0..ea86b6c6b 100644 --- a/admin-dev/themes/default/css/admin.css +++ b/admin-dev/themes/default/css/admin.css @@ -664,4 +664,8 @@ ul.listForm li {padding-bottom:3px;} /******** CREATE AN ORDER **************/ #carrier_form label{padding-top:0} -#carrier_form input{margin-top:3px} \ No newline at end of file +#carrier_form input{margin-top:3px} + +/************** SCENE *****************/ + +#large_scene_image{clear:both;border:1px solid transparent;} \ No newline at end of file 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 f5cc56a04..365736bbd 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 @@ -27,7 +27,7 @@ {block name="label"} {if $input.type == 'color'} -
+
{/if} {$smarty.block.parent} {/block} diff --git a/admin-dev/themes/default/template/controllers/cart_rules/form.js b/admin-dev/themes/default/template/controllers/cart_rules/form.js index bad35e93d..ff7c38d9a 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/form.js +++ b/admin-dev/themes/default/template/controllers/cart_rules/form.js @@ -84,6 +84,13 @@ function addCartRuleOption(item) function updateProductRuleShortDescription(item) { + /******* For IE: put a product in condition on cart rules *******/ + if(typeof String.prototype.trim !== 'function') { + String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + } + } + var id1 = $(item).attr('id').replace('_add', '').replace('_remove', ''); var id2 = id1.replace('_select', ''); var length = $('#' + id1 + '_2 option').length; diff --git a/admin-dev/themes/default/template/controllers/login/content.tpl b/admin-dev/themes/default/template/controllers/login/content.tpl index b1cfff216..784fdec19 100755 --- a/admin-dev/themes/default/template/controllers/login/content.tpl +++ b/admin-dev/themes/default/template/controllers/login/content.tpl @@ -22,91 +22,79 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - -
-
- {if isset($errors)} -

{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}

-
    - {foreach from=$errors item="error"} -
  1. {$error}
  2. - {/foreach} -
- {/if} -
-
- {if isset($warningSslMessage)} -
- {$warningSslMessage} -
- {/if} -
-

{$shop_name}

- {if !isset($wrong_folder_name) && !isset($wrong_install_name)} -
-
- - -
- -
- - -
- -
- - -

- -

- -

- {l s='Lost password?'} -

-
-
- -
- -
-

{l s='Forgot your password?'}

-

{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}

- -
- - -
- -
- - -

- -

- -

- -

-
-
-
- {else} -
-

{l s='For security reasons, you cannot connect to the Back Office until after you have:'}

-
    - {if isset($wrong_install_name) && $wrong_install_name == true}
  • {l s='deleted the /install folder'}
  • {/if} - {if isset($wrong_folder_name) && $wrong_folder_name == true}
  • {l s='renamed the /admin folder (e.g. /admin%d)' sprintf=$randomNb}
  • {/if} -
- {if isset($wrong_folder_name) && $wrong_folder_name == true}

{l s='Please then access this page by the new URL (e.g. http://www.yoursite.com/admin%d)' sprintf=$randomNb}

{/if} -
- {/if} -
-

© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.

-
+ +
+
+{if isset($errors)} +

{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}

+
    + {foreach from=$errors item="error"} +
  1. {$error}
  2. + {/foreach} +
+{/if} +
+
+{if isset($warningSslMessage)} +
{$warningSslMessage}
+{/if} +
+

{$shop_name}

+{if !isset($wrong_folder_name) && !isset($wrong_install_name)} +
+
+ + +
+
+ + +
+
+ +

+ +

+

+ {l s='Lost password?'} +

+
+
+ +
+
+

{l s='Forgot your password?'}

+

{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}

+
+ + +
+
+ +

+ +

+

+ +

+
+
+
+{else} +
+

{l s='For security reasons, you cannot connect to the Back Office until after you have:'}

+
    + {if isset($wrong_install_name) && $wrong_install_name == true}
  • {l s='deleted the /install folder'}
  • {/if} + {if isset($wrong_folder_name) && $wrong_folder_name == true}
  • {l s='renamed the /admin folder (e.g. %s)' sprintf=$randomNb}
  • {/if} +
+

{l s='Please then access this page by the new URL (e.g. %s)' sprintf=$adminUrl}

+
+{/if} +
+

© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.

+
\ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/modules/js.tpl b/admin-dev/themes/default/template/controllers/modules/js.tpl index b0bc45df2..d920b668b 100644 --- a/admin-dev/themes/default/template/controllers/modules/js.tpl +++ b/admin-dev/themes/default/template/controllers/modules/js.tpl @@ -321,6 +321,46 @@ catch(e){} return false; }); + + $('.toggle_favorite').live('click', function(event) + { + var el = $(this); + var value_pref = el.data('value'); + var module_pref = el.data('module'); + var action_pref = 'f'; + try + { + resAjax = $.ajax({ + type:"POST", + url : ajaxCurrentIndex, + async: true, + data : { + ajax : "1", + token : token, + controller : "AdminModules", + action : "saveFavoritePreferences", + action_pref : action_pref, + module_pref : module_pref, + value_pref : value_pref + }, + success : function(data) + { + // res.status = cache or refresh + if (data == 'OK') + { + el.parent('div').find('.toggle_favorite').toggle(); + } + + }, + error: function(res,textStatus,jqXHR) + { + //jAlert("TECHNICAL ERROR"+res); + } + }); + } + catch(e){} + return false; + }); }); {/literal} diff --git a/admin-dev/themes/default/template/controllers/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl index ff01f4620..aaee81658 100644 --- a/admin-dev/themes/default/template/controllers/modules/list.tpl +++ b/admin-dev/themes/default/template/controllers/modules/list.tpl @@ -79,7 +79,18 @@

{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}

{if isset($module->message)}
{$module->message}
{/if}
- {if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if} + {if !isset($module->not_on_disk)} + {$module->optionsHtml} + {if isset($module->preferences) && $module->preferences['favorite'] == 1} + {l s='Remove from Favorites'} + + {else} + + {l s='Mark as Favorite'} + {/if} + {else} +   + {/if}
diff --git a/admin-dev/themes/default/template/controllers/modules/page.tpl b/admin-dev/themes/default/template/controllers/modules/page.tpl index f1e49c1d9..ea759f137 100644 --- a/admin-dev/themes/default/template/controllers/modules/page.tpl +++ b/admin-dev/themes/default/template/controllers/modules/page.tpl @@ -26,7 +26,16 @@
{include file='controllers/modules/header.tpl'} {include file='controllers/modules/filters.tpl'} - + {if $upgrade_available|@count} +
+ {l s='An upgrade is available for some of your modules!'} + +
+ {/if}
- - - {if count($quick_access) > 0} +{if count($quick_access) > 0}
- {/if} - {if isset($displayBackOfficeTop)} - {$displayBackOfficeTop} - {/if} +{/if} +{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if} {* end header_infos*} - - {/if} - {/foreach} +{/if} +{/foreach} - {/if} - {* end header*} - + {* end header*} +{/if}
- {if $display_header && $install_dir_exists} -
- {l s='For security reasons, you must also:'} {l s='delete the /install folder'} -
- {/if} - - {if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)} -
- {l s='Multistore configuration for'} - {$shop_list} -
- {/if} +{if $display_header && $install_dir_exists} +
+ {l s='For security reasons, you must also:'} {l s='delete the /install folder'} +
+{/if} +{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)} +
+ {l s='Multistore configuration for'} {$shop_list} +
+{/if} \ No newline at end of file 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 596c5ba3e..add0db76d 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -116,6 +116,8 @@ {if isset($params.color) && isset($tr.color)} {/if} + {/block} + {block name="close_td"} {/block} {/foreach} 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 31df8a497..1a821e4f6 100644 --- a/admin-dev/themes/default/template/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_header.tpl @@ -189,8 +189,8 @@ {elseif $params.type == 'date' || $params.type == 'datetime'} - {l s='From'}
- {l s='To'} + {l s='From'}
+ {l s='To'} {elseif $params.type == 'select'} {if isset($params.filter_key)} list_activities as $i => $activity): ?> - + diff --git a/install-dev/theme/views/license.phtml b/install-dev/theme/views/license.phtml index 71d63d5be..ca0089b63 100644 --- a/install-dev/theme/views/license.phtml +++ b/install-dev/theme/views/license.phtml @@ -4,59 +4,7 @@

l('License Agreements') ?>

l('To enjoy the many features that are offered by PrestaShop, please read the license terms below. PrestaShop core is licensed under OSL 3.0, while the modules and themes are licensed under AFL 3.0.') ?>

-

Core: Open Software License ("OSL") v. 3.0

-

This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

-

Licensed under the Open Software License version 3.0

-

1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

-
    -
  1. to reproduce the Original Work in copies, either alone or as part of a collective work
  2. -
  3. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work
  4. -
  5. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License
  6. -
  7. to perform the Original Work publicly
  8. -
  9. to display the Original Work publicly
  10. -
-

2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

-

3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

-

4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

-

5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

-

6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

-

7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

-

8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

-

9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

-

10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

-

11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

-

12. Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

-

13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

-

14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

-

15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

-

16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under Open Software License ("OSL") v. 3.0" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

- -

Modules and Themes: Academic Free License ("AFL") v. 3.0

-

This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

-

Licensed under the Academic Free License version 3.0

-

1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

-
    -
  1. to reproduce the Original Work in copies, either alone or as part of a collective work;
  2. -
  3. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
  4. -
  5. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
  6. -
  7. to perform the Original Work publicly; and
  8. -
  9. to display the Original Work publicly.
  10. -
-

2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

-

3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

-

4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

-

5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

-

6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

-

7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

-

8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

-

9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

-

10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

-

11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

-

12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

-

13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

-

14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

-

15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

-

16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

+displayTemplate('license_content'); ?>
diff --git a/install-dev/theme/views/license_content.phtml b/install-dev/theme/views/license_content.phtml new file mode 100644 index 000000000..0ca4d805e --- /dev/null +++ b/install-dev/theme/views/license_content.phtml @@ -0,0 +1,53 @@ +

Core: Open Software License ("OSL") v. 3.0

+

This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

+

Licensed under the Open Software License version 3.0

+

1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

+
    +
  1. to reproduce the Original Work in copies, either alone or as part of a collective work
  2. +
  3. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work
  4. +
  5. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License
  6. +
  7. to perform the Original Work publicly
  8. +
  9. to display the Original Work publicly
  10. +
+

2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

+

3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

+

4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

+

5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

+

6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

+

7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

+

8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

+

9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

+

10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

+

11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

+

12. Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

+

13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

+

14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

+

15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

+

16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under Open Software License ("OSL") v. 3.0" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

+ +

Modules and Themes: Academic Free License ("AFL") v. 3.0

+

This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

+

Licensed under the Academic Free License version 3.0

+

1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

+
    +
  1. to reproduce the Original Work in copies, either alone or as part of a collective work;
  2. +
  3. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
  4. +
  5. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
  6. +
  7. to perform the Original Work publicly; and
  8. +
  9. to display the Original Work publicly.
  10. +
+

2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

+

3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

+

4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

+

5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

+

6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

+

7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

+

8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

+

9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

+

10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

+

11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

+

12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

+

13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

+

14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

+

15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

+

16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

\ No newline at end of file diff --git a/install-dev/theme/views/process.phtml b/install-dev/theme/views/process.phtml index 67b1e4320..3383edae2 100644 --- a/install-dev/theme/views/process.phtml +++ b/install-dev/theme/views/process.phtml @@ -75,7 +75,7 @@ var process_steps = process_steps) ?>;
- diff --git a/install-dev/upgrade/php/add_column_orders_reference_if_not_exists.php b/install-dev/upgrade/php/add_column_orders_reference_if_not_exists.php index 5088f1ca7..3a5676e63 100644 --- a/install-dev/upgrade/php/add_column_orders_reference_if_not_exists.php +++ b/install-dev/upgrade/php/add_column_orders_reference_if_not_exists.php @@ -28,5 +28,5 @@ function add_column_orders_reference_if_not_exists() { $column = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'orders` LIKE "reference"'); if (empty($column)) - return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'orders` ADD COLUMN `reference` varchar(9) AFTER `id_order`'); + return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'orders` ADD COLUMN `reference` varchar(10) AFTER `id_order`'); } diff --git a/install-dev/upgrade/php/block_category_1521.php b/install-dev/upgrade/php/block_category_1521.php index fe7c6825b..c6b1846f7 100644 --- a/install-dev/upgrade/php/block_category_1521.php +++ b/install-dev/upgrade/php/block_category_1521.php @@ -26,11 +26,11 @@ function block_category_1521() { - if (!Db::getInstance()->ExecuteS('SELECT `'._DB_PREFIX_.'configuration` WHERE `name`=\'BLOCK_CATEG_MAX_DEPTH\' ')) + if (!Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\' ')) Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration` ,`id_shop_group` ,`id_shop` ,`name` ,`value` ,`date_add` ,`date_upd`) - VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 2, NOW(), NOW())'); - else if (Db::getInstance()->ExecuteS('SELECT `'._DB_PREFIX_.'configuration` WHERE and `value` IS NOT NULL AND `value` <> 0')) - Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = 2 WHERE `name`=\'BLOCK_CATEG_MAX_DEPTH\' '); + VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 4, NOW(), NOW())'); + else if ($maxdepth = (int)Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `value` IS NOT NULL AND `value` <> 0')) + Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = '.($maxdepth + 1).' WHERE `name` LIKE\'BLOCK_CATEG_MAX_DEPTH\''); } \ No newline at end of file diff --git a/install-dev/upgrade/php/p15018_change_image_types.php b/install-dev/upgrade/php/p15018_change_image_types.php index f7ebcf3c9..37cc9c5d8 100644 --- a/install-dev/upgrade/php/p15018_change_image_types.php +++ b/install-dev/upgrade/php/p15018_change_image_types.php @@ -72,7 +72,7 @@ function p15018_change_image_types() $option ); $folder = implode(DIRECTORY_SEPARATOR, str_split((string)$row['id_image'])).DIRECTORY_SEPARATOR; - if (file_exists(_PS_ROOT_DIR_.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'.jpg')) + if (file_exists(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'.jpg')) foreach ($replace_types['products'] as $old_type => $new_type) p15018_copy_or_rename( _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'-'.$old_type.'.jpg', diff --git a/install-dev/upgrade/php/p1540_add_missing_columns.php b/install-dev/upgrade/php/p1540_add_missing_columns.php index 4d7775b0a..a86938056 100644 --- a/install-dev/upgrade/php/p1540_add_missing_columns.php +++ b/install-dev/upgrade/php/p1540_add_missing_columns.php @@ -47,10 +47,15 @@ function p1540_add_missing_columns() $list_fields[$k] = $field['Field']; if (!in_array('id_shop', $list_fields)) - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group` ')) + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group`')) $errors[] = Db::getInstance()->getMsgError(); } - + + $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"');; + if (is_array($key_exists)) + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `product_sqlstock`')) + $errors[] = Db::getInstance()->getMsgError(); + if (count($errors)) return array('error' => 1, 'msg' => implode(',', $errors)) ; } \ No newline at end of file diff --git a/install-dev/upgrade/php/update_mailalerts_add_column_idshop.php b/install-dev/upgrade/php/update_mailalerts_add_column_idshop.php index 9920567a1..c79407dec 100644 --- a/install-dev/upgrade/php/update_mailalerts_add_column_idshop.php +++ b/install-dev/upgrade/php/update_mailalerts_add_column_idshop.php @@ -31,6 +31,7 @@ function update_mailalerts_add_column_idshop() { $installed = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "mailalerts"'); + $installed &= Db::getInstance()->getValue('SHOW TABLES LIKE "'._DB_PREFIX_.'mailalert_customer_oos"'); if ($installed && !Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mailalert_customer_oos` ADD COLUMN `id_shop` int(11) NOT NULL default "0" AFTER `id_customer`')) return array('error' => 1, 'msg' => sprintf('unable to create column id_shop (%s)', Db::getInstance ()->getMsgError())); return true; diff --git a/install-dev/upgrade/php/update_order_messages.php b/install-dev/upgrade/php/update_order_messages.php index 357f2449f..369b753d5 100644 --- a/install-dev/upgrade/php/update_order_messages.php +++ b/install-dev/upgrade/php/update_order_messages.php @@ -33,42 +33,38 @@ function update_order_messages() $nb_loop = ceil($count_messages / $step); for($i = 0; $i < $nb_loop; $i++) { - $sql = 'SELECT id_message, message FROM '._DB_PREFIX_.'message LIMIT '.(int)$start.', '.(int)$step; - if ($messages = Db::getInstance()->executeS($sql)) - { - if(is_array($messages)) - foreach($messages as $message) + $sql = 'SELECT id_message, message FROM `'._DB_PREFIX_.'message` WHERE message REGEXP \'query($sql)) + while ($message = Db::getInstance()->nextRow($messages)) + { + if(is_array($message)) { - $sql = 'UPDATE '._DB_PREFIX_.'message SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(br2nl($message['message']))).'\' + $sql = 'UPDATE `'._DB_PREFIX_.'message` SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(br2nl($message['message']))).'\' WHERE id_message = '.(int)$message['id_message']; $result = Db::getInstance()->execute($sql); } - $start += ($step + 1); - } + } } - - $count_messages = Db::getInstance()->getValue('SELECT count(id_customer_message) FROM '._DB_PREFIX_.'customer_message'); $nb_loop = $start = 0; if($count_messages > 0) $nb_loop = ceil($count_messages / $step); for($i = 0; $i < $nb_loop; $i++) { - $sql = 'SELECT id_customer_message, message FROM '._DB_PREFIX_.'customer_message LIMIT '.(int)$start.', '.(int)$step; - if ($messages = Db::getInstance()->executeS($sql)) - { - if(is_array($messages)) - foreach($messages as $message) - { - $sql = 'UPDATE '._DB_PREFIX_.'customer_message SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message']))).'\' + $sql = 'SELECT id_customer_message, message FROM `'._DB_PREFIX_.'customer_message` WHERE message REGEXP \'query($sql)) + while ($message = Db::getInstance()->nextRow($messages)) + { + if(is_array($message)) + { + $sql = 'UPDATE `'._DB_PREFIX_.'customer_message` SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message']))).'\' WHERE id_customer_message = '.(int)$message['id_customer_message']; Db::getInstance()->execute($sql); } - $start += ($step + 1); - } + } } } function br2nl($str) { - return preg_replace("//i", "\n", $str); + return str_replace(array('
', '
', '
'), "\n", $str); } \ No newline at end of file diff --git a/install-dev/upgrade/sql/1.5.0.13.sql b/install-dev/upgrade/sql/1.5.0.13.sql index 65121283c..c89ae965e 100644 --- a/install-dev/upgrade/sql/1.5.0.13.sql +++ b/install-dev/upgrade/sql/1.5.0.13.sql @@ -23,7 +23,7 @@ INSERT INTO `PREFIX_order_invoice_payment` -- Step 2: Add the collumn id_order_reference ALTER TABLE `PREFIX_order_payment` - ADD COLUMN `order_reference` VARCHAR(9) AFTER `id_order`, + ADD COLUMN `order_reference` VARCHAR(10) AFTER `id_order`, ADD INDEX `order_reference`(`order_reference`); diff --git a/install-dev/upgrade/sql/1.5.4.0.sql b/install-dev/upgrade/sql/1.5.4.0.sql index 4e6e1cee2..4c291e693 100644 --- a/install-dev/upgrade/sql/1.5.4.0.sql +++ b/install-dev/upgrade/sql/1.5.4.0.sql @@ -33,7 +33,8 @@ CREATE TABLE `PREFIX_tab_module_preference` ( /* PHP:add_new_tab(AdminMarketing, es:Marketing|it:Marketing|en:Marketing|de:Marketing|fr:Marketing, 1); */; -ALTER TABLE `PREFIX_stock_available` DROP INDEX `product_sqlstock`; +/* PHP:p1540_add_missing_columns(); */; + ALTER TABLE `PREFIX_stock_available` ADD UNIQUE `product_sqlstock` (`id_product`, `id_product_attribute`, `id_shop`, `id_shop_group`); UPDATE PREFIX_configuration SET `value` = '8388608' WHERE `name` = 'PS_PRODUCT_PICTURE_MAX_SIZE' AND `value` <= '524288'; diff --git a/install-dev/upgrade/sql/1.5.4.1.sql b/install-dev/upgrade/sql/1.5.4.1.sql new file mode 100644 index 000000000..4d6f37c0e --- /dev/null +++ b/install-dev/upgrade/sql/1.5.4.1.sql @@ -0,0 +1,11 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_carrier` CHANGE `max_weight` `max_weight` DECIMAL( 20, 6 ) NULL DEFAULT '0'; + +DELETE ms.*, hm.* FROM `PREFIX_module_shop` ms INNER JOIN `PREFIX_hook_module` hm USING (`id_module`) INNER JOIN `PREFIX_module` m USING (`id_module`) WHERE m.`name` LIKE 'backwardcompatibility'; + +UPDATE `PREFIX_module` SET `active` = 0 WHERE `name` LIKE 'backwardcompatibility'; + +ALTER TABLE `PREFIX_orders` CHANGE `reference` `reference` VARCHAR( 10 ) NULL DEFAULT NULL; + +ALTER TABLE `PREFIX_order_payment` CHANGE `order_reference` `order_reference` VARCHAR( 10 ) NULL DEFAULT NULL; \ No newline at end of file diff --git a/install-dev/upgrade/upgrade.php b/install-dev/upgrade/upgrade.php index 3aefe2d1e..81b0481a8 100644 --- a/install-dev/upgrade/upgrade.php +++ b/install-dev/upgrade/upgrade.php @@ -246,6 +246,28 @@ if(!defined('_PS_CACHE_ENABLED_')) define('_PS_CACHE_ENABLED_', '0'); if(!defined('_MYSQL_ENGINE_')) define('_MYSQL_ENGINE_', 'MyISAM'); + +global $smarty; +// Clean all cache values +Cache::clean('*'); + +Context::getContext()->shop = new Shop(1); +Shop::setContext(Shop::CONTEXT_SHOP, 1); +Configuration::loadConfiguration(); +if (!isset(Context::getContext()->language) || !Validate::isLoadedObject(Context::getContext()->language)) + if ($id_lang = (int)Configuration::get('PS_LANG_DEFAULT')) + Context::getContext()->language = new Language($id_lang); +if (!isset(Context::getContext()->country) || !Validate::isLoadedObject(Context::getContext()->country)) + if ($id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT')) + Context::getContext()->country = new Country((int)$id_country); + +Context::getContext()->cart = new Cart(); +Context::getContext()->employee = new Employee(1); +if (!defined('_PS_SMARTY_FAST_LOAD_')) + define('_PS_SMARTY_FAST_LOAD_', true); +require_once _PS_ROOT_DIR_.'/config/smarty.config.inc.php'; + +Context::getContext()->smarty = $smarty; if(isset($_GET['customModule']) AND $_GET['customModule'] == 'desactivate') { diff --git a/js/jquery/plugins/jqzoom/jquery.jqzoom.js b/js/jquery/plugins/jqzoom/jquery.jqzoom.js index 2e03940a7..d74f8dc1c 100755 --- a/js/jquery/plugins/jqzoom/jquery.jqzoom.js +++ b/js/jquery/plugins/jqzoom/jquery.jqzoom.js @@ -31,9 +31,10 @@ var imageWidth = $(this).get(0).offsetWidth; var imageHeight = $(this).get(0).offsetHeight; - noalt = $(this).attr("alt"); + attr = typeof($(this).attr("rel")) != 'undefined' ? "rel" : "alt"; + noalt = $(this).attr(attr); var bigimage = noalt; - $(this).attr("alt", ''); + $(this).attr(attr, ''); if($("div.zoomdiv").get().length == 0) $(this).after("
"); @@ -67,7 +68,7 @@ $("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ; }); }, function() { - $(this).attr("alt", noalt); + $(this).attr(attr, noalt); $("div.zoomdiv").hide(); $(document.body).unbind("mousemove"); $(".lenszoom").remove(); diff --git a/modules/blockadvertising/config.xml b/modules/blockadvertising/config.xml index 37f1f7221..62b227aae 100755 --- a/modules/blockadvertising/config.xml +++ b/modules/blockadvertising/config.xml @@ -1,9 +1,9 @@ blockadvertising - + - + 1 diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 2eb44e093..c42dc72cf 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -35,7 +35,7 @@ var ajaxCart = { overrideButtonsInThePage : function(){ //for every 'add' buttons... $('.ajax_add_to_cart_button').unbind('click').click(function(){ - var idProduct = $(this).attr('rel').replace('ajax_id_product_', ''); + var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', ''); if ($(this).attr('disabled') != 'disabled') ajaxCart.add(idProduct, null, false, this); return false; @@ -449,8 +449,8 @@ var ajaxCart = { content += '
'; else content += ''; - if (typeof(freeShippingTranslation) != 'undefined') - content += '' + (parseFloat(this.price_float) > 0 ? this.priceByLine : freeShippingTranslation) + ''; + if (typeof(freeProductTranslation) != 'undefined') + content += '' + (parseFloat(this.price_float) > 0 ? this.priceByLine : freeProductTranslation) + ''; content += ''; if (this.hasAttributes) content += '
- +
-
 
+
+
 
{/if} \ No newline at end of file diff --git a/modules/blockviewed/blockviewed.php b/modules/blockviewed/blockviewed.php index d7cd1aed0..0ea240300 100644 --- a/modules/blockviewed/blockviewed.php +++ b/modules/blockviewed/blockviewed.php @@ -103,16 +103,16 @@ class BlockViewed extends Module $productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT image_shop.id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite FROM '._DB_PREFIX_.'product p - LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') - LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. - Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' - LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image) '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image) LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') WHERE p.id_product IN ('.$productIds.') - AND (i.id_image IS NULL OR image_shop.id_shop='.(int)$this->context->shop->id.') AND pl.id_lang = '.(int)($params['cookie']->id_lang).' - AND cl.id_lang = '.(int)($params['cookie']->id_lang) + AND cl.id_lang = '.(int)($params['cookie']->id_lang).' + GROUP BY product_shop.id_product' ); $productsImagesArray = array(); diff --git a/modules/blockwishlist/mails/en/wishlink.html b/modules/blockwishlist/mails/en/wishlink.html index 6089277f2..d82bfb660 100644 --- a/modules/blockwishlist/mails/en/wishlink.html +++ b/modules/blockwishlist/mails/en/wishlink.html @@ -20,7 +20,7 @@   -Message from {shop_name} +Message from {shop_name}   @@ -32,7 +32,7 @@   -{shop_name} realised with PrestaShop™ +{shop_name} realised with PrestaShop™ diff --git a/modules/blockwishlist/mails/en/wishlist.html b/modules/blockwishlist/mails/en/wishlist.html index 1deb338c9..6678d8224 100644 --- a/modules/blockwishlist/mails/en/wishlist.html +++ b/modules/blockwishlist/mails/en/wishlist.html @@ -20,7 +20,7 @@   -Message from {shop_name} +Message from {shop_name}   @@ -32,7 +32,7 @@   -{shop_name} Powered by PrestaShop™ +{shop_name} Powered by PrestaShop™ diff --git a/modules/cashondelivery/logo.png b/modules/cashondelivery/logo.png new file mode 100644 index 000000000..2b7b2685a Binary files /dev/null and b/modules/cashondelivery/logo.png differ diff --git a/modules/favoriteproducts/favoriteproducts.js b/modules/favoriteproducts/favoriteproducts.js index 4aa058ec1..ae490fdbb 100755 --- a/modules/favoriteproducts/favoriteproducts.js +++ b/modules/favoriteproducts/favoriteproducts.js @@ -1,7 +1,7 @@ $('document').ready(function(){ $('#favoriteproducts_block_extra_add').click(function(){ $.ajax({ - url: favorite_products_url_add + '?rand=' + new Date().getTime(), + url: favorite_products_url_add + '&rand=' + new Date().getTime(), type: "POST", headers: { "cache-control": "no-cache" }, data: { @@ -20,7 +20,7 @@ $('document').ready(function(){ }); $('#favoriteproducts_block_extra_remove').click(function(){ $.ajax({ - url: favorite_products_url_remove + '?rand=' + new Date().getTime(), + url: favorite_products_url_remove + '&rand=' + new Date().getTime(), type: "POST", headers: { "cache-control": "no-cache" }, data: { @@ -39,7 +39,7 @@ $('document').ready(function(){ }); $('#favoriteproducts_block_extra_added').click(function(){ $.ajax({ - url: favorite_products_url_remove + '?rand=' + new Date().getTime(), + url: favorite_products_url_remove + '&rand=' + new Date().getTime(), type: "POST", headers: { "cache-control": "no-cache" }, data: { @@ -58,7 +58,7 @@ $('document').ready(function(){ }); $('#favoriteproducts_block_extra_removed').click(function(){ $.ajax({ - url: favorite_products_url_add + '?rand=' + new Date().getTime(), + url: favorite_products_url_add + '&rand=' + new Date().getTime(), type: "POST", headers: { "cache-control": "no-cache" }, data: { diff --git a/modules/followup/mails/en/followup_1.html b/modules/followup/mails/en/followup_1.html index b49fce7bf..d6518515b 100644 --- a/modules/followup/mails/en/followup_1.html +++ b/modules/followup/mails/en/followup_1.html @@ -14,13 +14,13 @@   -Hi {firstname} {lastname}, +Hi {firstname} {lastname},   -Your cart at {shop_name} +Your cart at {shop_name}   @@ -38,7 +38,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/followup/mails/en/followup_2.html b/modules/followup/mails/en/followup_2.html index 8047b701b..963414077 100644 --- a/modules/followup/mails/en/followup_2.html +++ b/modules/followup/mails/en/followup_2.html @@ -14,13 +14,13 @@   -Hi {firstname} {lastname}, +Hi {firstname} {lastname},   -Thank you for your order at {shop_name} +Thank you for your order at {shop_name}   @@ -38,7 +38,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/followup/mails/en/followup_3.html b/modules/followup/mails/en/followup_3.html index 7b0a818cc..f6d033240 100644 --- a/modules/followup/mails/en/followup_3.html +++ b/modules/followup/mails/en/followup_3.html @@ -14,13 +14,13 @@   -Hi {firstname} {lastname}, +Hi {firstname} {lastname},   -Thanks for your trust +Thanks for your trust   @@ -38,7 +38,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/followup/mails/en/followup_4.html b/modules/followup/mails/en/followup_4.html index ac793ea83..ff59cd920 100644 --- a/modules/followup/mails/en/followup_4.html +++ b/modules/followup/mails/en/followup_4.html @@ -14,13 +14,13 @@   -Hi {firstname} {lastname}, +Hi {firstname} {lastname},   -Your cart at {shop_name} +Your cart at {shop_name}   @@ -38,7 +38,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/gsitemap/config.xml b/modules/gsitemap/config.xml deleted file mode 100755 index 8cb6e8b39..000000000 --- a/modules/gsitemap/config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - gsitemap - - - - - - 1 - 0 - - \ No newline at end of file diff --git a/modules/gsitemap/gsitemap-cron.php b/modules/gsitemap/gsitemap-cron.php deleted file mode 100755 index e8ae96de2..000000000 --- a/modules/gsitemap/gsitemap-cron.php +++ /dev/null @@ -1,19 +0,0 @@ -link = new Link(); - -echo $gsitemap->generateSitemapIndex(); \ No newline at end of file diff --git a/modules/gsitemap/gsitemap.php b/modules/gsitemap/gsitemap.php deleted file mode 100644 index c0a747e31..000000000 --- a/modules/gsitemap/gsitemap.php +++ /dev/null @@ -1,460 +0,0 @@ - -* @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 -*/ - -if (!defined('_PS_VERSION_')) - exit; - -class Gsitemap extends Module -{ - private $_html = ''; - private $_postErrors = array(); - - public function __construct() - { - $this->name = 'gsitemap'; - $this->tab = 'seo'; - $this->version = '1.9'; - $this->author = 'PrestaShop'; - $this->need_instance = 0; - - parent::__construct(); - - $this->displayName = $this->l('Google sitemap'); - $this->description = $this->l('Generate your Google sitemap file.'); - - if (!defined('GSITEMAP_FILE')) - define('GSITEMAP_FILE', dirname(__FILE__).'/../../sitemap.xml'); - } - - public function uninstall() - { - file_put_contents(GSITEMAP_FILE, ''); - return parent::uninstall(); - } - - private function _postValidation() - { - file_put_contents(GSITEMAP_FILE, ''); - if (!($fp = fopen(GSITEMAP_FILE, 'w'))) - $this->_postErrors[] = sprintf($this->l('Cannot create %ssitemap.xml file..'), realpath(dirname(__FILE__.'/../..')).'/'); - else - fclose($fp); - } - - private function getUrlWith($url, $key, $value) - { - if (empty($value)) - return $url; - if (strpos($url, '?') !== false) - return $url.'&'.$key.'='.$value; - return $url.'?'.$key.'='.$value; - } - - private function _postProcess() - { - Configuration::updateValue('GSITEMAP_ALL_CMS', (int)Tools::getValue('GSITEMAP_ALL_CMS')); - Configuration::updateValue('GSITEMAP_ALL_PRODUCTS', (int)Tools::getValue('GSITEMAP_ALL_PRODUCTS')); - - if (Shop::isFeatureActive()) - $res = $this->generateSitemapIndex(); - else - $res = $this->generateSitemap(Configuration::get('PS_SHOP_DEFAULT'), GSITEMAP_FILE); - - $this->_html .= '

'; - $this->_html .= $res ? $this->l('Sitemap file generated.') : $this->l('Error while creating sitemap file.'); - $this->_html .= '

'; - } - - /** - * Generate sitemap index to reference the sitemap of each shop - * - * @return bool - */ - public function generateSitemapIndex() - { - $xmlString = << - - -XML; - $xml = new SimpleXMLElement($xmlString); - - $sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri - FROM '._DB_PREFIX_.'shop s - INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1 - WHERE s.active = 1 - AND s.deleted = 0 - AND su.active = 1'; - if (!$result = Db::getInstance()->executeS($sql)) - return false; - - $res = true; - foreach ($result as $row) - { - $info = pathinfo(GSITEMAP_FILE); - $filename = $info['filename'].'-'.$row['id_shop'].'.'.$info['extension']; - - $replaceUrl = array('http://'.$row['domain'].$row['uri'], ((Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$row['domain_ssl'].$row['uri']); - - $last = $this->generateSitemap($row['id_shop'], $info['dirname'].'/'.$filename, $replaceUrl); - if ($last) - { - $this->_addSitemapIndexNode($xml, 'http://'.$row['domain'].(($row['uri']) ? $row['uri'] : '/').$filename, date('Y-m-d')); - } - $res &= $last; - } - - $fp = fopen(GSITEMAP_FILE, 'w'); - fwrite($fp, $xml->asXML()); - fclose($fp); - - return $res && file_exists(GSITEMAP_FILE); - } - - /** - * Generate a sitemap for a shop - * - * @param int $id_shop - * @param string $filename - * @return bool - */ - private function generateSitemap($id_shop, $filename = '', $replace_url = array()) - { - $langs = Language::getLanguages(); - $shop = new Shop($id_shop); - if (!$shop->id) - return false; - - $xmlString = << - - -XML; - - $xml = new SimpleXMLElement($xmlString); - - if (Configuration::get('PS_REWRITING_SETTINGS') && count($langs) > 1) - foreach($langs as $lang) - { - $this->_addSitemapNode($xml, Tools::getShopDomain(true, true).__PS_BASE_URI__.$lang['iso_code'].'/', '1.00', 'daily', date('Y-m-d')); - } - else - $this->_addSitemapNode($xml, Tools::getShopDomain(true, true).__PS_BASE_URI__, '1.00', 'daily', date('Y-m-d')); - - /* Product Generator */ - $sql = 'SELECT p.id_product, pl.link_rewrite, DATE_FORMAT(IF(ps.date_upd,ps.date_upd,ps.date_add), \'%Y-%m-%d\') date_upd, pl.id_lang, cl.`link_rewrite` category, ean13, i.id_image, il.legend legend_image, ( - SELECT MIN(level_depth) - FROM '._DB_PREFIX_.'product p2 - '.Shop::addSqlAssociation('product', 'p2').' - LEFT JOIN '._DB_PREFIX_.'category_product cp2 ON p2.id_product = cp2.id_product - LEFT JOIN '._DB_PREFIX_.'category c2 ON cp2.id_category = c2.id_category - WHERE p2.id_product = p.id_product AND product_shop.`active` = 1 AND c2.`active` = 1) AS level_depth - FROM '._DB_PREFIX_.'product p - LEFT JOIN '._DB_PREFIX_.'product_shop ps ON (ps.id_product = p.id_product AND ps.id_shop = '.(int)$id_shop.') - LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product) - LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (ps.id_category_default = cl.id_category AND pl.id_lang = cl.id_lang AND cl.id_shop = '.(int)$id_shop.') - LEFT JOIN '._DB_PREFIX_.'image i ON p.id_product = i.id_product - LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image) - LEFT JOIN '._DB_PREFIX_.'lang l ON (pl.id_lang = l.id_lang) - WHERE l.`active` = 1 - AND ps.`active` = 1 - AND ps.id_shop = '.(int)$id_shop.' - '.(Configuration::get('GSITEMAP_ALL_PRODUCTS') ? '' : 'HAVING level_depth IS NOT NULL').' - ORDER BY pl.id_product, pl.id_lang ASC'; - - $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql); - - // array used to know which product/image was already added (blacklist) - $done = null; - $sitemap = null; - - // iterates on the products, to gather the image ids - while ($product = Db::getInstance()->nextRow($resource)) - { - // if the product has not been added - $id_product = $product['id_product']; - if (!isset($done[$id_product]['added'])) - { - // priority - if (($priority = 0.7 - ($product['level_depth'] / 10)) < 0.1) - $priority = 0.1; - - // adds the product - $tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang'])); - $sitemap = $this->_addSitemapNode($xml, $tmpLink, $priority, 'weekly', substr($product['date_upd'], 0, 10)); - - // considers the product has added - $done[$id_product]['added'] = true; - } - - // if the image has not been added - $id_image = $product['id_image']; - if (!isset($done[$id_product][$id_image]) && $id_image) - { - // adds the image - $this->_addSitemapNodeImage($sitemap, $product); - - // considers the image as added - $done[$id_product][$id_image] = true; - } - } - - /* Categories Generator */ - if (Configuration::get('PS_REWRITING_SETTINGS')) - $categories = Db::getInstance()->executeS(' - SELECT c.id_category, c.level_depth, link_rewrite, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd, cl.id_lang - FROM '._DB_PREFIX_.'category c - LEFT JOIN '._DB_PREFIX_.'category_lang cl ON c.id_category = cl.id_category - LEFT JOIN '._DB_PREFIX_.'lang l ON cl.id_lang = l.id_lang - WHERE l.`active` = 1 AND c.`active` = 1 AND c.id_category != 1 - ORDER BY cl.id_category, cl.id_lang ASC'); - else - $categories = Db::getInstance()->executeS( - 'SELECT c.id_category, c.level_depth, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd - FROM '._DB_PREFIX_.'category c - ORDER BY c.id_category ASC'); - - - foreach($categories as $category) - { - if (($priority = 0.9 - ($category['level_depth'] / 10)) < 0.1) - $priority = 0.1; - - $tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ? - $this->context->link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'], (int)$category['id_lang']) - : $this->context->link->getCategoryLink((int)$category['id_category']); - $this->_addSitemapNode($xml, htmlspecialchars($tmpLink), $priority, 'weekly', substr($category['date_upd'], 0, 10)); - } - - /* CMS Generator */ - if (Configuration::get('GSITEMAP_ALL_CMS') || !Module::isInstalled('blockcms')) - $sql_cms = ' - SELECT DISTINCT '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'cl.id_cms, cl.link_rewrite, cl.id_lang' : 'cl.id_cms'). - ' FROM '._DB_PREFIX_.'cms_lang cl - LEFT JOIN '._DB_PREFIX_.'lang l ON (cl.id_lang = l.id_lang) - WHERE l.`active` = 1 - ORDER BY cl.id_cms, cl.id_lang ASC'; - else if (Module::isInstalled('blockcms')) - $sql_cms = ' - SELECT DISTINCT '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'cl.id_cms, cl.link_rewrite, cl.id_lang' : 'cl.id_cms'). - ' FROM '._DB_PREFIX_.'cms_block_page b - LEFT JOIN '._DB_PREFIX_.'cms_lang cl ON (b.id_cms = cl.id_cms) - LEFT JOIN '._DB_PREFIX_.'lang l ON (cl.id_lang = l.id_lang) - WHERE l.`active` = 1 - ORDER BY cl.id_cms, cl.id_lang ASC'; - - $cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_cms); - foreach($cmss as $cms) - { - $tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ? - $this->context->link->getCMSLink((int)$cms['id_cms'], $cms['link_rewrite'], false, (int)$cms['id_lang']) - : $this->context->link->getCMSLink((int)$cms['id_cms']); - $this->_addSitemapNode($xml, $tmpLink, '0.8', 'daily'); - } - - /* Add classic pages (contact, best sales, new products...) */ - $pages = array( - 'supplier' => false, - 'manufacturer' => false, - 'new-products' => false, - 'prices-drop' => false, - 'stores' => false, - 'authentication' => true, - 'best-sales' => false, - 'contact-form' => true); - - // Don't show suppliers and manufacturers if they are disallowed - if (!Module::getInstanceByName('blockmanufacturer')->id && !Configuration::get('PS_DISPLAY_SUPPLIERS')) - unset($pages['manufacturer']); - - if (!Module::getInstanceByName('blocksupplier')->id && !Configuration::get('PS_DISPLAY_SUPPLIERS')) - unset($pages['supplier']); - - // Generate nodes for pages - if(Configuration::get('PS_REWRITING_SETTINGS')) - foreach ($pages as $page => $ssl) - foreach($langs as $lang) - $this->_addSitemapNode($xml, $this->context->link->getPageLink($page, $ssl, $lang['id_lang']), '0.5', 'monthly'); - else - foreach($pages as $page => $ssl) - $this->_addSitemapNode($xml, $this->context->link->getPageLink($page, $ssl), '0.5', 'monthly'); - - $xml_string = $xml->asXML(); - - // Replace URL in XML strings by real shops URL - if ($replace_url) - $xml_string = str_replace(array(Tools::getShopDomain(true).__PS_BASE_URI__, Tools::getShopDomainSsl(true).__PS_BASE_URI__), $replace_url, $xml_string); - - $fp = fopen($filename, 'w'); - fwrite($fp, $xml_string); - fclose($fp); - - return file_exists($filename); - } - - private function _addSitemapIndexNode($xml, $loc, $last_mod) - { - $sitemap = $xml->addChild('sitemap'); - $sitemap->addChild('loc', htmlspecialchars($loc)); - $sitemap->addChild('lastmod', $last_mod); - return $sitemap; - } - - private function _addSitemapNode($xml, $loc, $priority, $change_freq, $last_mod = NULL) - { - $sitemap = $xml->addChild('url'); - $sitemap->addChild('loc', htmlspecialchars($loc)); - $sitemap->addChild('priority', number_format($priority,1,'.','')); - if ($last_mod) - $sitemap->addChild('lastmod', $last_mod); - $sitemap->addChild('changefreq', $change_freq); - return $sitemap; - } - - private function _addSitemapNodeImage($xml, $product) - { - $image = $xml->addChild('image', null, 'http://www.google.com/schemas/sitemap-image/1.1'); - $image->addChild('loc', htmlspecialchars($this->context->link->getImageLink($product['link_rewrite'], (int)$product['id_product'].'-'.(int)$product['id_image'])), 'http://www.google.com/schemas/sitemap-image/1.1'); - - $legend_image = preg_replace('/(&+)/i', '&', $product['legend_image']); - $image->addChild('caption', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1'); - $image->addChild('title', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1'); - } - - private function _displaySitemap() - { - if (Shop::isFeatureActive()) - { - $sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri - FROM '._DB_PREFIX_.'shop s - INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1 - WHERE s.active = 1 - AND s.deleted = 0 - AND su.active = 1'; - if (!$result = Db::getInstance()->executeS($sql)) - return ''; - - $this->_html .= '

'.$this->l('Sitemap index').'

'; - $this->_html .= '

'.$this->l('Your Google sitemap file is online at the following address:').'
- '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml


'; - - $info = pathinfo(GSITEMAP_FILE); - foreach ($result as $shop) - { - $filename = $info['dirname'].'/'.$info['filename'].'-'.$shop['id_shop'].'.'.$info['extension']; - if (file_exists($filename) && filesize($filename)) - { - $fp = fopen($filename, 'r'); - $fstat = fstat($fp); - fclose($fp); - $xml = simplexml_load_file($filename); - - $nbPages = count($xml->url); - $sitemap_uri = 'http://'.$shop['domain'].$shop['uri'].$info['filename'].'-'.$shop['id_shop'].'.'.$info['extension']; - - $this->_html .= '

'.$this->l('Sitemap for: ').$shop['domain'].$shop['uri'].'

'; - $this->_html .= '

'.$this->l('Your Google sitemap file is online at the following address:').'
- '.$sitemap_uri.'


'; - - $this->_html .= $this->l('Update:').' '.utf8_encode(strftime('%A %d %B %Y %H:%M:%S',$fstat['mtime'])).'
'; - $this->_html .= $this->l('Filesize:').' '.number_format(($fstat['size']*.000001), 3).'MB
'; - $this->_html .= $this->l('Indexed pages:').' '.$nbPages.'

'; - } - } - } - elseif (file_exists(GSITEMAP_FILE) && filesize(GSITEMAP_FILE)) - { - $fp = fopen(GSITEMAP_FILE, 'r'); - $fstat = fstat($fp); - fclose($fp); - $xml = simplexml_load_file(GSITEMAP_FILE); - - $nbPages = count($xml->url); - - $this->_html .= '

'.$this->l('Your Google sitemap file is online at the following address:').'
- '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml


'; - - $this->_html .= $this->l('Update:').' '.utf8_encode(strftime('%A %d %B %Y %H:%M:%S',$fstat['mtime'])).'
'; - $this->_html .= $this->l('Filesize:').' '.number_format(($fstat['size']*.000001), 3).'MB
'; - $this->_html .= $this->l('Indexed pages:').' '.$nbPages.'

'; - } - } - - private function _displayForm() - { - if (Tools::usingSecureMode()) - $domain = Tools::getShopDomainSsl(true); - else - $domain = Tools::getShopDomain(true); - - $this->_html .= ' -
-
- -
-
- -
- -

-

'.$this->l('Use cron job to re-build the sitemap:').'

-

- '.$domain.__PS_BASE_URI__.'modules/gsitemap/gsitemap-cron.php?&token='.substr(Tools::encrypt('gsitemap/cron'),0,10).'&GSITEMAP_ALL_CMS='.((int)Configuration::get('GSITEMAP_ALL_CMS')).'&GSITEMAP_ALL_PRODUCTS='.((int)Configuration::get('GSITEMAP_ALL_PRODUCTS')).' -

'; - } - - public function getContent() - { - if (Tools::isSubmit('btnSubmit')) - { - $this->_postValidation(); - if (!count($this->_postErrors)) - $this->_postProcess(); - else - foreach ($this->_postErrors as $err) - $this->_html .= '
'.$err.'
'; - } - - $this->_html .= ' -
- '.$this->l('Search Engine Optimization (SEO).').' -
- '.$this->l('See').' - '.$this->l('This page').' '.$this->l('For more information').' -
'; - - $this->_displaySitemap(); - $this->_displayForm(); - - $this->_html .= '
'; - return $this->_html; - } - -} - diff --git a/modules/gsitemap/index.php b/modules/gsitemap/index.php deleted file mode 100644 index 3f6561f72..000000000 --- a/modules/gsitemap/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @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 -*/ - -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/modules/gsitemap/logo.gif b/modules/gsitemap/logo.gif deleted file mode 100644 index d24a14a90..000000000 Binary files a/modules/gsitemap/logo.gif and /dev/null differ diff --git a/modules/gsitemap/logo.png b/modules/gsitemap/logo.png deleted file mode 100755 index 21c29316c..000000000 Binary files a/modules/gsitemap/logo.png and /dev/null differ diff --git a/modules/homefeatured/homefeatured.php b/modules/homefeatured/homefeatured.php index bd68293cb..4567adfa1 100644 --- a/modules/homefeatured/homefeatured.php +++ b/modules/homefeatured/homefeatured.php @@ -80,7 +80,7 @@ class HomeFeatured extends Module
-

'.$this->l('Define the number of products that you would like to display on homepage (default: 10).').'

+

'.$this->l('Define the number of products that you would like to display on homepage (default: 8).').'

diff --git a/modules/mailalerts/mailalerts.php b/modules/mailalerts/mailalerts.php index 4d8e0c105..20add47cc 100644 --- a/modules/mailalerts/mailalerts.php +++ b/modules/mailalerts/mailalerts.php @@ -339,11 +339,11 @@ class MailAlerts extends Module '{delivery_block_txt}' => MailAlert::getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => MailAlert::getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => MailAlert::getFormatedAddress($delivery, '
', array( - 'firstname' => '%s', - 'lastname' => '%s')), + 'firstname' => '%s', + 'lastname' => '%s')), '{invoice_block_html}' => MailAlert::getFormatedAddress($invoice, '
', array( - 'firstname' => '%s', - 'lastname' => '%s')), + 'firstname' => '%s', + 'lastname' => '%s')), '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, diff --git a/modules/mailalerts/mails/en/customer_qty.html b/modules/mailalerts/mails/en/customer_qty.html index e73641fcc..d2f03253b 100644 --- a/modules/mailalerts/mails/en/customer_qty.html +++ b/modules/mailalerts/mails/en/customer_qty.html @@ -14,7 +14,7 @@   -{product} is now available. +{product} is now available.   @@ -26,7 +26,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/mailalerts/mails/en/productcoverage.html b/modules/mailalerts/mails/en/productcoverage.html index 328d9077e..1d709047c 100644 --- a/modules/mailalerts/mails/en/productcoverage.html +++ b/modules/mailalerts/mails/en/productcoverage.html @@ -14,19 +14,19 @@   -{product} is almost out of stock. +{product} is almost out of stock.   -The stock cover is now less than the specified minimum of {warning_coverage}.

Current stock cover: {current_coverage}

+The stock cover is now less than the specified minimum of {warning_coverage}.

Current stock cover: {current_coverage}

  -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/mailalerts/mails/en/productoutofstock.html b/modules/mailalerts/mails/en/productoutofstock.html index 10858effd..73d26bee3 100644 --- a/modules/mailalerts/mails/en/productoutofstock.html +++ b/modules/mailalerts/mails/en/productoutofstock.html @@ -14,19 +14,19 @@   -{product} is nearly out of stock. +{product} is nearly out of stock.   -The remaining stock is now less than the specified minimum of {last_qty}.

Remaining stock: {qty}

You are advised to open the product's admin Product Page in order to replenish your inventory. +The remaining stock is now less than the specified minimum of {last_qty}.

Remaining stock: {qty}

You are advised to open the product's admin Product Page in order to replenish your inventory.   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/pscleaner/pscleaner.php b/modules/pscleaner/pscleaner.php index 353f82f4f..d091230fd 100644 --- a/modules/pscleaner/pscleaner.php +++ b/modules/pscleaner/pscleaner.php @@ -435,7 +435,7 @@ class PSCleaner extends Module ); foreach ($tables as $table) $db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`'); - $db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_customer > 0'); + $db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_manufacturer > 0 OR id_supplier > 0 OR id_warehouse > 0'); Image::deleteAllImages(_PS_PROD_IMG_DIR_); if (!file_exists(_PS_PROD_IMG_DIR_)) @@ -488,7 +488,7 @@ class PSCleaner extends Module ); foreach ($tables as $table) $db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`'); - $db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_manufacturer > 0 OR id_supplier > 0'); + $db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_customer > 0'); break; } } diff --git a/modules/referralprogram/mails/en/referralprogram-congratulations.html b/modules/referralprogram/mails/en/referralprogram-congratulations.html index 89f865423..70c65c205 100644 --- a/modules/referralprogram/mails/en/referralprogram-congratulations.html +++ b/modules/referralprogram/mails/en/referralprogram-congratulations.html @@ -20,7 +20,7 @@   -Your referred friend, {sponsored_firstname} {sponsored_lastname} has placed his or her first order on {shop_name}! +Your referred friend, {sponsored_firstname} {sponsored_lastname} has placed his or her first order on {shop_name}!   @@ -38,7 +38,7 @@   -{shop_name} powered by PrestaShop™ +{shop_name} powered by PrestaShop™ diff --git a/modules/referralprogram/mails/en/referralprogram-invitation.html b/modules/referralprogram/mails/en/referralprogram-invitation.html index 7d413cef7..667344a64 100644 --- a/modules/referralprogram/mails/en/referralprogram-invitation.html +++ b/modules/referralprogram/mails/en/referralprogram-invitation.html @@ -14,13 +14,13 @@   -{firstname_friend} {lastname_friend}, join us! +{firstname_friend} {lastname_friend}, join us!   -Your friend {firstname} {lastname} wants to refer you on {shop_name}! +Your friend {firstname} {lastname} wants to refer you on {shop_name}!   @@ -50,7 +50,7 @@   -{shop_name} powered by PrestaShop™ +{shop_name} powered by PrestaShop™ diff --git a/modules/referralprogram/mails/en/referralprogram-voucher.html b/modules/referralprogram/mails/en/referralprogram-voucher.html index 35022e89f..499e189f7 100644 --- a/modules/referralprogram/mails/en/referralprogram-voucher.html +++ b/modules/referralprogram/mails/en/referralprogram-voucher.html @@ -14,13 +14,13 @@   -Hi {firstname} {lastname}, +Hi {firstname} {lastname},   -Referral Program +Referral Program   @@ -38,7 +38,7 @@   -{shop_name} powered by PrestaShop™ +{shop_name} powered by PrestaShop™ diff --git a/modules/sendtoafriend/mails/en/send_to_a_friend.html b/modules/sendtoafriend/mails/en/send_to_a_friend.html index c30593d5e..c14aa128e 100644 --- a/modules/sendtoafriend/mails/en/send_to_a_friend.html +++ b/modules/sendtoafriend/mails/en/send_to_a_friend.html @@ -14,13 +14,13 @@   -Hi {name}, +Hi {name},   -{customer} has sent you a link to a product that (s)he thinks may interest you. +{customer} has sent you a link to a product that (s)he thinks may interest you.   @@ -32,7 +32,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/modules/sendtoafriend/sendtoafriend-extra.tpl b/modules/sendtoafriend/sendtoafriend-extra.tpl index c3ee09dc1..f7439b9cd 100644 --- a/modules/sendtoafriend/sendtoafriend-extra.tpl +++ b/modules/sendtoafriend/sendtoafriend-extra.tpl @@ -43,8 +43,9 @@ $('document').ready(function(){ { $.ajax({ {/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal} - post: "POST", - data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', friend: JSON.stringify(datas)},{/literal}{literal} + type: "POST", + headers: {"cache-control": "no-cache"}, + data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', friend: unescape(JSON.stringify(datas).replace(/u/g, '%u'))},{/literal}{literal} dataType: "json", success: function(result){ $.fancybox.close(); diff --git a/pdf/invoice.tpl b/pdf/invoice.tpl index b2950c86a..13a68ac67 100755 --- a/pdf/invoice.tpl +++ b/pdf/invoice.tpl @@ -190,7 +190,10 @@ {assign var="shipping_discount_tax_incl" value="0"} {foreach $cart_rules as $cart_rule} - {cycle values='#FFF,#DDD' assign=bgcolor} + {if $cart_rule.free_shipping} + {assign var="shipping_discount_tax_incl" value=$order_invoice->total_shipping_tax_incl} + {/if} + {cycle values='#FFF,#DDD' assign=bgcolor} {$cart_rule.name} diff --git a/themes/default/address.tpl b/themes/default/address.tpl index bdc915c3d..689440edd 100644 --- a/themes/default/address.tpl +++ b/themes/default/address.tpl @@ -102,14 +102,16 @@ $(function(){ldelim}

-
-
-

- - -

+ {/if} + {if $field_name eq 'vat_number'} +
+
+

+ + +

+
-
{/if} {if $field_name eq 'firstname'}

@@ -218,7 +220,7 @@ $(function(){ldelim}

- +

diff --git a/themes/default/authentication.tpl b/themes/default/authentication.tpl index 0249bf084..d35447f6b 100644 --- a/themes/default/authentication.tpl +++ b/themes/default/authentication.tpl @@ -70,7 +70,7 @@ $(document).ready(function() {

{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}

- +{if !isset($back) || $back != 'my-account'}{assign var='current_step' value='login'}{include file="$tpl_dir./order-steps.tpl"}{/if} {include file="$tpl_dir./errors.tpl"} {assign var='stateExist' value=false} {if !isset($email_create)} diff --git a/themes/default/css/global.css b/themes/default/css/global.css index dbc526971..b5b23061e 100644 --- a/themes/default/css/global.css +++ b/themes/default/css/global.css @@ -2,8 +2,6 @@ PRESTASHOP CSS ################################################################################################## */ -@import url("grid_prestashop.css"); - /* **************************************************************************** reset **************************************************************************** */ @@ -22,6 +20,8 @@ sub{vertical-align:baseline} legend{color:#000} input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit} input,button,textarea,select{font-size:100%} + +.ie7 input, .ie7 select{line-height:18px} a {cursor:pointer} .clearfix:before, @@ -105,7 +105,7 @@ p em {font-style:italic} padding:10px; border:1px solid #5cff74; font-size:13px; - background: #d3ffab + background: #d3ffab; } .error { margin:0 0 10px 0; @@ -263,6 +263,7 @@ table.table_block { border:1px solid #999; border-bottom:none; background:white; + border-collapse:inherit } table.std th, table.table_block th { @@ -346,6 +347,8 @@ ul.footer_links li .icon { #center_column .sortPagiBar p {padding:0;} #center_column .sortPagiBar form {display:inline-block;} +.ie7 #center_column .sortPagiBar form {display:inline;} + .sortPagiBar #productsSortForm {float:right;} .sortPagiBar select#selectPrductSort { margin:0 0 0 10px; @@ -407,6 +410,10 @@ ul.pagination li.disabled span {color:#ccc} #pagination_previous {float:left} #pagination_next {float:right} + +.ie7 #pagination_previous, +.ie7 #pagination_next {float:none} + #pagination_previous a, #pagination_previous span, #pagination_next a, #pagination_next span { padding:0 8px; @@ -539,9 +546,9 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px } ************************************************************************************************ */ #header {position:relative} #header_logo { - float:left; - display:block; - margin-top:30px; + position: absolute; + top: 30px; + z-index: 1; } #header_right { @@ -613,7 +620,6 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px } .idTabs { list-style-type: none; margin-top: 20px; - padding:0 5px; border-bottom: 8px solid #f7b900 } ul.idTabs li { @@ -806,6 +812,7 @@ table#cart_summary .cart_total_price td.cart_voucher { table#cart_summary #total_price_container { border-bottom:1px solid #999; + border-right: none; } .cart_voucher .title_block, .cart_voucher h4 @@ -1267,10 +1274,11 @@ a.iframe {font-weight:bold} width:723px; border:1px solid #ccc } - +#order-opc #opc_delivery_methods #message { + width: 757px; +} #order-opc #opc_payment_methods {margin-bottom:20px} #order-opc #opc_payment_methods #opc_payment_methods-content p{margin:0} - .delivery_option_carrier td {width:200px} .delivery_option_carrier td + td {width:280px;} .delivery_option_carrier td + td + td {width:200px} @@ -1967,6 +1975,8 @@ div.star_hover a, div.star a:hover { background-position: 0 -12px } .blockcategories_footer { padding:15px 10px; } +.blockcategories_footer .category_footer {float:left;clear:none;} +.blockcategories_footer .category_footer .list{float:left;} .blockcategories_footer ul ul {display:none !important} diff --git a/themes/default/css/order-opc.css b/themes/default/css/order-opc.css index 5209953f2..568ded610 100644 --- a/themes/default/css/order-opc.css +++ b/themes/default/css/order-opc.css @@ -87,4 +87,7 @@ float: right; margin-right: 20px; padding: 0; +} +#address_invoice_form { + padding: 0px; } \ No newline at end of file diff --git a/themes/default/css/product.css b/themes/default/css/product.css index ba0945bbb..35b563544 100644 --- a/themes/default/css/product.css +++ b/themes/default/css/product.css @@ -169,6 +169,8 @@ span.view_scroll_spacer { text-align:right; } +.ie7 #pb-left-column #buy_block label {margin-right:5px;float:left} + /* short description pack */ .short_description_pack { display:none; @@ -192,26 +194,43 @@ span.view_scroll_spacer { display:inline-block; } +.ie7 #attributes .attribute_list { + display:inline; + zoom:1; + float:right +} + +#attributes .attribute_list ul{ + list-style:none +} + +#attributes .attribute_list ul li{ + clear:both +} + #attributes .attribute_list input.attribute_radio{float: left;margin-left: 3px;} #attributes .attribute_list span{float: left;margin-bottom: 5px;margin-left: 3px;} -.attribute_list #color_to_pick_list { +.ie7 #attributes .attribute_list span{margin-top:1px} + +#attributes .attribute_list #color_to_pick_list { list-style-type:none; width:125px; } -.attribute_list #color_to_pick_list li { +#attributes .attribute_list #color_to_pick_list li { float:left; margin:0 8px 8px 0; padding:1px; border:1px solid #ccc; + clear:none } -.attribute_list #color_to_pick_list li.selected { +#attributes .attribute_list #color_to_pick_list li.selected { border:1px solid #000; } -.attribute_list #color_to_pick_list a.color_pick { +#attributes .attribute_list #color_to_pick_list a.color_pick { display:block; height:20px; width:20px; diff --git a/themes/default/guest-tracking.tpl b/themes/default/guest-tracking.tpl index 1f1d838cb..68d151db0 100644 --- a/themes/default/guest-tracking.tpl +++ b/themes/default/guest-tracking.tpl @@ -96,7 +96,7 @@ {/if}
-

{l s='o track your order, please enter the following information:'}

+

{l s='To track your order, please enter the following information:'}

diff --git a/themes/default/header.tpl b/themes/default/header.tpl index 748edd4b3..6dbd39d3e 100644 --- a/themes/default/header.tpl +++ b/themes/default/header.tpl @@ -22,12 +22,11 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - - - - + + + + {$meta_title|escape:'htmlall':'UTF-8'} @@ -79,7 +78,7 @@ -

+
{$HOOK_TOP}
diff --git a/themes/default/js/cart-summary.js b/themes/default/js/cart-summary.js index 7b19e806e..c1c0ac3c7 100644 --- a/themes/default/js/cart-summary.js +++ b/themes/default/js/cart-summary.js @@ -201,8 +201,9 @@ function changeAddressDelivery(obj) function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line) { + if (typeof(line) == 'undefined' || line.length == 0) - line = $('#product_' + id_product + '_' + id_product_attribute + '_0_' + old_id_address_delivery + ', #product_' + id_product + '_' + id_product_attribute + '_nocustom_' + old_id_address_delivery); + line = $('#cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_0_], #cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_nocustom_]'); $('.product_customization_for_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery).each(function(){ $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + id_address_delivery)).removeClass('product_customization_for_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery + ' address_' + old_id_address_delivery).addClass('product_customization_for_' + id_product + '_' + id_product_attribute + '_' + id_address_delivery + ' address_' + id_address_delivery); @@ -217,6 +218,7 @@ function updateAddressId(id_product, id_product_attribute, old_id_address_delive }); line.attr('id', line.attr('id').replace(/_\d+$/, '_' + id_address_delivery)).removeClass('address_' + old_id_address_delivery).addClass('address_' + id_address_delivery).find('span[id^=cart_quantity_custom_], span[id^=total_product_price_], input[name^=quantity_], .cart_quantity_down, .cart_quantity_up, .cart_quantity_delete').each(function(){ + if (typeof($(this).attr('name')) != 'undefined') $(this).attr('name', $(this).attr('name').replace(/_\d+(_hidden|)$/, '_' + id_address_delivery)); if (typeof($(this).attr('id')) != 'undefined') @@ -653,9 +655,9 @@ function updateCartSummary(json) location.reload(); if (priceDisplayMethod !== 0) - $('#total_discount').html(formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank)); + $('#total_discount').html('-' + formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank)); else - $('#total_discount').html(formatCurrency(json.total_discounts, currencyFormat, currencySign, currencyBlank)); + $('#total_discount').html('-' + formatCurrency(json.total_discounts, currencyFormat, currencySign, currencyBlank)); $('.cart_discount').each(function(){ var idElmt = $(this).attr('id').replace('cart_discount_',''); @@ -665,10 +667,12 @@ function updateCartSummary(json) if (json.discounts[i].id_discount == idElmt) { if (json.discounts[i].value_real !== '!') + { if (priceDisplayMethod !== 0) $('#cart_discount_' + idElmt + ' td.cart_discount_price span.price-discount').html(formatCurrency(json.discounts[i].value_tax_exc * -1, currencyFormat, currencySign, currencyBlank)); else $('#cart_discount_' + idElmt + ' td.cart_discount_price span.price-discount').html(formatCurrency(json.discounts[i].value_real * -1, currencyFormat, currencySign, currencyBlank)); + } toDelete = false; } if (toDelete) diff --git a/themes/default/js/order-opc.js b/themes/default/js/order-opc.js index 53d1e8f46..162f95553 100644 --- a/themes/default/js/order-opc.js +++ b/themes/default/js/order-opc.js @@ -265,6 +265,7 @@ function confirmFreeOrder() else $('#opc_account-overlay').fadeIn('slow'); $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + $('#confirmOrder').attr('disabled', 'disabled'); $.ajax({ type: 'POST', headers: { "cache-control": "no-cache" }, @@ -275,6 +276,7 @@ function confirmFreeOrder() data: 'ajax=true&method=makeFreeOrder&token=' + static_token , success: function(html) { + $('#confirmOrder').attr('disabled', ''); var array_split = html.split(':'); if (array_split[0] == 'freeorder') { @@ -401,7 +403,6 @@ function updateNewAccountToAddressBlock() $.each(json.summary.products, function() { updateAddressId(this.id_product, this.id_product_attribute, '0', this.id_address_delivery); }); - updateCartSummary(json.summary); updateAddressesDisplay(true); updateCarrierList(json.carrier_data); updateCarrierSelectionAndGift(); diff --git a/themes/default/js/product.js b/themes/default/js/product.js index f80461748..7bae47cc0 100644 --- a/themes/default/js/product.js +++ b/themes/default/js/product.js @@ -118,7 +118,7 @@ function findCombination(firstTime) //show the large image in relation to the selected combination if (combinations[combination]['image'] && combinations[combination]['image'] != -1) - displayImage( $('#thumb_' + combinations[combination]['image']).parent() ); + displayImage($('#thumb_' + combinations[combination]['image']).parent()); //show discounts values according to the selected combination if (combinations[combination]['idCombination'] && combinations[combination]['idCombination'] > 0) @@ -295,17 +295,28 @@ function updateDisplay() var priceTaxExclWithoutGroupReduction = ''; // retrieve price without group_reduction in order to compute the group reduction after - // the specific price discount (done in the JS in order to keep backward compatibility) - if (!displayPrice && !noTaxForThisProduct) - { - priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction); - } else { - priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction); - } - var combination_add_price = selectedCombination['price'] * group_reduction; + // the specific price discount (done in the JS in order to keep backward compatibility) + priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction); var tax = (taxRate / 100) + 1; + var taxExclPrice = priceTaxExclWithoutGroupReduction + (selectedCombination['price'] * currencyRate); + if (selectedCombination.specific_price && selectedCombination.specific_price['id_product_attribute']) + { + if (selectedCombination.specific_price['price'] && selectedCombination.specific_price['price'] >=0) + var taxExclPrice = (specific_currency ? selectedCombination.specific_price['price'] : selectedCombination.specific_price['price'] * currencyRate); + else + var taxExclPrice = productBasePriceTaxExcluded * currencyRate + (selectedCombination['price'] * currencyRate); + } + else if (product_specific_price.price && product_specific_price.price >= 0) + var taxExclPrice = (specific_currency ? product_specific_price.price : product_specific_price.price * currencyRate) + (selectedCombination['price'] * currencyRate); + + if (!displayPrice && !noTaxForThisProduct) + productPriceDisplay = taxExclPrice * tax; // Need to be global => no var + else + productPriceDisplay = ps_round(taxExclPrice, 2); // Need to be global => no var + + productPriceWithoutReductionDisplay = productPriceDisplay * group_reduction; var reduction = 0; if (selectedCombination['specific_price'].reduction_price || selectedCombination['specific_price'].reduction_percent) { @@ -313,18 +324,26 @@ function updateDisplay() reduction = productPriceDisplay * (parseFloat(selectedCombination['specific_price'].reduction_percent) / 100) + reduction_price; if (reduction_price && (displayPrice || noTaxForThisProduct)) reduction = ps_round(reduction / tax, 6); + } - else if (product_specific_price.reduction_price || product_specific_price.reduction_percent) + else if (product_specific_price && product_specific_price.reduction) { - reduction_price = (specific_currency ? product_specific_price.reduction_price : product_specific_price.reduction_price * currencyRate); - reduction = productPriceDisplay * (parseFloat(product_specific_price.reduction_percent) / 100) + reduction_price; + if (product_specific_price.reduction_type == 'amount') + reduction_price = (specific_currency ? product_specific_price.reduction : product_specific_price.reduction * currencyRate); + else + reduction_price = 0; + + if (product_specific_price.reduction_type == 'percentage') + reduction_percent = productPriceDisplay * parseFloat(product_specific_price.reduction); + + reduction = reduction_price + reduction_percent; if (reduction_price && (displayPrice || noTaxForThisProduct)) reduction = ps_round(reduction / tax, 6); } if (selectedCombination.specific_price) { - if (selectedCombination['specific_price'].reduction_type == 'percentage') + if (selectedCombination['specific_price'] && selectedCombination['specific_price'].reduction_type == 'percentage') { $('#reduction_amount').hide(); $('#reduction_percent_display').html('-' + parseFloat(selectedCombination['specific_price'].reduction_percent) + '%'); @@ -338,36 +357,20 @@ function updateDisplay() $('#reduction_amount').hide(); } } - else - if (product_specific_price['reduction_type'] == 'percentage') - $('#reduction_percent_display').html(product_specific_price['specific_price'].reduction_percent); if (product_specific_price['reduction_type'] != '' || selectedCombination['specific_price'].reduction_type != '') $('#discount_reduced_price,#old_price').show(); else $('#discount_reduced_price,#old_price').hide(); - - if (product_specific_price['reduction_type'] == 'percentage' || selectedCombination['specific_price'].reduction_type == 'percentage') + if ((product_specific_price['reduction_type'] == 'percentage' && selectedCombination['specific_price'].reduction_type == 'percentage') || selectedCombination['specific_price'].reduction_type == 'percentage') $('#reduction_percent').show(); else $('#reduction_percent').hide(); - if (product_specific_price['price'] || selectedCombination.specific_price['price']) + if (product_specific_price['price'] || (selectedCombination.specific_price && selectedCombination.specific_price['price'])) $('#not_impacted_by_discount').show(); else $('#not_impacted_by_discount').hide(); - if (selectedCombination.specific_price['price'] && selectedCombination.specific_price['price'] >=0) - var taxExclPrice = (specific_currency ? selectedCombination.specific_price['price'] : selectedCombination.specific_price['price'] * currencyRate); - else - var taxExclPrice = priceTaxExclWithoutGroupReduction + (selectedCombination['price'] * currencyRate); - - if (!displayPrice && !noTaxForThisProduct) - productPriceDisplay = taxExclPrice * tax; // Need to be global => no var - else - productPriceDisplay = ps_round(taxExclPrice, 2); // Need to be global => no var - - productPriceWithoutReductionDisplay = productPriceDisplay * group_reduction; - productPriceDisplay -= reduction; var tmp = productPriceDisplay * group_reduction; productPriceDisplay = ps_round(productPriceDisplay * group_reduction, 2); @@ -414,17 +417,14 @@ function displayImage(domAAroundImgThumb, no_animation) { if (typeof(no_animation) == 'undefined') no_animation = false; - if (domAAroundImgThumb.attr('href')) { - var newSrc = domAAroundImgThumb.attr('href').replace('thickbox','large'); + var newSrc = domAAroundImgThumb.attr('href').replace('thickbox', 'large'); if ($('#bigpic').attr('src') != newSrc) { - $('#bigpic').fadeOut((no_animation ? 0 : 'fast'), function(){ - $(this).attr('src', newSrc).show(); - if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) - $(this).attr('alt', domAAroundImgThumb.attr('href')); - }); + $('#bigpic').attr('src', newSrc); + if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) + $('#bigpic').attr('rel', domAAroundImgThumb.attr('href')); } $('#views_block li a').removeClass('shown'); $(domAAroundImgThumb).addClass('shown'); @@ -468,24 +468,29 @@ function serialScrollFixLock(event, targeted, scrolled, items, position) function refreshProductImages(id_product_attribute) { $('#thumbs_list_frame').scrollTo('li:eq(0)', 700, {axis:'x'}); - $('#thumbs_list li').hide(); + id_product_attribute = parseInt(id_product_attribute); - if (typeof(combinationImages) != 'undefined' && typeof(combinationImages[id_product_attribute]) != 'undefined') + if (id_product_attribute > 0 && typeof(combinationImages) != 'undefined' && typeof(combinationImages[id_product_attribute]) != 'undefined') { + $('#thumbs_list li').hide(); + $('#thumbs_list').trigger('goto', 0); for (var i = 0; i < combinationImages[id_product_attribute].length; i++) $('#thumbnail_' + parseInt(combinationImages[id_product_attribute][i])).show(); - } - if (i > 0) - { - var thumb_width = $('#thumbs_list_frame >li').width() + parseInt($('#thumbs_list_frame >li').css('marginRight')); - $('#thumbs_list_frame').width((parseInt((thumb_width)* i) + 3) + 'px'); // Bug IE6, needs 3 pixels more ? + if (parseInt($('#thumbs_list_frame >li:visible').length) < parseInt($('#thumbs_list_frame >li').length)) + $('#wrapResetImages').show('slow'); + else + $('#wrapResetImages').hide('slow'); } else { - $('#thumbnail_' + idDefaultImage).show(); - displayImage($('#thumbnail_' + idDefaultImage + ' a')); + $('#thumbs_list li').show(); + if (parseInt($('#thumbs_list_frame >li').length) == parseInt($('#thumbs_list_frame >li:visible').length)) + $('#wrapResetImages').hide('slow'); } + + var thumb_width = $('#thumbs_list_frame >li').width() + parseInt($('#thumbs_list_frame >li').css('marginRight')); + $('#thumbs_list_frame').width((parseInt((thumb_width) * $('#thumbs_list_frame >li').length)) + 'px'); $('#thumbs_list').trigger('goto', 0); serialScrollFixLock('', '', '', '', 0);// SerialScroll Bug on goto 0 ? } @@ -523,6 +528,7 @@ $(document).ready(function() //set jqZoom parameters if needed if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) { + $('#bigpic').attr('rel', $('#bigpic').attr('src').replace('thickbox', 'large')); $('img.jqzoom').jqueryzoom({ xzoom: 200, //zooming div default width(default width value is 200) yzoom: 200, //zooming div default width(default height value is 200) @@ -548,6 +554,11 @@ $(document).ready(function() $('#customizedDatas').append(uploading_in_progress); }); + original_url = window.location + ''; + first_url_check = true; + checkUrl(); + initLocationChange(); + //init the price in relation of the selected attributes if (typeof productHasAttributes != 'undefined' && productHasAttributes) findCombination(true); @@ -563,11 +574,6 @@ $(document).ready(function() 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); - original_url = window.location + ''; - first_url_check = true; - checkUrl(); - initLocationChange(); - }); function saveCustomization() @@ -668,12 +674,12 @@ function getProductAttribute() function initLocationChange(time) { if(!time) time = 500; - setInterval(checkUrl, time); + setInterval(checkUrl, time); } function checkUrl() { - if (original_url != window.url || first_url_check) + if (original_url != window.location || first_url_check) { first_url_check = false; url = window.location + ''; @@ -710,7 +716,7 @@ function checkUrl() if (count >= 0) { findCombination(false); - original_url = window.location + ''; + original_url = url; } // no combination found = removing attributes from url else diff --git a/themes/default/layout.tpl b/themes/default/layout.tpl index 8bf5c9bb5..a6f2e3e9b 100644 --- a/themes/default/layout.tpl +++ b/themes/default/layout.tpl @@ -23,16 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - -{if !empty($display_header)} - {include file='./header.tpl' HOOK_HEADER=$HOOK_HEADER} -{/if} -{if !empty($template)} - {$template} -{/if} -{if !empty($display_footer)} - {include file='./footer.tpl'} -{/if} -{if !empty($live_edit)} - {$live_edit} -{/if} \ No newline at end of file +{if !empty($display_header)}{include file='./header.tpl' HOOK_HEADER=$HOOK_HEADER}{/if} +{if !empty($template)}{$template}{/if} +{if !empty($display_footer)}{include file='./footer.tpl'}{/if} +{if !empty($live_edit)}{$live_edit}{/if} \ No newline at end of file diff --git a/themes/default/mobile/authentication-choice.tpl b/themes/default/mobile/authentication-choice.tpl index 4bbfb00bc..7d8346a4d 100644 --- a/themes/default/mobile/authentication-choice.tpl +++ b/themes/default/mobile/authentication-choice.tpl @@ -13,7 +13,7 @@
-
+
-
+
{/if}
{include file="./category-product-sort.tpl" container_class="container-sort"}

{include file="$tpl_dir./category-count.tpl"}

-
+
{include file="./pagination.tpl"} {include file="./category-product-list.tpl" products=$products} diff --git a/themes/default/mobile/contact-form.tpl b/themes/default/mobile/contact-form.tpl index 14b6cc043..6c435356a 100644 --- a/themes/default/mobile/contact-form.tpl +++ b/themes/default/mobile/contact-form.tpl @@ -44,7 +44,7 @@ {/foreach} -

+

 

{foreach from=$contacts item=contact}
{if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1} - + {elseif !isset($customerThread.id_order) && !isset($isLogged)} {elseif $customerThread.id_order > 0} @@ -75,8 +79,15 @@ {/if} {if isset($isLogged) && $isLogged}
+ {if !isset($customerThread.id_product)} - + {foreach from=$orderedProductList key=id_order item=products name=products} + + {/foreach} {elseif $customerThread.id_product > 0} {/if} diff --git a/themes/default/mobile/header.tpl b/themes/default/mobile/header.tpl index 973b3582c..34752abba 100644 --- a/themes/default/mobile/header.tpl +++ b/themes/default/mobile/header.tpl @@ -23,7 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} - + {$meta_title|escape:'htmlall':'UTF-8'} {**} diff --git a/themes/default/mobile/manufacturer.tpl b/themes/default/mobile/manufacturer.tpl index 3143b61a5..5233a48ed 100644 --- a/themes/default/mobile/manufacturer.tpl +++ b/themes/default/mobile/manufacturer.tpl @@ -48,7 +48,7 @@
{include file="./category-product-sort.tpl" container_class="container-sort"}
-
+
{include file="./pagination.tpl"} {include file="./category-product-list.tpl" products=$products} {include file="./pagination.tpl"} diff --git a/themes/default/mobile/new-products.tpl b/themes/default/mobile/new-products.tpl index 81b9aaa9c..4d5950126 100644 --- a/themes/default/mobile/new-products.tpl +++ b/themes/default/mobile/new-products.tpl @@ -31,7 +31,7 @@
{include file="./category-product-sort.tpl" container_class="container-sort"}
-
+
{include file="./pagination.tpl"} {include file="./category-product-list.tpl" products=$products} {include file="./pagination.tpl"} diff --git a/themes/default/mobile/order-detail.tpl b/themes/default/mobile/order-detail.tpl index c341b7461..558854be4 100644 --- a/themes/default/mobile/order-detail.tpl +++ b/themes/default/mobile/order-detail.tpl @@ -117,7 +117,7 @@ {elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}

{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}

{else} {assign var=address_words value=" "|explode:$field_item} -

{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$invoiceAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}{/foreach}

+

{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$invoiceAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}

{/if} {/foreach} @@ -130,7 +130,7 @@ {elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}

{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}

{else} {assign var=address_words value=" "|explode:$field_item} -

{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$deliveryAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}{/foreach}

+

{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$deliveryAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}

{/if} {/foreach} @@ -174,7 +174,7 @@ {if $priceDisplay && $use_tax}
  • {l s='Total products (tax excl.)'} {displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency} - +
  • {/if}
  • {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency} diff --git a/themes/default/mobile/pages-list.tpl b/themes/default/mobile/pages-list.tpl index 3f6148c5a..8513b4714 100644 --- a/themes/default/mobile/pages-list.tpl +++ b/themes/default/mobile/pages-list.tpl @@ -23,7 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -
    +

    {l s='Sitemap'}

      {if $controller_name != 'index'}
    • Accueil
    • {/if} diff --git a/themes/default/mobile/pagination.tpl b/themes/default/mobile/pagination.tpl index 06e2c4fb1..42d450e6a 100644 --- a/themes/default/mobile/pagination.tpl +++ b/themes/default/mobile/pagination.tpl @@ -50,7 +50,7 @@
      - {if $start!=$stop} + {if $start!=$stop && $pages_nb >= 1}
        {if $p != 1} {assign var='p_previous' value=$p-1} diff --git a/themes/default/mobile/prices-drop.tpl b/themes/default/mobile/prices-drop.tpl index 0404bea93..e331a6054 100644 --- a/themes/default/mobile/prices-drop.tpl +++ b/themes/default/mobile/prices-drop.tpl @@ -31,7 +31,7 @@
        {include file="./category-product-sort.tpl" container_class="container-sort"}
        -
        +
        {include file="./pagination.tpl"} {include file="./category-product-list.tpl" products=$products} {include file="./pagination.tpl"} diff --git a/themes/default/mobile/product-attributes.tpl b/themes/default/mobile/product-attributes.tpl index 1f45f4929..ec6672b0c 100644 --- a/themes/default/mobile/product-attributes.tpl +++ b/themes/default/mobile/product-attributes.tpl @@ -23,7 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} {if isset($groups)} -
        +
        {foreach from=$groups key=id_attribute_group item=group} diff --git a/themes/default/mobile/product-desc-features.tpl b/themes/default/mobile/product-desc-features.tpl index 8b2cce86e..8692a9a3d 100644 --- a/themes/default/mobile/product-desc-features.tpl +++ b/themes/default/mobile/product-desc-features.tpl @@ -5,7 +5,7 @@ {if isset($product) && $product->description}

        {l s='More info'}

        -

        {$product->description}

        +
        {$product->description}
        {/if} @@ -70,7 +70,7 @@ {assign var="btn_href" value=$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")} {else} {assign var="btn_class" value="disabled"} - {capture assign="btn_more"}{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}{/capture} + {capture assign="btn_more"}{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{if !$PS_CATALOG_MODE}{l s='Out of stock'}{/if}{/if}{/capture} {/if} {l s='Add to cart'} {$btn_more} diff --git a/themes/default/mobile/product.tpl b/themes/default/mobile/product.tpl index 1e22cd482..e9b88fd95 100644 --- a/themes/default/mobile/product.tpl +++ b/themes/default/mobile/product.tpl @@ -119,10 +119,10 @@
        {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} -
        +
        {include file="./product-prices.tpl"} {else} -
        +
        {/if}
        {hook h="displayMobileAddToCartTop"} @@ -147,13 +147,13 @@ {include file="./product-quantity-discount.tpl"} {* ================================== *} -
        +
        {include file="./product-desc-features.tpl"} {if isset($packItems) && $packItems|@count > 0} -
        +

        {l s='Pack content'}

        {include file="./category-product-list.tpl" products=$packItems} diff --git a/themes/default/mobile/search.tpl b/themes/default/mobile/search.tpl index 61ba394e0..f46bffa03 100644 --- a/themes/default/mobile/search.tpl +++ b/themes/default/mobile/search.tpl @@ -42,7 +42,7 @@
        {/if} -
        +
        {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} {include file="./pagination.tpl"} {/if} diff --git a/themes/default/mobile/sitemap.tpl b/themes/default/mobile/sitemap.tpl index a59072165..7b0f17401 100644 --- a/themes/default/mobile/sitemap.tpl +++ b/themes/default/mobile/sitemap.tpl @@ -25,19 +25,22 @@
        {hook h="displayMobileTopSiteMap"}
        -
        - +
        {if isset($categoriesTree.children)}

        {l s='Our offers'}

          {for $i=0 to 4} {if isset($categoriesTree.children.$i)} + {if isset($categoriesTree.children.$i.children) && ($categoriesTree.children.$i.children|@count > 0)} + {include file="./category-tree-branch.tpl" node=$categoriesTree.children.$i} + {else}
        • {$categoriesTree.children.$i.name|escape:'htmlall':'UTF-8'}
        • + {/if} {/if} {/for}
        • @@ -51,7 +54,7 @@
        {/if} -
        +

        {l s='Sitemap'}

          {if $controller_name != 'index'}
        • {l s='Home'}
        • {/if} diff --git a/themes/default/mobile/supplier.tpl b/themes/default/mobile/supplier.tpl index 60a22525c..1526f58c0 100644 --- a/themes/default/mobile/supplier.tpl +++ b/themes/default/mobile/supplier.tpl @@ -47,7 +47,7 @@
          {include file="./category-product-sort.tpl" container_class="container-sort"}
          -
          +
          {include file="./pagination.tpl"} {include file="./category-product-list.tpl" products=$products} {include file="./pagination.tpl"} diff --git a/themes/default/modules/blockcart/blockcart.tpl b/themes/default/modules/blockcart/blockcart.tpl index 15b222a77..287510b41 100644 --- a/themes/default/modules/blockcart/blockcart.tpl +++ b/themes/default/modules/blockcart/blockcart.tpl @@ -116,27 +116,24 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}'; {/if}

          {l s='No products' mod='blockcart'}

          - {if $discounts|@count > 0} - +
          - {foreach from=$discounts item=discount} - {if $discount.value_real > 0} - - - - - - +{foreach from=$discounts item=discount} +{if $discount.value_real > 0} + + + + + + +{/if} +{/foreach} - - {/if} - +

          {$shipping_cost} {l s='Shipping' mod='blockcart'} diff --git a/themes/default/modules/blockcategories/blockcategories_footer.tpl b/themes/default/modules/blockcategories/blockcategories_footer.tpl index 23a1ee933..cfa489f63 100644 --- a/themes/default/modules/blockcategories/blockcategories_footer.tpl +++ b/themes/default/modules/blockcategories/blockcategories_footer.tpl @@ -26,8 +26,8 @@

  • @@ -373,14 +382,6 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving {/if}
    - {if !$priceDisplay || $priceDisplay == 2} - {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} - {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} - {elseif $priceDisplay == 1} - {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} - {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} - {/if} -

    {if $priceDisplay >= 0 && $priceDisplay <= 2} {convertPrice price=$productPrice} @@ -402,14 +403,14 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving {/if}

    specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}

    -

    specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}> +

    specificPrice OR $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|intval ==0} style="display:none"{/if}> {if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0} -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval} {/if}

    - {if $product->specificPrice AND $product->specificPrice.reduction} + {if $product->specificPrice AND $product->specificPrice.reduction && $product->specificPrice.reduction > 0}

    {if $priceDisplay >= 0 && $priceDisplay <= 2} {if $productPriceWithoutReduction > $productPrice} @@ -535,14 +536,14 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving {/if} {if isset($accessories) AND $accessories} -

    + {/if} @@ -615,7 +616,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving {if $field.type == 1}
  • - +
  • {counter} {/if} @@ -638,13 +639,10 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving {/if} - {if isset($packItems) && $packItems|@count > 0}

    {l s='Pack content'}

    {include file="$tpl_dir./product-list.tpl" products=$packItems}
    {/if} - -{/if} - +{/if} \ No newline at end of file diff --git a/tools/profiling/Controller.php b/tools/profiling/Controller.php index 1b55dd0dd..16aec04d7 100644 --- a/tools/profiling/Controller.php +++ b/tools/profiling/Controller.php @@ -228,7 +228,7 @@ abstract class Controller extends ControllerCore if ($this->ajax) { $action = Tools::getValue('action'); - if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action))) + if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action))) $this->{'displayAjax'.$action}(); elseif (method_exists($this, 'displayAjax')) $this->displayAjax();