Compare commits

...

42 Commits

Author SHA1 Message Date
dlage b4c4068e41 [-] BO : fixed bug loading wrong root category in AdminCategoriesController
Fix wrong root category being loaded.
There's an issue if you activate multishop and create a new root category which loads the wrong category and causes, at least, 'Add new Category' and 'Export' in AdminCategories to redirect back to the category list (e.g. impossible to add/remove categories).
2013-12-11 01:38:05 +00:00
Vincent Augagneur fd1050b0db //tab module list fix 2013-12-10 09:43:15 +01:00
Gregory Roussac 5b809ec536 Merge pull request #1108 from Gamesh/patch-1
[-] FO : filesize returns negavite int for realy large files
2013-12-08 08:50:09 -08:00
Gamesh 02fd940124 filesize returns negavite int for realy large files
this will cast to unsigned int that will allow to display correct file size up about 4 gigabytes
2013-12-06 21:18:52 +02:00
rGaillard 134914dc1a // invisible char 2013-12-05 18:13:45 +01:00
rGaillard d8a1dca660 // demo mode 2013-11-29 17:00:50 +01:00
rGaillard 10fa987832 // small fix 2013-11-29 15:11:49 +01:00
Jérôme Nadaud 58da52b808 Merge pull request #1047 from djfm/development
Localization Packs
2013-11-28 03:26:04 -08:00
rGaillard 0585b8d723 // small fix 2013-11-28 11:29:27 +01:00
Jérôme Nadaud ccc388fab9 Merge pull request #1044 from prestamodule/development
Mail translation methods fix & template translation fix
2013-11-28 00:08:54 -08:00
fram dbd5f9d32f // added country name to Tunisia localization pack 2013-11-27 10:44:46 +01:00
fram 27397ab839 // updated Slovenia VAT rate 2013-11-27 10:39:44 +01:00
fram 11f530b54f // updated Singapore localization pack 2013-11-27 10:34:59 +01:00
fram 6c271e037c // corrected spelling of Saudi Arabia 2013-11-27 10:27:52 +01:00
fram 964a0a4601 // updated Poland VAT rate 2013-11-27 10:20:04 +01:00
fram 9737709ee6 // added country name to Philippines localization pack 2013-11-27 10:12:02 +01:00
fram 70144c7cef // added country name to Peru localization pack 2013-11-27 10:11:05 +01:00
fram 0442da817c // added country name to Panama localization pack 2013-11-27 10:07:14 +01:00
fram 9d63514220 // updated Norway VAT rate 2013-11-27 10:00:04 +01:00
rGaillard 13061bdc04 [-] Core: update cartrule feature active on cartrule updating 2013-11-26 18:04:57 +01:00
Vincent Augagneur 5150a3fc4c [-] MO : fixed bug #PSCFV-9642 - Slider does not scroll when define language from right to left 2013-11-26 15:20:44 +01:00
fram 4ab4e19d20 // updated Latvia VAT rate 2013-11-26 12:32:45 +01:00
fram 023be78690 // updated Liechtenstein VAT rate 2013-11-26 12:28:38 +01:00
fram 55c329c16e // updated Kenya VAT rate 2013-11-26 11:54:51 +01:00
fram b951c2809c // updated Jersey VAT rate 2013-11-26 11:47:34 +01:00
prestamodule 2b37db629e - Fix english translation for backoffice_order template
Signed-off-by: hadjedjvincent <v.hadjedj@presta-module.com>
2013-11-26 11:23:33 +01:00
prestamodule d064be1587 - Fix multiple translations in a same process for different id_lang
If id_lang are mixed (1, 2, 3, 1, 4, 2...) the translations aren't correctly populated from the theme lang.php override if include_once is used.
include must be used in order to handle mixed id_lang in a same process.

