diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 944062c4e..29f1cdfdc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,5 +8,5 @@ All core files you commit in your pull request must have Open Software License ( All modules files you commit in your pull request must have Academic Free License (AFL 3.0) [1]: https://help.github.com/articles/using-pull-requests -[2]: http://docs.prestashop.com/display/PS15/Coding+Standard -[3]: http://docs.prestashop.com/display/PS15/How+to+write+a+commit+message \ No newline at end of file +[2]: http://docs.prestashop.com/display/PS15/Coding+Standards +[3]: http://docs.prestashop.com/display/PS15/How+to+write+a+commit+message diff --git a/admin-dev/get-file-admin.php b/admin-dev/get-file-admin.php index b37f691e5..39fcd8a85 100644 --- a/admin-dev/get-file-admin.php +++ b/admin-dev/get-file-admin.php @@ -25,5 +25,5 @@ */ define('_PS_ADMIN_DIR_', getcwd()); -require(_PS_ADMIN_DIR_.'/config/config.inc.php'); +require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); Controller::getController('GetFileController')->run(); \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/access/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/access/helpers/form/form.tpl index ef97458aa..72beec990 100644 --- a/admin-dev/themes/default/template/controllers/access/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/access/helpers/form/form.tpl @@ -49,10 +49,12 @@ if (perm == 'all' && $(this).parent().parent().hasClass('parent')) { - checked = enabled ? 'checked': ''; - $(this).parent().parent().parent().find('.child-'+id_tab+' input[type=checkbox]').attr('checked', checked); + if (enabled) + $(this).parent().parent().parent().find('.child-'+id_tab+' input[type=checkbox]').attr('checked', 'checked'); + else + $(this).parent().parent().parent().find('.child-'+id_tab+' input[type=checkbox]').removeAttr('checked'); $.ajax({ - url: "{$link->getAdminLink('AdminAccess')}", + url: "{$link->getAdminLink('AdminAccess')|addslashes}", cache: false, data : { ajaxMode : '1', @@ -68,15 +70,12 @@ }, success : function(res,textStatus,jqXHR) { - try - { + try { if (res == 'ok') showSuccessMessage("{l s='Update successful'}"); else showErrorMessage("{l s='Update error'}"); - } - catch(e) - { + } catch(e) { jAlert('Technical error'); } } @@ -85,7 +84,7 @@ perfect_access_js_gestion(this, perm, id_tab, tabsize, tabnumber, table); $.ajax({ - url: "{$link->getAdminLink('AdminAccess')}", + url: "{$link->getAdminLink('AdminAccess')|addslashes}", cache: false, data : { ajaxMode : '1', @@ -134,7 +133,7 @@ }); $.ajax({ - url: "{$link->getAdminLink('AdminAccess')}", + url: "{$link->getAdminLink('AdminAccess')|addslashes}", cache: false, data : { ajaxMode: '1', diff --git a/admin-dev/themes/default/template/controllers/countries/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/countries/helpers/form/form.tpl index 14ecde6ad..88f0278cf 100644 --- a/admin-dev/themes/default/template/controllers/countries/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/countries/helpers/form/form.tpl @@ -48,6 +48,21 @@ {else} {$smarty.block.parent} + {/if} +{/block} +{block name="label"} + {if $input.name == 'standardization'} + + {else} + {$smarty.block.parent} {/if} {/block} @@ -85,7 +100,11 @@ $('#need_zip_code_on, #need_zip_code_off').change(function() { disableZipFormat(); }); - + + $('#iso_code').change(function() { + disableTAASC(); + }); + disableTAASC(); }); function switchExplanationText(text) { diff --git a/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl index 395e949d0..e9a05e5f1 100644 --- a/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl @@ -60,7 +60,7 @@ ifSuperAdmin($(this)); $.ajax({ - url: "{$link->getAdminLink('AdminEmployees')}", + url: "{$link->getAdminLink('AdminEmployees')|addslashes}", cache: false, data : { ajax : '1', diff --git a/admin-dev/themes/default/template/controllers/information/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/information/helpers/view/view.tpl index 782c4b834..d11e4721c 100644 --- a/admin-dev/themes/default/template/controllers/information/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/information/helpers/view/view.tpl @@ -32,7 +32,7 @@ { $.ajax({ type: 'GET', - url: '{$link->getAdminLink('AdminInformation')}', + url: '{$link->getAdminLink('AdminInformation')|addslashes}', data: { 'action': 'checkFiles', 'ajax': 1 diff --git a/admin-dev/themes/default/template/controllers/not_found/content.tpl b/admin-dev/themes/default/template/controllers/not_found/content.tpl index 67933528c..cd836c0ea 100644 --- a/admin-dev/themes/default/template/controllers/not_found/content.tpl +++ b/admin-dev/themes/default/template/controllers/not_found/content.tpl @@ -22,7 +22,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} +{if isset($controller) && !empty($controller) && $controller != 'adminnotfound'}

{l s='The controller %s is missing or invalid.' sprintf=$controller}

+{/if} \ No newline at end of file diff --git a/install-dev/theme/views/header.phtml b/install-dev/theme/views/header.phtml index 1e424f40b..43119205f 100644 --- a/install-dev/theme/views/header.phtml +++ b/install-dev/theme/views/header.phtml @@ -83,4 +83,7 @@
  • isStepFinished($step)): ?>class="ok">l('menu_'.$this->step) ?>
  • - \ No newline at end of file + + \ No newline at end of file diff --git a/install-dev/upgrade/php/add_order_reference_in_order_payment.php b/install-dev/upgrade/php/add_order_reference_in_order_payment.php index 1ce631c1f..75b5d0782 100644 --- a/install-dev/upgrade/php/add_order_reference_in_order_payment.php +++ b/install-dev/upgrade/php/add_order_reference_in_order_payment.php @@ -27,47 +27,49 @@ function add_order_reference_in_order_payment() { $res = true; - $payments = Db::getInstance()->executeS(' + $payments = Db::getInstance()->query(' SELECT op.id_order_payment, o.reference FROM `'._DB_PREFIX_.'order_payment` op INNER JOIN `'._DB_PREFIX_.'orders` o ON o.id_order = op.id_order'); - if (!is_array($payments)) + if (!is_object($payments)) return false; $errors = array(); - - // Populate "order_reference" - foreach ($payments as $payment) + while ($payment = Db::getInstance()->nextRow($payments)) { - $res = Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'order_payment` - SET order_reference = \''.$payment['reference'].'\' - WHERE id_order_payment = '.(int)$payment['id_order_payment']); - - if (!$res) - $errors[] = Db::getInstance()->getMsgError(); + if(isset($payment['id_order_payment'])) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'order_payment` + SET order_reference = \''.$payment['reference'].'\' + WHERE id_order_payment = '.(int)$payment['id_order_payment']); + if (!$res) + $errors[] = Db::getInstance()->getMsgError(); + } } if (count($errors)) return array('error' => true, 'msg' => implode('
    ', $errors)); // Get lines to merge (with multishipping on, durring the payment one line was added by order, only one is necessary by cart) - $duplicate_lines = Db::getInstance()->executeS(' + $duplicate_lines = Db::getInstance()->query(' SELECT GROUP_CONCAT(id_order_payment) as id_order_payments FROM `'._DB_PREFIX_.'order_payment` GROUP BY order_reference, date_add HAVING COUNT(*) > 1'); - if (!is_array($duplicate_lines)) + if (!is_object($duplicate_lines)) return false; $order_payments_to_remove = array(); - foreach ($duplicate_lines as $order_payments) + while ($order_payments = Db::getInstance()->nextRow($duplicate_lines)) { - $order_payments_array = explode(',', $order_payments['id_order_payments']); + $order_payments_array = array(); + if(isset($order_payments['id_order_payments'])) + $order_payments_array = explode(',', $order_payments['id_order_payments']); // Remove the first item (we want to keep one line) $id_order_payment_keep = array_shift($order_payments_array); @@ -84,6 +86,5 @@ function add_order_reference_in_order_payment() if (!$res) return array('errors' => true, 'msg' => Db::getInstance()->getMsgError()); - return true; } diff --git a/install-dev/upgrade/php/fix_download_product_feature_active.php b/install-dev/upgrade/php/fix_download_product_feature_active.php new file mode 100644 index 000000000..354b3e5f5 --- /dev/null +++ b/install-dev/upgrade/php/fix_download_product_feature_active.php @@ -0,0 +1,31 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function fix_download_product_feature_active() +{ + if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1 ;') > 0) + Configuration::updateGlobaleValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE'); +} \ No newline at end of file diff --git a/install-dev/upgrade/php/p15013_add_missing_columns.php b/install-dev/upgrade/php/p15013_add_missing_columns.php index 0dc851843..55322a56c 100644 --- a/install-dev/upgrade/php/p15013_add_missing_columns.php +++ b/install-dev/upgrade/php/p15013_add_missing_columns.php @@ -32,13 +32,19 @@ function p15013_add_missing_columns() if ($id_module) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'statssearch` - ADD `id_group_shop` INT(10) NOT NULL default "1" AFTER id_statssearch, - ADD `id_shop` INT(10) NOT NULL default "1" AFTER id_statssearch')) - { - $errors[] = $db->getMsgError(); - } + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'statssearch`'); + foreach ($list_fields as $k => $field) + $list_fields[$k] = $field['Field']; + + if (!in_array('id_group_shop', $list_fields)) + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'statssearch` + ADD `id_group_shop` INT(10) NOT NULL default "1" AFTER id_statssearch')) + $errors[] = $db->getMsgError(); + if (!in_array('id_shop', $list_fields)) + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'statssearch` + ADD `id_shop` INT(10) NOT NULL default "1" AFTER id_statssearch')) + $errors[] = $db->getMsgError(); } if (count($errors)) return array('error' => 1, 'msg' => implode(',', $errors)) ; -} +} \ No newline at end of file diff --git a/install-dev/upgrade/php/p15016_add_missing_columns.php b/install-dev/upgrade/php/p15016_add_missing_columns.php index e9d8288fb..4916c4f6c 100644 --- a/install-dev/upgrade/php/p15016_add_missing_columns.php +++ b/install-dev/upgrade/php/p15016_add_missing_columns.php @@ -34,13 +34,31 @@ function p15016_add_missing_columns() $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'reinsurance`'); foreach ($list_fields as $k => $field) $list_fields[$k] = $field['Field']; - + + if (in_array('id_contactinfos', $list_fields)) + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'reinsurance` CHANGE `id_contactinfos` `id_reinsurance` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT')) + $errors[] = Db::getInstance()->getMsgError(); if (!in_array('id_shop', $list_fields)) if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'reinsurance` ADD `id_shop` INT(10) NOT NULL default "1" AFTER id_reinsurance')) $errors[] = Db::getInstance()->getMsgError(); if (in_array('filename', $list_fields)) if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'reinsurance` CHANGE `filename` `file_name` VARCHAR(100) NOT NULL')) - $errors[] = Db::getInstance()->getMsgError(); + $errors[] = Db::getInstance()->getMsgError(); + + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'reinsurance_lang`'); + + if (!is_array($list_fields) || $list_fields == false) + { + $return = Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance_lang` ( + `id_reinsurance` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_lang` int(10) unsigned NOT NULL , + `text` VARCHAR(300) NOT NULL, + PRIMARY KEY (`id_reinsurance`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + if (!$return) + $errors[] = Db::getInstance()->getMsgError(); + } } $id_module = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name="blocktopmenu"'); diff --git a/install-dev/upgrade/php/p1540_add_missing_columns.php b/install-dev/upgrade/php/p1540_add_missing_columns.php index a86938056..b63af1a71 100644 --- a/install-dev/upgrade/php/p1540_add_missing_columns.php +++ b/install-dev/upgrade/php/p1540_add_missing_columns.php @@ -52,9 +52,14 @@ function p1540_add_missing_columns() } $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"');; - if (is_array($key_exists)) + if (is_array($key_exists) && count($key_exists)) if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `product_sqlstock`')) $errors[] = Db::getInstance()->getMsgError(); + + $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "id_product_2"');; + if (is_array($key_exists) && count($key_exists)) + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `id_product_2`')) + $errors[] = Db::getInstance()->getMsgError(); if (count($errors)) return array('error' => 1, 'msg' => implode(',', $errors)) ; diff --git a/install-dev/upgrade/php/setAllGroupsOnHomeCategory.php b/install-dev/upgrade/php/setallgroupsonhomecategory.php old mode 100755 new mode 100644 similarity index 100% rename from install-dev/upgrade/php/setAllGroupsOnHomeCategory.php rename to install-dev/upgrade/php/setallgroupsonhomecategory.php diff --git a/install-dev/upgrade/sql/1.4.7.0.sql b/install-dev/upgrade/sql/1.4.7.0.sql index f38a89385..3cef2a5c3 100644 --- a/install-dev/upgrade/sql/1.4.7.0.sql +++ b/install-dev/upgrade/sql/1.4.7.0.sql @@ -3,7 +3,7 @@ SET NAMES 'utf8'; /* PHP:category_product_index_unique(); */; CREATE TABLE IF NOT EXISTS `PREFIX_order_tax` ( - `id_order` int(11) NOT NULL, + `id_order` int(10) NOT NULL, `tax_name` varchar(40) NOT NULL, `tax_rate` decimal(6,3) NOT NULL, `amount` decimal(20,6) NOT NULL @@ -12,10 +12,6 @@ CREATE TABLE IF NOT EXISTS `PREFIX_order_tax` ( INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`, `live_edit`) VALUES ('frontCanonicalRedirect', 'Front Canonical Redirect', 'Check for 404 errors before canonical redirects', 0, 0); -SET @id_hook = (SELECT `id_hook` FROM `PREFIX_hook` WHERE `name` = 'frontCanonicalRedirect'); -SET @position = (SELECT IFNULL(MAX(`position`),0)+1 FROM `PREFIX_hook_module` WHERE `id_hook` = @id_hook); -SET @id_module = (SELECT `id_module` FROM `PREFIX_module` WHERE `name` = 'pagesnotfound'); +/* PHP:update_module_pagesnotfound(); */; -INSERT INTO `PREFIX_hook_module` (`id_hook`, `id_module`, `position`) VALUES (@id_hook, @id_module, @position); - -ALTER TABLE `PREFIX_order_state` ADD COLUMN `deleted` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `delivery`; +ALTER TABLE `PREFIX_order_state` ADD COLUMN `deleted` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `delivery`; \ No newline at end of file diff --git a/install-dev/upgrade/sql/1.4.9.1.sql b/install-dev/upgrade/sql/1.4.9.1.sql deleted file mode 100644 index 22c382dd4..000000000 --- a/install-dev/upgrade/sql/1.4.9.1.sql +++ /dev/null @@ -1 +0,0 @@ -SET NAMES 'utf8'; \ No newline at end of file diff --git a/install-dev/upgrade/sql/1.5.4.0.sql b/install-dev/upgrade/sql/1.5.4.0.sql index 4c291e693..75da0cf64 100644 --- a/install-dev/upgrade/sql/1.5.4.0.sql +++ b/install-dev/upgrade/sql/1.5.4.0.sql @@ -52,6 +52,4 @@ UPDATE `PREFIX_customer` SET `id_gender` = 1 WHERE `email` LIKE 'pub@prestashop. UPDATE `PREFIX_cart_rule_carrier` crc INNER JOIN `PREFIX_carrier` c ON crc.`id_carrier` = c.`id_carrier` SET crc.`id_carrier` = c.`id_reference`; -UPDATE `PREFIX_order_payment` SET `order_reference` = LPAD(order_reference, 9 , '0'); - -/* PHP:p1540_add_missing_columns(); */; \ No newline at end of file +UPDATE `PREFIX_order_payment` SET `order_reference` = LPAD(order_reference, 9 , '0'); \ No newline at end of file diff --git a/install-dev/upgrade/sql/1.5.5.0.sql b/install-dev/upgrade/sql/1.5.5.0.sql index f2f11e95a..c0d8d4632 100644 --- a/install-dev/upgrade/sql/1.5.5.0.sql +++ b/install-dev/upgrade/sql/1.5.5.0.sql @@ -1,3 +1,19 @@ SET NAMES 'utf8'; -ALTER TABLE `PREFIX_store` CHANGE `latitude` `latitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL , CHANGE `longitude` `longitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL ; \ No newline at end of file +ALTER TABLE `PREFIX_store` CHANGE `latitude` `latitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL , CHANGE `longitude` `longitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL ; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_CUSTOMER_CREATION_EMAIL', 1, NOW(), NOW()); + +ALTER TABLE `PREFIX_webservice_account` CHANGE `class_name` `class_name` VARCHAR(64) NOT NULL DEFAULT 'WebserviceRequest', +CHANGE `module_name` `module_name` VARCHAR(64) NULL DEFAULT NULL; + +/* PHP:add_module_to_hook(blockcart, actionCartListOverride); */; +/* PHP:add_module_to_hook(blockmanufacturer, actionObjectManufacturerDeleteAfter); */; +/* PHP:add_module_to_hook(blockmanufacturer, actionObjectManufacturerAddAfter); */; +/* PHP:add_module_to_hook(blockmanufacturer, actionObjectManufacturerUpdateAfter); */; +/* PHP:add_module_to_hook(blocksupplier, actionObjectSupplierDeleteAfter); */; +/* PHP:add_module_to_hook(blocksupplier, actionObjectSupplierAddAfter); */; +/* PHP:add_module_to_hook(blocksupplier, actionObjectSupplierUpdateAfter); */; +/* PHP:fix_download_product_feature_active(); */; + + diff --git a/js/admin-products.js b/js/admin-products.js index 1867893ba..0ee818a21 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -1356,23 +1356,27 @@ product_tabs['VirtualProduct'] = new function(){ // Bind file deletion $(('#product-tab-content-VirtualProduct')).delegate('a.delete_virtual_product', 'click', function(e){ e.preventDefault(); - if (!$('#virtual_product_id').val()) + if (confirm(delete_this_file)) { - $('#upload_input').show(); - $('#virtual_product_name').val(''); - $('#virtual_product_file').val(''); - $('#upload-confirmation').hide().find('span').remove(); - } - else - { - var object = this; - ajaxAction(this.href, 'deleteVirtualProduct', function(){ - $(object).closest('tr').remove(); + if (!$('#virtual_product_id').val()) + { $('#upload_input').show(); $('#virtual_product_name').val(''); $('#virtual_product_file').val(''); - $('#virtual_product_id').remove(); - }); + $('#upload-confirmation').hide().find('span').remove(); + } + else + { + var object = this; + ajaxAction(this.href, 'deleteVirtualProduct', function(){ + $(object).closest('tr').remove(); + $('#upload_input').show(); + $('#virtual_product_name').val(''); + $('#virtual_product_file').val(''); + $('#virtual_product_id').remove(); + }); + } + } }); } diff --git a/js/admin.js b/js/admin.js index 3172cadda..bf67a53f9 100644 --- a/js/admin.js +++ b/js/admin.js @@ -577,6 +577,14 @@ function disableZipFormat() $('.zip_code_format').show(); } +function disableTAASC() +{ + if ($('#iso_code').val() == 'US') + $('#TAASC').show(); + else + $('#TAASC').hide(); +} + function spreadFees(id_range) { newVal = $('#fees_all_'+id_range).val().replace(/,/g, '.'); diff --git a/js/checkLangPack.js b/js/checkLangPack.js index 0db7a857a..1bcd6aec7 100644 --- a/js/checkLangPack.js +++ b/js/checkLangPack.js @@ -34,7 +34,7 @@ function checkLangPack(token){ action:'checkLangPack', token:token, ajax:1, - iso_lang:$('#iso_code').val(), + iso_lang:($('#iso_code').val()).toLowerCase(), ps_version:$('#ps_version').val() }, function(ret) @@ -47,7 +47,7 @@ function checkLangPack(token){ message = langPackOk + ' '+content['name'] + ') :' +'
    ' + langPackVersion + ' ' + content['version'] + ' '+download+'
    ' + langPackInfo; + + ($('#iso_code').val()).toLowerCase()+'.gzip" target="_blank" class="link">'+download+'
    ' + langPackInfo; $('#lang_pack_msg').html(message); $('#lang_pack_msg').show(); } diff --git a/js/sendMailTest.js b/js/sendMailTest.js index ad2b16444..f46a6542d 100644 --- a/js/sendMailTest.js +++ b/js/sendMailTest.js @@ -24,7 +24,7 @@ */ //constant -verifMailREGEX = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/; +verifMailREGEX = /^([\w+-]+(?:\.[\w+-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/; function verifyMail(testMsg, testSubject) { diff --git a/localization/cn.xml b/localization/cn.xml index b582b2dad..bf0af22e4 100644 --- a/localization/cn.xml +++ b/localization/cn.xml @@ -27,7 +27,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -58,6 +58,7 @@ + @@ -66,4 +67,4 @@ - + \ No newline at end of file diff --git a/localization/hk.xml b/localization/hk.xml index a03d91b94..a50827162 100644 --- a/localization/hk.xml +++ b/localization/hk.xml @@ -1,7 +1,7 @@ - + diff --git a/mails/en/download-product.tpl b/mails/en/download-product.tpl index 69dea48ba..3ad0101b8 100644 --- a/mails/en/download-product.tpl +++ b/mails/en/download-product.tpl @@ -1,7 +1,7 @@
      {foreach from=$virtualProducts item=product}
    • - {$product.name} + {$product.name} {if isset($product.deadline)} expires on {$product.deadline} {/if} diff --git a/mails/en/order_conf.html b/mails/en/order_conf.html index a3ec03b01..22b5ddea8 100644 --- a/mails/en/order_conf.html +++ b/mails/en/order_conf.html @@ -35,7 +35,7 @@ - + @@ -52,8 +52,8 @@ - - + + @@ -72,8 +72,8 @@ - - + +
      Reference Product Unit price
       Products{total_products}Products{total_products}
       
       Total paid{total_paid}Total paid{total_paid}
      @@ -98,7 +98,7 @@ - + @@ -125,4 +125,4 @@
      Delivery addressBilling address
      Delivery addressBilling address
      {delivery_block_html} {invoice_block_html}
      - + \ No newline at end of file diff --git a/modules/bankwire/views/templates/front/payment_execution.tpl b/modules/bankwire/views/templates/front/payment_execution.tpl index bb4ec3698..2d903529e 100644 --- a/modules/bankwire/views/templates/front/payment_execution.tpl +++ b/modules/bankwire/views/templates/front/payment_execution.tpl @@ -36,7 +36,7 @@ {else}

      {l s='Bank-wire payment.' mod='bankwire'}

      - +

      {l s='Bank wire' mod='bankwire'} {l s='You have chosen to pay by bank wire.' mod='bankwire'} @@ -73,7 +73,7 @@

      - {l s='Other payment methods' mod='bankwire'} + {l s='Other payment methods' mod='bankwire'}

      {/if} diff --git a/modules/bankwire/views/templates/hook/payment.tpl b/modules/bankwire/views/templates/hook/payment.tpl index fce36997f..c2fa55e40 100644 --- a/modules/bankwire/views/templates/hook/payment.tpl +++ b/modules/bankwire/views/templates/hook/payment.tpl @@ -24,7 +24,7 @@ *}

      - + {l s='Pay by bank wire' mod='bankwire'} {l s='Pay by bank wire (order process will be longer)' mod='bankwire'} diff --git a/modules/bankwire/views/templates/hook/payment_return.tpl b/modules/bankwire/views/templates/hook/payment_return.tpl index d7baf1b6f..063a13bc2 100644 --- a/modules/bankwire/views/templates/hook/payment_return.tpl +++ b/modules/bankwire/views/templates/hook/payment_return.tpl @@ -37,11 +37,11 @@

      - {l s='Do not forget to insert your order reference %s in the subject of your bank wire.' sprintf=$reference mod='bankwire'} {/if}

      {l s='An email has been sent with this information.' mod='bankwire'}

      {l s='Your order will be sent as soon as we receive payment.' mod='bankwire'} -

      {l s='If you have questions, comments or concerns, please contact our' mod='bankwire'} {l s='expert customer support team. ' mod='bankwire'}. +

      {l s='If you have questions, comments or concerns, please contact our' mod='bankwire'} {l s='expert customer support team. ' mod='bankwire'}.

      {else}

      {l s='We noticed a problem with your order. If you think this is an error, feel free to contact our' mod='bankwire'} - {l s='expert customer support team. ' mod='bankwire'}. + {l s='expert customer support team. ' mod='bankwire'}.

      {/if} diff --git a/modules/blockbestsellers/blockbestsellers-home.tpl b/modules/blockbestsellers/blockbestsellers-home.tpl index 1170dbb6b..08d1c6818 100644 --- a/modules/blockbestsellers/blockbestsellers-home.tpl +++ b/modules/blockbestsellers/blockbestsellers-home.tpl @@ -36,17 +36,17 @@ -

      {l s='All best sellers' mod='blockbestsellers'}

      +

      {l s='All best sellers' mod='blockbestsellers'}

      {else}

      {l s='No best sellers' mod='blockbestsellers'}

      diff --git a/modules/blockbestsellers/blockbestsellers.tpl b/modules/blockbestsellers/blockbestsellers.tpl index c9609627a..21f1b2176 100644 --- a/modules/blockbestsellers/blockbestsellers.tpl +++ b/modules/blockbestsellers/blockbestsellers.tpl @@ -26,25 +26,25 @@
      -

      {l s='Top sellers' mod='blockbestsellers'}

      +

      {l s='Top sellers' mod='blockbestsellers'}

      {if $best_sellers|@count > 0} -

      » {l s='All best sellers' mod='blockbestsellers'}

      +

      » {l s='All best sellers' mod='blockbestsellers'}

      {else}

      {l s='No best sellers at this time' mod='blockbestsellers'}

      {/if} diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index c42dc72cf..df74b0c63 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -232,6 +232,7 @@ var ajaxCart = { .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) .fadeOut(100, function() { ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + $(this).remove(); }); } else @@ -312,7 +313,7 @@ var ajaxCart = { // If the cart is now empty, show the 'no product in the cart' message and close detail if($('#cart_block dl.products dt').length == 0) { - $("#header #cart_block").stop(true, true).slideUp(200); + $("#cart_block").stop(true, true).slideUp(200); $('#cart_block_no_products:hidden').slideDown(450); $('#cart_block dl.products').remove(); } @@ -376,7 +377,7 @@ var ajaxCart = { else { $('#vouchers tbody').html(''); - + for (i=0;i 0) @@ -427,7 +428,7 @@ var ajaxCart = { if (this.id != undefined) { //create a container for listing the products and hide the 'no product in the cart' message (only if the cart was empty) - + if ($('#cart_block dl.products').length == 0) { $('#cart_block_no_products').before('
      '); @@ -443,8 +444,8 @@ var ajaxCart = { var content = '
      diff --git a/modules/blockcms/BlockCMSModel.php b/modules/blockcms/BlockCMSModel.php index 0d7c9a2d6..a6afd79ac 100644 --- a/modules/blockcms/BlockCMSModel.php +++ b/modules/blockcms/BlockCMSModel.php @@ -335,7 +335,7 @@ class BlockCMSModel extends ObjectModel ON (bc.`id_cms_category` = ccl.`id_cms_category`) INNER JOIN `'._DB_PREFIX_.'cms_block_lang` bcl ON (bc.`id_cms_block` = bcl.`id_cms_block`) - WHERE bc.`location` = '.(int)($location).' + WHERE bc.`location` = '.(int)$location.' AND ccl.`id_lang` = '.(int)$context->language->id.' AND bcl.`id_lang` = '.(int)$context->language->id.' AND bcs.id_shop = '.($id_shop ? (int)$id_shop : (int)$context->shop->id).' @@ -540,7 +540,7 @@ class BlockCMSModel extends ObjectModel { foreach ($content[$key]['cms'] as $row) { - $row['link'] = $context->link->getCMSLink((int)($row['id_cms']), $row['link_rewrite']); + $row['link'] = $context->link->getCMSLink((int)$row['id_cms'], $row['link_rewrite']); $links[] = $row; } } diff --git a/modules/blockcms/blockcms.tpl b/modules/blockcms/blockcms.tpl index 1b17da4dd..fe80491a5 100755 --- a/modules/blockcms/blockcms.tpl +++ b/modules/blockcms/blockcms.tpl @@ -27,17 +27,17 @@ {foreach from=$cms_titles key=cms_key item=cms_title}
      -

      {if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}

      +

      {if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}

      {/foreach} @@ -47,17 +47,17 @@
    • diff --git a/modules/blockpermanentlinks/blockpermanentlinks.tpl b/modules/blockpermanentlinks/blockpermanentlinks.tpl index 09d2ddb9a..7e0766f66 100644 --- a/modules/blockpermanentlinks/blockpermanentlinks.tpl +++ b/modules/blockpermanentlinks/blockpermanentlinks.tpl @@ -27,11 +27,11 @@