Signed-off-by: hadjedjvincent <v.hadjedj@presta-module.com>
2013-11-26 11:22:57 +01:00
gRoussac 2a1c991612 [-] BO : Undefined on image upload, revert of https://github.com/PrestaShop/PrestaShop/commit/48b7a49b1aea34a2def355ffec1d4c08dfdbdfd6 2013-11-25 22:56:50 +01:00
Jérôme Nadaud fa059751fc Merge pull request #1032 from djfm/development
// updated Italian VAT rate
2013-11-25 09:48:47 -08:00
fram 6284c55e2a // updated Italian VAT rate 2013-11-25 18:42:17 +01:00
Rémi Gaillard 81f05b9db3 Merge pull request #780 from MyBB-Services/dev/gb/sqlmanagergroupby
[*] BO : Allow complex GROUP BY in SQL Manager
2013-11-25 08:21:23 -08:00
Rémi Gaillard 09b5d3a0b8 Merge pull request #863 from Prestaworks/patch-15
// Update GuestTrackingController.php
2013-11-25 07:52:57 -08:00
Jérôme Nadaud 754ba06a39 Merge pull request #1030 from ccauw/patch-13
[-] BO : Double separator in function createTemplate()
2013-11-25 05:18:28 -08:00
Jérôme Nadaud 2129aebac0 Update CONTRIBUTING.md 2013-11-25 14:17:49 +01:00
ccauw 04760c91e5 [-] BO : Double separator in function createTemplate()
smarty->getTemplateDir() returns a result ending with a separator,
so no need to add DIRECTORY_SEPARATOR ?
2013-11-25 14:13:10 +01:00
Damien Metzger 2eb620267c Merge pull request #835 from axometeam/patch-20
// Fixed potential issue with textarea
2013-11-25 02:35:23 -08:00
Damien Metzger a932ba512a Merge pull request #846 from sebastienhouzet/patch-2
[-] MO : Fix add truncate tag in pscleaner
2013-11-25 02:13:06 -08:00
gRoussac d14fcf169a [-] IN : bad reset on vars in migrate_orders 2013-11-21 17:10:19 +01:00
Daniel 8053604005 Update GuestTrackingController.php
Fixed issue with retrocompatibility where the ->getFirst() caused a 505 error on the order_collection when a collection class was not loaded.
2013-10-21 19:40:47 +08:00
Sébastien 5abd93e619 [-] MO : Fix add truncate tag 2013-10-15 21:38:10 +02:00
Axome eff3f6f713 A new version of my precedent pull-request
when you have some tags with attributes ( like img, ... )
2013-10-11 16:52:14 +02:00
Grégoire Bélorgey dbc5c4301f [*] BO : Allow complex GROUP BY in SQL Manager 2013-10-02 10:31:41 +02:00
37 changed files with 90 additions and 149 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
Contributing Contributing
------------ ------------
PrestaShop is an open-source e-commerce solution - To contribute to our project, you can make pull requests on the development branch. PrestaShop is an open-source e-commerce solution - To contribute to our project, you can make pull requests on the bootstrap branch.
If you need some help to make a [pull-request][1] If you need some help to make a [pull-request][1]
All contributions must respect [the coding norm][2] and [the commit norm][3] in your pull-request. All contributions must respect [the coding norm][2] and [the commit norm][3] in your pull-request.
All core files you commit in your pull request must have Open Software License (OSL 3.0) All core files you commit in your pull request must have Open Software License (OSL 3.0)
@@ -23,10 +23,6 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<div class="width4"> {if isset($localization_form)}{$localization_form}{/if}
{if isset($localization_form)}{$localization_form}{/if}
</div>
<br /> <br />
<div class="width4"> {if isset($localization_options)}{$localization_options}{/if}
{if isset($localization_options)}{$localization_options}{/if}
</div>
@@ -28,7 +28,7 @@
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}float: left;"> <div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}float: left;">
<textarea cols="100" rows="10" id="{$input_name}_{$language.id_lang}" <textarea cols="100" rows="10" id="{$input_name}_{$language.id_lang}"
name="{$input_name}_{$language.id_lang}" name="{$input_name}_{$language.id_lang}"
class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea> class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8|replace:'\r\n':''|replace:'\&quot;':'&quot;'}{/if}</textarea>
<span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span> <span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span>
<span class="hint">{$hint|default:''}<span class="hint-pointer">&nbsp;</span></span> <span class="hint">{$hint|default:''}<span class="hint-pointer">&nbsp;</span></span>
</div> </div>
+6 -1
View File
@@ -132,7 +132,12 @@ class CartRuleCore extends ObjectModel
public function update($null_values = false) public function update($null_values = false)
{ {
Cache::clean('getContextualValue_'.$this->id.'_*'); Cache::clean('getContextualValue_'.$this->id.'_*');
return parent::update($null_values); if (!parent::update($null_values))
return false;
Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', CartRule::isCurrentlyUsed($this->def['table'], true));
return true;
} }
/** /**
+2 -2
View File
@@ -372,11 +372,11 @@ class MailCore
$file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php'; $file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php';
if (Tools::file_exists_cache($file_core) && empty($_LANGMAIL)) if (Tools::file_exists_cache($file_core) && empty($_LANGMAIL))
include_once($file_core); include($file_core);
$file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php'; $file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php';
if (Tools::file_exists_cache($file_theme)) if (Tools::file_exists_cache($file_theme))
include_once($file_theme); include($file_theme);
if (!is_array($_LANGMAIL)) if (!is_array($_LANGMAIL))
return (str_replace('"', '&quot;', $string)); return (str_replace('"', '&quot;', $string));
+5 -4
View File
@@ -245,9 +245,10 @@ class RequestSqlCore extends ObjectModel
*/ */
public function cutAttribute($attr, $from) public function cutAttribute($attr, $from)
{ {
if (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr)) $matches = array();
if (preg_match('/((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$/i', $attr, $matches, PREG_OFFSET_CAPTURE))
{ {
$tab = explode('.', str_replace(array('`', '(', ')'), '', $attr)); $tab = explode('.', str_replace(array('`', '(', ')'), '', $matches[0][0]));
if (!$table = $this->returnNameTable($tab[0], $from)) if (!$table = $this->returnNameTable($tab[0], $from))
return false; return false;
else else
@@ -256,9 +257,9 @@ class RequestSqlCore extends ObjectModel
'attribut' => $tab[1], 'attribut' => $tab[1],
'string' => $attr); 'string' => $attr);
} }
elseif (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr)) elseif (preg_match('/((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$/i', $attr, $matches, PREG_OFFSET_CAPTURE))
{ {
$attribut = str_replace(array('`', '(', ')'), '', $attr); $attribut = str_replace(array('`', '(', ')'), '', $matches[0][0]);
if (!$table = $this->returnNameTable(false, $from)) if (!$table = $this->returnNameTable(false, $from))
return false; return false;
else else
+4 -5
View File
@@ -344,7 +344,7 @@ class ToolsCore
} }
/* Automatically detect language if not already defined, detect_language is set in Cookie::update */ /* Automatically detect language if not already defined, detect_language is set in Cookie::update */
if ((!$cookie->id_lang || isset($cookie->detect_language)) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) if ((!$cookie->id_lang && (isset($cookie->detect_language)) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])))
{ {
$array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'])); $array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
$string = $array[0]; $string = $array[0];
@@ -397,6 +397,7 @@ class ToolsCore
|| (($id_lang == $configuration_id_lang) && Validate::isUnsignedId($id_lang) && $id_lang != $cookie_id_lang)) || (($id_lang == $configuration_id_lang) && Validate::isUnsignedId($id_lang) && $id_lang != $cookie_id_lang))
{ {
$context->cookie->id_lang = $id_lang; $context->cookie->id_lang = $id_lang;
$language = new Language($id_lang); $language = new Language($id_lang);
if (Validate::isLoadedObject($language) && $language->active) if (Validate::isLoadedObject($language) && $language->active)
$context->language = $language; $context->language = $language;
@@ -675,10 +676,8 @@ class ToolsCore
public static function htmlentitiesDecodeUTF8($string) public static function htmlentitiesDecodeUTF8($string)
{ {
if (is_array($string)) if (is_array($string))
{ return array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string);
$string = array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string);
return (string)array_shift($string);
}
return html_entity_decode((string)$string, ENT_QUOTES, 'utf-8'); return html_entity_decode((string)$string, ENT_QUOTES, 'utf-8');
} }
+1 -1
View File
@@ -1547,7 +1547,7 @@ class AdminControllerCore extends Controller
if (!empty($country_module_list) && is_string($country_module_list) && $country_module_list_xml = simplexml_load_string($country_module_list)) if (!empty($country_module_list) && is_string($country_module_list) && $country_module_list_xml = simplexml_load_string($country_module_list))
{ {
$country_module_list_array = array(); $country_module_list_array = array();
if (is_array($country_module_list_xml->module)) if (isset($country_module_list_xml->module))
foreach ($country_module_list_xml->module as $k => $m) foreach ($country_module_list_xml->module as $k => $m)
$country_module_list_array[] = (string)$m->name; $country_module_list_array[] = (string)$m->name;
$this->tab_modules_list['slider_list'] = array_intersect($this->tab_modules_list['slider_list'], $country_module_list_array); $this->tab_modules_list['slider_list'] = array_intersect($this->tab_modules_list['slider_list'], $country_module_list_array);
+3 -3
View File
@@ -86,9 +86,9 @@ class HelperCore
$override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->override_folder.$this->base_folder.$tpl_name; $override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->override_folder.$this->base_folder.$tpl_name;
else else
{ {
if (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) if (file_exists($this->context->smarty->getTemplateDir(1).$this->override_folder.$this->base_folder.$tpl_name))
$override_tpl_path = $this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; $override_tpl_path = $this->context->smarty->getTemplateDir(1).$this->override_folder.$this->base_folder.$tpl_name;
else if (file_exists($this->context->smarty->getTemplateDir(0).DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) else if (file_exists($this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name))
$override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; $override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name;
} }
@@ -105,7 +105,7 @@ class AdminCategoriesControllerCore extends AdminController
$this->_category = new Category($id_category); $this->_category = new Category($id_category);
else else
{ {
if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP) if (Shop::getContext() == Shop::CONTEXT_SHOP)
$this->_category = new Category($this->context->shop->id_category); $this->_category = new Category($this->context->shop->id_category);
elseif (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1) elseif (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
$this->_category = Category::getTopCategory(); $this->_category = Category::getTopCategory();
@@ -71,6 +71,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
{ {
$this->initToolbar(); $this->initToolbar();
$this->toolbar_btn['new']['href'] .= '&amp;id_parent='.(int)Tools::getValue('id_cms_category'); $this->toolbar_btn['new']['href'] .= '&amp;id_parent='.(int)Tools::getValue('id_cms_category');
$this->initTabModuleList();
return parent::renderList(); return parent::renderList();
} }
@@ -120,6 +120,7 @@ class AdminDeliverySlipControllerCore extends AdminController
public function initContent() public function initContent()
{ {
$this->initTabModuleList();
$this->content .= $this->renderForm().'<br />'; $this->content .= $this->renderForm().'<br />';
$this->show_toolbar = false; $this->show_toolbar = false;
$this->content .= $this->renderOptions(); $this->content .= $this->renderOptions();
@@ -347,15 +347,15 @@ class AdminEmployeesControllerCore extends AdminController
public function postProcess() public function postProcess()
{ {
if (Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee')) /* PrestaShop demo mode */
if ((Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee') || Tools::isSubmit('submitAddemployee')) && _PS_MODE_DEMO_)
{ {
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_ && $id_employee = Tools::getValue('id_employee') && (int)$id_employee == _PS_DEMO_MAIN_BO_ACCOUNT_)
{
$this->errors[] = Tools::displayError('This functionality has been disabled.'); $this->errors[] = Tools::displayError('This functionality has been disabled.');
return; return;
} }
if (Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee'))
{
if ($this->context->employee->id == Tools::getValue('id_employee')) if ($this->context->employee->id == Tools::getValue('id_employee'))
{ {
$this->errors[] = Tools::displayError('You cannot disable or delete your own account.'); $this->errors[] = Tools::displayError('You cannot disable or delete your own account.');
@@ -304,7 +304,7 @@ class AdminLocalizationControllerCore extends AdminController
'download_updated_pack' => 1 'download_updated_pack' => 1
); );
$this->show_toolbar = false; $this->show_toolbar = true;
return parent::renderForm(); return parent::renderForm();
} }
@@ -315,7 +315,6 @@ class AdminLocalizationControllerCore extends AdminController
// toolbar (save, cancel, new, ..) // toolbar (save, cancel, new, ..)
$this->initToolbar(); $this->initToolbar();
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'localization_form' => $this->renderForm(), 'localization_form' => $this->renderForm(),
'localization_options' => $this->renderOptions(), 'localization_options' => $this->renderOptions(),
@@ -323,9 +322,15 @@ class AdminLocalizationControllerCore extends AdminController
)); ));
} }
public function initToolbar()
{
$this->toolbar_btn = array();
$this->initTabModuleList();
}
public function display() public function display()
{ {
$this->initContent(); $this->initContent();
parent::display(); parent::display();
} }
@@ -638,6 +638,7 @@ class AdminManufacturersControllerCore extends AdminController
{ {
// toolbar (save, cancel, new, ..) // toolbar (save, cancel, new, ..)
$this->initToolbar(); $this->initToolbar();
$this->initTabModuleList();
if ($this->display == 'editaddresses' || $this->display == 'addaddress') if ($this->display == 'editaddresses' || $this->display == 'addaddress')
$this->content .= $this->renderFormAddress(); $this->content .= $this->renderFormAddress();
else if ($this->display == 'edit' || $this->display == 'add') else if ($this->display == 'edit' || $this->display == 'add')
+1 -1
View File
@@ -276,7 +276,7 @@ class GetFileControllerCore extends FrontController
/* Set headers for download */ /* Set headers for download */
header('Content-Transfer-Encoding: binary'); header('Content-Transfer-Encoding: binary');
header('Content-Type: '.$mimeType); header('Content-Type: '.$mimeType);
header('Content-Length: '.filesize($file)); header('Content-Length: '.sprintf('%u', filesize($file)));
header('Content-Disposition: attachment; filename="'.$filename.'"'); header('Content-Disposition: attachment; filename="'.$filename.'"');
$fp = fopen($file, 'rb'); $fp = fopen($file, 'rb');
while (!feof($fp)) while (!feof($fp))
@@ -58,7 +58,7 @@ class GuestTrackingControllerCore extends FrontController
{ {
$order = new Order((int)$id_order); $order = new Order((int)$id_order);
if (Validate::isLoadedObject($order)) if (Validate::isLoadedObject($order))
$order_collection[] = $order; $order_collection = Order::getByReference($order->reference);
} }
else else
$order_collection = Order::getByReference($id_order); $order_collection = Order::getByReference($id_order);
+7 -4
View File
@@ -86,11 +86,9 @@ function migrate_orders()
SELECT od.* SELECT od.*
FROM `'._DB_PREFIX_.'order_detail` od FROM `'._DB_PREFIX_.'order_detail` od
WHERE od.`id_order` = '.(int)$order['id_order']); WHERE od.`id_order` = '.(int)$order['id_order']);
while ($order_details = Db::getInstance()->nextRow($order_details_list)) while ($order_details = Db::getInstance()->nextRow($order_details_list))
{ {
$values_order_detail = array();
$values_order = array();
$col_order_detail = array();
// we don't want to erase order_details data in order to create the insert query // we don't want to erase order_details data in order to create the insert query
$products = mo_setProductPrices($order_details, $price_display_method); $products = mo_setProductPrices($order_details, $price_display_method);
$tax_rate = 1 + ((float)$products['tax_rate'] / 100); $tax_rate = 1 + ((float)$products['tax_rate'] / 100);
@@ -107,6 +105,7 @@ function migrate_orders()
$order_details['total_price_tax_excl'] = (float)$products['total_price']; $order_details['total_price_tax_excl'] = (float)$products['total_price'];
$order_details['unit_price_tax_incl'] = (float)$products['product_price_wt']; $order_details['unit_price_tax_incl'] = (float)$products['product_price_wt'];
$order_details['unit_price_tax_excl'] = (float)$products['product_price']; $order_details['unit_price_tax_excl'] = (float)$products['product_price'];
foreach (array_keys($order_details) as $k) foreach (array_keys($order_details) as $k)
if (!in_array($k, $col_order_detail)) if (!in_array($k, $col_order_detail))
unset($order_details[$k]); unset($order_details[$k]);
@@ -121,7 +120,7 @@ function migrate_orders()
$values_order_detail[] = '(\''.implode('\', \'', $order_details).'\')'; $values_order_detail[] = '(\''.implode('\', \'', $order_details).'\')';
unset($order_details); unset($order_details);
} }
$average_tax_used = 1; $average_tax_used = 1;
if ($sum_total_products > 0) if ($sum_total_products > 0)
$average_tax_used += $sum_tax_amount / $sum_total_products; $average_tax_used += $sum_tax_amount / $sum_total_products;
@@ -187,6 +186,10 @@ function migrate_orders()
$res = false; $res = false;
$array_errors[] = '[insert order 4] - '.Db::getInstance()->getMsgError(); $array_errors[] = '[insert order 4] - '.Db::getInstance()->getMsgError();
} }
if (isset($values_order))
unset($values_order);
if (isset($values_order_detail))
unset($values_order_detail);
if (!mo_renameTables()) if (!mo_renameTables())
{ {
$res = false; $res = false;
+2 -1
View File
@@ -1072,7 +1072,8 @@ qq.extend(qq.UploadHandlerXhr.prototype, {
var queryString = qq.obj2url(params, this._options.action); var queryString = qq.obj2url(params, this._options.action);
xhr.open("POST", queryString, true); xhr.open("POST", queryString, true);
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr.setRequestHeader("Content-Type", "application/octet-stream");
xhr.setRequestHeader("processData", false);
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.setRequestHeader("X-File-Name", encodeURIComponent(name)); xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
xhr.send(file); xhr.send(file);
+2 -2
View File
@@ -7,11 +7,11 @@
<language iso_code="it" /> <language iso_code="it" />
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="IVA IT 21%" rate="21" /> <tax id="1" name="IVA IT 22%" rate="22" />
<tax id="2" name="IVA IT 10%" rate="10" /> <tax id="2" name="IVA IT 10%" rate="10" />
<tax id="3" name="IVA IT 4%" rate="4" /> <tax id="3" name="IVA IT 4%" rate="4" />
<taxRulesGroup name="IT Standard Rate (21%)"> <taxRulesGroup name="IT Standard Rate (22%)">
<taxRule iso_code_country="be" id_tax="1" /> <taxRule iso_code_country="be" id_tax="1" />
<taxRule iso_code_country="bg" id_tax="1" /> <taxRule iso_code_country="bg" id_tax="1" />
<taxRule iso_code_country="cz" id_tax="1" /> <taxRule iso_code_country="cz" id_tax="1" />
+2 -2
View File
@@ -8,9 +8,9 @@
<language iso_code="en" /> <language iso_code="en" />
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="GST JE 3%" rate="3" /> <tax id="1" name="GST JE 5%" rate="5" />
<taxRulesGroup name="JE Standard Rate (3%)"> <taxRulesGroup name="JE Standard Rate (5%)">
<taxRule iso_code_country="je" id_tax="1" /> <taxRule iso_code_country="je" id_tax="1" />
</taxRulesGroup> </taxRulesGroup>
</taxes> </taxes>
-4
View File
@@ -10,14 +10,10 @@
<taxRulesGroup name="Kenya VAT 16%"> <taxRulesGroup name="Kenya VAT 16%">
<taxRule iso_code_country="ke" behavior="0" id_tax="76"/> <taxRule iso_code_country="ke" behavior="0" id_tax="76"/>
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="Kenya VAT 12%">
<taxRule iso_code_country="ke" behavior="0" id_tax="77"/>
</taxRulesGroup>
<taxRulesGroup name="Kenya VAT 0%"> <taxRulesGroup name="Kenya VAT 0%">
<taxRule iso_code_country="ke" behavior="0" id_tax="78"/> <taxRule iso_code_country="ke" behavior="0" id_tax="78"/>
</taxRulesGroup> </taxRulesGroup>
<tax id="76" name="Kenya VAT 16%" rate="16.000"/> <tax id="76" name="Kenya VAT 16%" rate="16.000"/>
<tax id="77" name="Kenya VAT 12%" rate="12.000"/>
<tax id="78" name="Kenya VAT 0%" rate="0.000"/> <tax id="78" name="Kenya VAT 0%" rate="0.000"/>
</taxes> </taxes>
<units> <units>
+6 -6
View File
@@ -7,19 +7,19 @@
<language iso_code="de" /> <language iso_code="de" />
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="TVA CH 7.6%" rate="7.6" /> <tax id="1" name="TVA CH 8%" rate="8" />
<tax id="2" name="TVA CH 3.6%" rate="3.6" /> <tax id="2" name="TVA CH 3.8%" rate="3.8" />
<tax id="3" name="TVA CH 2.4%" rate="2.4" /> <tax id="3" name="TVA CH 2.5%" rate="2.5" />
<taxRulesGroup name="CH Standard Rate (7.6%)"> <taxRulesGroup name="CH Standard Rate (8%)">
<taxRule iso_code_country="li" id_tax="1" /> <taxRule iso_code_country="li" id_tax="1" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="CH Reduced Rate (3.6%)"> <taxRulesGroup name="CH Reduced Rate (3.8%)">
<taxRule iso_code_country="li" id_tax="2" /> <taxRule iso_code_country="li" id_tax="2" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="CH Super Reduced Rate (2.4%)"> <taxRulesGroup name="CH Super Reduced Rate (2.5%)">
<taxRule iso_code_country="li" id_tax="3" /> <taxRule iso_code_country="li" id_tax="3" />
</taxRulesGroup> </taxRulesGroup>
</taxes> </taxes>
+3 -3
View File
@@ -8,7 +8,7 @@
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="PVN LV 21%" rate="21" /> <tax id="1" name="PVN LV 21%" rate="21" />
<tax id="2" name="PVN LV 10%" rate="10" /> <tax id="2" name="PVN LV 12%" rate="12" />
<taxRulesGroup name="LV Standard Rate (21%)"> <taxRulesGroup name="LV Standard Rate (21%)">
<taxRule iso_code_country="be" id_tax="1" /> <taxRule iso_code_country="be" id_tax="1" />
@@ -40,7 +40,7 @@
<taxRule iso_code_country="uk" id_tax="1" /> <taxRule iso_code_country="uk" id_tax="1" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="LV Reduced Rate (10%)"> <taxRulesGroup name="LV Reduced Rate (12%)">
<taxRule iso_code_country="be" id_tax="2" /> <taxRule iso_code_country="be" id_tax="2" />
<taxRule iso_code_country="bg" id_tax="2" /> <taxRule iso_code_country="bg" id_tax="2" />
<taxRule iso_code_country="cz" id_tax="2" /> <taxRule iso_code_country="cz" id_tax="2" />
@@ -100,7 +100,7 @@
<taxRule iso_code_country="uk" id_tax="1" /> <taxRule iso_code_country="uk" id_tax="1" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="LV Books Rate (10%)"> <taxRulesGroup name="LV Books Rate (12%)">
<taxRule iso_code_country="be" id_tax="2" /> <taxRule iso_code_country="be" id_tax="2" />
<taxRule iso_code_country="bg" id_tax="2" /> <taxRule iso_code_country="bg" id_tax="2" />
<taxRule iso_code_country="cz" id_tax="2" /> <taxRule iso_code_country="cz" id_tax="2" />
+2 -2
View File
@@ -8,14 +8,14 @@
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="MVA NO 25%" rate="25" /> <tax id="1" name="MVA NO 25%" rate="25" />
<tax id="2" name="MVA NO 14%" rate="14" /> <tax id="2" name="MVA NO 15%" rate="15" />
<tax id="3" name="MVA NO 8%" rate="8" /> <tax id="3" name="MVA NO 8%" rate="8" />
<taxRulesGroup name="NO Standard Rate (25%)"> <taxRulesGroup name="NO Standard Rate (25%)">
<taxRule iso_code_country="no" id_tax="1" /> <taxRule iso_code_country="no" id_tax="1" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="NO Reduced Rate (14%)"> <taxRulesGroup name="NO Reduced Rate (15%)">
<taxRule iso_code_country="no" id_tax="2" /> <taxRule iso_code_country="no" id_tax="2" />
</taxRulesGroup> </taxRulesGroup>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<localizationPack name="PA"> <localizationPack name="Panama">
<currencies> <currencies>
<currency name="Dollar" iso_code="USD" iso_code_num="840" sign="$" blank="0" conversion_rate="1.000000" format="1" decimals="1"/> <currency name="Dollar" iso_code="USD" iso_code_num="840" sign="$" blank="0" conversion_rate="1.000000" format="1" decimals="1"/>
</currencies> </currencies>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<localizationPack name="PE"> <localizationPack name="Peru">
<currencies> <currencies>
<currency name="Nuevo Sol" iso_code="PEN" iso_code_num="604" sign="S/." blank="1" conversion_rate="2.784499" format="1" decimals="0"/> <currency name="Nuevo Sol" iso_code="PEN" iso_code_num="604" sign="S/." blank="1" conversion_rate="2.784499" format="1" decimals="0"/>
</currencies> </currencies>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<localizationPack name="PH"> <localizationPack name="Philippines">
<currencies> <currencies>
<currency name="Philippine Peso" iso_code="PHP" iso_code_num="608" sign="PHP" blank="1" conversion_rate="1.000000" format="1" decimals="1"/> <currency name="Philippine Peso" iso_code="PHP" iso_code_num="608" sign="PHP" blank="1" conversion_rate="1.000000" format="1" decimals="1"/>
</currencies> </currencies>
+1 -70
View File
@@ -1,18 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<localizationPack name="Poland" version="1.0"> <localizationPack name="Poland" version="1.0">
<currencies> <currencies>
<currency name="Zloty" iso_code="PLN" iso_code_num="985" sign="zł" blank="1" conversion_rate="3.84510" format="2" decimals="1" /> <currency name="Złoty" iso_code="PLN" iso_code_num="985" sign="zł" blank="1" conversion_rate="3.84510" format="2" decimals="1" />
</currencies> </currencies>
<languages> <languages>
<language iso_code="pl" /> <language iso_code="pl" />
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="PTU PL 23%" rate="23" /> <tax id="1" name="PTU PL 23%" rate="23" />
<tax id="2" name="PTU PL 8%" rate="8" /> <tax id="2" name="PTU PL 8%" rate="8" />
<tax id="3" name="PTU PL 7%" rate="7" />
<tax id="4" name="PTU PL 5%" rate="5" /> <tax id="4" name="PTU PL 5%" rate="5" />
<tax id="5" name="PTU PL 4%" rate="4" />
<tax id="6" name="PTU PL 0" rate="0" /> <tax id="6" name="PTU PL 0" rate="0" />
<taxRulesGroup name="PL Standard Rate (23%)"> <taxRulesGroup name="PL Standard Rate (23%)">
@@ -82,39 +79,6 @@
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="PL Reduced Rate (7%)">
<taxRule iso_code_country="be" id_tax="3" />
<taxRule iso_code_country="bg" id_tax="3" />
<taxRule iso_code_country="cz" id_tax="3" />
<taxRule iso_code_country="dk" id_tax="3" />
<taxRule iso_code_country="de" id_tax="3" />
<taxRule iso_code_country="ee" id_tax="3" />
<taxRule iso_code_country="gr" id_tax="3" />
<taxRule iso_code_country="es" id_tax="3" />
<taxRule iso_code_country="fr" id_tax="3" />
<taxRule iso_code_country="ie" id_tax="3" />
<taxRule iso_code_country="it" id_tax="3" />
<taxRule iso_code_country="cy" id_tax="3" />
<taxRule iso_code_country="lv" id_tax="3" />
<taxRule iso_code_country="lt" id_tax="3" />
<taxRule iso_code_country="lu" id_tax="3" />
<taxRule iso_code_country="hu" id_tax="3" />
<taxRule iso_code_country="mt" id_tax="3" />
<taxRule iso_code_country="nl" id_tax="3" />
<taxRule iso_code_country="at" id_tax="3" />
<taxRule iso_code_country="pl" id_tax="3" />
<taxRule iso_code_country="pt" id_tax="3" />
<taxRule iso_code_country="ro" id_tax="3" />
<taxRule iso_code_country="si" id_tax="3" />
<taxRule iso_code_country="sk" id_tax="3" />
<taxRule iso_code_country="fi" id_tax="3" />
<taxRule iso_code_country="se" id_tax="3" />
<taxRule iso_code_country="uk" id_tax="3" />
</taxRulesGroup>
<taxRulesGroup name="PL Reduced Rate (5%)"> <taxRulesGroup name="PL Reduced Rate (5%)">
<taxRule iso_code_country="be" id_tax="4" /> <taxRule iso_code_country="be" id_tax="4" />
<taxRule iso_code_country="bg" id_tax="4" /> <taxRule iso_code_country="bg" id_tax="4" />
@@ -147,38 +111,6 @@
<taxRule iso_code_country="uk" id_tax="4" /> <taxRule iso_code_country="uk" id_tax="4" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="PL Reduced Rate (4%)">
<taxRule iso_code_country="be" id_tax="5" />
<taxRule iso_code_country="bg" id_tax="5" />
<taxRule iso_code_country="cz" id_tax="5" />
<taxRule iso_code_country="dk" id_tax="5" />
<taxRule iso_code_country="de" id_tax="5" />
<taxRule iso_code_country="ee" id_tax="5" />
<taxRule iso_code_country="gr" id_tax="5" />
<taxRule iso_code_country="es" id_tax="5" />
<taxRule iso_code_country="fr" id_tax="5" />
<taxRule iso_code_country="it" id_tax="5" />
<taxRule iso_code_country="cy" id_tax="5" />
<taxRule iso_code_country="lv" id_tax="5" />
<taxRule iso_code_country="lt" id_tax="5" />
<taxRule iso_code_country="lu" id_tax="5" />
<taxRule iso_code_country="hu" id_tax="5" />
<taxRule iso_code_country="mt" id_tax="5" />
<taxRule iso_code_country="nl" id_tax="5" />
<taxRule iso_code_country="at" id_tax="5" />
<taxRule iso_code_country="pl" id_tax="5" />
<taxRule iso_code_country="pt" id_tax="5" />
<taxRule iso_code_country="ro" id_tax="5" />
<taxRule iso_code_country="si" id_tax="5" />
<taxRule iso_code_country="sk" id_tax="5" />
<taxRule iso_code_country="fi" id_tax="5" />
<taxRule iso_code_country="se" id_tax="5" />
<taxRule iso_code_country="uk" id_tax="5" />
</taxRulesGroup>
<taxRulesGroup name="PL Exempted Rate (0%)"> <taxRulesGroup name="PL Exempted Rate (0%)">
<taxRule iso_code_country="be" id_tax="6" /> <taxRule iso_code_country="be" id_tax="6" />
@@ -210,7 +142,6 @@
<taxRule iso_code_country="se" id_tax="6" /> <taxRule iso_code_country="se" id_tax="6" />
<taxRule iso_code_country="uk" id_tax="6" /> <taxRule iso_code_country="uk" id_tax="6" />
</taxRulesGroup> </taxRulesGroup>
</taxes> </taxes>
<units> <units>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<localizationPack name="Saoudi Arabie" version="1.0"> <localizationPack name="Saudi Arabia" version="1.0">
<currencies> <currencies>
<currency name="Riyal" iso_code="SAR" iso_code_num="682" sign="﷼" blank="1" conversion_rate="5.10682" format="2" decimals="1" /> <currency name="Riyal" iso_code="SAR" iso_code_num="682" sign="﷼" blank="1" conversion_rate="5.10682" format="2" decimals="1" />
</currencies> </currencies>
+6 -6
View File
@@ -5,7 +5,7 @@
</currencies> </currencies>
<languages> <languages>
<language iso_code="en" /> <language iso_code="en" />
<language iso_code="tw" /> <language iso_code="ms" />
<language iso_code="zh" /> <language iso_code="zh" />
</languages> </languages>
<taxes> <taxes>
@@ -16,10 +16,10 @@
</taxRulesGroup> </taxRulesGroup>
</taxes> </taxes>
<units> <units>
<unit type="weight" value="市制" /> <unit type="weight" value="kg"/>
<unit type="volume" value="市升" /> <unit type="volume" value="L"/>
<unit type="short_distance" value="市厘" /> <unit type="short_distance" value="cm"/>
<unit type="base_distance" value="" /> <unit type="base_distance" value="m"/>
<unit type="long_distance" value="市里" /> <unit type="long_distance" value="km"/>
</units> </units>
</localizationPack> </localizationPack>
+6 -6
View File
@@ -7,10 +7,10 @@
<language iso_code="si" /> <language iso_code="si" />
</languages> </languages>
<taxes> <taxes>
<tax id="1" name="DDV SI 20%" rate="20" /> <tax id="1" name="DDV SI 22%" rate="22" />
<tax id="2" name="DDV SI 8.5%" rate="8.5" /> <tax id="2" name="DDV SI 9.5%" rate="9.5" />
<taxRulesGroup name="SI Standard Rate (20%)"> <taxRulesGroup name="SI Standard Rate (22%)">
<taxRule iso_code_country="be" id_tax="1" /> <taxRule iso_code_country="be" id_tax="1" />
<taxRule iso_code_country="bg" id_tax="1" /> <taxRule iso_code_country="bg" id_tax="1" />
<taxRule iso_code_country="cz" id_tax="1" /> <taxRule iso_code_country="cz" id_tax="1" />
@@ -40,7 +40,7 @@
<taxRule iso_code_country="uk" id_tax="1" /> <taxRule iso_code_country="uk" id_tax="1" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="SI Reduced Rate (8.5%)"> <taxRulesGroup name="SI Reduced Rate (9.5%)">
<taxRule iso_code_country="be" id_tax="2" /> <taxRule iso_code_country="be" id_tax="2" />
<taxRule iso_code_country="bg" id_tax="2" /> <taxRule iso_code_country="bg" id_tax="2" />
<taxRule iso_code_country="cz" id_tax="2" /> <taxRule iso_code_country="cz" id_tax="2" />
@@ -70,7 +70,7 @@
<taxRule iso_code_country="uk" id_tax="2" /> <taxRule iso_code_country="uk" id_tax="2" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="SI Foodstuff Rate (8.5%)"> <taxRulesGroup name="SI Foodstuff Rate (9.5%)">
<taxRule iso_code_country="be" id_tax="2" /> <taxRule iso_code_country="be" id_tax="2" />
<taxRule iso_code_country="bg" id_tax="2" /> <taxRule iso_code_country="bg" id_tax="2" />
<taxRule iso_code_country="cz" id_tax="2" /> <taxRule iso_code_country="cz" id_tax="2" />
@@ -100,7 +100,7 @@
<taxRule iso_code_country="uk" id_tax="2" /> <taxRule iso_code_country="uk" id_tax="2" />
</taxRulesGroup> </taxRulesGroup>
<taxRulesGroup name="SI Books Rate (8.5%)"> <taxRulesGroup name="SI Books Rate (9.5%)">
<taxRule iso_code_country="be" id_tax="2" /> <taxRule iso_code_country="be" id_tax="2" />
<taxRule iso_code_country="bg" id_tax="2" /> <taxRule iso_code_country="bg" id_tax="2" />
<taxRule iso_code_country="cz" id_tax="2" /> <taxRule iso_code_country="cz" id_tax="2" />
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<localizationPack name="TN"> <localizationPack name="Tunisia">
<currencies> <currencies>
<currency name="Tunisian Dinar" iso_code="TND" iso_code_num="788" sign="DT" blank="0" conversion_rate="1.000000" format="2" decimals="1"/> <currency name="Tunisian Dinar" iso_code="TND" iso_code_num="788" sign="DT" blank="0" conversion_rate="1.000000" format="2" decimals="1"/>
</currencies> </currencies>
+1 -1
View File
@@ -20,7 +20,7 @@
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">A new command has been generated to you.</td> <td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">A new order has been generated to you.</td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
+1 -1
View File
@@ -1,6 +1,6 @@
Hi {firstname} {lastname}, Hi {firstname} {lastname},
A new command has been generated to you. A new order has been generated to you.
Go on {order_link} to finalize the payment. Go on {order_link} to finalize the payment.
+1
View File
@@ -474,6 +474,7 @@ class PSCleaner extends Module
'stock', 'stock',
'stock_available', 'stock_available',
'stock_mvt', 'stock_mvt',
'tag',
); );
foreach ($tables as $table) foreach ($tables as $table)
$db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`'); $db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`');
+1 -1
View File
@@ -1,2 +1,2 @@
* { direction: rtl !important; } body { direction: rtl !important; }
#page { text-align: right !important; } #page { text-align: right !important; }