';
echo '
['.get_class($this).']
';
- echo $this->getExentedMessage();
+ echo $this->getExtendedMessage();
$this->displayFileDebug($this->getFile(), $this->getLine());
@@ -145,14 +145,23 @@ class PrestaShopExceptionCore extends Exception
{
$logger = new FileLogger();
$logger->setFilename(_PS_ROOT_DIR_.'/log/'.date('Ymd').'_exception.log');
- $logger->logError($this->getExentedMessage(false));
+ $logger->logError($this->getExtendedMessage(false));
+ }
+
+ /**
+ * @deprecated 1.5.5
+ */
+ protected function getExentedMessage($html = true)
+ {
+ Tools::displayAsDeprecated();
+ return $this->getExtendedMessage($html);
}
/**
* Return the content of the Exception
* @return string content of the exception
*/
- protected function getExentedMessage($html = true)
+ protected function getExtendedMessage($html = true)
{
$format = '
%s
at line %d in file %s
';
if (!$html)
diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php
index 6d4c3a023..69a6127c2 100644
--- a/classes/helper/HelperList.php
+++ b/classes/helper/HelperList.php
@@ -173,13 +173,13 @@ class HelperListCore extends Helper
public function displayListContent()
{
- if ($this->position_identifier)
- $id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', ($this->is_cms ? '1' : Category::getRootCategory()->id ));
- else
- $id_category = Category::getRootCategory()->id;
-
if (isset($this->fields_list['position']))
{
+ if ($this->position_identifier)
+ $id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', ($this->is_cms ? '1' : Category::getRootCategory()->id ));
+ else
+ $id_category = Category::getRootCategory()->id;
+
$positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list);
sort($positions);
}
@@ -259,7 +259,7 @@ class HelperListCore extends Helper
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)$tr['id_image'] : '').'.'.$this->imageType;
else
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.Image::getImgFolderStatic($tr['id_image']).(int)$tr['id_image'].'.'.$this->imageType;
- $this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
+ $this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'_'.$this->context->shop->id.'.'.$this->imageType, 45, $this->imageType);
}
elseif (isset($params['icon']) && isset($tr[$key]) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
{
@@ -307,7 +307,7 @@ class HelperListCore extends Helper
'table' => $this->table,
'token' => $this->token,
'color_on_bg' => $this->colorOnBackground,
- 'id_category' => $id_category,
+ 'id_category' => isset($id_category) ? $id_category : false,
'bulk_actions' => $this->bulk_actions,
'positions' => isset($positions) ? $positions : null,
'order_by' => $this->orderBy,
@@ -456,7 +456,7 @@ class HelperListCore extends Helper
);
if ($this->specificConfirmDelete !== false)
- $data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name;
+ $data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : addcslashes(Tools::htmlentitiesDecodeUTF8(self::$cache_lang['DeleteItem'].$name), '\'');
$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
@@ -486,18 +486,21 @@ class HelperListCore extends Helper
*/
public function displayListHeader()
{
+ if (!isset($this->list_id))
+ $this->list_id = $this->table;
+
$id_cat = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category');
if (!isset($token) || empty($token))
$token = $this->token;
/* Determine total page number */
- if (isset($this->context->cookie->{$this->table.'_pagination'}) && $this->context->cookie->{$this->table.'_pagination'})
- $default_pagination = $this->context->cookie->{$this->table.'_pagination'};
+ if (isset($this->context->cookie->{$this->list_id.'_pagination'}) && $this->context->cookie->{$this->list_id.'_pagination'})
+ $default_pagination = $this->context->cookie->{$this->list_id.'_pagination'};
else
$default_pagination = $this->_pagination[0];
- $total_pages = ceil($this->listTotal / Tools::getValue('pagination', ($default_pagination)));
+ $total_pages = ceil($this->listTotal / Tools::getValue($this->list_id.'_pagination', ($default_pagination)));
if (!$total_pages)
$total_pages = 1;
@@ -510,14 +513,13 @@ class HelperListCore extends Helper
$action = $this->currentIndex.$identifier.'&token='.$token.$order.'#'.$this->table;
/* Determine current page number */
- $page = (int)Tools::getValue('submitFilter'.$this->table);
+ $page = (int)Tools::getValue('submitFilter'.$this->list_id);
if (!$page)
$page = 1;
/* Choose number of results per page */
- $selected_pagination = Tools::getValue(
- 'pagination',
- isset($this->context->cookie->{$this->table.'_pagination'}) ? $this->context->cookie->{$this->table.'_pagination'} : null
+ $selected_pagination = Tools::getValue($this->list_id.'_pagination',
+ isset($this->context->cookie->{$this->list_id.'_pagination'}) ? $this->context->cookie->{$this->list_id.'_pagination'} : null
);
// Cleaning links
@@ -535,7 +537,7 @@ class HelperListCore extends Helper
{
if (!isset($params['type']))
$params['type'] = 'text';
- $value = Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.(array_key_exists('filter_key', $params) && $key != 'active' ? $params['filter_key'] : $key)};
+ $value = Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.(array_key_exists('filter_key', $params) && $key != 'active' ? $params['filter_key'] : $key)};
switch ($params['type'])
{
case 'bool':
@@ -547,7 +549,7 @@ class HelperListCore extends Helper
$value = Tools::unSerialize($value);
if (!Validate::isCleanHtml($value[0]) || !Validate::isCleanHtml($value[1]))
$value = '';
- $name = $this->table.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key);
+ $name = $this->list_id.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key);
$name_id = str_replace('!', '__', $name);
$params['id_date'] = $name_id;
@@ -559,9 +561,9 @@ class HelperListCore extends Helper
case 'select':
foreach ($params['list'] as $option_value => $option_display)
{
- if (isset(Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']})
- && Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} == $option_value
- && Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} != '')
+ if (isset(Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']})
+ && Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']} == $option_value
+ && Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']} != '')
$this->fields_list[$key]['select'][$option_value]['selected'] = 'selected';
}
break;
@@ -605,6 +607,7 @@ class HelperListCore extends Helper
'name' => isset($name) ? $name : null,
'name_id' => isset($name_id) ? $name_id : null,
'row_hover' => $this->row_hover,
+ 'list_id' => isset($this->list_id) ? $this->list_id : $this->table
)));
return $this->header_tpl->fetch();
diff --git a/classes/module/Module.php b/classes/module/Module.php
index 6067612b6..2c95d60bf 100644
--- a/classes/module/Module.php
+++ b/classes/module/Module.php
@@ -153,18 +153,22 @@ abstract class ModuleCore
// If cache is not generated, we generate it
if (self::$modules_cache == null && !is_array(self::$modules_cache))
{
- // Join clause is done to check if the module is activated in current shop context
- $sql_limit_shop = 'SELECT COUNT(*) FROM `'._DB_PREFIX_.'module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` = '.((is_object(Context::getContext()->shop) && $id = (int)Context::getContext()->shop->id) ? $id : 1);
-
- $sql = 'SELECT m.`id_module`, m.`name`, ('.$sql_limit_shop.') as total FROM `'._DB_PREFIX_.'module` m';
-
- // Result is cached
+ $id_shop = (Validate::isLoadedObject($this->context->shop) ? $this->context->shop->id : 1);
self::$modules_cache = array();
- $result = Db::getInstance()->executeS($sql);
+ // Join clause is done to check if the module is activated in current shop context
+ $result = Db::getInstance()->executeS('
+ SELECT m.`id_module`, m.`name`, (
+ SELECT id_module
+ FROM `'._DB_PREFIX_.'module_shop` ms
+ WHERE m.`id_module` = ms.`id_module`
+ AND ms.`id_shop` = '.(int)$id_shop.'
+ LIMIT 1
+ ) as mshop
+ FROM `'._DB_PREFIX_.'module` m');
foreach ($result as $row)
{
self::$modules_cache[$row['name']] = $row;
- self::$modules_cache[$row['name']]['active'] = ($row['total'] > 0) ? 1 : 0;
+ self::$modules_cache[$row['name']]['active'] = ($row['mshop'] > 0) ? 1 : 0;
}
}
@@ -288,15 +292,17 @@ abstract class ModuleCore
else
{
if (!$upgrade_detail['number_upgraded'])
- $this->_errors[] = $this->l('None upgrades have been applied');
+ $this->_errors[] = $this->l('No upgrade has been applied');
else
{
- $this->_errors[] = $this->l('Upgraded from: ').$upgrade_detail['upgraded_from'].$this->l(' to ').
- $upgrade_detail['upgraded_to'];
+ $this->_errors[] = sprintf($this->l('Upgraded from: %S to %s'), $upgrade_detail['upgraded_from'], $upgrade_detail['upgraded_to']);
$this->_errors[] = $upgrade_detail['number_upgrade_left'].' '.$this->l('upgrade left');
}
- $this->_errors[] = $this->l('To prevent any problem, this module has been turned off');
+ if ($upgrade_detail['duplicate'])
+ $this->_errors[] = sprintf(Tools::displayError('Module %s cannot be upgraded this time: please refresh this page to update it.'), $this->name);
+ else
+ $this->_errors[] = $this->l('To prevent any problem, this module has been turned off');
}
}
}
@@ -344,19 +350,21 @@ abstract class ModuleCore
$upgrade = &self::$modules_cache[$this->name]['upgrade'];
foreach ($upgrade['upgrade_file_left'] as $num => $file_detail)
{
- // Default variable required in the included upgrade file need to be set by default there:
- // upgrade_version, success_upgrade
- $upgrade_result = false;
+ if (function_exists($file_detail['upgrade_function']))
+ {
+ $upgrade['success'] = false;
+ $upgrade['duplicate'] = true;
+ break;
+ }
include($file_detail['file']);
// Call the upgrade function if defined
+ $upgrade['success'] = false;
if (function_exists($file_detail['upgrade_function']))
- $upgrade_result = $file_detail['upgrade_function']($this);
-
- $upgrade['success'] = $upgrade_result;
+ $upgrade['success'] = $file_detail['upgrade_function']($this);
// Set detail when an upgrade succeed or failed
- if ($upgrade_result)
+ if ($upgrade['success'])
{
$upgrade['number_upgraded'] += 1;
$upgrade['upgraded_to'] = $file_detail['version'];
@@ -374,6 +382,7 @@ abstract class ModuleCore
}
$upgrade['number_upgrade_left'] = count($upgrade['upgrade_file_left']);
+
// Update module version in DB with the last succeed upgrade
if ($upgrade['upgraded_to'])
Module::upgradeModuleVersion($this->name, $upgrade['upgraded_to']);
@@ -392,9 +401,9 @@ abstract class ModuleCore
public static function upgradeModuleVersion($name, $version)
{
return Db::getInstance()->execute('
- UPDATE `'._DB_PREFIX_.'module` m
- SET m.version = \''.bqSQL($version).'\'
- WHERE m.name = \''.bqSQL($name).'\'');
+ UPDATE `'._DB_PREFIX_.'module` m
+ SET m.version = \''.bqSQL($version).'\'
+ WHERE m.name = \''.bqSQL($name).'\'');
}
/**
@@ -665,12 +674,14 @@ abstract class ModuleCore
return false;
// Retrocompatibility
+ $hook_name_bak = $hook_name;
if ($alias = Hook::getRetroHookName($hook_name))
$hook_name = $alias;
Hook::exec('actionModuleRegisterHookBefore', array('object' => $this, 'hook_name' => $hook_name));
// Get hook id
$id_hook = Hook::getIdByName($hook_name);
+ $live_edit = Hook::getLiveEditById((int)Hook::getIdByName($hook_name_bak));
// If hook does not exist, we create it
if (!$id_hook)
@@ -678,6 +689,7 @@ abstract class ModuleCore
$new_hook = new Hook();
$new_hook->name = pSQL($hook_name);
$new_hook->title = pSQL($hook_name);
+ $new_hook->live_edit = pSQL($live_edit);
$new_hook->add();
$id_hook = $new_hook->id;
if (!$id_hook)
@@ -1350,7 +1362,7 @@ abstract class ModuleCore
elseif (isset($context->customer))
{
$groups = $context->customer->getGroups();
- if (empty($groups))
+ if (!count($groups))
$groups = array(Configuration::get('PS_UNIDENTIFIED_GROUP'));
}
@@ -1373,7 +1385,7 @@ abstract class ModuleCore
'.(isset($billing) && $frontend ? 'AND mc.id_country = '.(int)$billing->id_country : '').'
AND (SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN('.implode(', ', $list).')) = '.count($list).'
AND hm.id_shop IN('.implode(', ', $list).')
- '.(count($groups) && $frontend ? 'AND (mg.`id_group` IN('.implode(', ', $groups).'))' : '').$paypal_condition.'
+ '.((count($groups) && $frontend) ? 'AND (mg.`id_group` IN ('.implode(', ', $groups).'))' : '').$paypal_condition.'
GROUP BY hm.id_hook, hm.id_module
ORDER BY hm.`position`, m.`name` DESC');
}
@@ -1511,12 +1523,12 @@ abstract class ModuleCore
* @param int $id_hook Hook ID
* @return array Exceptions
*/
- protected static $exceptionsCache = null;
- public function getExceptions($hookID, $dispatch = false)
+ public function getExceptions($id_hook, $dispatch = false)
{
- if (self::$exceptionsCache === null)
+ $cache_id = 'exceptionsCache';
+ if (!Cache::isStored($cache_id))
{
- self::$exceptionsCache = array();
+ $exceptionsCache = array();
$sql = 'SELECT * FROM `'._DB_PREFIX_.'hook_module_exceptions`
WHERE `id_shop` IN ('.implode(', ', Shop::getContextListShopID()).')';
$result = Db::getInstance()->executeS($sql);
@@ -1525,33 +1537,34 @@ abstract class ModuleCore
if (!$row['file_name'])
continue;
$key = $row['id_hook'].'-'.$row['id_module'];
- if (!isset(self::$exceptionsCache[$key]))
- self::$exceptionsCache[$key] = array();
- if (!isset(self::$exceptionsCache[$key][$row['id_shop']]))
- self::$exceptionsCache[$key][$row['id_shop']] = array();
- self::$exceptionsCache[$key][$row['id_shop']][] = $row['file_name'];
+ if (!isset($exceptionsCache[$key]))
+ $exceptionsCache[$key] = array();
+ if (!isset($exceptionsCache[$key][$row['id_shop']]))
+ $exceptionsCache[$key][$row['id_shop']] = array();
+ $exceptionsCache[$key][$row['id_shop']][] = $row['file_name'];
}
+ Cache::store($cache_id, $exceptionsCache);
}
+ else
+ $exceptionsCache = Cache::retrieve($cache_id);
- $key = $hookID.'-'.$this->id;
- if (!$dispatch)
+ $key = $id_hook.'-'.$this->id;
+ $array_return = array();
+ if ($dispatch)
{
- $files = array();
foreach (Shop::getContextListShopID() as $shop_id)
- if (isset(self::$exceptionsCache[$key], self::$exceptionsCache[$key][$shop_id]))
- foreach (self::$exceptionsCache[$key][$shop_id] as $file)
- if (!in_array($file, $files))
- $files[] = $file;
- return $files;
+ if (isset($exceptionsCache[$key], $exceptionsCache[$key][$shop_id]))
+ $array_return[$shop_id] = $exceptionsCache[$key][$shop_id];
}
else
{
- $list = array();
foreach (Shop::getContextListShopID() as $shop_id)
- if (isset(self::$exceptionsCache[$key], self::$exceptionsCache[$key][$shop_id]))
- $list[$shop_id] = self::$exceptionsCache[$key][$shop_id];
- return $list;
+ if (isset($exceptionsCache[$key], $exceptionsCache[$key][$shop_id]))
+ foreach ($exceptionsCache[$key][$shop_id] as $file)
+ if (!in_array($file, $array_return))
+ $array_return[] = $file;
}
+ return $array_return;
}
public static function isInstalled($module_name)
@@ -1595,7 +1608,11 @@ abstract class ModuleCore
protected static function _isTemplateOverloadedStatic($module_name, $template)
{
if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/'.$template))
- return true;
+ return _PS_THEME_DIR_.'modules/'.$module_name.'/'.$template;
+ elseif (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/hook/'.$template))
+ return _PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/hook/'.$template;
+ elseif (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/front/'.$template))
+ return _PS_THEME_DIR_.'modules/'.$module_name.'/views/templates/front/'.$template;
elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/views/templates/hook/'.$template))
return false;
elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$template))
@@ -1610,9 +1627,16 @@ abstract class ModuleCore
protected function getCacheId($name = null)
{
- if ($name === null)
- $name = $this->name;
- return $name.'|'.(int)Tools::usingSecureMode().'|'.(int)$this->context->shop->id.'|'.(int)Group::getCurrent()->id.'|'.(int)$this->context->language->id.'|'.(int)$this->context->currency->id;
+ $cache_array = array(
+ $name !== null ? $name : $this->name,
+ (int)Tools::usingSecureMode(),
+ (int)$this->context->shop->id,
+ (int)Group::getCurrent()->id,
+ (int)$this->context->language->id,
+ (int)$this->context->currency->id,
+ (int)$this->context->country->id
+ );
+ return implode('|', $cache_array);
}
public function display($file, $template, $cacheId = null, $compileId = null)
@@ -1656,8 +1680,9 @@ abstract class ModuleCore
$overloaded = $this->_isTemplateOverloaded($template);
if ($overloaded === null)
return null;
+
if ($overloaded)
- return _PS_THEME_DIR_.'modules/'.$this->name.'/'.$template;
+ return $overloaded;
else if (file_exists(_PS_MODULE_DIR_.$this->name.'/views/templates/hook/'.$template))
return _PS_MODULE_DIR_.$this->name.'/views/templates/hook/'.$template;
else
@@ -1701,7 +1726,15 @@ abstract class ModuleCore
'.(int)$this->need_instance.''.(isset($this->limited_countries) ? "\n\t".'
'.(count($this->limited_countries) == 1 ? $this->limited_countries[0] : '').'' : '').'
';
if (is_writable(_PS_MODULE_DIR_.$this->name.'/'))
- file_put_contents(_PS_MODULE_DIR_.$this->name.'/config.xml', $xml);
+ {
+ $file = _PS_MODULE_DIR_.$this->name.'/config.xml';
+ if (!@file_put_contents($file, $xml))
+ if (!is_writable($file))
+ {
+ @unlink($file);
+ @file_put_contents($file, $xml);
+ }
+ }
}
/**
@@ -1926,7 +1959,43 @@ abstract class ModuleCore
$path = Autoload::getInstance()->getClassPath($classname.'Core');
// Check if there is already an override file, if not, we just need to copy the file
- if (!($classpath = Autoload::getInstance()->getClassPath($classname)))
+ if (Autoload::getInstance()->getClassPath($classname))
+ {
+ // Check if override file is writable
+ $override_path = _PS_ROOT_DIR_.'/'.Autoload::getInstance()->getClassPath($classname);
+ if ((!file_exists($override_path) && !is_writable(dirname($override_path))) || (file_exists($override_path) && !is_writable($override_path)))
+ throw new Exception(sprintf(Tools::displayError('file (%s) not writable'), $override_path));
+
+ // Get a uniq id for the class, because you can override a class (or remove the override) twice in the same session and we need to avoid redeclaration
+ do $uniq = uniqid();
+ while (class_exists($classname.'OverrideOriginal_remove', false));
+
+ // Make a reflection of the override class and the module override class
+ $override_file = file($override_path);
+ eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?#i'), array('', 'class '.$classname.'OverrideOriginal'.$uniq), implode('', $override_file)));
+ $override_class = new ReflectionClass($classname.'OverrideOriginal'.$uniq);
+
+ $module_file = file($this->getLocalPath().'override'.DIRECTORY_SEPARATOR.$path);
+ eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'(\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?)?#i'), array('', 'class '.$classname.'Override'.$uniq), implode('', $module_file)));
+ $module_class = new ReflectionClass($classname.'Override'.$uniq);
+
+ // Check if none of the methods already exists in the override class
+ foreach ($module_class->getMethods() as $method)
+ if ($override_class->hasMethod($method->getName()))
+ throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overriden.'), $method->getName(), $classname));
+
+ // Check if none of the properties already exists in the override class
+ foreach ($module_class->getProperties() as $property)
+ if ($override_class->hasProperty($property->getName()))
+ throw new Exception(sprintf(Tools::displayError('The property %1$s in the class %2$s is already defined.'), $property->getName(), $classname));
+
+ // Insert the methods from module override in override
+ $copy_from = array_slice($module_file, $module_class->getStartLine() + 1, $module_class->getEndLine() - $module_class->getStartLine() - 2);
+ array_splice($override_file, $override_class->getEndLine() - 1, 0, $copy_from);
+ $code = implode('', $override_file);
+ file_put_contents($override_path, $code);
+ }
+ else
{
$override_src = $this->getLocalPath().'override'.DIRECTORY_SEPARATOR.$path;
$override_dest = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'override'.DIRECTORY_SEPARATOR.$path;
@@ -1935,39 +2004,7 @@ abstract class ModuleCore
copy($override_src, $override_dest);
// Re-generate the class index
Autoload::getInstance()->generateIndex();
- return true;
}
-
- // Check if override file is writable
- $override_path = _PS_ROOT_DIR_.'/'.Autoload::getInstance()->getClassPath($classname);
- if ((!file_exists($override_path) && !is_writable(dirname($override_path))) || (file_exists($override_path) && !is_writable($override_path)))
- throw new Exception(sprintf(Tools::displayError('file (%s) not writable'), $override_path));
-
- // Make a reflection of the override class and the module override class
- $override_file = file($override_path);
- eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?#i'), array('', 'class '.$classname.'OverrideOriginal'), implode('', $override_file)));
- $override_class = new ReflectionClass($classname.'OverrideOriginal');
-
- $module_file = file($this->getLocalPath().'override'.DIRECTORY_SEPARATOR.$path);
- eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'(\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?)?#i'), array('', 'class '.$classname.'Override'), implode('', $module_file)));
- $module_class = new ReflectionClass($classname.'Override');
-
- // Check if none of the methods already exists in the override class
- foreach ($module_class->getMethods() as $method)
- if ($override_class->hasMethod($method->getName()))
- throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overriden.'), $method->getName(), $classname));
-
- // Check if none of the properties already exists in the override class
- foreach ($module_class->getProperties() as $property)
- if ($override_class->hasProperty($property->getName()))
- throw new Exception(sprintf(Tools::displayError('The property %1$s in the class %2$s is already defined.'), $property->getName(), $classname));
-
- // Insert the methods from module override in override
- $copy_from = array_slice($module_file, $module_class->getStartLine() + 1, $module_class->getEndLine() - $module_class->getStartLine() - 2);
- array_splice($override_file, $override_class->getEndLine() - 1, 0, $copy_from);
- $code = implode('', $override_file);
- file_put_contents($override_path, $code);
-
return true;
}
@@ -1989,14 +2026,18 @@ abstract class ModuleCore
if (!is_writable($override_path))
return false;
+ // Get a uniq id for the class, because you can override a class (or remove the override) twice in the same session and we need to avoid redeclaration
+ do $uniq = uniqid();
+ while (class_exists($classname.'OverrideOriginal_remove', false));
+
// Make a reflection of the override class and the module override class
$override_file = file($override_path);
- eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?#i'), array('', 'class '.$classname.'OverrideOriginal_remove'), implode('', $override_file)));
- $override_class = new ReflectionClass($classname.'OverrideOriginal_remove');
+ eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?#i'), array('', 'class '.$classname.'OverrideOriginal_remove'.$uniq), implode('', $override_file)));
+ $override_class = new ReflectionClass($classname.'OverrideOriginal_remove'.$uniq);
$module_file = file($this->getLocalPath().'override/'.$path);
- eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'(\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?)?#i'), array('', 'class '.$classname.'Override_remove'), implode('', $module_file)));
- $module_class = new ReflectionClass($classname.'Override_remove');
+ eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'(\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?)?#i'), array('', 'class '.$classname.'Override_remove'.$uniq), implode('', $module_file)));
+ $module_class = new ReflectionClass($classname.'Override_remove'.$uniq);
// Remove methods from override file
$override_file = file($override_path);
diff --git a/classes/order/Order.php b/classes/order/Order.php
index 6d624e8cc..42e5b42b0 100644
--- a/classes/order/Order.php
+++ b/classes/order/Order.php
@@ -254,10 +254,12 @@ class OrderCore extends ObjectModel
public function __construct($id = null, $id_lang = null)
{
parent::__construct($id, $id_lang);
- if ($this->id_customer)
+
+ $is_admin = (is_object(Context::getContext()->controller) && Context::getContext()->controller->controller_type == 'admin');
+ if ($this->id_customer && !$is_admin)
{
$customer = new Customer((int)($this->id_customer));
- $this->_taxCalculationMethod = Group::getPriceDisplayMethod((int)($customer->id_default_group));
+ $this->_taxCalculationMethod = Group::getPriceDisplayMethod((int)$customer->id_default_group);
}
else
$this->_taxCalculationMethod = Group::getDefaultPriceDisplayMethod();
@@ -710,11 +712,10 @@ class OrderCore extends ObjectModel
}
public function getCartRules()
- {
+ {
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT *
FROM `'._DB_PREFIX_.'order_cart_rule` ocr
- LEFT JOIN `'._DB_PREFIX_.'cart_rule` cr ON cr.`id_cart_rule` = ocr.`id_cart_rule`
WHERE ocr.`id_order` = '.(int)$this->id);
}
diff --git a/classes/order/OrderCartRule.php b/classes/order/OrderCartRule.php
index 3eceb173d..dcc06203a 100644
--- a/classes/order/OrderCartRule.php
+++ b/classes/order/OrderCartRule.php
@@ -46,6 +46,9 @@ class OrderCartRuleCore extends ObjectModel
/** @var float value (tax excl.) of voucher */
public $value_tax_excl;
+
+ /** @var boolean value : voucher gives free shipping or not */
+ public $free_shipping;
/**
* @see ObjectModel::$definition
@@ -59,7 +62,8 @@ class OrderCartRuleCore extends ObjectModel
'id_order_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true),
'value' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true),
- 'value_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true)
+ 'value_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true),
+ 'free_shipping' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool')
)
);
diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php
index d78c5318c..9c0721baa 100644
--- a/classes/order/OrderHistory.php
+++ b/classes/order/OrderHistory.php
@@ -64,6 +64,9 @@ class OrderHistoryCore extends ObjectModel
'id_order_state' => array('required' => true, 'xlink_resource'=> 'order_states'),
'id_order' => array('xlink_resource' => 'orders'),
),
+ 'objectMethods' => array(
+ 'add' => 'addWs',
+ ),
);
/**
@@ -122,8 +125,8 @@ class OrderHistoryCore extends ObjectModel
.'&id_order='.(int)$order->id
.'&secure_key='.$order->secure_key;
$assign[$key]['link'] = $dl_link;
- if (isset($virtual_product['date_expiration']) && $virtual_product['date_expiration'] != '0000-00-00 00:00:00')
- $assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration ']);
+ if (isset($virtual_product['download_deadline']) && $virtual_product['download_deadline'] != '0000-00-00 00:00:00')
+ $assign[$key]['deadline'] = Tools::displayDate($virtual_product['download_deadline']);
if ($product_download->nb_downloadable != 0)
$assign[$key]['downloadable'] = (int)$product_download->nb_downloadable;
}
@@ -142,7 +145,7 @@ class OrderHistoryCore extends ObjectModel
$links .= ' '.Tools::htmlentitiesUTF8(sprintf(Tools::displayError('downloadable %d time(s)'), (int)$product['downloadable']));
$links .= '';
}
- $links .= '
';
$data = array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
@@ -376,7 +379,7 @@ class OrderHistoryCore extends ObjectModel
return false;
$result = Db::getInstance()->getRow('
- SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`
+ SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state`
FROM `'._DB_PREFIX_.'order_history` oh
LEFT JOIN `'._DB_PREFIX_.'orders` o ON oh.`id_order` = o.`id_order`
LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer`
@@ -408,9 +411,23 @@ class OrderHistoryCore extends ObjectModel
$data['{order_name}'] = $order->getUniqReference();
if (Validate::isLoadedObject($order))
+ {
+ // Join PDF invoice if order state is "payment accepted"
+ if ((int)$result['id_order_state'] === 2 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number)
+ {
+ $context = Context::getContext();
+ $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $context->smarty);
+ $file_attachement['content'] = $pdf->render(false);
+ $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf';
+ $file_attachement['mime'] = 'application/pdf';
+ }
+ else
+ $file_attachement = null;
+
Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'],
- null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop);
-
+ null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop);
+ }
+
ShopUrl::resetMainDomainCache();
}
@@ -445,4 +462,27 @@ class OrderHistoryCore extends ObjectModel
AND os.`logable` = 1');
}
+ /**
+ * Add method for webservice create resource Order History
+ * If sendemail=1 GET parameter is present sends email to customer otherwise does not
+ * @return bool
+ */
+ public function addWs()
+ {
+ $sendemail = (bool)Tools::getValue('sendemail', false);
+ if ($sendemail)
+ {
+ //Mail::Send requires link object on context and is not set when getting here
+ $context = Context::getContext();
+ if ($context->link == null)
+ {
+ $protocol_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
+ $protocol_content = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
+ $context->link = new Link($protocol_link, $protocol_content);
+ }
+ return $this->addWithemail();
+ }
+ else
+ return $this->add();
+ }
}
diff --git a/classes/order/OrderSlip.php b/classes/order/OrderSlip.php
index a9b38457d..527df4bb4 100644
--- a/classes/order/OrderSlip.php
+++ b/classes/order/OrderSlip.php
@@ -129,19 +129,6 @@ class OrderSlipCore extends ObjectModel
{
$products[$key] = $product;
$products[$key]['product_quantity'] = $slip_quantity[$product['id_order_detail']];
- if (count($cart_rules))
- {
- $order->setProductPrices($product);
- $realProductPrice = $products[$key]['product_price'];
- // Todo : must be updated to use the cart rules
- foreach ($cart_rules as $cart_rule)
- {
- if ($cart_rule['reduction_percent'])
- $products[$key]['product_price'] -= $realProductPrice * ($cart_rule['reduction_percent'] / 100);
- elseif ($cart_rule['reduction_amount'])
- $products[$key]['product_price'] -= (($cart_rule['reduction_amount'] * ($product['product_price_wt'] / $order->total_products_wt)) / (1.00 + ($product['tax_rate'] / 100)));
- }
- }
}
return $order->getProducts($products);
}
diff --git a/classes/pdf/HTMLTemplateOrderReturn.php b/classes/pdf/HTMLTemplateOrderReturn.php
index 4bee5be8c..7efda9b4a 100755
--- a/classes/pdf/HTMLTemplateOrderReturn.php
+++ b/classes/pdf/HTMLTemplateOrderReturn.php
@@ -40,7 +40,7 @@ class HTMLTemplateOrderReturnCore extends HTMLTemplate
// header informations
$this->date = Tools::displayDate($this->order->invoice_date);
- $this->title = HTMLTemplateOrderReturn::l('Order Return ').sprintf('%06d', $this->order_return->id);
+ $this->title = sprintf(HTMLTemplateOrderReturn::l('Order Return %s'), sprintf('%06d', $this->order_return->id));
// footer informations
$this->shop = new Shop((int)$this->order->id_shop);
diff --git a/classes/pdf/HTMLTemplateOrderSlip.php b/classes/pdf/HTMLTemplateOrderSlip.php
index 95d9b9f1f..db9df275d 100644
--- a/classes/pdf/HTMLTemplateOrderSlip.php
+++ b/classes/pdf/HTMLTemplateOrderSlip.php
@@ -45,7 +45,7 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice
$this->smarty = $smarty;
// header informations
- $this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
+ $this->date = Tools::displayDate($this->order_slip->date_add);
$this->title = HTMLTemplateOrderSlip::l('Slip #').Configuration::get('PS_CREDIT_SLIP_PREFIX', Context::getContext()->language->id).sprintf('%06d', (int)$this->order_slip->id);
// footer informations
diff --git a/classes/pdf/HTMLTemplateSupplyOrderForm.php b/classes/pdf/HTMLTemplateSupplyOrderForm.php
index 16a94b8e5..15139644d 100644
--- a/classes/pdf/HTMLTemplateSupplyOrderForm.php
+++ b/classes/pdf/HTMLTemplateSupplyOrderForm.php
@@ -45,7 +45,7 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate
$this->address_supplier = new Address(Address::getAddressIdBySupplierId((int)$supply_order->id_supplier));
// header informations
- $this->date = Tools::displayDate($supply_order->date_add, (int)$this->supply_order->id_lang);
+ $this->date = Tools::displayDate($supply_order->date_add);
$this->title = HTMLTemplateSupplyOrderForm::l('Supply order form');
}
diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php
index da7a42e6c..4ca5cf8f4 100644
--- a/classes/shop/Shop.php
+++ b/classes/shop/Shop.php
@@ -187,18 +187,16 @@ class ShopCore extends ObjectModel
public function setUrl()
{
- $sql = 'SELECT su.physical_uri, su.virtual_uri,
- su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
- FROM '._DB_PREFIX_.'shop s
- LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
- LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
- WHERE s.id_shop = '.(int)$this->id.'
- AND s.active = 1
- AND s.deleted = 0
- AND su.main = 1';
-
- if (!$row = Db::getInstance()->getRow($sql))
- return;
+ $row = Db::getInstance()->getRow('
+ SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
+ FROM '._DB_PREFIX_.'shop s
+ LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
+ LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
+ WHERE s.id_shop = '.(int)$this->id.'
+ AND s.active = 1 AND s.deleted = 0 AND su.main = 1');
+
+ if (!$row)
+ return false;
$this->theme_id = $row['id_theme'];
$this->theme_name = $row['name'];
diff --git a/classes/shop/ShopUrl.php b/classes/shop/ShopUrl.php
index c8e4b6074..5edf106d4 100644
--- a/classes/shop/ShopUrl.php
+++ b/classes/shop/ShopUrl.php
@@ -34,8 +34,8 @@ class ShopUrlCore extends ObjectModel
public $main;
public $active;
- protected static $main_domain = null;
- protected static $main_domain_ssl = null;
+ protected static $main_domain = array();
+ protected static $main_domain_ssl = array();
/**
* @see ObjectModel::$definition
@@ -143,41 +143,35 @@ class ShopUrlCore extends ObjectModel
return Db::getInstance()->getValue($sql);
}
- public static function getMainShopDomain($id_shop = null)
- {
- if (!self::$main_domain || $id_shop !== null)
- self::$main_domain = Db::getInstance()->getValue('SELECT domain
- FROM '._DB_PREFIX_.'shop_url
- WHERE main=1 AND id_shop = '.($id_shop !== null ? (int)$id_shop : Context::getContext()->shop->id));
- return self::$main_domain;
- }
-
public static function cacheMainDomainForShop($id_shop)
{
- if (!Validate::isUnsignedId($id_shop))
- return false;
-
- ShopUrl::getMainShopDomain($id_shop);
- ShopUrl::getMainShopDomainSSL($id_shop);
+ if (!isset(self::$main_domain_ssl[(int)$id_shop]) || !isset(self::$main_domain[(int)$id_shop]))
+ {
+ $row = Db::getInstance()->getRow('
+ SELECT domain, domain_ssl
+ FROM '._DB_PREFIX_.'shop_url
+ WHERE main = 1
+ AND id_shop = '.($id_shop !== null ? (int)$id_shop : Context::getContext()->shop->id));
+ self::$main_domain[(int)$id_shop] = $row['domain'];
+ self::$main_domain_ssl[(int)$id_shop] = $row['domain_ssl'];
+ }
}
public static function resetMainDomainCache()
{
- self::$main_domain = null;
- self::$main_domain_ssl = null;
+ self::$main_domain = array();
+ self::$main_domain_ssl = array();
}
+ public static function getMainShopDomain($id_shop = null)
+ {
+ ShopUrl::cacheMainDomainForShop($id_shop);
+ return self::$main_domain[(int)$id_shop];
+ }
public static function getMainShopDomainSSL($id_shop = null)
{
- if (!self::$main_domain_ssl || $id_shop !== null)
- {
- $sql = 'SELECT domain_ssl
- FROM '._DB_PREFIX_.'shop_url
- WHERE main = 1
- AND id_shop = '.($id_shop !== null ? (int)$id_shop : Context::getContext()->shop->id);
- self::$main_domain_ssl = Db::getInstance()->getValue($sql);
- }
- return self::$main_domain_ssl;
+ ShopUrl::cacheMainDomainForShop($id_shop);
+ return self::$main_domain_ssl[(int)$id_shop];
}
}
\ No newline at end of file
diff --git a/classes/stock/StockAvailable.php b/classes/stock/StockAvailable.php
index fbdaa1a2f..12e23cd39 100644
--- a/classes/stock/StockAvailable.php
+++ b/classes/stock/StockAvailable.php
@@ -680,7 +680,7 @@ class StockAvailableCore extends ObjectModel
// if there is no $id_shop, gets the context one
// get shop group too
- if ($shop === null)
+ if ($shop === null || $shop === $context->shop->id)
{
if (Shop::getContext() == Shop::CONTEXT_GROUP)
$shop_group = Shop::getContextShopGroup();
diff --git a/classes/stock/StockMvt.php b/classes/stock/StockMvt.php
index 2245cf648..83bd79e08 100644
--- a/classes/stock/StockMvt.php
+++ b/classes/stock/StockMvt.php
@@ -236,7 +236,7 @@ class StockMvtCore extends ObjectModel
$query->innerJoin('stock', 's', 's.id_stock = sm.id_stock');
$query->innerJoin('warehouse', 'w', 'w.id_warehouse = s.id_warehouse');
$query->where('sm.sign = 1');
- $query->where('s.id_product = '.(int)$id_product.' AND s.id_product_attribute = '.(int)$id_product_attribute);
+ $query->where('s.id_product = '.(int)$id_product.' OR s.id_product_attribute = '.(int)$id_product_attribute);
$query->orderBy('date_add DESC');
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
diff --git a/classes/tax/TaxRulesGroup.php b/classes/tax/TaxRulesGroup.php
index 02391e134..469b6c641 100644
--- a/classes/tax/TaxRulesGroup.php
+++ b/classes/tax/TaxRulesGroup.php
@@ -56,10 +56,12 @@ class TaxRulesGroupCore extends ObjectModel
public static function getTaxRulesGroups($only_active = true)
{
return Db::getInstance()->executeS('
- SELECT *
- FROM `'._DB_PREFIX_.'tax_rules_group` g'
- .($only_active ? ' WHERE g.`active` = 1' : '').'
- ORDER BY name ASC');
+ SELECT DISTINCT g.id_tax_rules_group, g.name, g.active
+ FROM `'._DB_PREFIX_.'tax_rules_group` g'
+ .Shop::addSqlAssociation('tax_rules_group', 'g')
+ .($only_active ? ' WHERE g.`active` = 1' : '').'
+ ORDER BY name ASC');
+
}
/**
@@ -113,11 +115,11 @@ class TaxRulesGroupCore extends ObjectModel
);
}
- public function hasUniqueTaxRuleForCountry($id_country, $id_state)
+ public function hasUniqueTaxRuleForCountry($id_country, $id_state, $id_tax_rule = false)
{
$rules = TaxRule::getTaxRulesByGroupId((int)Context::getContext()->language->id, (int)$this->id);
foreach ($rules as $rule)
- if ($rule['id_country'] == $id_country && $id_state == $rule['id_state'] && !$rule['behavior'])
+ if ($rule['id_country'] == $id_country && $id_state == $rule['id_state'] && !$rule['behavior'] && (int)$id_tax_rule != $rule['id_tax_rule'])
return true;
return false;
diff --git a/classes/webservice/WebserviceRequest.php b/classes/webservice/WebserviceRequest.php
index c90e3a43a..546370998 100644
--- a/classes/webservice/WebserviceRequest.php
+++ b/classes/webservice/WebserviceRequest.php
@@ -513,7 +513,6 @@ class WebserviceRequestCore
$this->setError(501, sprintf('The specific management class is not implemented for the "%s" entity.', $this->urlSegment[0]), 124);
else
{
- $this->setFieldsToDisplay();
$this->objectSpecificManagement = new $specificObjectName();
$this->objectSpecificManagement->setObjectOutput($this->objOutput)
->setWsObject($this);
@@ -1261,32 +1260,40 @@ class WebserviceRequestCore
if (!isset($this->urlFragments['display']))
$this->fieldsToDisplay = 'full';
- // Check if Object is accessible for this/those id_shop
- $assoc = Shop::getAssoTable($this->resourceConfiguration['retrieveData']['table']);
- if ($assoc !== false)
- {
- $sql = 'SELECT 1
- FROM `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table']);
- if ($assoc['type'] != 'fk_shop')
- $sql .= '_'.$assoc['type'];
- $sql .= '`';
-
- foreach (self::$shopIDs as $id_shop)
- $OR[] = ' id_shop = '.(int)$id_shop.' ';
-
- $check = ' WHERE ('.implode('OR', $OR).') AND `'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = '.(int)$this->urlSegment[1];
- if (!Db::getInstance()->getValue($sql.$check))
- $this->setError(403, 'Bad id_shop : You are not allowed to access this '.$this->resourceConfiguration['retrieveData']['className'].' ('.(int)$this->urlSegment[1].')', 131);
- }
-
//get entity details
$object = new $this->resourceConfiguration['retrieveData']['className']((int)$this->urlSegment[1]);
if ($object->id)
{
$objects[] = $object;
- return $objects;
+ // Check if Object is accessible for this/those id_shop
+ $assoc = Shop::getAssoTable($this->resourceConfiguration['retrieveData']['table']);
+ if ($assoc !== false)
+ {
+ $check_shop_group = false;
+
+ $sql = 'SELECT 1
+ FROM `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table']);
+ if ($assoc['type'] != 'fk_shop')
+ $sql .= '_'.$assoc['type'];
+ else
+ {
+ $def = ObjectModel::getDefinition($this->resourceConfiguration['retrieveData']['className']);
+ if (isset($def['fields']) && isset($def['fields']['id_shop_group']))
+ $check_shop_group = true;
+ }
+ $sql .= '`';
+
+ foreach (self::$shopIDs as $id_shop)
+ $OR[] = ' (id_shop = '.(int)$id_shop.($check_shop_group ? ' OR (id_shop = 0 AND id_shop_group='.(int)Shop::getGroupFromShop((int)$id_shop).')' : '').') ';
+
+ $check = ' WHERE ('.implode('OR', $OR).') AND `'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = '.(int)$this->urlSegment[1];
+ if (!Db::getInstance()->getValue($sql.$check))
+ $this->setError(404, 'This '.$this->resourceConfiguration['retrieveData']['className'].' ('.(int)$this->urlSegment[1].') does not exists on this shop', 131);
+ else
+ return $objects;
+ }
}
- elseif (!count($this->errors))
+ if (!count($this->errors))
{
$this->objOutput->setStatus(404);
$this->_outputEnabled = false;
diff --git a/config/config.inc.php b/config/config.inc.php
index 637089c22..763f3a135 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -90,7 +90,15 @@ if (!isset($_SERVER['HTTP_HOST']) || empty($_SERVER['HTTP_HOST']))
$context = Context::getContext();
/* Initialize the current Shop */
-$context->shop = Shop::initialize();
+try
+{
+ $context->shop = Shop::initialize();
+}
+catch (PrestaShopException $e)
+{
+ $e->displayMessage();
+}
+
define('_THEME_NAME_', $context->shop->getTheme());
define('__PS_BASE_URI__', $context->shop->getBaseURI());
diff --git a/config/smarty.config.inc.php b/config/smarty.config.inc.php
index 128900a6d..392b42a58 100644
--- a/config/smarty.config.inc.php
+++ b/config/smarty.config.inc.php
@@ -44,7 +44,10 @@ $smarty->debugging = false;
$smarty->debugging_ctrl = 'NONE';
if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_)
+{
$smarty->debugging_ctrl = 'URL';
+ $smarty->smarty_debug_id = Configuration::get('PS_SMARTY_CONSOLE_KEY');
+}
else if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_)
$smarty->debugging = true;
@@ -176,6 +179,7 @@ function smartyHook($params, &$smarty)
{
$id_module = null;
$hook_params = $params;
+ $hook_params['smarty'] = $smarty;
if (!empty($params['mod']))
{
$module = Module::getInstanceByName($params['mod']);
diff --git a/config/smartyfront.config.inc.php b/config/smartyfront.config.inc.php
index b95642a4b..6441344c2 100644
--- a/config/smartyfront.config.inc.php
+++ b/config/smartyfront.config.inc.php
@@ -62,8 +62,10 @@ function smartyTranslate($params, &$smarty)
else
$msg = $params['s'];
- if ($msg != $params['s'])
- $msg = $params['js'] ? addslashes($msg) : stripslashes($msg);
+ if ($msg != $params['s'] && !$params['js'])
+ $msg = stripslashes($msg);
+ elseif ($params['js'])
+ $msg = addslashes($msg);
if ($params['sprintf'] !== null)
$msg = Translate::checkAndReplaceArgs($msg, $params['sprintf']);
diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php
index 937d632e0..80d665edb 100644
--- a/controllers/admin/AdminAttributesGroupsController.php
+++ b/controllers/admin/AdminAttributesGroupsController.php
@@ -54,6 +54,8 @@ class AdminAttributesGroupsControllerCore extends AdminController
'title' => $this->l('Values count'),
'width' => 120,
'align' => 'center',
+ 'orderby' => false,
+ 'search' => false
),
'position' => array(
'title' => $this->l('Position'),
@@ -328,6 +330,11 @@ class AdminAttributesGroupsControllerCore extends AdminController
'label' => $this->l('Current texture:'),
'name' => 'current_texture'
);
+
+ $this->fields_form['input'][] = array(
+ 'type' => 'closediv',
+ 'name' => ''
+ );
$this->fields_form['submit'] = array(
'title' => $this->l('Save '),
diff --git a/controllers/admin/AdminCarrierWizardController.php b/controllers/admin/AdminCarrierWizardController.php
new file mode 100644
index 000000000..dc9ee01fd
--- /dev/null
+++ b/controllers/admin/AdminCarrierWizardController.php
@@ -0,0 +1,932 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+class AdminCarrierWizardControllerCore extends AdminController
+{
+ protected $wizard_access;
+
+ public function __construct()
+ {
+ $this->display = 'view';
+ $this->table = 'carrier';
+ $this->identifier = 'id_carrier';
+ $this->className = 'Carrier';
+ $this->lang = false;
+ $this->deleted = true;
+ $this->step_number = 0;
+
+ $this->multishop_context = Shop::CONTEXT_ALL;
+ $this->context = Context::getContext();
+
+ $this->fieldImageSettings = array(
+ 'name' => 'logo',
+ 'dir' => 's'
+ );
+
+ parent::__construct();
+
+ $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, Tab::getIdFromClassName('AdminCarriers'));
+ }
+
+ public function setMedia()
+ {
+ parent::setMedia();
+ $this->addJqueryPlugin('smartWizard');
+ $this->addJqueryPlugin('typewatch');
+ $this->addJs(_PS_JS_DIR_.'admin_carrier_wizard.js');
+ }
+
+ public function initWizard()
+ {
+ $this->wizard_steps = array(
+ 'name' => 'carrier_wizard',
+ 'steps' => array(
+ array(
+ 'title' => $this->l('General settings'),
+ ),
+ array(
+ 'title' => $this->l('Shipping locations and costs'),
+ ),
+ array(
+ 'title' => $this->l('Size, weight, and group access'),
+ ),
+ array(
+ 'title' => $this->l('Summary'),
+ ),
+
+ ));
+
+ if (Shop::isFeatureActive())
+ {
+ $multistore_step = array(
+ array(
+ 'title' => $this->l('MultiStore'),
+ )
+ );
+ array_splice($this->wizard_steps['steps'], 1, 0, $multistore_step);
+ }
+ }
+
+ public function renderView()
+ {
+ $this->initWizard();
+
+ if (Tools::getValue('id_carrier') && $this->tabAccess['edit'])
+ $carrier = $this->loadObject();
+ elseif ($this->tabAccess['add'])
+ $carrier = new Carrier();
+
+ if ((!$this->tabAccess['edit'] && Tools::getValue('id_carrier')) || (!$this->tabAccess['add'] && !Tools::getValue('id_carrier')))
+ {
+ $this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
+ return ;
+ }
+ $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
+ $this->tpl_view_vars = array(
+ 'currency_sign' => $currency->sign,
+ 'PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'),
+ 'enableAllSteps' => Validate::isLoadedObject($carrier),
+ 'wizard_steps' => $this->wizard_steps,
+ 'validate_url' => $this->context->link->getAdminLink('AdminCarrierWizard'),
+ 'carrierlist_url' => $this->context->link->getAdminLink('AdminCarriers').'&conf='.((int)Validate::isLoadedObject($carrier) ? 4 : 3),
+ 'multistore_enable' => Shop::isFeatureActive(),
+ 'wizard_contents' => array(
+ 'contents' => array(
+ 0 => $this->renderStepOne($carrier),
+ 1 => $this->renderStepThree($carrier),
+ 2 => $this->renderStepFour($carrier),
+ 3 => $this->renderStepFive($carrier),
+ )),
+ 'labels' => array('next' => $this->l('Next'), 'previous' => $this->l('Previous'), 'finish' => $this->l('Finish'))
+ );
+
+
+ if (Shop::isFeatureActive())
+ array_splice($this->tpl_view_vars['wizard_contents']['contents'], 1, 0, array(0 => $this->renderStepTwo($carrier)));
+
+ $this->context->smarty->assign(array(
+ 'carrier_logo' => (Validate::isLoadedObject($carrier) && file_exists(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg') ? _THEME_SHIP_DIR_.$carrier->id.'.jpg' : false)
+ ));
+ $this->content .= $this->createTemplate('logo.tpl')->fetch();
+ $this->addjQueryPlugin(array('ajaxfileupload'));
+
+ return parent::renderView();
+ }
+
+ public function initToolbarTitle()
+ {
+ $bread_extended = array_unique($this->breadcrumbs);
+
+ if (Tools::getValue('id_carrier'))
+ $bread_extended[1] = $this->l('Edit');
+ else
+ $bread_extended[1] = $this->l('Add new');
+
+ $this->toolbar_title = $bread_extended;
+ }
+
+ public function initToolbar()
+ {
+ parent::initToolbar();
+ $this->toolbar_btn['back']['href'] = $this->context->link->getAdminLink('AdminCarriers');
+ }
+
+ public function renderStepOne($carrier)
+ {
+ $this->fields_form = array(
+ 'form' => array(
+ 'id_form' => 'step_carrier_general',
+ 'input' => array(
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Carrier name:'),
+ 'name' => 'name',
+ 'size' => 25,
+ 'required' => true,
+ 'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'),
+ 'desc' => array(
+ $this->l('Carrier name displayed during checkout'),
+ $this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name.')
+ )
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Transit time:'),
+ 'name' => 'delay',
+ 'lang' => true,
+ 'required' => true,
+ 'size' => 41,
+ 'maxlength' => 128,
+ 'desc' => $this->l('Estimated delivery time will be displayed during checkout.')
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Speed grade:'),
+ 'name' => 'grade',
+ 'required' => false,
+ 'size' => 1,
+ 'desc' => $this->l('Enter "0" for a longest shipping delay, or "9" for the shortest shipping delay.')
+ ),
+ array(
+ 'type' => 'logo',
+ 'label' => $this->l('Logo:'),
+ 'name' => 'logo',
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Tracking URL:'),
+ 'name' => 'url',
+ 'size' => 40,
+ 'desc' => $this->l('Delivery tracking URL: Type \'@\' where the tracking number should appear. It will then be automatically replaced by the tracking number.')
+ ),
+ )),
+ );
+
+ $tpl_vars = array('max_image_size' => (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE') / 1024 / 1024);
+ $fields_value = $this->getStepOneFieldsValues($carrier);
+ return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value, $tpl_vars);
+ }
+
+ public function renderStepTwo($carrier)
+ {
+ $this->fields_form = array(
+ 'form' => array(
+ 'id_form' => 'step_carrier_shops',
+ 'input' => array(
+ array(
+ 'type' => 'shop',
+ 'label' => $this->l('Shop association:'),
+ 'name' => 'checkBoxShopAsso',
+ ),
+ ))
+ );
+ $fields_value = $this->getStepTwoFieldsValues($carrier);
+ return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value);
+ }
+
+ public function renderStepThree($carrier)
+ {
+ $this->fields_form = array(
+ 'form' => array(
+ 'id_form' => 'step_carrier_ranges',
+ 'input' => array(
+ array(
+ 'type' => 'radio',
+ 'label' => $this->l('Shipping and handling:'),
+ 'name' => 'shipping_handling',
+ 'required' => false,
+ 'class' => 't',
+ 'is_bool' => true,
+ 'values' => array(
+ array(
+ 'id' => 'shipping_handling_on',
+ 'value' => 1,
+ 'label' => $this->l('Enabled')
+ ),
+ array(
+ 'id' => 'shipping_handling_off',
+ 'value' => 0,
+ 'label' => $this->l('Disabled')
+ )
+ ),
+ 'desc' => $this->l('Include the shipping and handling costs in the carrier price.')
+ ),
+ array(
+ 'type' => 'radio',
+ 'label' => $this->l('Apply shipping cost:'),
+ 'name' => 'is_free',
+ 'required' => false,
+ 'class' => 't',
+ 'values' => array(
+ array(
+ 'id' => 'is_free_off',
+ 'value' => 0,
+ 'label' => '

'
+ ),
+ array(
+ 'id' => 'is_free_on',
+ 'value' => 1,
+ 'label' => '

'
+ )
+ ),
+ 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.')
+ ),
+ array(
+ 'type' => 'radio',
+ 'label' => $this->l('Billing:'),
+ 'name' => 'shipping_method',
+ 'required' => false,
+ 'class' => 't',
+ 'br' => true,
+ 'values' => array(
+ array(
+ 'id' => 'billing_price',
+ 'value' => Carrier::SHIPPING_METHOD_PRICE,
+ 'label' => $this->l('According to total price')
+ ),
+ array(
+ 'id' => 'billing_weight',
+ 'value' => Carrier::SHIPPING_METHOD_WEIGHT,
+ 'label' => $this->l('According to total weight')
+ )
+ )
+ ),
+ array(
+ 'type' => 'select',
+ 'label' => $this->l('Tax:'),
+ 'name' => 'id_tax_rules_group',
+ 'options' => array(
+ 'query' => TaxRulesGroup::getTaxRulesGroups(true),
+ 'id' => 'id_tax_rules_group',
+ 'name' => 'name',
+ 'default' => array(
+ 'label' => $this->l('No Tax'),
+ 'value' => 0
+ )
+ )
+ ),
+ array(
+ 'type' => 'select',
+ 'label' => $this->l('Out-of-range behavior:'),
+ 'name' => 'range_behavior',
+ 'options' => array(
+ 'query' => array(
+ array(
+ 'id' => 0,
+ 'name' => $this->l('Apply the cost of the highest defined range')
+ ),
+ array(
+ 'id' => 1,
+ 'name' => $this->l('Disable carrier')
+ )
+ ),
+ 'id' => 'id',
+ 'name' => 'name'
+ ),
+ 'desc' => $this->l('Out-of-range behavior occurs when no defined range matches the customer\'s cart (e.g. when the weight of the cart is greater than the highest weight limit defined by the weight ranges)')
+ )
+ ,
+ array(
+ 'type' => 'zone',
+ 'name' => 'zones'
+ ),
+ ),
+
+ ));
+
+ $tpl_vars = array();
+ $tpl_vars['PS_WEIGHT_UNIT'] = Configuration::get('PS_WEIGHT_UNIT');
+ $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
+ $tpl_vars['currency_sign'] = $currency->sign;
+
+ $fields_value = $this->getStepThreeFieldsValues($carrier);
+
+ $this->getTplRangesVarsAndValues($carrier, $tpl_vars, $fields_value);
+ return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value, $tpl_vars);
+ }
+
+ public function renderStepFour($carrier)
+ {
+ $this->fields_form = array(
+ 'form' => array(
+ 'id_form' => 'step_carrier_conf',
+ 'input' => array(
+ array(
+ 'type' => 'text',
+ 'label' => sprintf($this->l('Maximum package height (%s):'), Configuration::get('PS_DIMENSION_UNIT')),
+ 'name' => 'max_height',
+ 'required' => false,
+ 'size' => 10,
+ 'desc' => $this->l('Maximum height managed by this carrier. Set the value to "0", or leave this field blank to ignore.').' '.$this->l('The value must be an integer.')
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => sprintf($this->l('Maximum package width (%s):'), Configuration::get('PS_DIMENSION_UNIT')),
+ 'name' => 'max_width',
+ 'required' => false,
+ 'size' => 10,
+ 'desc' => $this->l('Maximum width managed by this carrier. Set the value to "0", or leave this field blank to ignore.').' '.$this->l('The value must be an integer.')
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => sprintf($this->l('Maximum package depth (%s):'), Configuration::get('PS_DIMENSION_UNIT')),
+ 'name' => 'max_depth',
+ 'required' => false,
+ 'size' => 10,
+ 'desc' => $this->l('Maximum depth managed by this carrier. Set the value to "0", or leave this field blank to ignore.').' '.$this->l('The value must be an integer.')
+ ),
+ array(
+ 'type' => 'text',
+ 'label' => sprintf($this->l('Maximum package weight (%s):'), Configuration::get('PS_WEIGHT_UNIT')),
+ 'name' => 'max_weight',
+ 'required' => false,
+ 'size' => 10,
+ 'desc' => $this->l('Maximum weight managed by this carrier. Set the value to "0", or leave this field blank to ignore.')
+ ),
+ array(
+ 'type' => 'group',
+ 'label' => $this->l('Group access:'),
+ 'name' => 'groupBox',
+ 'values' => Group::getGroups(Context::getContext()->language->id),
+ 'desc' => $this->l('Mark the groups that are allowed access to this carrier.')
+ )
+ )
+ ));
+
+ $fields_value = $this->getStepFourFieldsValues($carrier);
+
+ // Added values of object Group
+ $carrier_groups = $carrier->getGroups();
+ $carrier_groups_ids = array();
+ if (is_array($carrier_groups))
+ foreach ($carrier_groups as $carrier_group)
+ $carrier_groups_ids[] = $carrier_group['id_group'];
+
+ $groups = Group::getGroups($this->context->language->id);
+
+ foreach ($groups as $group)
+ $fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $carrier_groups_ids) || empty($carrier_groups_ids) && !$carrier->id));
+
+ return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value);
+ }
+
+ public function renderStepFive($carrier)
+ {
+ $this->fields_form = array(
+ 'form' => array(
+ 'id_form' => 'step_carrier_summary',
+ 'input' => array(
+ array(
+ 'type' => 'radio',
+ 'label' => $this->l('Status:'),
+ 'name' => 'active',
+ 'required' => false,
+ 'class' => 't',
+ 'is_bool' => true,
+ 'values' => array(
+ array(
+ 'id' => 'active_on',
+ 'value' => 1,
+ 'label' => $this->l('Enabled')
+ ),
+ array(
+ 'id' => 'active_off',
+ 'value' => 0,
+ 'label' => $this->l('Disabled')
+ )
+ ),
+ 'desc' => $this->l('Enable the carrier in the Front Office')
+ )
+ )
+ ));
+
+ $template = $this->createTemplate('controllers/carrier_wizard/summary.tpl');
+
+ $fields_value = $this->getStepFiveFieldsValues($carrier);
+
+ $active_form = $this->renderGenericForm(array('form' => $this->fields_form), $fields_value);
+
+ $active_form = str_replace(array('
'), '', $active_form);
+
+ $template->assign('active_form', $active_form);
+
+ return $template->fetch('controllers/carrier_wizard/summary.tpl');
+ }
+
+ protected function getTplRangesVarsAndValues($carrier, &$tpl_vars, &$fields_value)
+ {
+ $tpl_vars['zones'] = Zone::getZones(false);
+ $carrier_zones = $carrier->getZones();
+ $carrier_zones_ids = array();
+ if (is_array($carrier_zones))
+ foreach ($carrier_zones as $carrier_zone)
+ $carrier_zones_ids[] = $carrier_zone['id_zone'];
+
+ $range_table = $carrier->getRangeTable();
+ $shipping_method = $carrier->getShippingMethod();
+
+ $zones = Zone::getZones(false);
+ foreach ($zones as $zone)
+ $fields_value['zones'][$zone['id_zone']] = Tools::getValue('zone_'.$zone['id_zone'], (in_array($zone['id_zone'], $carrier_zones_ids)));
+
+ if ($shipping_method == Carrier::SHIPPING_METHOD_FREE)
+ {
+ $range_obj = $carrier->getRangeObject($carrier->shipping_method);
+ $price_by_range = array();
+ }
+ else
+ {
+ $range_obj = $carrier->getRangeObject();
+ $price_by_range = Carrier::getDeliveryPriceByRanges($range_table, (int)$carrier->id);
+ }
+
+ foreach ($price_by_range as $price)
+ $tpl_vars['price_by_range'][$price['id_'.$range_table]][$price['id_zone']] = $price['price'];
+
+ $tmp_range = $range_obj->getRanges((int)$carrier->id);
+ $tpl_vars['ranges'] = array();
+ if ($shipping_method != Carrier::SHIPPING_METHOD_FREE)
+ foreach ($tmp_range as $id => $range)
+ {
+ $tpl_vars['ranges'][$range['id_'.$range_table]] = $range;
+ $tpl_vars['ranges'][$range['id_'.$range_table]]['id_range'] = $range['id_'.$range_table];
+ }
+
+ // init blank range
+ if (!count($tpl_vars['ranges']))
+ $tpl_vars['ranges'][] = array('id_range' => 0, 'delimiter1' => 0, 'delimiter2' => 0);
+ }
+
+ public function renderGenericForm($fields_form, $fields_value, $tpl_vars = array())
+ {
+ $helper = new HelperForm();
+ $helper->show_toolbar = false;
+ $helper->table = $this->table;
+ $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
+ $helper->default_form_language = $lang->id;
+ $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
+ $this->fields_form = array();
+ $helper->id = (int)Tools::getValue('id_carrier');
+ $helper->identifier = $this->identifier;
+ $helper->tpl_vars = array_merge(array(
+ 'fields_value' => $fields_value,
+ 'languages' => $this->getLanguages(),
+ 'id_language' => $this->context->language->id
+ ), $tpl_vars);
+ $helper->override_folder = 'carrier_wizard/';
+
+ return $helper->generateForm($fields_form);
+ }
+
+ public function getStepOneFieldsValues($carrier)
+ {
+ return array(
+ 'id_carrier' => $this->getFieldValue($carrier, 'id_carrier'),
+ 'name' => $this->getFieldValue($carrier, 'name'),
+ 'delay' => $this->getFieldValue($carrier, 'delay'),
+ 'grade' => $this->getFieldValue($carrier, 'grade'),
+ 'url' => $this->getFieldValue($carrier, 'url'),
+ );
+ }
+
+ public function getStepTwoFieldsValues($carrier)
+ {
+ return array('shop' => $this->getFieldValue($carrier, 'shop'));
+
+ }
+
+ public function getStepThreeFieldsValues($carrier)
+ {
+ $id_tax_rules_group = (is_object($this->object) && !$this->object->id) ? Carrier::getIdTaxRulesGroupMostUsed() : $this->getFieldValue($carrier, 'id_tax_rules_group');
+
+ $shipping_handling = (is_object($this->object) && !$this->object->id) ? 0 : $this->getFieldValue($carrier, 'shipping_handling');
+
+ return array(
+ 'is_free' => $this->getFieldValue($carrier, 'is_free'),
+ 'id_tax_rules_group' => (int)$id_tax_rules_group,
+ 'shipping_handling' => $shipping_handling,
+ 'shipping_method' => $this->getFieldValue($carrier, 'shipping_method'),
+ 'range_behavior' => $this->getFieldValue($carrier, 'range_behavior'),
+ 'zones' => $this->getFieldValue($carrier, 'zones'),
+ );
+ }
+
+ public function getStepFourFieldsValues($carrier)
+ {
+ return array(
+ 'range_behavior' => $this->getFieldValue($carrier, 'range_behavior'),
+ 'max_height' => $this->getFieldValue($carrier, 'max_height'),
+ 'max_width' => $this->getFieldValue($carrier, 'max_width'),
+ 'max_depth' => $this->getFieldValue($carrier, 'max_depth'),
+ 'max_weight' => $this->getFieldValue($carrier, 'max_weight'),
+ 'group' => $this->getFieldValue($carrier, 'group'),
+ );
+ }
+
+ public function getStepFiveFieldsValues($carrier)
+ {
+ return array('active' => $this->getFieldValue($carrier, 'active'));
+ }
+
+ public function ajaxProcessChangeRanges()
+ {
+ if ((Validate::isLoadedObject($this->object) && !$this->tabAccess['edit']) || !$this->tabAccess['add'])
+ {
+ $this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
+ return;
+ }
+ if ((!(int)$shipping_method = Tools::getValue('shipping_method')) || !in_array($shipping_method, array(Carrier::SHIPPING_METHOD_PRICE, Carrier::SHIPPING_METHOD_WEIGHT)))
+ return ;
+
+ $carrier = $this->loadObject(true);
+ $carrier->shipping_method = $shipping_method;
+
+ $tpl_vars = array();
+ $fields_value = $this->getStepThreeFieldsValues($carrier);
+ $this->getTplRangesVarsAndValues($carrier, $tpl_vars, $fields_value);
+ $template = $this->createTemplate('controllers/carrier_wizard/helpers/form/form_ranges.tpl');
+ $template->assign($tpl_vars);
+ $template->assign('change_ranges', 1);
+
+ $template->assign('fields_value', $fields_value);
+ $template->assign('input', array('type' => 'zone', 'name' => 'zones' ));
+
+ $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
+ $template->assign('currency_sign', $currency->sign);
+ $template->assign('PS_WEIGHT_UNIT', Configuration::get('PS_WEIGHT_UNIT'));
+
+ die($template->fetch());
+ }
+
+ public function ajaxProcessValidateStep()
+ {
+ $step_number = (int)Tools::getValue('step_number');
+ $return = array('has_error' => false);
+
+ if (!$this->tabAccess['edit'])
+ $this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
+ else
+ {
+ if (Shop::isFeatureActive() && $step_number == 2)
+ {
+ if (!Tools::getValue('checkBoxShopAsso_carrier'))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('You must choose at least one shop or group shop.');
+ }
+ }
+ else
+ $this->validateRules('AdminCarrierWizardControllerCore');
+ }
+
+ if (count($this->errors))
+ {
+ $return['has_error'] = true;
+ $return['errors'] = $this->errors;
+ }
+ die(Tools::jsonEncode($return));
+ }
+
+ public function processRanges($id_carrier)
+ {
+ if (!$this->tabAccess['edit'] || !$this->tabAccess['add'])
+ {
+ $this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
+ return;
+ }
+
+ $carrier = new Carrier((int)$id_carrier);
+ if (!Validate::isLoadedObject($carrier))
+ return false;
+
+ $range_inf = Tools::getValue('range_inf');
+ $range_sup = Tools::getValue('range_sup');
+ $range_type = Tools::getValue('shipping_method');
+
+ $fees = Tools::getValue('fees');
+
+ $carrier->deleteDeliveryPrice($carrier->getRangeTable());
+ if ($range_type != Carrier::SHIPPING_METHOD_FREE)
+ {
+ foreach ($range_inf as $key => $delimiter1)
+ {
+ if (!isset($range_sup[$key]))
+ continue;
+ $add_range = true;
+ if ($range_type == Carrier::SHIPPING_METHOD_WEIGHT)
+ {
+ if (!RangeWeight::rangeExist((int)$carrier->id, (float)$delimiter1, (float)$range_sup[$key]))
+ $range = new RangeWeight();
+ else
+ {
+ $range = new RangeWeight((int)$key);
+ $add_range = false;
+ }
+ }
+
+ if ($range_type == Carrier::SHIPPING_METHOD_PRICE)
+ {
+ if (!RangePrice::rangeExist((int)$carrier->id, (float)$delimiter1, (float)$range_sup[$key]))
+ $range = new RangePrice();
+ else
+ {
+ $range = new RangePrice((int)$key);
+ $add_range = false;
+ }
+ }
+ if ($add_range)
+ {
+ $range->id_carrier = (int)$carrier->id;
+ $range->delimiter1 = (float)$delimiter1;
+ $range->delimiter2 = (float)$range_sup[$key];
+ $range->save();
+ }
+
+ if (!Validate::isLoadedObject($range))
+ return false;
+ $price_list = array();
+ if (is_array($fees) && count($fees))
+ {
+ foreach ($fees as $id_zone => $fee)
+ $price_list[] = array(
+ 'id_range_price' => ($range_type == Carrier::SHIPPING_METHOD_PRICE ? (int)$range->id : null),
+ 'id_range_weight' => ($range_type == Carrier::SHIPPING_METHOD_WEIGHT ? (int)$range->id : null),
+ 'id_carrier' => (int)$carrier->id,
+ 'id_zone' => (int)$id_zone,
+ 'price' => (float)$fee[$key]
+ );
+ }
+
+ if (count($price_list) && !$carrier->addDeliveryPrice($price_list, true))
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public function ajaxProcessUploadLogo()
+ {
+ if (!$this->tabAccess['edit'])
+ die('
');
+
+ $allowedExtensions = array('jpeg', 'gif', 'png', 'jpg');
+
+ $logo = (isset($_FILES['carrier_logo_input']) ? $_FILES['carrier_logo_input'] : false);
+ if ($logo && !empty($logo['tmp_name']) && $logo['tmp_name'] != 'none'
+ && (!isset($logo['error']) || !$logo['error'])
+ && preg_match('/\.(jpe?g|gif|png)$/', $logo['name'])
+ && is_uploaded_file($logo['tmp_name'])
+ && ImageManager::isRealImage($logo['tmp_name'], $logo['type']))
+ {
+ $file = $logo['tmp_name'];
+ do $tmp_name = uniqid().'.jpg';
+ while (file_exists(_PS_TMP_IMG_DIR_.$tmp_name));
+ if (!ImageManager::resize($file, _PS_TMP_IMG_DIR_.$tmp_name))
+ die('
');
+ @unlink($file);
+ die('
');
+ }
+ else
+ die('
');
+ }
+
+ public function ajaxProcessFinishStep()
+ {
+ $return = array('has_error' => false);
+
+ if (!$this->tabAccess['edit'])
+ $return = array(
+ 'has_error' => true,
+ $return['errors'][] = Tools::displayError('You do not have permission to use this wizard.')
+ );
+ else
+ {
+ if ($id_carrier = Tools::getValue('id_carrier'))
+ {
+ $current_carrier = new Carrier((int)$id_carrier);
+ // if update we duplicate current Carrier
+ $new_carrier = $current_carrier->duplicateObject();
+ if (Validate::isLoadedObject($new_carrier))
+ {
+ // Set flag deteled to true for historization
+ $current_carrier->deleted = true;
+ $current_carrier->update();
+
+ // Fill the new carrier object
+ $this->copyFromPost($new_carrier, $this->table);
+ $new_carrier->position = $current_carrier->position;
+ $new_carrier->update();
+
+ $this->updateAssoShop((int)$new_carrier->id);
+ $this->duplicateLogo((int)$new_carrier->id, (int)$current_carrier->id);
+ $this->changeGroups((int)$new_carrier->id);
+ // Call of hooks
+ Hook::exec('actionCarrierUpdate', array(
+ 'id_carrier' => (int)$current_carrier->id,
+ 'carrier' => $new_carrier
+ ));
+ $this->postImage($new_carrier->id);
+ $this->changeZones($new_carrier->id);
+ $new_carrier->setTaxRulesGroup((int)Tools::getValue('id_tax_rules_group'));
+ $carrier = $new_carrier;
+ }
+ }
+ else
+ {
+ $carrier = new Carrier();
+ $this->copyFromPost($carrier, $this->table);
+ if (!$carrier->add())
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving this carrier.');
+ }
+ }
+
+ if ($carrier->is_free)
+ {
+ //if carrier is free delete shipping cost
+ $carrier->deleteDeliveryPrice('range_weight');
+ $carrier->deleteDeliveryPrice('range_price');
+ }
+
+ if (Validate::isLoadedObject($carrier))
+ {
+ if (!$this->changeGroups((int)$carrier->id))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving carrier groups.');
+ }
+
+ if (!$this->changeZones((int)$carrier->id))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving carrier zones.');
+ }
+
+ if (!$carrier->is_free)
+ if (!$this->processRanges((int)$carrier->id))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving carrier ranges.');
+ }
+
+ if (Shop::isFeatureActive() && !$this->updateAssoShop((int)$carrier->id))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving associations of shops.');
+ }
+
+ if (!$carrier->setTaxRulesGroup((int)Tools::getValue('id_tax_rules_group')))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving the tax rules group.');
+ }
+
+ if (Tools::getValue('logo'))
+ {
+ if (Tools::getValue('logo') == 'null' && file_exists(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg'))
+ unlink(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg');
+ else
+ {
+ $logo = basename(Tools::getValue('logo'));
+ if (!file_exists(_PS_TMP_IMG_DIR_.$logo) || !copy(_PS_TMP_IMG_DIR_.$logo, _PS_SHIP_IMG_DIR_.$carrier->id.'.jpg'))
+ {
+ $return['has_error'] = true;
+ $return['errors'][] = $this->l('An error occurred while saving carrier logo.');
+ }
+ }
+ }
+ $return['id_carrier'] = $carrier->id;
+ }
+ }
+ die(Tools::jsonEncode($return));
+ }
+
+ protected function changeGroups($id_carrier, $delete = true)
+ {
+ $carrier = new Carrier((int)$id_carrier);
+ if (!Validate::isLoadedObject($carrier))
+ return false;
+
+ return $carrier->setGroups(Tools::getValue('groupBox'));
+ }
+
+ public function changeZones($id)
+ {
+ $return = true;
+ $carrier = new Carrier($id);
+ if (!Validate::isLoadedObject($carrier))
+ die (Tools::displayError('The object cannot be loaded.'));
+ $zones = Zone::getZones(false);
+ foreach ($zones as $zone)
+ if (count($carrier->getZone($zone['id_zone'])))
+ {
+ if (!isset($_POST['zone_'.$zone['id_zone']]) || !$_POST['zone_'.$zone['id_zone']])
+ $return &= $carrier->deleteZone((int)$zone['id_zone']);
+ }
+ else
+ if (isset($_POST['zone_'.$zone['id_zone']]) && $_POST['zone_'.$zone['id_zone']])
+ $return &= $carrier->addZone((int)$zone['id_zone']);
+
+ return $return;
+ }
+
+ public static function getValidationRules()
+ {
+ $step_number = Tools::getValue('step_number');
+
+ if ($step_number == 4 && !Shop::isFeatureActive() || $step_number == 5 && Shop::isFeatureActive())
+ return array();
+
+ $step_fields = array(
+ 1 => array('name', 'delay', 'grade', 'url'),
+ 2 => array('is_free', 'id_tax_rules_group', 'shipping_handling', 'shipping_method', 'range_behavior'),
+ 3 => array('range_behavior', 'max_height', 'max_width', 'max_depth', 'max_weight'),
+ 4 => array(),
+ );
+
+ if (Shop::isFeatureActive())
+ {
+ $multistore_field = array(array('shop'));
+ array_splice($step_fields, 1, 0, $multistore_field);
+ }
+
+ $rules = Carrier::getValidationRules('Carrier');
+
+ foreach ($rules as $key_r => $rule)
+ foreach ($rule as $key_f => $field)
+ {
+ if (in_array($key_r, array('required', 'requiredLang')))
+ {
+ if(!in_array($field, $step_fields[$step_number]))
+ unset($rules[$key_r][$key_f]);
+ }
+ else if(!in_array($key_f, $step_fields[$step_number]))
+ unset($rules[$key_r][$key_f]);
+ }
+ return $rules;
+ }
+
+ public static function displayFieldName($field)
+ {
+ return $field;
+ }
+
+ public function duplicateLogo($new_id, $old_id)
+ {
+ $old_logo = _PS_SHIP_IMG_DIR_.'/'.(int)$old_id.'.jpg';
+ if (file_exists($old_logo))
+ copy($old_logo, _PS_SHIP_IMG_DIR_.'/'.(int)$new_id.'.jpg');
+
+ $old_tmp_logo = _PS_TMP_IMG_DIR_.'/carrier_mini_'.(int)$old_id.'.jpg';
+ if (file_exists($old_tmp_logo))
+ {
+ if (!isset($_FILES['logo']))
+ copy($old_tmp_logo, _PS_TMP_IMG_DIR_.'/carrier_mini_'.$new_id.'.jpg');
+ unlink($old_tmp_logo);
+ }
+ }
+}
diff --git a/controllers/admin/AdminCarriersController.php b/controllers/admin/AdminCarriersController.php
index 84a51b04d..53a7efa29 100644
--- a/controllers/admin/AdminCarriersController.php
+++ b/controllers/admin/AdminCarriersController.php
@@ -87,11 +87,7 @@ class AdminCarriersControllerCore extends AdminController
'is_free' => array(
'title' => $this->l('Free Shipping'),
'align' => 'center',
- 'icon' => array(
- 0 => 'disabled.gif',
- 1 => 'enabled.gif',
- 'default' => 'disabled.gif'
- ),
+ 'active' => 'isFree',
'type' => 'bool',
'orderby' => false,
'width' => 150
@@ -105,84 +101,19 @@ class AdminCarriersControllerCore extends AdminController
)
);
- $carrier_default_sort = array(
- array('value' => Carrier::SORT_BY_PRICE, 'name' => $this->l('Price')),
- array('value' => Carrier::SORT_BY_POSITION, 'name' => $this->l('Position'))
- );
-
- $carrier_default_order = array(
- array('value' => Carrier::SORT_BY_ASC, 'name' => $this->l('Ascending')),
- array('value' => Carrier::SORT_BY_DESC, 'name' => $this->l('Descending'))
- );
-
- $this->fields_options = array(
- 'general' => array(
- 'title' => $this->l('Carrier options'),
- 'fields' => array(
- 'PS_CARRIER_DEFAULT' => array(
- 'title' => $this->l('Default carrier:'),
- 'desc' => $this->l('Your shop\'s default carrier'),
- 'cast' => 'intval',
- 'type' => 'select',
- 'identifier' => 'id_carrier',
- 'list' => array_merge(
- array(
- -1 => array('id_carrier' => -1, 'name' => $this->l('Best price')),
- -2 => array('id_carrier' => -2, 'name' => $this->l('Best grade'))
- ),
- Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::ALL_CARRIERS))
- ),
- 'PS_CARRIER_DEFAULT_SORT' => array(
- 'title' => $this->l('Sort by:'),
- 'desc' => $this->l('This will only be visible in the Front Office'),
- 'cast' => 'intval',
- 'type' => 'select',
- 'identifier' => 'value',
- 'list' => $carrier_default_sort
- ),
- 'PS_CARRIER_DEFAULT_ORDER' => array(
- 'title' => $this->l('Order by:'),
- 'desc' => $this->l('This will only be visible in the Front Office'),
- 'cast' => 'intval',
- 'type' => 'select',
- 'identifier' => 'value',
- 'list' => $carrier_default_order
- ),
- ),
- 'submit' => array()
- )
- );
-
parent::__construct();
}
+ public function initToolbar()
+ {
+ parent::initToolbar();
+
+ if (isset($this->toolbar_btn['new']))
+ $this->toolbar_btn['new']['href'] = $this->context->link->getAdminLink('AdminCarrierWizard');
+ }
+
public function renderList()
{
- $this->displayInformation(
- '
'.$this->l('How do I create a new carrier?').'
-
-
- - '.$this->l('Click "Add New."').'
- - '.$this->l('Fill in the fields and click "Save."').'
- - '.
- $this->l('You need to set a price range -- or weight range -- for which the new carrier will be available.').' '.
- $this->l('Under the "Shipping" menu, click either "Price ranges" or "Weight ranges.".').'
-
- - '.$this->l('Click "Add New."').'
- - '.
- $this->l('Select the name of the carrier before defining the price or weight range.').' '.
- $this->l('For example, the carrier can be made available for a weight range between 0 and 5lbs. Another carrier can have a range between 5 and 10lbs.').'
-
- - '.$this->l('When you\'re done, click "Save."').'
- - '.$this->l('Click on the "Shipping" menu.').'
- - '.
- $this->l('You need to set the fees that will be applied for this carrier.').' '.
- $this->l('At the bottom on the page -- in the "Fees" section -- select the name of the carrier.').'
-
- - '.$this->l('For each zone, enter a price and then click "Save."').'
- - '.$this->l('You\'re all set! The new carrier will now be displayed to customers.').'
-
'
- );
$this->_select = 'b.*';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier'.Shop::addSqlRestrictionOnLang('b').'
LEFT JOIN `'._DB_PREFIX_.'carrier_tax_rules_group_shop` ctrgs ON (a.`id_carrier` = ctrgs.`id_carrier`
@@ -539,7 +470,8 @@ class AdminCarriersControllerCore extends AdminController
}
parent::postProcess();
}
- else if ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier))
+ /*
+else if ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier))
{
if ($this->tabAccess['edit'] === '1')
{
@@ -551,13 +483,20 @@ class AdminCarriersControllerCore extends AdminController
else
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
}
+*/
+ else if (isset($_GET['isFree'.$this->table]))
+ {
+ $this->processIsFree();
+ }
else
{
- if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox')))
+ /*
+ if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox')))
|| (isset($_GET['delete'.$this->table]) && Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT')))
$this->errors[] = $this->l('Please set another carrier as default before deleting this one.');
else
{
+*/
// if deletion : removes the carrier from the warehouse/carrier association
if (Tools::isSubmit('delete'.$this->table))
{
@@ -579,10 +518,21 @@ class AdminCarriersControllerCore extends AdminController
}
parent::postProcess();
Carrier::cleanPositions();
- }
+ //}
}
}
+ public function processIsFree()
+ {
+ $carrier = new Carrier($this->id_object);
+ if (!Validate::isLoadedObject($carrier))
+ $this->errors[] = Tools::displayError('An error occurred while updating carrier information.');
+ $carrier->is_free = $carrier->is_free ? 0 : 1;
+ if (!$carrier->update())
+ $this->errors[] = Tools::displayError('An error occurred while updating carrier information.');
+ Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token);
+ }
+
/**
* Overload the property $fields_value
*
@@ -696,6 +646,22 @@ class AdminCarriersControllerCore extends AdminController
}
}
+ public function displayEditLink($token = null, $id, $name = null)
+ {
+ if ($this->tabAccess['edit'] == 1)
+ return '

';
+ else
+ return;
+ }
+
+ public function displayDeleteLink($token = null, $id, $name = null)
+ {
+ if ($this->tabAccess['delete'] == 1)
+ return '

';
+ else
+ return;
+ }
+
}
diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php
index 4d48eb608..69db3dc17 100644
--- a/controllers/admin/AdminCategoriesController.php
+++ b/controllers/admin/AdminCategoriesController.php
@@ -38,6 +38,8 @@ class AdminCategoriesControllerCore extends AdminController
/** @var boolean does the product have to be disable during the delete process */
public $disable_products = false;
+ private $original_filter = '';
+
public function __construct()
{
$this->table = 'category';
@@ -130,7 +132,7 @@ class AdminCategoriesControllerCore extends AdminController
$id_parent = $this->context->shop->id_category;
$this->_select = 'sa.position position';
- $this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' ';
+ $this->original_filter = $this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' ';
if (Shop::getContext() == Shop::CONTEXT_SHOP)
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = '.(int)$this->context->shop->id.') ';
@@ -174,6 +176,9 @@ class AdminCategoriesControllerCore extends AdminController
public function renderList()
{
+ if (isset($this->_filter) && trim($this->_filter) == '')
+ $this->_filter = $this->original_filter;
+
$this->addRowAction('edit');
$this->addRowAction('delete');
$this->addRowAction('add');
@@ -390,26 +395,6 @@ class AdminCategoriesControllerCore extends AdminController
'use_context' => true,
)
),
- array(
- 'type' => 'radio',
- 'label' => $this->l('Root Category:'),
- 'name' => 'is_root_category',
- 'required' => false,
- 'is_bool' => true,
- 'class' => 't',
- 'values' => array(
- array(
- 'id' => 'is_root_on',
- 'value' => 1,
- 'label' => $this->l('Yes')
- ),
- array(
- 'id' => 'is_root_off',
- 'value' => 0,
- 'label' => $this->l('No')
- )
- )
- ),
array(
'type' => 'textarea',
'label' => $this->l('Description:'),
@@ -477,21 +462,46 @@ class AdminCategoriesControllerCore extends AdminController
$this->tpl_form_vars['shared_category'] = Validate::isLoadedObject($obj) && $obj->hasMultishopEntries();
$this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
+
+ // Display this field only if multistore option is enabled
+ if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && Tools::isSubmit('add'.$this->table.'root'))
+ {
+ $this->fields_form['input'][] = array(
+ 'type' => 'radio',
+ 'label' => $this->l('Root Category:'),
+ 'name' => 'is_root_category',
+ 'required' => false,
+ 'is_bool' => true,
+ 'class' => 't',
+ 'values' => array(
+ array(
+ 'id' => 'is_root_on',
+ 'value' => 1,
+ 'label' => $this->l('Yes')
+ ),
+ array(
+ 'id' => 'is_root_off',
+ 'value' => 0,
+ 'label' => $this->l('No')
+ )
+ )
+ );
+ unset($this->fields_form['input'][2],$this->fields_form['input'][3]);
+ }
+ // Display this field only if multistore option is enabled AND there are several stores configured
if (Shop::isFeatureActive())
$this->fields_form['input'][] = array(
'type' => 'shop',
'label' => $this->l('Shop association:'),
'name' => 'checkBoxShopAsso',
);
+
// remove category tree and radio button "is_root_category" if this category has the root category as parent category to avoid any conflict
if ($this->_category->id_parent == Category::getTopCategory()->id && Tools::isSubmit('updatecategory'))
foreach ($this->fields_form['input'] as $k => $input)
if (in_array($input['name'], array('id_parent', 'is_root_category')))
unset($this->fields_form['input'][$k]);
- if (Tools::isSubmit('add'.$this->table.'root'))
- unset($this->fields_form['input'][2],$this->fields_form['input'][3]);
-
if (!($obj = $this->loadObject(true)))
return;
@@ -515,6 +525,8 @@ class AdminCategoriesControllerCore extends AdminController
foreach ($groups as $group)
$this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $category_groups_ids)));
+ $this->fields_value['is_root_category'] = (bool)Tools::isSubmit('add'.$this->table.'root');
+
return parent::renderForm();
}
@@ -545,7 +557,7 @@ class AdminCategoriesControllerCore extends AdminController
$id_parent = (int)Tools::getValue('id_parent');
// if true, we are in a root category creation
- if (!$id_parent && !Tools::isSubmit('is_root_category'))
+ if (!$id_parent)
{
$_POST['is_root_category'] = $_POST['level_depth'] = 1;
$_POST['id_parent'] = $id_parent = (int)Configuration::get('PS_ROOT_CATEGORY');
diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php
index 6d5638b31..fbf5f84df 100644
--- a/controllers/admin/AdminCountriesController.php
+++ b/controllers/admin/AdminCountriesController.php
@@ -145,7 +145,8 @@ class AdminCountriesControllerCore extends AdminController
array('address2'),
array('postcode', 'city'),
array('Country:name'),
- array('phone'));
+ array('phone'),
+ array('phone_mobile'));
foreach ($default_layout_tab as $line)
$default_layout .= implode(' ', $line)."\r\n";
@@ -433,10 +434,10 @@ class AdminCountriesControllerCore extends AdminController
public function processStatus()
{
- $return = parent::processStatus();
+ parent::processStatus();
if (Validate::isLoadedObject($object = $this->loadObject()) && $object->active == 1)
- $return &= Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
- return $return;
+ return Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
+ return false;
}
public function processBulkStatusSelection($way)
diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php
index c5d719483..bf8690b64 100644
--- a/controllers/admin/AdminCurrenciesController.php
+++ b/controllers/admin/AdminCurrenciesController.php
@@ -38,7 +38,7 @@ class AdminCurrenciesControllerCore extends AdminController
'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 80),
'iso_code_num' => array('title' => $this->l('ISO code number'), 'align' => 'center', 'width' => 120),
'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false),
- 'conversion_rate' => array('title' => $this->l('Exchange rate'), 'type' => 'float', 'align' => 'center', 'width' => 130, 'search' => false),
+ 'conversion_rate' => array('title' => $this->l('Exchange rate'), 'type' => 'float', 'align' => 'center', 'width' => 130, 'search' => false, 'filter_key' => 'currency_shop!conversion_rate'),
'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false),
);
diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php
index 57eff11a0..3714a0a17 100644
--- a/controllers/admin/AdminCustomerThreadsController.php
+++ b/controllers/admin/AdminCustomerThreadsController.php
@@ -401,7 +401,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
),
);
//#ct == id_customer_thread #tc == token of thread <== used in the synchronization imap
- $contact = new Contact((int)$ct->id_contact);
+ $contact = new Contact((int)$ct->id_contact, (int)$ct->id_lang);
if (Validate::isLoadedObject($contact))
{
$from_name = $contact->name[(int)$ct->id_lang];
diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php
index 621e9b765..d4edc5926 100644
--- a/controllers/admin/AdminCustomersController.php
+++ b/controllers/admin/AdminCustomersController.php
@@ -774,7 +774,8 @@ class AdminCustomersControllerCore extends AdminController
if ($customer_email != $this->object->email)
{
$customer = new Customer();
- $customer->getByEmail($customer_email);
+ if (Validate::isEmail($customer_email))
+ $customer->getByEmail($customer_email);
if ($customer->id)
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
}
diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php
index 3c09f4cf1..945a95ba0 100644
--- a/controllers/admin/AdminEmployeesController.php
+++ b/controllers/admin/AdminEmployeesController.php
@@ -463,6 +463,24 @@ class AdminEmployeesControllerCore extends AdminController
return parent::initContent();
}
+ protected function afterUpdate($object)
+ {
+ $res = parent::afterUpdate($object);
+ // Update cookie if needed
+ if (Tools::getValue('id_employee') == $this->context->employee->id && Tools::getValue('passwd') && $object->passwd != $this->context->employee->passwd)
+ $this->context->cookie->passwd = $this->context->employee->passwd = $object->passwd;
+
+ return $res;
+ }
+
+ protected function ajaxProcessFormLanguage()
+ {
+ $this->context->cookie->employee_form_lang = (int)Tools::getValue('form_language_id');
+ if (!$this->context->cookie->write())
+ die ('Error while updating cookie.');
+ die ('Form language updated.');
+ }
+
public function ajaxProcessGetTabByIdProfile()
{
$id_profile = Tools::getValue('id_profile');
diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php
index 8045e2c56..f63ceb83a 100644
--- a/controllers/admin/AdminFeaturesController.php
+++ b/controllers/admin/AdminFeaturesController.php
@@ -455,7 +455,7 @@ class AdminFeaturesControllerCore extends AdminController
* AdminController::getList() override
* @see AdminController::getList()
*/
- public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
+ public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = false, $id_lang_shop = false)
{
if ($this->table == 'feature_value')
$this->_where .= ' AND a.custom = 0';
diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php
index 03f2fbed6..96d37e035 100644
--- a/controllers/admin/AdminHomeController.php
+++ b/controllers/admin/AdminHomeController.php
@@ -71,10 +71,15 @@ class AdminHomeControllerCore extends AdminController
$indexRebuiltAfterUpdate = 2;
$smartyOptimized = 0;
+ // Forcing compilation is not good, really slow
if (in_array(Configuration::get('PS_SMARTY_FORCE_COMPILE'), array(_PS_SMARTY_CHECK_COMPILE_, _PS_SMARTY_NO_COMPILE_)))
++$smartyOptimized;
+ // Enabling cache is better
if (Configuration::get('PS_SMARTY_CACHE'))
++$smartyOptimized;
+ // If the console is enabled, not good for production
+ if (Configuration::get('PS_SMARTY_CONSOLE') != _PS_SMARTY_CONSOLE_CLOSE_)
+ $smartyOptimized = 0;
$cccOptimized = Configuration::get('PS_CSS_THEME_CACHE');
$cccOptimized += Configuration::get('PS_JS_THEME_CACHE');
@@ -170,10 +175,16 @@ class AdminHomeControllerCore extends AdminController
$shop = Context::getContext()->shop;
if ($_SERVER['HTTP_HOST'] != $shop->domain && $_SERVER['HTTP_HOST'] != $shop->domain_ssl && Tools::getValue('ajax') == false)
- $this->displayWarning($this->l('You are currently connected under the following domain name:').'
'.$_SERVER['HTTP_HOST'].''.
- $this->l('This is different from the main shop domain name set in the "Multistore" page under the "Advanced Parameters" menu:').'
'.$shop->domain.'
-
'.
- $this->l('Click here if you want to modify your main shop\'s domain name.').'');
+ {
+ $warning = $this->l('You are currently connected under the following domain name:').'
'.$_SERVER['HTTP_HOST'].'';
+ if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE'))
+ $warning .= sprintf($this->l('This is different from the shop domain name set in the Multistore settings: "%s".'), $shop->domain).'
+ '.preg_replace('@{link}(.*){/link}@', '
$1', $this->l('If this is your main domain, please {link}change it now{/link}.'));
+ else
+ $warning .= $this->l('This is different from the domain name set in the "SEO & URLs" tab.').'
+ '.preg_replace('@{link}(.*){/link}@', '
$1', $this->l('If this is your main domain, please {link}change it now{/link}.'));
+ $this->displayWarning($warning);
+ }
}
protected function getQuickLinks()
@@ -377,12 +388,13 @@ class AdminHomeControllerCore extends AdminController
$chart = new Chart();
$chart->getCurve(1)->setType('bars');
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
- SELECT total_paid / conversion_rate as total_converted, left(invoice_date, 10) as invoice_date
+ SELECT SUM(total_paid / conversion_rate) as total_converted, left(invoice_date, 10) as invoice_date
FROM '._DB_PREFIX_.'orders o
WHERE valid = 1
AND total_paid > 0
AND invoice_date BETWEEN \''.date('Y-m-d', strtotime('-7 DAYS', time())).' 00:00:00\' AND \''.date('Y-m-d H:i:s').'\'
- '.Shop::addSqlRestriction(Shop::SHARE_ORDER).'
+ '.Shop::addSqlRestriction(Shop::SHARE_ORDER).'
+ GROUP BY DATE(invoice_date)
');
foreach ($result as $row)
$chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 02:00:00'), $row['total_converted']);
@@ -474,7 +486,7 @@ class AdminHomeControllerCore extends AdminController
$result = array();
$content = '';
- $protocol = Tools::usingSecureMode() ? 'https' : 'http';
+ $protocol = Tools::getCurrentUrlProtocolPrefix();
$isoUser = Context::getContext()->language->iso_code;
$isoCountry = Context::getContext()->country->iso_code;
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 2)));
@@ -482,17 +494,16 @@ class AdminHomeControllerCore extends AdminController
// SCREENCAST
$result['screencast'] = 'OK';
-
// PREACTIVATION
$result['partner_preactivation'] = $this->getBlockPartners();
// DISCOVER PRESTASHOP
$result['discover_prestashop'] = '
'.$this->getBlockDiscover().'
';
- $result['discover_prestashop'] .= '
';
+ $result['discover_prestashop'] .= '
';
// SHOW TIPS OF THE DAY
- $content = Tools::file_get_contents($protocol.'://api.prestashop.com/partner/tipsoftheday/?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser), false, $stream_context);
- $content = explode('|', $content);
+ $content = Tools::file_get_contents($protocol.'api.prestashop.com/partner/tipsoftheday/?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser), false, $stream_context);
+ $content = explode('|', utf8_encode($content));
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] .= '
'.$content[1].'
';
@@ -517,7 +528,7 @@ class AdminHomeControllerCore extends AdminController
{
// Init var
$return = '';
- $protocol = Tools::getShopProtocol();
+ $protocol = Tools::getCurrentUrlProtocolPrefix();
$isoCountry = Context::getContext()->country->iso_code;
$isoUser = Context::getContext()->language->iso_code;
@@ -525,7 +536,7 @@ class AdminHomeControllerCore extends AdminController
if (is_writable('../config/xml/') && (!file_exists('../config/xml/preactivation.xml') || (time() - filemtime('../config/xml/preactivation.xml')) > 86400))
{
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT)));
- $content = Tools::file_get_contents('http://api.prestashop.com/partner/premium/get_partners.php?protocol='.$protocol.'&iso_country='.Tools::strtoupper($isoCountry).'&iso_lang='.Tools::strtolower($isoUser).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&host='.urlencode($_SERVER['HTTP_HOST']).'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')), false, $stream_context);
+ $content = Tools::file_get_contents($protocol.'api.prestashop.com/partner/premium/get_partners.php?iso_country='.Tools::strtoupper($isoCountry).'&iso_lang='.Tools::strtolower($isoUser).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&host='.urlencode($_SERVER['HTTP_HOST']), false, $stream_context);
@unlink('../config/xml/preactivation.xml');
file_put_contents('../config/xml/preactivation.xml', $content);
}
@@ -657,15 +668,12 @@ class AdminHomeControllerCore extends AdminController
$smarty->assign('protocol', $protocol);
$isoUser = $this->context->language->iso_code;
$smarty->assign('isoUser', $isoUser);
- $upgrade = null;
$tpl_vars['refresh_check_version'] = 0;
- if (@ini_get('allow_url_fopen'))
- {
- $upgrade = new Upgrader(true);
- // if this information is outdated, the version will be checked after page loading
- if (Configuration::get('PS_LAST_VERSION_CHECK') < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS))
- $tpl_vars['refresh_check_version'] = 1;
- }
+ $upgrade = new Upgrader(true);
+
+ // if this information is outdated, the version will be checked after page loading
+ if (Configuration::get('PS_LAST_VERSION_CHECK') < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS))
+ $tpl_vars['refresh_check_version'] = 1;
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400))
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php
index 22694773d..fdacfe872 100644
--- a/controllers/admin/AdminImagesController.php
+++ b/controllers/admin/AdminImagesController.php
@@ -375,6 +375,7 @@ class AdminImagesControllerCore extends AdminController
|| !Configuration::updateValue('PS_PNG_QUALITY', Tools::getValue('PS_PNG_QUALITY')))
$this->errors[] = Tools::displayError('Unknown error.');
else
+ $this->confirmations[] = $this->_conf[6];
return parent::postProcess();
}
else
@@ -533,18 +534,16 @@ class AdminImagesControllerCore extends AdminController
protected function _regenerateNoPictureImages($dir, $type, $languages)
{
$errors = false;
- foreach ($type as $imageType)
- {
+ foreach ($type as $image_type)
foreach ($languages as $language)
{
$file = $dir.$language['iso_code'].'.jpg';
if (!file_exists($file))
- $file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)(Configuration::get('PS_LANG_DEFAULT'))).'.jpg';
- if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg'))
- if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg', (int)$imageType['width'], (int)$imageType['height']))
+ $file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')).'.jpg';
+ if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($image_type['name']).'.jpg'))
+ if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($image_type['name']).'.jpg', (int)$image_type['width'], (int)$image_type['height']))
$errors = true;
}
- }
return $errors;
}
diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php
index e267e3b0f..b0bef57b6 100644
--- a/controllers/admin/AdminImportController.php
+++ b/controllers/admin/AdminImportController.php
@@ -2435,17 +2435,12 @@ class AdminImportControllerCore extends AdminController
$discount_rate = (float)$info['discount_rate'];
$tax_rate = (float)$info['tax_rate'];
- // checks if one product is there only once
- if (isset($product['id_product']))
- {
- if ($product['id_product'] == $id_product_attribute)
- $this->errors[] = sprintf($this->l('Product (%d/%D) cannot be added twice (at line %d).'), $id_product,
- $id_product_attribute, $current_line + 1);
- else
- $product['id_product'] = $id_product_attribute;
- }
+ // checks if one product/attribute is there only once
+ if (isset($products[$id_product][$id_product_attribute]))
+ $this->errors[] = sprintf($this->l('Product/Attribute (%d/%d) cannot be added twice (at line %d).'), $id_product,
+ $id_product_attribute, $current_line + 1);
else
- $product['id_product'] = 0;
+ $products[$id_product][$id_product_attribute] = $quantity_expected;
// checks parameters
if (false === ($supplier_reference = ProductSupplier::getProductSupplierReference($id_product, $id_product_attribute, $supply_order->id_supplier)))
@@ -2658,6 +2653,13 @@ class AdminImportControllerCore extends AdminController
Image::clearTmpDir();
return true;
}
+
+ public function clearSmartyCache()
+ {
+ Tools::enableCache();
+ Tools::clearCache($this->context->smarty);
+ Tools::restoreCacheSettings();
+ }
public function postProcess()
{
@@ -2715,10 +2717,12 @@ class AdminImportControllerCore extends AdminController
{
case $this->entities[$import_type = $this->l('Categories')]:
$this->categoryImport();
+ $this->clearSmartyCache();
break;
case $this->entities[$import_type = $this->l('Products')]:
$import_type = $this->l('Categories');
$this->productImport();
+ $this->clearSmartyCache();
break;
case $this->entities[$import_type = $this->l('Customers')]:
$this->customerImport();
@@ -2728,12 +2732,15 @@ class AdminImportControllerCore extends AdminController
break;
case $this->entities[$import_type = $this->l('Combinations')]:
$this->attributeImport();
+ $this->clearSmartyCache();
break;
case $this->entities[$import_type = $this->l('Manufacturers')]:
$this->manufacturerImport();
+ $this->clearSmartyCache();
break;
case $this->entities[$import_type = $this->l('Suppliers')]:
$this->supplierImport();
+ $this->clearSmartyCache();
break;
// @since 1.5.0
case $this->entities[$import_type = $this->l('Supply Orders')]:
diff --git a/controllers/admin/AdminLanguagesController.php b/controllers/admin/AdminLanguagesController.php
index 2112d1fbe..233b3e7dd 100644
--- a/controllers/admin/AdminLanguagesController.php
+++ b/controllers/admin/AdminLanguagesController.php
@@ -104,7 +104,8 @@ class AdminLanguagesControllerCore extends AdminController
$this->addRowAction('delete');
$this->displayWarning($this->l('When you delete a language, all related translations in the database will be deleted.'));
- $this->displayInformation($this->l('Your .htaccess file must be writable.'));
+ if (!is_writable(_PS_ROOT_DIR_.'/.htaccess') && Configuration::get('PS_REWRITING_SETTINGS'))
+ $this->displayInformation($this->l('Your .htaccess file must be writable.'));
return parent::renderList();
}
@@ -374,12 +375,11 @@ class AdminLanguagesControllerCore extends AdminController
if ($_FILES['no-picture']['error'] == UPLOAD_ERR_OK)
$this->copyNoPictureImage(strtolower(Tools::getValue('iso_code')));
unset($_FILES['no-picture']);
- return parent::processAdd();
}
else
$this->errors[] = Tools::displayError('Flag and "No picture" image fields are required.');
- return false;
+ return parent::processAdd();
}
public function processUpdate()
diff --git a/controllers/admin/AdminLocalizationController.php b/controllers/admin/AdminLocalizationController.php
index c5158f9fa..882ad4e5e 100644
--- a/controllers/admin/AdminLocalizationController.php
+++ b/controllers/admin/AdminLocalizationController.php
@@ -28,9 +28,6 @@ class AdminLocalizationControllerCore extends AdminController
{
public function __construct()
{
- $this->className = 'Configuration';
- $this->table = 'configuration';
-
parent::__construct();
$this->fields_options = array(
diff --git a/controllers/admin/AdminLogsController.php b/controllers/admin/AdminLogsController.php
index 265e420f1..5a4dc1255 100644
--- a/controllers/admin/AdminLogsController.php
+++ b/controllers/admin/AdminLogsController.php
@@ -33,9 +33,6 @@ class AdminLogsControllerCore extends AdminController
$this->lang = false;
$this->noLink = true;
- $this->addRowAction('delete');
- $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
-
$this->fields_list = array(
'id_log' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'employee' => array('title' => $this->l('Employee'), 'align' => 'center', 'width' => 100),
@@ -67,10 +64,20 @@ class AdminLogsControllerCore extends AdminController
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'employee e ON (a.id_employee = e.id_employee)';
parent::__construct();
}
+
+ public function processDelete()
+ {
+ return Logger::eraseAllLogs();
+ }
public function initToolbar()
{
parent::initToolbar();
+ $this->toolbar_btn['delete'] = array(
+ 'short' => 'Erase',
+ 'desc' => $this->l('Erase all'),
+ 'js' => 'if (confirm(\''.$this->l('Are you sure?').'\')) document.location = \''.$this->context->link->getAdminLink('AdminLogs').'&token='.$this->token.'&deletelog=1\';'
+ );
unset($this->toolbar_btn['new']);
}
diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php
index b1e630bc1..ebdb2ad1d 100644
--- a/controllers/admin/AdminManufacturersController.php
+++ b/controllers/admin/AdminManufacturersController.php
@@ -115,45 +115,23 @@ class AdminManufacturersControllerCore extends AdminController
$this->content .= parent::renderList();
}
-
- public function initListManufacturerAddresses()
+
+ protected function getAddressFieldsList()
{
- $this->toolbar_title = $this->l('Addresses');
- // reset actions and query vars
- $this->actions = array();
- unset($this->fields_list, $this->_select, $this->_join, $this->_group, $this->_filterHaving, $this->_filter);
-
- $this->table = 'address';
- $this->identifier = 'id_address';
- $this->deleted = true;
- $this->_orderBy = null;
-
- $this->addRowAction('editaddresses');
- $this->addRowAction('delete');
-
- // test if a filter is applied for this list
- if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false)
- $this->filter = true;
-
- // test if a filter reset request is required for this list
- if (isset($_POST['submitReset'.$this->table]))
- $this->action = 'reset_filters';
- else
- $this->action = '';
-
// Sub tab addresses
$countries = Country::getCountries($this->context->language->id);
foreach ($countries as $country)
$this->countries_array[$country['id_country']] = $country['name'];
- $this->fields_list = array(
+ return array(
'id_address' => array(
'title' => $this->l('ID'),
'width' => 25
),
'manufacturer_name' => array(
'title' => $this->l('Manufacturer'),
- 'width' => 'auto'
+ 'width' => 'auto',
+ 'filter_key' => 'm!name'
),
'firstname' => array(
'title' => $this->l('First name'),
@@ -181,6 +159,32 @@ class AdminManufacturersControllerCore extends AdminController
'filter_key' => 'cl!id_country'
)
);
+ }
+
+ public function initListManufacturerAddresses()
+ {
+ $this->toolbar_title = $this->l('Addresses');
+ // reset actions and query vars
+ $this->actions = array();
+ unset($this->fields_list, $this->_select, $this->_join, $this->_group, $this->_filterHaving, $this->_filter);
+
+ $this->table = 'address';
+ $this->list_id = 'address';
+ $this->identifier = 'id_address';
+ $this->deleted = true;
+ $this->_orderBy = null;
+
+ $this->addRowAction('editaddresses');
+ $this->addRowAction('delete');
+
+ // test if a filter is applied for this list
+ if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false)
+ $this->filter = true;
+
+ // test if a filter reset request is required for this list
+ $this->action = (isset($_POST['submitReset'.$this->table]) ? 'reset_filters' : '');
+
+ $this->fields_list = $this->getAddressFieldsList();
$this->_select = 'cl.`name` as country, m.`name` AS manufacturer_name';
$this->_join = '
@@ -252,7 +256,7 @@ class AdminManufacturersControllerCore extends AdminController
'lang' => true,
'cols' => 60,
'rows' => 10,
- 'class' => 'rte',
+ 'autoload_rte' => 'rte', //Enable TinyMCE editor for short description
'hint' => $this->l('Invalid characters:').' <>;=#{}'
),
array(
@@ -262,7 +266,7 @@ class AdminManufacturersControllerCore extends AdminController
'lang' => true,
'cols' => 60,
'rows' => 10,
- 'class' => 'rte',
+ 'autoload_rte' => 'rte', //Enable TinyMCE editor for description
'hint' => $this->l('Invalid characters:').' <>;=#{}'
),
array(
@@ -511,7 +515,7 @@ class AdminManufacturersControllerCore extends AdminController
$this->fields_value = array(
'name' => Manufacturer::getNameById($address->id_manufacturer),
'alias' => 'manufacturer',
- 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT')
+ 'id_country' => $address->id_country
);
$this->initToolbar();
@@ -671,6 +675,8 @@ class AdminManufacturersControllerCore extends AdminController
if (Tools::isSubmit('editaddresses'))
$this->display = 'editaddresses';
+ else if (Tools::isSubmit('updateaddress'))
+ $this->display = 'editaddresses';
else if (Tools::isSubmit('addaddress'))
$this->display = 'addaddress';
else if (Tools::isSubmit('submitAddaddress'))
@@ -681,12 +687,13 @@ class AdminManufacturersControllerCore extends AdminController
public function initProcess()
{
- if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress') || Tools::isSubmit('submitBulkdeleteaddress'))
+ if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress') || Tools::isSubmit('submitBulkdeleteaddress') || Tools::isSubmit('exportaddress'))
{
$this->table = 'address';
$this->className = 'Address';
$this->identifier = 'id_address';
$this->deleted = true;
+ $this->fields_list = $this->getAddressFieldsList();
}
parent::initProcess();
}
@@ -723,4 +730,4 @@ class AdminManufacturersControllerCore extends AdminController
{
return true;
}
-}
\ No newline at end of file
+}
diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php
index ec58e1e96..9fad901c9 100644
--- a/controllers/admin/AdminMetaController.php
+++ b/controllers/admin/AdminMetaController.php
@@ -139,7 +139,7 @@ class AdminMetaControllerCore extends AdminController
$this->url = ShopUrl::getShopUrls($this->context->shop->id)->where('main', '=', 1)->getFirst();
if ($this->url)
{
- $shop_url_options['description'] = $this->l('Here you can set the URL for your shop. If you migrate your shop to a new URL, remember to change the values bellow.');
+ $shop_url_options['description'] = $this->l('Here you can set the URL for your shop. If you migrate your shop to a new URL, remember to change the values below.');
$shop_url_options['fields'] = array(
'domain' => array(
'title' => $this->l('Shop domain'),
@@ -363,6 +363,9 @@ class AdminMetaControllerCore extends AdminController
else if (Tools::isSubmit('submitRobots'))
$this->generateRobotsFile();
+ if (Tools::isSubmit('PS_ROUTE_product_rule'))
+ Tools::clearCache($this->context->smarty);
+
return parent::postProcess();
}
@@ -467,7 +470,6 @@ class AdminMetaControllerCore extends AdminController
else
Configuration::updateValue('PS_ROUTE_'.$route_id, $rule);
}
-
}
/**
@@ -476,11 +478,21 @@ class AdminMetaControllerCore extends AdminController
public function updateOptionPsRewritingSettings()
{
Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS'));
- Tools::generateHtaccess($this->ht_file, null, null, '', Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'), false, Tools::getValue('PS_HTACCESS_DISABLE_MODSEC'));
-
- Tools::enableCache();
- Tools::clearCache($this->context->smarty);
- Tools::restoreCacheSettings();
+ if (Tools::generateHtaccess($this->ht_file, null, null, '', Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'), false, Tools::getValue('PS_HTACCESS_DISABLE_MODSEC')))
+ {
+ Tools::enableCache();
+ Tools::clearCache($this->context->smarty);
+ Tools::restoreCacheSettings();
+ }
+ else
+ {
+ Configuration::updateValue('PS_REWRITING_SETTINGS', 0);
+ // Message copied/pasted from the information tip
+ $message = $this->l('Before being able to use this tool, you need to:');
+ $message .= '
- '.$this->l('Create a blank .htaccess in your root directory.');
+ $message .= '
- '.$this->l('Give it write permissions (CHMOD 666 on Unix system)');
+ $this->errors[] = $message;
+ }
}
public function updateOptionPsRouteProductRule()
diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php
index 5be50453c..a9f19e379 100644
--- a/controllers/admin/AdminModulesController.php
+++ b/controllers/admin/AdminModulesController.php
@@ -98,6 +98,8 @@ class AdminModulesControllerCore extends AdminController
$this->list_modules_categories['others']['name'] = $this->l('Other Modules');
$this->list_modules_categories['mobile']['name'] = $this->l('Mobile');
+ uasort($this->list_modules_categories, array($this, 'checkCategoriesNames'));
+
// Set Id Employee, Iso Default Country and Filter Configuration
$this->id_employee = (int)$this->context->employee->id;
$this->iso_default_country = $this->context->country->iso_code;
@@ -129,6 +131,14 @@ class AdminModulesControllerCore extends AdminController
$this->logged_on_addons = true;
}
+ public function checkCategoriesNames($a, $b)
+ {
+ if ($a['name'] === $this->l('Other Modules'))
+ return true;
+
+ return (bool)($a['name'] > $b['name']);
+ }
+
public function setMedia()
{
parent::setMedia();
@@ -630,9 +640,8 @@ class AdminModulesControllerCore extends AdminController
if (!$download_ok)
$this->errors[] = $this->l('Error on downloading the lastest version');
- else
- if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
- $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
+ elseif (!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
+ $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
}
}
}
@@ -674,18 +683,18 @@ class AdminModulesControllerCore extends AdminController
// Get the return value of current method
$echo = $module->{$method}();
-
+
// After a successful install of a single module that has a configuration method, to the configuration page
if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent'))
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12');
}
-
+
// If the method called is "configure" (getContent method), we show the html code of configure page
if ($key == 'configure' && Module::isInstalled($module->name))
{
if (isset($module->multishop_context))
$this->multishop_context = $module->multishop_context;
-
+
$backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name;
$hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;
$tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang=';
@@ -767,6 +776,9 @@ class AdminModulesControllerCore extends AdminController
Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name').$params);
Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
}
+
+ if (isset($_GET['update']))
+ Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : ''));
}
public function postProcess()
@@ -774,7 +786,6 @@ class AdminModulesControllerCore extends AdminController
// Parent Post Process
parent::postProcess();
-
// Get the list of installed module ans prepare it for ajax call.
if (($list = Tools::getValue('installed_modules')))
Context::getContext()->smarty->assign('installed_modules', Tools::jsonEncode(explode('|', $list)));
@@ -1013,6 +1024,14 @@ class AdminModulesControllerCore extends AdminController
// Browse modules list
foreach ($modules as $km => $module)
{
+ //Add succes message for one module update
+ if (Tools::getValue('updated') && Tools::getValue('module_name'))
+ {
+ if ($module->name === (string)Tools::getValue('module_name'))
+ $module_success[] = array('name' => $module->displayName, 'message' => array(
+ 0 => $this->l('Current version:').$module->version));
+ }
+
//if we are in favorites view we only display installed modules
if (Tools::getValue('select') == 'favorites' && !$module->id)
{
diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php
index 8b7820b19..30d16107b 100644
--- a/controllers/admin/AdminModulesPositionsController.php
+++ b/controllers/admin/AdminModulesPositionsController.php
@@ -270,12 +270,13 @@ class AdminModulesPositionsControllerCore extends AdminController
'href' => self::$currentIndex.'&addToHook'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token,
'desc' => $this->l('Transplant a module')
);
-
+
$live_edit_params = array(
'live_edit' => true,
'ad' => $admin_dir,
'liveToken' => $this->token,
- 'id_employee' => (int)$this->context->employee->id
+ 'id_employee' => (int)$this->context->employee->id,
+ 'id_shop' => (int)$this->context->shop->id
);
$this->context->smarty->assign(array(
@@ -302,10 +303,12 @@ class AdminModulesPositionsControllerCore extends AdminController
public function getLiveEditUrl($live_edit_params)
{
$lang = '';
+ $admin_dir = dirname($_SERVER['PHP_SELF']);
+ $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1);
+ $dir = str_replace($admin_dir, '', dirname($_SERVER['SCRIPT_NAME']));
if (Configuration::get('PS_REWRITING_SETTINGS') && count(Language::getLanguages(true)) > 1)
$lang = Language::getIsoById($this->context->employee->id_lang).'/';
- $url = $this->context->shop->getBaseURL().$lang.Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
-
+ $url = Tools::getCurrentUrlProtocolPrefix().Tools::getHttpHost().$dir.$lang.Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
return $url;
}
@@ -393,21 +396,35 @@ class AdminModulesPositionsControllerCore extends AdminController
if (!is_array($file_list))
$file_list = ($file_list) ? array($file_list) : array();
- $content = '
';
+ $content = '
';
if ($shop_id)
{
$shop = new Shop($shop_id);
$content .= ' ('.$shop->name.')';
}
- $content .= '
+ ';
return $content;
}
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index 857887689..0b9557f64 100755
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -305,7 +305,7 @@ class AdminOrdersControllerCore extends AdminController
'{shipping_number}' => $order->shipping_number,
'{order_name}' => $order->getUniqReference()
);
- if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars,
+ if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit'), $templateVars,
$customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null,
_PS_MAIL_DIR_, true, (int)$order->id_shop))
{
@@ -861,7 +861,7 @@ class AdminOrdersControllerCore extends AdminController
$payment_module->validateOrder(
(int)$cart->id, (int)$id_order_state,
$cart->getOrderTotal(true, Cart::BOTH), $payment_module->displayName, $this->l('Manual order -- Employee:').
- Tools::safeOutput(substr($employee->firstname, 0, 1).'. '.$employee->lastname), array(), null, false, $cart->secure_key
+ substr($employee->firstname, 0, 1).'. '.$employee->lastname, array(), null, false, $cart->secure_key
);
if ($payment_module->currentOrder)
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token);
@@ -1332,6 +1332,13 @@ class AdminOrdersControllerCore extends AdminController
// if the current stock requires a warning
if ($product['current_stock'] == 0 && $display_out_of_stock_warning)
$this->displayWarning($this->l('This product is out of stock: ').' '.$product['product_name']);
+ if ($product['id_warehouse'] != 0)
+ {
+ $warehouse = new Warehouse((int)$product['id_warehouse']);
+ $product['warehouse_name'] = $warehouse->name;
+ }
+ else
+ $product['warehouse_name'] = '--';
}
// Smarty assign
@@ -1374,7 +1381,8 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $order->getInvoicesCollection(),
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
'payment_methods' => $payment_methods,
- 'invoice_management_active' => Configuration::get('PS_INVOICE', null, null, $order->id_shop)
+ 'invoice_management_active' => Configuration::get('PS_INVOICE', null, null, $order->id_shop),
+ 'display_warehouse' => (int)Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')
);
return parent::renderView();
@@ -1737,6 +1745,13 @@ class AdminOrdersControllerCore extends AdminController
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
$product['return_history'] = OrderReturn::getProductReturnDetail((int)$product['id_order_detail']);
$product['refund_history'] = OrderSlip::getProductSlipDetail((int)$product['id_order_detail']);
+ if ($product['id_warehouse'] != 0)
+ {
+ $warehouse = new Warehouse((int)$product['id_warehouse']);
+ $product['warehouse_name'] = $warehouse->name;
+ }
+ else
+ $product['warehouse_name'] = '--';
// Get invoices collection
$invoice_collection = $order->getInvoicesCollection();
@@ -1757,7 +1772,8 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $invoice_collection,
'current_id_lang' => Context::getContext()->language->id,
'link' => Context::getContext()->link,
- 'current_index' => self::$currentIndex
+ 'current_index' => self::$currentIndex,
+ 'display_warehouse' => (int)Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')
));
$this->sendChangedNotification($order);
@@ -1952,6 +1968,14 @@ class AdminOrdersControllerCore extends AdminController
$product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl'];
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
$product['refund_history'] = OrderSlip::getProductSlipDetail($order_detail->id);
+ if ($product['id_warehouse'] != 0)
+ {
+ $warehouse = new Warehouse((int)$product['id_warehouse']);
+ $product['warehouse_name'] = $warehouse->name;
+ }
+ else
+ $product['warehouse_name'] = '--';
+
// Get invoices collection
$invoice_collection = $order->getInvoicesCollection();
@@ -1971,7 +1995,8 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $invoice_collection,
'current_id_lang' => Context::getContext()->language->id,
'link' => Context::getContext()->link,
- 'current_index' => self::$currentIndex
+ 'current_index' => self::$currentIndex,
+ 'display_warehouse' => (int)Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')
));
if (!$res)
diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php
index ee69e93ea..22656808d 100644
--- a/controllers/admin/AdminPPreferencesController.php
+++ b/controllers/admin/AdminPPreferencesController.php
@@ -116,7 +116,8 @@ class AdminPPreferencesControllerCore extends AdminController
array('id' => '3', 'name' => $this->l('Product modified date')),
array('id' => '4', 'name' => $this->l('Position inside category')),
array('id' => '5', 'name' => $this->l('Manufacturer')),
- array('id' => '6', 'name' => $this->l('Product quantity'))
+ array('id' => '6', 'name' => $this->l('Product quantity')),
+ array('id' => '7', 'name' => $this->l('Product reference'))
),
'identifier' => 'id'
),
diff --git a/controllers/admin/AdminPaymentController.php b/controllers/admin/AdminPaymentController.php
index 0c10bab4a..8a09dda92 100644
--- a/controllers/admin/AdminPaymentController.php
+++ b/controllers/admin/AdminPaymentController.php
@@ -175,7 +175,7 @@ class AdminPaymentControllerCore extends AdminController
),
array('items' => Group::getGroups($this->context->language->id),
'title' => $this->l('Group restrictions'),
- 'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'),
+ 'desc' => $this->l('Please mark each checkbox for the customer group(s), in which you want the payment module(s) to be available.'),
'name_id' => 'group',
'identifier' => 'id_group',
'icon' => 'group',
diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php
index c19b3c221..798e1912d 100644
--- a/controllers/admin/AdminPerformanceController.php
+++ b/controllers/admin/AdminPerformanceController.php
@@ -118,12 +118,20 @@ class AdminPerformanceControllerCore extends AdminController
)
)
),
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Debug console Key'),
+ 'name' => 'smarty_console_key',
+ 'size' => 30,
+ 'desc' => $this->l('SMARTY_DEBUG parameter in the URL.')
+ ),
)
);
$this->fields_value['smarty_force_compile'] = Configuration::get('PS_SMARTY_FORCE_COMPILE');
$this->fields_value['smarty_cache'] = Configuration::get('PS_SMARTY_CACHE');
$this->fields_value['smarty_console'] = Configuration::get('PS_SMARTY_CONSOLE');
+ $this->fields_value['smarty_console_key'] = Configuration::get('PS_SMARTY_CONSOLE_KEY');
}
public function initFieldsetFeaturesDetachables()
@@ -471,21 +479,6 @@ class AdminPerformanceControllerCore extends AdminController
$this->tpl_form_vars['servers'] = CacheMemcache::getMemcachedServers();
}
- public function initFieldsetCloudCache()
- {
- if (!class_exists('CloudCache'))
- $this->fields_form[6]['form'] = array(
- 'legend' => array(
- 'title' => $this->l('CloudCache'),
- 'image' => '../img/admin/subdomain.gif'
- ),
- 'desc' => $this->l('Performance matters! Improve speed and conversions the easy way.').'
'.
- $this->l('CloudCache supercharges your site in minutes through its state-of-the-art content delivery network.').'
'.
- $this->l('Subscribe now using the code "presta25" and get an exclusive 25% monthly discount on every available package.').'
-
> '.$this->l('Click here to install the CloudCache module for PrestaShop').''
- );
- }
-
public function renderForm()
{
// Initialize fieldset for a form
@@ -495,7 +488,6 @@ class AdminPerformanceControllerCore extends AdminController
$this->initFieldsetMediaServer();
$this->initFieldsetCiphering();
$this->initFieldsetCaching();
- $this->initFieldsetCloudCache();
// Activate multiple fieldset
$this->multiple_fieldsets = true;
@@ -602,7 +594,8 @@ class AdminPerformanceControllerCore extends AdminController
Configuration::updateValue('PS_SMARTY_FORCE_COMPILE', Tools::getValue('smarty_force_compile', _PS_SMARTY_NO_COMPILE_));
Configuration::updateValue('PS_SMARTY_CACHE', Tools::getValue('smarty_cache', 0));
Configuration::updateValue('PS_SMARTY_CONSOLE', Tools::getValue('smarty_console', 0));
- $redirectAdmin = true;
+ Configuration::updateValue('PS_SMARTY_CONSOLE_KEY', Tools::getValue('smarty_console_key', 'SMARTY_DEBUG'));
+ $redirecAdmin = true;
}
else
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
@@ -798,6 +791,13 @@ class AdminPerformanceControllerCore extends AdminController
else
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
}
+
+ if ((bool)Tools::getValue('empty_smarty_cache'))
+ {
+ $redirectAdmin = true;
+ Tools::clearSmartyCache();
+ }
+
if ($redirectAdmin && (!isset($this->errors) || !count($this->errors)))
{
Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => ''));
@@ -833,4 +833,4 @@ class AdminPerformanceControllerCore extends AdminController
die;
}
-}
\ No newline at end of file
+}
diff --git a/controllers/admin/AdminPreferencesController.php b/controllers/admin/AdminPreferencesController.php
index 5df23eae9..f878f69fc 100644
--- a/controllers/admin/AdminPreferencesController.php
+++ b/controllers/admin/AdminPreferencesController.php
@@ -95,6 +95,14 @@ class AdminPreferencesControllerCore extends AdminController
'default' => '0',
'visibility' => Shop::CONTEXT_ALL
),
+ 'PS_ALLOW_HTML_IFRAME' => array(
+ 'title' => $this->l('Allow iframes on html fields'),
+ 'desc' => $this->l('Allow iframes on fields like product description. We recommend that you leave this option disabled'),
+ 'validation' => 'isBool',
+ 'cast' => 'intval',
+ 'type' => 'bool',
+ 'default' => '0'
+ ),
'PS_PRICE_ROUND_MODE' => array(
'title' => $this->l('Round mode'),
'desc' => $this->l('You can choose how to round prices: Always round superior, always round inferior or classic rounding.'),
diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php
index f9d9a803a..b95d88942 100644
--- a/controllers/admin/AdminProductsController.php
+++ b/controllers/admin/AdminProductsController.php
@@ -76,7 +76,7 @@ class AdminProductsControllerCore extends AdminController
$this->allow_export = true;
// @since 1.5 : translations for tabs
- $this->available_tabs_lang = array (
+ $this->available_tabs_lang = array(
'Informations' => $this->l('Information'),
'Pack' => $this->l('Pack'),
'VirtualProduct' => $this->l('Virtual Product'),
@@ -160,40 +160,28 @@ class AdminProductsControllerCore extends AdminController
if (Validate::isLoadedObject($this->_category) && empty($this->_filter))
$join_category = true;
- $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = a.`id_product` '.(!Shop::isFeatureActive() ? ' AND i.cover=1' : '').')';
- if (Shop::isFeatureActive())
- {
- $alias = 'sa';
- $alias_image = 'image_shop';
- if (Shop::getContext() == Shop::CONTEXT_SHOP)
- {
- $this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.(int)$this->context->shop->id.')
- LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.(int)$this->context->shop->id.')
- LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.(int)$this->context->shop->id.')
- LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop='.(int)$this->context->shop->id.')';
- }
- else
- {
- $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = a.id_shop_default)
- LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = a.id_shop_default)
- LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = a.id_shop_default)
- LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop=a.id_shop_default)';
- }
- $this->_select .= 'shop.name as shopname, ';
- }
- else
- {
- $alias = 'a';
- $alias_image = 'i';
- $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = 1)';
- }
-
- $this->_select .= 'MAX('.$alias_image.'.id_image) id_image,';
-
- $this->_join .= ($join_category ? 'INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.')' : '').'
+ $this->_join .= '
+ LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = a.`id_product`)
LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0
'.StockAvailable::addSqlShopRestriction(null, null, 'sav').') ';
- $this->_select .= 'cl.name `name_category` '.($join_category ? ', cp.`position`' : '').', '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`';
+
+ $alias = 'sa';
+ $alias_image = 'image_shop';
+
+ $id_shop = Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP? (int)$this->context->shop->id : 'a.id_shop_default';
+ $this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.')
+ LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.')
+ LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.')
+ LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')';
+
+ $this->_select .= 'shop.name as shopname, ';
+ $this->_select .= 'MAX('.$alias_image.'.id_image) id_image, cl.name `name_category`, '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`';
+
+ if ($join_category)
+ {
+ $this->_join .= ' INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.') ';
+ $this->_select .= ' , cp.`position`, ';
+ }
$this->_group = 'GROUP BY '.$alias.'.id_product';
@@ -270,7 +258,7 @@ class AdminProductsControllerCore extends AdminController
'orderby' => false
);
- if ((int)$this->id_current_category)
+ if ($join_category && (int)$this->id_current_category)
$this->fields_list['position'] = array(
'title' => $this->l('Position'),
'width' => 70,
@@ -371,18 +359,17 @@ class AdminProductsControllerCore extends AdminController
$result = parent::loadObject($opt);
if ($result && Validate::isLoadedObject($this->object))
{
- if (Shop::getContext() == Shop::CONTEXT_SHOP && !$this->object->isAssociatedToShop())
+ if (Shop::getContext() == Shop::CONTEXT_SHOP && Shop::isFeatureActive() && !$this->object->isAssociatedToShop())
{
$default_product = new Product((int)$this->object->id, false, null, (int)$this->object->id_shop_default);
$def = ObjectModel::getDefinition($this->object);
foreach ($def['fields'] as $field_name => $row)
{
- $fields_array = array();
- if(is_array($default_product->$field_name))
- foreach ($fields_array as $key => $fields_name)
- $this->object->$field_name[$key] = ObjectModel::formatValue($fields_name, $def['fields'][$field_name]['type']);
+ if (is_array($default_product->$field_name))
+ foreach ($default_product->$field_name as $key => $value)
+ $this->object->{$field_name}[$key] = ObjectModel::formatValue($value, $def['fields'][$field_name]['type']);
else
- $this->object->$field_name = ObjectModel::formatValue($this->object->$field_name, $def['fields'][$field_name]['type']);
+ $this->object->$field_name = ObjectModel::formatValue($default_product->$field_name, $def['fields'][$field_name]['type']);
}
}
$this->object->loadStockData();
@@ -643,6 +630,7 @@ class AdminProductsControllerCore extends AdminController
{
$id_category = (int)Tools::getValue('id_category');
$category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category;
+ Logger::addLog(sprintf($this->l('%s deletion'), $this->className), 1, null, $this->className, (int)$object->id, true, (int)$this->context->employee->id);
$this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token.$category_url;
}
else
@@ -681,7 +669,7 @@ class AdminProductsControllerCore extends AdminController
{
$productId = (int)Tools::getValue('id_product');
@unlink(_PS_TMP_IMG_DIR_.'product_'.$productId.'.jpg');
- @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$productId.'.jpg');
+ @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$productId.'_'.$this->context->shop->id.'.jpg');
$this->redirect_after = self::$currentIndex.'&id_product='.$image->id_product.'&id_category='.(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '').'&action=Images&addproduct'.'&token='.$this->token;
}
}
@@ -814,8 +802,7 @@ class AdminProductsControllerCore extends AdminController
{
if ($this->tabAccess['edit'] === '1')
{
-
- if ($this->isProductFieldUpdated('available_date_attribute') && !Validate::isDateFormat(Tools::getValue('available_date_attribute')))
+ if ($this->isProductFieldUpdated('available_date_attribute') && (Tools::getValue('available_date_attribute') != '' &&!Validate::isDateFormat(Tools::getValue('available_date_attribute'))))
$this->errors[] = Tools::displayError('Invalid date format.');
else
{
@@ -876,6 +863,12 @@ class AdminProductsControllerCore extends AdminController
{
$combination = new Combination((int)$id_product_attribute);
$combination->setAttributes(Tools::getValue('attribute_combination_list'));
+
+ // images could be deleted before
+ $id_images = Tools::getValue('id_image_attr');
+ if (!empty($id_images))
+ $combination->setImages($id_images);
+
$product->checkDefaultAttributes();
if (Tools::getValue('attribute_default'))
{
@@ -1361,7 +1354,7 @@ class AdminProductsControllerCore extends AdminController
'shops' => $json_shops,
);
@unlink(_PS_TMP_IMG_DIR_.'product_'.(int)$obj->id_product.'.jpg');
- @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.(int)$obj->id_product.'.jpg');
+ @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.(int)$obj->id_product.'_'.$this->context->shop->id.'.jpg');
die(Tools::jsonEncode($json));
}
else
@@ -1533,7 +1526,7 @@ class AdminProductsControllerCore extends AdminController
$img->cover = 1;
@unlink(_PS_TMP_IMG_DIR_.'product_'.(int)$img->id_product.'.jpg');
- @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.(int)$img->id_product.'.jpg');
+ @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.(int)$img->id_product.'_'.$this->context->shop->id.'.jpg');
if ($img->update())
$this->jsonConfirmation($this->_conf[26]);
@@ -1569,8 +1562,8 @@ class AdminProductsControllerCore extends AdminController
if (file_exists(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg'))
$res &= @unlink(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg');
- if (file_exists(_PS_TMP_IMG_DIR_.'product_mini_'.$image->id_product.'.jpg'))
- $res &= @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$image->id_product.'.jpg');
+ if (file_exists(_PS_TMP_IMG_DIR_.'product_mini_'.$image->id_product.'_'.$this->context->shop->id.'.jpg'))
+ $res &= @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$image->id_product.'_'.$this->context->shop->id.'.jpg');
if ($res)
$this->jsonConfirmation($this->_conf[7]);
@@ -1659,7 +1652,7 @@ class AdminProductsControllerCore extends AdminController
if (count($this->errors))
return false;
@unlink(_PS_TMP_IMG_DIR_.'product_'.$product->id.'.jpg');
- @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$product->id.'.jpg');
+ @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$product->id.'_'.$this->context->shop->id.'.jpg');
return ((isset($id_image) && is_int($id_image) && $id_image) ? $id_image : false);
}
/**
@@ -2053,17 +2046,28 @@ class AdminProductsControllerCore extends AdminController
// Check fields validity
foreach ($rules['validate'] as $field => $function)
if ($this->isProductFieldUpdated($field) && ($value = Tools::getValue($field)))
- if (!Validate::$function($value))
+ {
+ $res = true;
+ if (Tools::strtolower($function) == 'iscleanhtml')
+ {
+ if (!Validate::$function($value, (int)Configuration::get('PS_ALLOW_HTML_IFRAME')))
+ $res = false;
+ }
+ else
+ if (!Validate::$function($value))
+ $res = false;
+
+ if (!$res)
$this->errors[] = sprintf(
Tools::displayError('The %s field is invalid.'),
call_user_func(array($className, 'displayFieldName'), $field, $className)
);
-
+ }
// Check multilingual fields validity
foreach ($rules['validateLang'] as $fieldLang => $function)
foreach ($languages as $language)
if ($this->isProductFieldUpdated('description_short', $language['id_lang']) && ($value = Tools::getValue($fieldLang.'_'.$language['id_lang'])))
- if (!Validate::$function($value))
+ if (!Validate::$function($value, (int)Configuration::get('PS_ALLOW_HTML_IFRAME')))
$this->errors[] = sprintf(
Tools::displayError('The %1$s field (%2$s) is invalid.'),
call_user_func(array($className, 'displayFieldName'), $fieldLang, $className),
@@ -2411,18 +2415,23 @@ class AdminProductsControllerCore extends AdminController
{
if ($product = $this->loadObject(true))
{
+ if ($this->tabAccess['edit'])
+ {
+ $this->toolbar_btn['save'] = array(
+ 'short' => 'Save',
+ 'href' => '#',
+ 'desc' => $this->l('Save'),
+ );
+
+ $this->toolbar_btn['save-and-stay'] = array(
+ 'short' => 'SaveAndStay',
+ 'href' => '#',
+ 'desc' => $this->l('Save and stay'),
+ );
+ }
+
if ((bool)$product->id)
{
- // adding button for delete this product
- if ($this->tabAccess['delete'] && $this->display != 'add')
- $this->toolbar_btn['delete'] = array(
- 'short' => 'Delete',
- 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&deleteproduct',
- 'desc' => $this->l('Delete this product.'),
- 'confirm' => 1,
- 'js' => 'if (confirm(\''.$this->l('Delete product?').'\')){return true;}else{event.preventDefault();}'
- );
-
// adding button for duplicate this product
if ($this->tabAccess['add'] && $this->display != 'add')
$this->toolbar_btn['duplicate'] = array(
@@ -2456,22 +2465,17 @@ class AdminProductsControllerCore extends AdminController
'desc' => $this->l('New combination'),
'class' => 'toolbar-new'
);
- }
-
- if ($this->tabAccess['edit'])
- {
- $this->toolbar_btn['save'] = array(
- 'short' => 'Save',
- 'href' => '#',
- 'desc' => $this->l('Save'),
- );
-
- $this->toolbar_btn['save-and-stay'] = array(
- 'short' => 'SaveAndStay',
- 'href' => '#',
- 'desc' => $this->l('Save and stay'),
- );
- }
+
+ // adding button for delete this product
+ if ($this->tabAccess['delete'] && $this->display != 'add')
+ $this->toolbar_btn['delete'] = array(
+ 'short' => 'Delete',
+ 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&deleteproduct',
+ 'desc' => $this->l('Delete this product.'),
+ 'confirm' => 1,
+ 'js' => 'if (confirm(\''.$this->l('Delete product?').'\')){return true;}else{event.preventDefault();}'
+ );
+ }
}
}
else
@@ -2538,7 +2542,7 @@ class AdminProductsControllerCore extends AdminController
$this->tpl_form_vars['currentIndex'] = self::$currentIndex;
$this->tpl_form_vars['display_multishop_checkboxes'] = (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP && $this->display == 'edit');
$this->fields_form = array('');
- $this->display = 'edit';
+
$this->tpl_form_vars['token'] = $this->token;
$this->tpl_form_vars['combinationImagesJs'] = $this->getCombinationImagesJs();
$this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
@@ -2568,8 +2572,8 @@ class AdminProductsControllerCore extends AdminController
$this->tpl_form_vars['upload_max_filesize'] = $upload_max_filesize;
$this->tpl_form_vars['country_display_tax_label'] = $this->context->country->display_tax_label;
$this->tpl_form_vars['has_combinations'] = $this->object->hasAttributes();
-
$this->product_exists_in_shop = true;
+
if ($this->display == 'edit' && Validate::isLoadedObject($product) && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id))
{
$this->product_exists_in_shop = false;
@@ -2597,12 +2601,14 @@ class AdminProductsControllerCore extends AdminController
$this->initPack($this->object);
$this->{'initForm'.$this->tab_display}($this->object);
$this->tpl_form_vars['product'] = $this->object;
+
if ($this->ajax)
if (!isset($this->tpl_form_vars['custom_form']))
throw new PrestaShopException('custom_form empty for action '.$this->tab_display);
else
return $this->tpl_form_vars['custom_form'];
}
+
$parent = parent::renderForm();
$this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch'));
return $parent;
@@ -2610,19 +2616,23 @@ class AdminProductsControllerCore extends AdminController
public function getPreviewUrl(Product $product)
{
+ $id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, Context::getContext()->shop->id);
+
if (!ShopUrl::getMainShopDomain())
return false;
+
$is_rewrite_active = (bool)Configuration::get('PS_REWRITING_SETTINGS');
$preview_url = $this->context->link->getProductLink(
$product,
$this->getFieldValue($product, 'link_rewrite', $this->context->language->id),
Category::getLinkRewrite($product->id_category_default, $this->context->language->id),
null,
- null,
+ $id_lang,
Context::getContext()->shop->id,
0,
$is_rewrite_active
);
+
if (!$product->active)
{
$preview_url = $this->context->link->getProductLink(
@@ -2630,20 +2640,17 @@ class AdminProductsControllerCore extends AdminController
$this->getFieldValue($product, 'link_rewrite', $this->default_form_language),
Category::getLinkRewrite($this->getFieldValue($product, 'id_category_default'), $this->context->language->id),
null,
- null,
+ $id_lang,
Context::getContext()->shop->id,
0,
$is_rewrite_active
);
+ $admin_dir = dirname($_SERVER['PHP_SELF']);
+ $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1);
+ $preview_url .= ((strpos($preview_url, '?') === false) ? '?' : '&').'adtoken='.$this->token.'&ad='.$admin_dir.'&id_employee='.(int)$this->context->employee->id;
- if (!$product->active)
- {
- $admin_dir = dirname($_SERVER['PHP_SELF']);
- $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1);
-
- $preview_url .= $product->active ? '' : '&adtoken='.$this->token.'&ad='.$admin_dir.'&id_employee='.(int)$this->context->employee->id;
- }
}
+
return $preview_url;
}
@@ -3485,7 +3492,7 @@ class AdminProductsControllerCore extends AdminController
$data->assign('languages', $this->_languages);
$data->assign('currency', $currency);
$this->object = $product;
- $this->display = 'edit';
+ //$this->display = 'edit';
$data->assign('product_name_redirected', Product::getProductName((int)$product->id_product_redirected, null, (int)$this->context->language->id));
/*
* Form for adding a virtual product like software, mp3, etc...
@@ -3641,12 +3648,15 @@ class AdminProductsControllerCore extends AdminController
$current_shop_id = (int)$this->context->shop->id;
else
$current_shop_id = 0;
+
+ $languages = Language::getLanguages(true);
$data->assign(array(
'countImages' => $count_images,
'id_product' => (int)Tools::getValue('id_product'),
'id_category_default' => (int)$this->_category->id,
'images' => $images,
+ 'iso_lang' => $languages[0]['iso_code'],
'token' => $this->token,
'table' => $this->table,
'max_image_size' => $this->max_image_size / 1024 / 1024,
diff --git a/controllers/admin/AdminShippingController.php b/controllers/admin/AdminShippingController.php
index 7d804b0f9..ec4d01129 100644
--- a/controllers/admin/AdminShippingController.php
+++ b/controllers/admin/AdminShippingController.php
@@ -37,7 +37,17 @@ class AdminShippingControllerCore extends AdminController
foreach ($carriers as $key => $carrier)
if ($carrier['is_free'])
unset($carriers[$key]);
+
+ $carrier_default_sort = array(
+ array('value' => Carrier::SORT_BY_PRICE, 'name' => $this->l('Price')),
+ array('value' => Carrier::SORT_BY_POSITION, 'name' => $this->l('Position'))
+ );
+ $carrier_default_order = array(
+ array('value' => Carrier::SORT_BY_ASC, 'name' => $this->l('Ascending')),
+ array('value' => Carrier::SORT_BY_DESC, 'name' => $this->l('Descending'))
+ );
+
$this->fields_options = array(
'handling' => array(
'title' => $this->l('Handling'),
@@ -69,73 +79,42 @@ class AdminShippingControllerCore extends AdminController
',
'submit' => array()
),
- 'billing' => array(
- 'title' => $this->l('Billing'),
- 'icon' => 'money',
- 'fields' => array(
- 'PS_SHIPPING_METHOD' => array(
- 'title' => $this->l('Billing'),
+ 'general' => array(
+ 'title' => $this->l('Carrier options'),
+ 'fields' => array(
+ 'PS_CARRIER_DEFAULT' => array(
+ 'title' => $this->l('Default carrier:'),
+ 'desc' => $this->l('Your shop\'s default carrier'),
'cast' => 'intval',
- 'type' => 'radio',
- 'choices' => array(
- 0 => $this->l('According to total price'),
- 1 => $this->l('According to total weight')
- ),
- 'validation' => 'isBool'
+ 'type' => 'select',
+ 'identifier' => 'id_carrier',
+ 'list' => array_merge(
+ array(
+ -1 => array('id_carrier' => -1, 'name' => $this->l('Best price')),
+ -2 => array('id_carrier' => -2, 'name' => $this->l('Best grade'))
+ ),
+ Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::ALL_CARRIERS))
),
- )
- ),
- );
- }
-
- public function initContent()
- {
- $array_carrier = array();
- $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);
- foreach ($carriers as $key => $carrier)
- if ($carrier['is_free'])
- unset($carriers[$key]);
- else
- $array_carrier[] = $carrier['id_carrier'];
-
- $id_carrier = (int)Tools::getValue('id_carrier');
-
- if (count($carriers) && isset($array_carrier[0]))
- {
- if (!$id_carrier)
- $id_carrier = (int)$array_carrier[0];
-
- $carrierSelected = new Carrier((int)$id_carrier);
- }
- else
- $carrierSelected = new Carrier((int)$id_carrier);
-
- $currency = $this->context->currency;
- $rangeObj = $carrierSelected->getRangeObject();
- $rangeTable = $carrierSelected->getRangeTable();
- $suffix = $carrierSelected->getRangeSuffix();
-
- $rangeIdentifier = 'id_'.$rangeTable;
- $ranges = $rangeObj->getRanges($id_carrier);
- $delivery = Carrier::getDeliveryPriceByRanges($rangeTable, $id_carrier);
- $deliveryArray = array();
- foreach ($delivery as $deliv)
- $deliveryArray[$deliv['id_zone']][$deliv['id_carrier']][$deliv[$rangeIdentifier]] = $deliv['price'];
-
- $this->context->smarty->assign(array(
- 'zones' => $carrierSelected->getZones(),
- 'carriers' => $carriers,
- 'ranges' => $ranges,
- 'currency' => $currency,
- 'deliveryArray' => $deliveryArray,
- 'carrierSelected' => $carrierSelected,
- 'id_carrier' => $id_carrier,
- 'suffix' => $suffix,
- 'rangeIdentifier' => $rangeIdentifier,
- 'action_fees' => self::$currentIndex.'&token='.$this->token
- ));
-
- parent::initContent();
+ 'PS_CARRIER_DEFAULT_SORT' => array(
+ 'title' => $this->l('Sort by:'),
+ 'desc' => $this->l('This will only be visible in the Front Office'),
+ 'cast' => 'intval',
+ 'type' => 'select',
+ 'identifier' => 'value',
+ 'list' => $carrier_default_sort
+ ),
+ 'PS_CARRIER_DEFAULT_ORDER' => array(
+ 'title' => $this->l('Order by:'),
+ 'desc' => $this->l('This will only be visible in the Front Office'),
+ 'cast' => 'intval',
+ 'type' => 'select',
+ 'identifier' => 'value',
+ 'list' => $carrier_default_order
+ ),
+ ),
+ 'submit' => array()
+ )
+ );
}
public function postProcess()
diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php
index 74f74010d..47bd270cb 100755
--- a/controllers/admin/AdminShopController.php
+++ b/controllers/admin/AdminShopController.php
@@ -386,7 +386,7 @@ class AdminShopControllerCore extends AdminController
$this->fields_form['input'][] = array(
'type' => 'select',
'label' => $this->l('Category root:'),
- 'desc' => $this->l('This is the root category of the store that you\'ve created. To define a new root category for your store,').'
'.$this->l('Please click here').'',
+ 'desc' => $this->l('This is the root category of the store that you\'ve created. To define a new root category for your store,').'
'.$this->l('Please click here').'',
'name' => 'id_category',
'options' => array(
'query' => $categories,
diff --git a/controllers/admin/AdminShopUrlController.php b/controllers/admin/AdminShopUrlController.php
index f7fd28c78..05d3ca9d1 100644
--- a/controllers/admin/AdminShopUrlController.php
+++ b/controllers/admin/AdminShopUrlController.php
@@ -394,6 +394,42 @@ class AdminShopUrlControllerCore extends AdminController
if ($this->redirect_shop_url)
$this->redirect_after = $object->getBaseURI().basename(_PS_ADMIN_DIR_).'/'.$this->context->link->getAdminLink('AdminShopUrl');
}
+
+ /**
+ * @param string $token
+ * @param integer $id
+ * @param string $name
+ * @return mixed
+ */
+ public function displayDeleteLink($token = null, $id, $name = null)
+ {
+ $tpl = $this->createTemplate('helpers/list/list_action_delete.tpl');
+
+ if (!array_key_exists('Delete', self::$cache_lang))
+ self::$cache_lang['Delete'] = $this->l('Delete', 'Helper');
+
+ if (!array_key_exists('DeleteItem', self::$cache_lang))
+ self::$cache_lang['DeleteItem'] = $this->l('Delete selected item?', 'Helper');
+
+ if (!array_key_exists('Name', self::$cache_lang))
+ self::$cache_lang['Name'] = $this->l('Name:', 'Helper');
+
+ if (!is_null($name))
+ $name = '\n\n'.self::$cache_lang['Name'].' '.$name;
+
+ $data = array(
+ $this->identifier => $id,
+ 'href' => Tools::safeOutput(self::$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&id_shop='.$this->id_shop.'&token='.($token != null ? $token : $this->token)),
+ 'action' => self::$cache_lang['Delete'],
+ );
+
+ if ($this->specificConfirmDelete !== false)
+ $data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name;
+
+ $tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
+
+ return $tpl->fetch();
+ }
}
diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php
index 6b2dc99d0..7c90eceb3 100644
--- a/controllers/admin/AdminStatesController.php
+++ b/controllers/admin/AdminStatesController.php
@@ -236,6 +236,34 @@ class AdminStatesControllerCore extends AdminController
else
parent::postProcess();
}
-}
+ protected function displayAjaxStates()
+ {
+ if ($this->tabAccess['view'] === '1')
+ {
+ $states = Db::getInstance()->executeS('
+ SELECT s.id_state, s.name
+ FROM '._DB_PREFIX_.'state s
+ LEFT JOIN '._DB_PREFIX_.'country c ON (s.`id_country` = c.`id_country`)
+ WHERE s.id_country = '.(int)(Tools::getValue('id_country')).' AND s.active = 1 AND c.`contains_states` = 1
+ ORDER BY s.`name` ASC');
+ if (is_array($states) AND !empty($states))
+ {
+ $list = '';
+ if (Tools::getValue('no_empty') != true)
+ {
+ $empty_value = (Tools::isSubmit('empty_value')) ? Tools::getValue('empty_value') : '----------';
+ $list = '
'."\n";
+ }
+
+ foreach ($states AS $state)
+ $list .= '
'."\n";
+ }
+ else
+ $list = 'false';
+
+ die($list);
+ }
+ }
+}
\ No newline at end of file
diff --git a/controllers/admin/AdminStatsTabController.php b/controllers/admin/AdminStatsTabController.php
index 8f6895ba7..a143841a4 100644
--- a/controllers/admin/AdminStatsTabController.php
+++ b/controllers/admin/AdminStatsTabController.php
@@ -131,8 +131,13 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
$modules = $this->getModules();
$module_instance = array();
- foreach ($modules as $module)
+ foreach ($modules as $m => $module)
+ {
$module_instance[$module['name']] = Module::getInstanceByName($module['name']);
+ $modules[$m]['displayName'] = $module_instance[$module['name']]->displayName;
+ }
+
+ uasort($modules, array($this, 'checkModulesNames'));
$tpl->assign(array(
'current' => self::$currentIndex,
@@ -143,6 +148,11 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
return $tpl->fetch();
}
+
+ public function checkModulesNames($a, $b)
+ {
+ return (bool)($a['displayName'] > $b['displayName']);
+ }
protected function getModules()
{
diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php
index e1cc6f887..b046fe3ea 100644
--- a/controllers/admin/AdminStatusesController.php
+++ b/controllers/admin/AdminStatusesController.php
@@ -231,14 +231,6 @@ class AdminStatusesControllerCore extends AdminController
}
public function renderForm()
- {
- if (Tools::isSubmit('updateorder_state') || Tools::isSubmit('addorder_state'))
- return $this->renderOrderStatusForm();
- else if (Tools::isSubmit('updateorder_return_state') || Tools::isSubmit('addorder_return_state'))
- return $this->renderOrderReturnsForm();
- }
-
- protected function renderOrderStatusForm()
{
$this->fields_form = array(
'tinymce' => true,
@@ -366,7 +358,17 @@ class AdminStatusesControllerCore extends AdminController
'class' => 'button'
)
);
-
+
+ if (Tools::isSubmit('updateorder_state') || Tools::isSubmit('addorder_state'))
+ return $this->renderOrderStatusForm();
+ else if (Tools::isSubmit('updateorder_return_state') || Tools::isSubmit('addorder_return_state'))
+ return $this->renderOrderReturnsForm();
+ else
+ return parent::renderForm();
+ }
+
+ protected function renderOrderStatusForm()
+ {
if (!($obj = $this->loadObject(true)))
return;
diff --git a/controllers/admin/AdminStockInstantStateController.php b/controllers/admin/AdminStockInstantStateController.php
index 04079c882..da2f66f80 100644
--- a/controllers/admin/AdminStockInstantStateController.php
+++ b/controllers/admin/AdminStockInstantStateController.php
@@ -71,7 +71,7 @@ class AdminStockInstantStateControllerCore extends AdminController
'valuation' => array(
'title' => $this->l('Valuation'),
'width' => 150,
- 'orderby' => true,
+ 'orderby' => false,
'search' => false,
'type' => 'price',
'currency' => true,
@@ -92,7 +92,7 @@ class AdminStockInstantStateControllerCore extends AdminController
'real_quantity' => array(
'title' => $this->l('Real quantity'),
'width' => 80,
- 'orderby' => true,
+ 'orderby' => false,
'search' => false,
'hint' => $this->l('Pysical quantity (usable) - Client orders + Supply Orders'),
),
@@ -181,11 +181,13 @@ class AdminStockInstantStateControllerCore extends AdminController
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
- if (Tools::isSubmit('csv') && (int)Tools::getValue('id_warehouse') != -1)
+ if ((Tools::isSubmit('csv_quantities') || Tools::isSubmit('csv_prices')) &&
+ (int)Tools::getValue('id_warehouse') != -1)
$limit = false;
$order_by_valuation = false;
$order_by_real_quantity = false;
+
if ($this->context->cookie->{$this->table.'Orderby'} == 'valuation')
{
unset($this->context->cookie->{$this->table.'Orderby'});
@@ -200,6 +202,7 @@ class AdminStockInstantStateControllerCore extends AdminController
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
$nb_items = count($this->_list);
+
for ($i = 0; $i < $nb_items; ++$i)
{
$item = &$this->_list[$i];
diff --git a/controllers/admin/AdminStockManagementController.php b/controllers/admin/AdminStockManagementController.php
index cb14e032d..22319e557 100644
--- a/controllers/admin/AdminStockManagementController.php
+++ b/controllers/admin/AdminStockManagementController.php
@@ -1060,8 +1060,8 @@ class AdminStockManagementControllerCore extends AdminController
{
$helper->fields_value['id_warehouse_from'] = Tools::getValue('id_warehouse_from', '');
$helper->fields_value['id_warehouse_to'] = Tools::getValue('id_warehouse_to', '');
- $helper->fields_value['usable_from'] = Tools::getValue('usable_from', '');
- $helper->fields_value['usable_to'] = Tools::getValue('usable_to', '');
+ $helper->fields_value['usable_from'] = Tools::getValue('usable_from', '1');
+ $helper->fields_value['usable_to'] = Tools::getValue('usable_to', '1');
}
$this->content .= $helper->generateForm($this->fields_form);
diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php
index 03a001d34..ec9175901 100644
--- a/controllers/admin/AdminStoresController.php
+++ b/controllers/admin/AdminStoresController.php
@@ -296,8 +296,12 @@ class AdminStoresControllerCore extends AdminController
if (!($obj = $this->loadObject(true)))
return;
+
+ if (file_exists(_PS_TMP_IMG_DIR_.$this->table.'_'.(int)$obj->id.'.'.$this->imageType)) {
+ @unlink(_PS_TMP_IMG_DIR_.$this->table.'_'.(int)$obj->id.'.'.$this->imageType);
+ }
- $image = ImageManager::thumbnail(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true);
+ $image = ImageManager::thumbnail(_PS_STORE_IMG_DIR_.DIRECTORY_SEPARATOR.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true, true);
$days = array();
$days[1] = $this->l('Monday');
@@ -316,7 +320,7 @@ class AdminStoresControllerCore extends AdminController
'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'),
'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'),
'image' => $image ? $image : false,
- 'size' => $image ? filesize(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false,
+ 'size' => $image ? filesize(_PS_STORE_IMG_DIR_.DIRECTORY_SEPARATOR.$obj->id.'.jpg') / 1000 : false,
'days' => $days,
'hours' => isset($hours_unserialized) ? $hours_unserialized : false
);
diff --git a/controllers/admin/AdminSuppliersController.php b/controllers/admin/AdminSuppliersController.php
index 22e30efb4..bfe5618a3 100644
--- a/controllers/admin/AdminSuppliersController.php
+++ b/controllers/admin/AdminSuppliersController.php
@@ -94,7 +94,8 @@ class AdminSuppliersControllerCore extends AdminController
'rows' => 10,
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
- 'desc' => $this->l('Will appear in the supplier list')
+ 'desc' => $this->l('Will appear in the supplier list'),
+ 'autoload_rte' => 'rte' //Enable TinyMCE editor for short description
),
array(
'type' => 'text',
diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php
index 25d98a664..5d581be0f 100644
--- a/controllers/admin/AdminSupplyOrdersController.php
+++ b/controllers/admin/AdminSupplyOrdersController.php
@@ -39,6 +39,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
{
$this->context = Context::getContext();
$this->table = 'supply_order';
+
$this->className = 'SupplyOrder';
$this->identifier = 'id_supply_order';
$this->lang = false;
@@ -462,6 +463,8 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->_where .= ' AND st.enclosed != 1';
self::$currentIndex .= '&filter_status=on';
}
+
+ $this->list_id = 'orders';
$first_list = parent::renderList();
if (Tools::isSubmit('csv_orders') || Tools::isSubmit('csv_orders_details') || Tools::isSubmit('csv_order_details'))
@@ -514,6 +517,8 @@ class AdminSupplyOrdersControllerCore extends AdminController
'href' => self::$currentIndex.'&add'.$this->table.'&mod=template&token='.$this->token,
'desc' => $this->l('Add new template')
);
+
+ $this->list_id = 'templates';
// inits list
$second_list = parent::renderList();
@@ -749,7 +754,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'orderby' => false,
'filter' => false,
'search' => false,
- 'hint' => 'Note that you can see details on the receptions - per products',
+ 'hint' => $this->l('Note that you can see details on the receptions - per products'),
),
'quantity_expected' => array(
'title' => $this->l('Quantity expected'),
@@ -1074,9 +1079,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->errors[] = Tools::displayError($this->l('The date you specified cannot be in the past.'));
// gets threshold
- $quantity_threshold = null;
- if (Tools::getValue('load_products') && Validate::isInt(Tools::getValue('load_products')))
- $quantity_threshold = (int)Tools::getValue('load_products');
+ $quantity_threshold = Tools::getValue('load_products');
+
+ if (is_numeric($quantity_threshold))
+ $quantity_threshold = (int)$quantity_threshold;
+ else
+ $quantity_threshold = null;
if (!count($this->errors))
{
@@ -1095,15 +1103,14 @@ class AdminSupplyOrdersControllerCore extends AdminController
//specific discount check
$_POST['discount_rate'] = (float)str_replace(array(' ', ','), array('', '.'), Tools::getValue('discount_rate', 0));
-
}
// manage each associated product
$this->manageOrderProducts();
// if the threshold is defined and we are saving the order
- if (Tools::isSubmit('submitAddsupply_order') && $quantity_threshold != null)
- $this->loadProducts($quantity_threshold);
+ if (Tools::isSubmit('submitAddsupply_order') && Validate::isInt($quantity_threshold))
+ $this->loadProducts((int)$quantity_threshold);
}
// Manage state change
@@ -1186,7 +1193,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
}
// updates receipt
- if (Tools::isSubmit('submitFiltersupply_order_detail') && Tools::isSubmit('submitBulkUpdatesupply_order_detail') && Tools::isSubmit('id_supply_order'))
+ if (Tools::isSubmit('submitBulkUpdatesupply_order_detail') && Tools::isSubmit('id_supply_order'))
$this->postProcessUpdateReceipt();
// use template to create a supply order
@@ -1331,6 +1338,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->errors[] = sprintf(Tools::displayError($this->l('Quantity (%d) for product #%d is not valid')), (int)$quantity, (int)$id_supply_order_detail);
else // everything is valid : updates
{
+
// creates the history
$supplier_receipt_history = new SupplyOrderReceiptHistory();
$supplier_receipt_history->id_supply_order_detail = (int)$id_supply_order_detail;
@@ -1362,7 +1370,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
// first, converts the price to the default currency
$price_converted_to_default_currency = Tools::convertPrice($supply_order_detail->unit_price_te, $supply_order->id_currency, false);
- // then, converts the newly calculated price from the default currency to the needed currency
+ // then, converts the newly calculated pri-ce from the default currency to the needed currency
$price = Tools::ps_round(Tools::convertPrice($price_converted_to_default_currency,
$warehouse->id_currency,
true),
@@ -1378,14 +1386,27 @@ class AdminSupplyOrdersControllerCore extends AdminController
$price,
true,
$supply_order->id);
- if ($res) // if product has been added
+
+ if (!$res)
+ $this->errors[] = Tools::displayError($this->l('Something went wrong when adding products to the warehouse.'));
+
+ $location = Warehouse::getProductLocation($supply_order_detail->id_product,
+ $supply_order_detail->id_product_attribute,
+ $warehouse->id);
+
+ $res = Warehouse::setProductlocation($supply_order_detail->id_product,
+ $supply_order_detail->id_product_attribute,
+ $warehouse->id,
+ $location ? $location : '');
+
+ if ($res)
{
$supplier_receipt_history->add();
$supply_order_detail->save();
$supply_order->save();
}
else
- $this->errors[] = Tools::displayError($this->l('Something went wrong when adding products to the warehouse.'));
+ $this->errors[] = Tools::displayError($this->l('Something went wrong when setting warehouse on product record'));
}
}
}
@@ -1980,7 +2001,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
*/
protected function afterAdd($object)
{
- if (Tools::getValue('load_products') && Validate::isInt(Tools::getValue('load_products')))
+ if (is_numeric(Tools::getValue('load_products')))
$this->loadProducts((int)Tools::getValue('load_products'));
$this->object = $object;
@@ -2053,7 +2074,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
$diff = (int)$threshold - (int)$real_quantity;
}
- if ($diff > 0)
+ if ($diff >= 0)
{
// sets supply_order_detail
$supply_order_detail = new SupplyOrderDetail();
@@ -2066,7 +2087,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
$supply_order_detail->name = Product::getProductName($item['id_product'], $item['id_product_attribute'], $supply_order->id_lang);
$supply_order_detail->ean13 = $item['ean13'];
$supply_order_detail->upc = $item['upc'];
- $supply_order_detail->quantity_expected = (int)$diff;
+ $supply_order_detail->quantity_expected = ((int)$diff == 0) ? 1 : (int)$diff;
$supply_order_detail->exchange_rate = $order_currency->conversion_rate;
$product_currency = new Currency($item['id_currency']);
diff --git a/controllers/admin/AdminTagsController.php b/controllers/admin/AdminTagsController.php
index 7e7ffcf41..57a158d37 100644
--- a/controllers/admin/AdminTagsController.php
+++ b/controllers/admin/AdminTagsController.php
@@ -77,8 +77,23 @@ class AdminTagsControllerCore extends AdminController
public function postProcess()
{
if ($this->tabAccess['edit'] === '1' && Tools::getValue('submitAdd'.$this->table))
+ {
if (($id = (int)Tools::getValue($this->identifier)) && ($obj = new $this->className($id)) && Validate::isLoadedObject($obj))
+ {
+ $previousProducts = $obj->getProducts();
+ $removedProducts = array();
+
+ foreach ($previousProducts as $product)
+ if (!in_array($product['id_product'], $_POST['products']))
+ $removedProducts[] = $product['id_product'];
+
+ if (Configuration::get('PS_SEARCH_INDEXATION'))
+ Search::removeProductsSearchIndex($removedProducts);
+
$obj->setProducts($_POST['products']);
+ }
+ }
+
return parent::postProcess();
}
diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php
index ac37c2d72..c36597348 100644
--- a/controllers/admin/AdminTaxRulesGroupController.php
+++ b/controllers/admin/AdminTaxRulesGroupController.php
@@ -179,6 +179,15 @@ class AdminTaxRulesGroupControllerCore extends AdminController
'stay' => true
)
);
+
+ if (Shop::isFeatureActive())
+ {
+ $this->fields_form['input'][] = array(
+ 'type' => 'shop',
+ 'label' => $this->l('Shop association:'),
+ 'name' => 'checkBoxShopAsso',
+ );
+ }
if (!($obj = $this->loadObject(true)))
return;
@@ -404,7 +413,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController
{
foreach ($this->selected_states as $id_state)
{
- if ($tax_rules_group->hasUniqueTaxRuleForCountry($id_country, $id_state))
+ if ($tax_rules_group->hasUniqueTaxRuleForCountry($id_country, $id_state, $id_rule))
{
$this->errors[] = Tools::displayError('A tax rule already exists for this country/state with tax only behavior');
continue;
@@ -497,5 +506,18 @@ class AdminTaxRulesGroupControllerCore extends AdminController
// TODO: check if the rule already exists
return $tr->validateController();
}
+
+ protected function displayAjaxUpdateTaxRule()
+ {
+ if ($this->tabAccess['view'] === '1')
+ {
+ $id_tax_rule = Tools::getValue('id_tax_rule');
+ $tax_rules = new TaxRule((int)$id_tax_rule);
+ $output = array();
+ foreach ($tax_rules as $key => $result)
+ $output[$key] = $result;
+ die(Tools::jsonEncode($output));
+ }
+ }
}
diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php
index dcf849a53..2d0c63706 100644
--- a/controllers/admin/AdminThemesController.php
+++ b/controllers/admin/AdminThemesController.php
@@ -614,7 +614,7 @@ class AdminThemesControllerCore extends AdminController
$ext = ($field_name == 'PS_STORES_ICON') ? '.gif' : '.jpg';
$logo_name = $logo_prefix.'-'.(int)$id_shop.$ext;
- if (Context::getContext()->shop->getContext() == Shop::CONTEXT_ALL || $id_shop == 0 || Shop::isFeatureActive()==false)
+ if (Context::getContext()->shop->getContext() == Shop::CONTEXT_ALL || $id_shop == 0 || Shop::isFeatureActive() == false)
$logo_name = $logo_prefix.$ext;
if ($field_name == 'PS_STORES_ICON')
diff --git a/controllers/admin/AdminTrackingController.php b/controllers/admin/AdminTrackingController.php
index 4510d998c..d4d35dfc0 100644
--- a/controllers/admin/AdminTrackingController.php
+++ b/controllers/admin/AdminTrackingController.php
@@ -77,6 +77,7 @@ class AdminTrackingControllerCore extends AdminController
public function getCustomListCategoriesEmpty()
{
$this->table = 'category';
+ $this->list_id = 'empty_categories';
$this->lang = true;
$this->className = 'Category';
$this->identifier = 'id_category';
@@ -119,6 +120,7 @@ class AdminTrackingControllerCore extends AdminController
return;
$this->table = 'product';
+ $this->list_id = 'no_stock_products_attributes';
$this->lang = true;
$this->identifier = 'id_product';
$this->_orderBy = 'id_product';
@@ -163,6 +165,7 @@ class AdminTrackingControllerCore extends AdminController
return;
$this->table = 'product';
+ $this->list_id = 'no_stock_products';
$this->className = 'Product';
$this->lang = true;
$this->identifier = 'id_product';
@@ -203,13 +206,13 @@ class AdminTrackingControllerCore extends AdminController
public function getCustomListProductsDisabled()
{
$this->table = 'product';
+ $this->list_id = 'disabled_products';
$this->className = 'Product';
$this->lang = true;
$this->identifier = 'id_product';
$this->_orderBy = 'id_product';
$this->_orderWay = 'DESC';
$this->_filter = 'AND product_shop.`active` = 0';
- $this->list_no_filter = true;
$this->tpl_list_vars = array('sub_title' => $this->l('List of disabled products:'));
$this->show_toolbar = false;
$this->_list_index = 'index.php?controller=AdminProducts';
@@ -266,8 +269,17 @@ class AdminTrackingControllerCore extends AdminController
protected function clearFilters()
{
- if ((Tools::isSubmit('submitResetcategory') && $this->table == 'category' ) || (Tools::isSubmit('submitResetproduct') && $this->table == 'product' ))
- $this->processResetFilters();
+ if (Tools::isSubmit('submitResetcategory'))
+ $this->processResetFilters('empty_categories');
+
+ if (Tools::isSubmit('submitResetproduct'))
+ $this->processResetFilters('no_stock_products_attributes');
+
+ if (Tools::isSubmit('submitResetno_stock_products'))
+ $this->processResetFilters('no_stock_products');
+
+ if (Tools::isSubmit('submitResetdisabled_products'))
+ $this->processResetFilters('disabled_products');
}
public function clearListOptions()
@@ -281,7 +293,6 @@ class AdminTrackingControllerCore extends AdminController
$this->_filter = '';
$this->_group = '';
$this->_where = '';
- $this->list_no_filter = true;
$this->list_title = $this->l('Product disabled');
}
diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php
index 36dbaa061..52b178edc 100644
--- a/controllers/admin/AdminTranslationsController.php
+++ b/controllers/admin/AdminTranslationsController.php
@@ -353,13 +353,15 @@ class AdminTranslationsControllerCore extends AdminController
$items = Language::getFilesList($from_lang, $from_theme, $to_lang, $to_theme, false, false, true);
foreach ($items as $source => $dest)
{
- $bool &= $this->checkDirAndCreate($dest);
- $bool &= @copy($source, $dest);
-
- if (strpos($dest, 'modules') && basename($source) === $from_lang.'.php' && $bool !== false)
- $bool &= $this->changeModulesKeyTranslation($dest, $from_theme, $to_theme);
+ if (!$this->checkDirAndCreate($dest))
+ $this->errors[] = sprintf($this->l('Impossible to create the directory "%s".'), $dest);
+ elseif (!copy($source, $dest))
+ $this->errors[] = sprintf($this->l('Impossible to copy "%s" to "%s".'), $source, $dest);
+ elseif (strpos($dest, 'modules') && basename($source) === $from_lang.'.php' && $bool !== false)
+ if (!$this->changeModulesKeyTranslation($dest, $from_theme, $to_theme))
+ $this->errors[] = sprintf($this->l('Impossible to translate "$dest".'), $dest);
}
- if ($bool)
+ if (!count($this->errors))
$this->redirect(false, 14);
$this->errors[] = $this->l('A part of the data has been copied but some of the language files could not be found.');
}
@@ -458,7 +460,9 @@ class AdminTranslationsControllerCore extends AdminController
if (!$default_language || !Validate::isLanguageIsoCode($default_language))
return false;
// 1 - Scan mails files
- $mails = scandir(_PS_MAIL_DIR_.$default_language.'/');
+ $mails = array();
+ if (Tools::file_exists_cache(_PS_MAIL_DIR_.$default_language.'/'))
+ $mails = scandir(_PS_MAIL_DIR_.$default_language.'/');
$mails_new_lang = array();
@@ -577,7 +581,9 @@ class AdminTranslationsControllerCore extends AdminController
if (preg_match('#^translations\/'.$iso_code.'\/tabs.php#Ui', $file['filename'], $matches) && Validate::isLanguageIsoCode($iso_code))
{
// Include array width new translations tabs
- $tabs = include _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$file['filename'];
+ $tabs = array();
+ if (Tools::file_exists_cache(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$file['filename']))
+ $tabs = include_once(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$file['filename']);
foreach ($tabs as $class_name => $translations)
{
@@ -720,9 +726,8 @@ class AdminTranslationsControllerCore extends AdminController
$arr_import_lang = explode('|', Tools::getValue('params_import_language')); /* 0 = Language ISO code, 1 = PS version */
if (Validate::isLangIsoCode($arr_import_lang[0]))
{
- if ($content = Tools::file_get_contents(
- 'http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip', false,
- @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5)))))
+ $content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.Tools::strtolower($arr_import_lang[0]).'.gzip');
+ if ($content)
{
$file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip';
if ((bool)@file_put_contents($file, $content))
@@ -1064,7 +1069,7 @@ class AdminTranslationsControllerCore extends AdminController
{
case 'front':
// Parsing file in Front office
- $regex = '/\{l\s*s=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*js=1)?\s*\}/U';
+ $regex = '/\{l\s*s=(?|\'('._PS_TRANS_PATTERN_.')\'|"('._PS_TRANS_PATTERN_.')")(\s*sprintf=.*)?(\s*js=1)?\s*\}/U';
break;
case 'back':
@@ -1072,9 +1077,9 @@ class AdminTranslationsControllerCore extends AdminController
if ($type_file == 'php')
$regex = '/this->l\(\''._PS_TRANS_PATTERN_.'\'[\)|\,]/U';
else if ($type_file == 'specific')
- $regex = '/translate\(\''._PS_TRANS_PATTERN_.'\'\)/U';
+ $regex = '/Translate::getAdminTranslation\(\''._PS_TRANS_PATTERN_.'\'\)/U';
else
- $regex = '/\{l\s*s\s*=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*js=1)?(\s*slashes=1)?\s*\}/U';
+ $regex = '/\{l\s*s\s*=(?|\''._PS_TRANS_PATTERN_.'\'|"'._PS_TRANS_PATTERN_.'")(\s*sprintf=.*)?(\s*js=1)?(\s*slashes=1)?\s*\}/U';
break;
case 'errors':
@@ -1088,7 +1093,7 @@ class AdminTranslationsControllerCore extends AdminController
$regex = '/->l\(\''._PS_TRANS_PATTERN_.'\'(, ?\'(.+)\')?(, ?(.+))?\)/U';
else
// In tpl file look for something that should contain mod='module_name' according to the documentation
- $regex = '/\{l\s*s=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"].*\s+mod=\''.$module_name.'\'.*\}/U';
+ $regex = '/\{l\s*s=(?|\''._PS_TRANS_PATTERN_.'\'|"'._PS_TRANS_PATTERN_.'").*\s+mod=\''.$module_name.'\'.*\}/U';
break;
case 'pdf':
@@ -1096,7 +1101,7 @@ class AdminTranslationsControllerCore extends AdminController
if ($type_file == 'php')
$regex = '/HTMLTemplate.*::l\(\''._PS_TRANS_PATTERN_.'\'[\)|\,]/U';
else
- $regex = '/\{l\s*s=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*js=1)?(\s*pdf=\'true\')?\s*\}/U';
+ $regex = '/\{l\s*s=(?|\''._PS_TRANS_PATTERN_.'\'|"'._PS_TRANS_PATTERN_.'")(\s*sprintf=.*)?(\s*js=1)?(\s*pdf=\'true\')?\s*\}/U';
break;
}
@@ -2352,7 +2357,8 @@ class AdminTranslationsControllerCore extends AdminController
foreach ($files_by_directiories['php'] as $dir => $files)
foreach ($files as $file)
- if (Tools::file_exists_cache($dir.$file) && is_file($dir.$file) && !in_array($file, self::$ignore_folder) && preg_match('/\.php$/', $file))
+ // If file exist and is not in ignore_folder, in the next step we check if a folder or mail
+ if (Tools::file_exists_cache($dir.$file) && !in_array($file, self::$ignore_folder))
$subject_mail = $this->getSubjectMail($dir, $file, $subject_mail);
// Get path of directory for find a good path of translation file
@@ -2408,30 +2414,37 @@ class AdminTranslationsControllerCore extends AdminController
*/
protected function getSubjectMail($dir, $file, $subject_mail)
{
- $content = file_get_contents($dir.'/'.$file);
- $content = str_replace("\n", ' ', $content);
+ // If is file and is not in ignore_folder
+ if (is_file($dir.'/'.$file) && !in_array($file, self::$ignore_folder) && preg_match('/\.php$/', $file))
+ {
+ $content = file_get_contents($dir.'/'.$file);
+ $content = str_replace("\n", ' ', $content);
- // Subject must match with a template, therefor we first grep the Mail::Send() function then the Mail::l() inside.
- if (preg_match_all('/Mail::Send([^;]*);/si', $content, $tab))
- for ($i = 0; isset($tab[1][$i]); $i++)
+ // Subject must match with a template, therefor we first grep the Mail::Send() function then the Mail::l() inside.
+ if (preg_match_all('/Mail::Send([^;]*);/si', $content, $tab))
{
- $tab2 = explode(',', $tab[1][$i]);
- if (is_array($tab2) && isset($tab2[1]))
+ for ($i = 0; isset($tab[1][$i]); $i++)
{
- $template = trim(str_replace('\'', '', $tab2[1]));
- foreach ($tab2 as $tab3)
- if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'\)/Us', $tab3.')', $matches))
- {
- if (!isset($subject_mail[$template]))
- $subject_mail[$template] = array();
- if (!in_array($matches[1], $subject_mail[$template]))
- $subject_mail[$template][] = $matches[1];
- }
+ $tab2 = explode(',', $tab[1][$i]);
+ if (is_array($tab2) && isset($tab2[1]))
+ {
+ $template = trim(str_replace('\'', '', $tab2[1]));
+ foreach ($tab2 as $tab3)
+ if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'\)/Us', $tab3.')', $matches))
+ {
+ if (!isset($subject_mail[$template]))
+ $subject_mail[$template] = array();
+ if (!in_array($matches[1], $subject_mail[$template]))
+ $subject_mail[$template][] = $matches[1];
+ }
+ }
}
}
-
- if (!in_array($file, self::$ignore_folder) && is_dir($dir.'/'.$file))
- $subject_mail = $this->getSubjectMail($dir, $file, $subject_mail);
+ }
+ // Of if is colder, we scan colder for check if find in folder and subfolder
+ else if (!in_array($file, self::$ignore_folder) && is_dir($dir.'/'.$file))
+ foreach( scandir($dir.'/'.$file ) as $temp )
+ $subject_mail = $this->getSubjectMail($dir.'/'.$file, $temp, $subject_mail);
return $subject_mail;
}
diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php
index 699a37287..eb17888ce 100644
--- a/controllers/front/AddressController.php
+++ b/controllers/front/AddressController.php
@@ -303,7 +303,9 @@ class AddressControllerCore extends FrontController
$selected_country = (int)$this->_address->id_country;
else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
- $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ // get all countries as language (xy) or language-country (wz-XY)
+ $array = array();
+ preg_match("#(?<=-)\w\w|\w\w(?!-)#",$_SERVER['HTTP_ACCEPT_LANGUAGE'],$array);
if (!Validate::isLanguageIsoCode($array[0]) || !($selected_country = Country::getByIso($array[0])))
$selected_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
}
diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php
index 717937594..79b09cce6 100644
--- a/controllers/front/AuthController.php
+++ b/controllers/front/AuthController.php
@@ -43,7 +43,7 @@ class AuthControllerCore extends FrontController
parent::init();
if (!Tools::getIsset('step') && $this->context->customer->isLogged() && !$this->ajax)
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account'));
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
if (Tools::getValue('create_account'))
$this->create_account = true;
@@ -103,7 +103,9 @@ class AuthControllerCore extends FrontController
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
- $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ // get all countries as language (xy) or language-country (wz-XY)
+ $array = array();
+ preg_match("#(?<=-)\w\w|\w\w(?!-)#",$_SERVER['HTTP_ACCEPT_LANGUAGE'],$array);
if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0])))
$sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
}
@@ -327,7 +329,7 @@ class AuthControllerCore extends FrontController
{
if ($back = Tools::getValue('back'))
Tools::redirect(html_entity_decode($back));
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account'));
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
}
}
}
@@ -467,7 +469,7 @@ class AuthControllerCore extends FrontController
Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping'));
// else : redirection to the account
else
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account'));
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
}
else
$this->errors[] = Tools::displayError('An error occurred while creating your account.');
@@ -606,7 +608,7 @@ class AuthControllerCore extends FrontController
Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping'));
// else : redirection to the account
else
- Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account'));
+ Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : 'my-account'));
}
}
}
diff --git a/controllers/front/CartController.php b/controllers/front/CartController.php
index 828238c7c..cc98424c9 100644
--- a/controllers/front/CartController.php
+++ b/controllers/front/CartController.php
@@ -33,6 +33,7 @@ class CartControllerCore extends FrontController
protected $id_address_delivery;
protected $customization_id;
protected $qty;
+ public $ssl = true;
protected $ajax_refresh = false;
@@ -66,13 +67,13 @@ class CartControllerCore extends FrontController
{
if (Tools::getIsset('add') || Tools::getIsset('update'))
$this->processChangeProductInCart();
- else if (Tools::getIsset('delete'))
+ elseif (Tools::getIsset('delete'))
$this->processDeleteProductInCart();
- else if (Tools::getIsset('changeAddressDelivery'))
+ elseif (Tools::getIsset('changeAddressDelivery'))
$this->processChangeProductAddressDelivery();
- else if (Tools::getIsset('allowSeperatedPackage'))
+ elseif (Tools::getIsset('allowSeperatedPackage'))
$this->processAllowSeperatedPackage();
- else if (Tools::getIsset('duplicate'))
+ elseif (Tools::getIsset('duplicate'))
$this->processDuplicateProduct();
// Make redirection
if (!$this->errors && !$this->ajax)
@@ -178,7 +179,7 @@ class CartControllerCore extends FrontController
if ($this->qty == 0)
$this->errors[] = Tools::displayError('Null quantity.');
- else if (!$this->id_product)
+ elseif (!$this->id_product)
$this->errors[] = Tools::displayError('Product not found');
$product = new Product($this->id_product, true, $this->context->language->id);
@@ -188,23 +189,43 @@ class CartControllerCore extends FrontController
return;
}
+ $qty_to_check = $this->qty;
+ $cart_products = $this->context->cart->getProducts();
+
+ if (is_array($cart_products))
+ foreach ($cart_products as $cart_product)
+ {
+ if ((!isset($this->id_product_attribute) || $cart_product['id_product_attribute'] == $this->id_product_attribute) &&
+ (isset($this->id_product) && $cart_product['id_product'] == $this->id_product))
+ {
+ $qty_to_check = $cart_product['cart_quantity'];
+
+ if (Tools::getValue('op', 'up') == 'down')
+ $qty_to_check -= $this->qty;
+ else
+ $qty_to_check += $this->qty;
+
+ break;
+ }
+ }
+
// Check product quantity availability
if ($this->id_product_attribute)
{
- if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty))
+ if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $qty_to_check))
$this->errors[] = Tools::displayError('There isn\'t enough product in stock.');
}
- else if ($product->hasAttributes())
+ elseif ($product->hasAttributes())
{
$minimumQuantity = ($product->out_of_stock == 2) ? !Configuration::get('PS_ORDER_OUT_OF_STOCK') : !$product->out_of_stock;
$this->id_product_attribute = Product::getDefaultAttribute($product->id, $minimumQuantity);
// @todo do something better than a redirect admin !!
if (!$this->id_product_attribute)
Tools::redirectAdmin($this->context->link->getProductLink($product));
- else if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty))
+ elseif (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $qty_to_check))
$this->errors[] = Tools::displayError('There isn\'t enough product in stock.');
}
- else if (!$product->checkQty($this->qty))
+ elseif (!$product->checkQty($qty_to_check))
$this->errors[] = Tools::displayError('There isn\'t enough product in stock.');
// If no errors, process product addition
diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php
index 33dfc3bf3..d027fafcf 100644
--- a/controllers/front/CategoryController.php
+++ b/controllers/front/CategoryController.php
@@ -53,6 +53,8 @@ class CategoryControllerCore extends FrontController
public function canonicalRedirection($canonicalURL = '')
{
+ if (Tools::getValue('live_edit'))
+ return ;
if (!Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop())
{
$this->redirect_after = '404';
@@ -205,5 +207,13 @@ class CategoryControllerCore extends FrontController
$this->context->smarty->assign('nb_products', $this->nbProducts);
}
+
+ /**
+ * Get instance of current category
+ */
+ public function getCategory()
+ {
+ return $this->category;
+ }
}
diff --git a/controllers/front/CmsController.php b/controllers/front/CmsController.php
index 75877f647..c5a282b00 100644
--- a/controllers/front/CmsController.php
+++ b/controllers/front/CmsController.php
@@ -33,6 +33,8 @@ class CmsControllerCore extends FrontController
public function canonicalRedirection($canonicalURL = '')
{
+ if (Tools::getValue('live_edit'))
+ return ;
if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms)))
parent::canonicalRedirection($canonicalURL);
else if (Validate::isLoadedObject($this->cms_category) && ($canonicalURL = $this->context->link->getCMSCategoryLink($this->cms_category)))
diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php
index d5a136ae3..01941bf4d 100644
--- a/controllers/front/ContactController.php
+++ b/controllers/front/ContactController.php
@@ -37,15 +37,8 @@ class ContactControllerCore extends FrontController
{
if (Tools::isSubmit('submitMessage'))
{
- $fileAttachment = null;
- if (isset($_FILES['fileUpload']['name']) && !empty($_FILES['fileUpload']['name']) && !empty($_FILES['fileUpload']['tmp_name']))
- {
- $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg');
- $filename = uniqid().substr($_FILES['fileUpload']['name'], -5);
- $fileAttachment['content'] = file_get_contents($_FILES['fileUpload']['tmp_name']);
- $fileAttachment['name'] = $_FILES['fileUpload']['name'];
- $fileAttachment['mime'] = $_FILES['fileUpload']['type'];
- }
+ $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg');
+ $fileAttachment = Tools::fileAttachment('fileUpload');
$message = Tools::getValue('message'); // Html entities is not usefull, iscleanHtml check there is no bad html tags.
if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from))
$this->errors[] = Tools::displayError('Invalid email address.');
@@ -55,9 +48,9 @@ class ContactControllerCore extends FrontController
$this->errors[] = Tools::displayError('Invalid message');
else if (!($id_contact = (int)(Tools::getValue('id_contact'))) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id))))
$this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
- else if (!empty($_FILES['fileUpload']['name']) && $_FILES['fileUpload']['error'] != 0)
+ else if (!empty($fileAttachment['name']) && $fileAttachment['error'] != 0)
$this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
- else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -4), $extension) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -5), $extension))
+ else if (!empty($fileAttachment['name']) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -4)), $extension) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -5)), $extension))
$this->errors[] = Tools::displayError('Bad file extension');
else
{
@@ -152,8 +145,8 @@ class ContactControllerCore extends FrontController
$cm = new CustomerMessage();
$cm->id_customer_thread = $ct->id;
$cm->message = Tools::htmlentitiesUTF8($message);
- if (isset($filename) && rename($_FILES['fileUpload']['tmp_name'], _PS_MODULE_DIR_.'../upload/'.$filename))
- $cm->file_name = $filename;
+ if (isset($fileAttachment['rename']) && !empty($fileAttachment['rename']) && rename($fileAttachment['tmp_name'], _PS_MODULE_DIR_.'../upload/'.basename($fileAttachment['rename'])))
+ $cm->file_name = $fileAttachment['rename'];
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
$cm->user_agent = $_SERVER['HTTP_USER_AGENT'];
if (!$cm->add())
@@ -173,8 +166,8 @@ class ContactControllerCore extends FrontController
'{product_name}' => '',
);
- if (isset($filename))
- $var_list['{attached_file}'] = $_FILES['fileUpload']['name'];
+ if (isset($fileAttachment['name']))
+ $var_list['{attached_file}'] = $fileAttachment['name'];
$id_order = (int)Tools::getValue('id_order');
@@ -197,10 +190,6 @@ class ContactControllerCore extends FrontController
$var_list['{product_name}'] = $product->name[Context::getContext()->language->id];
}
-
-
-
-
if (empty($contact->email))
Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $fileAttachment);
else
@@ -296,5 +285,4 @@ class ContactControllerCore extends FrontController
$this->context->smarty->assign('orderedProductList', $products);
}
}
-}
-
+}
\ No newline at end of file
diff --git a/controllers/front/IdentityController.php b/controllers/front/IdentityController.php
index 048a1d07a..7f0eb50b4 100644
--- a/controllers/front/IdentityController.php
+++ b/controllers/front/IdentityController.php
@@ -57,13 +57,14 @@ class IdentityControllerCore extends FrontController
{
$email = trim(Tools::getValue('email'));
$this->customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']);
- $_POST['old_passwd'] = trim($_POST['old_passwd']);
+ if (isset($_POST['old_passwd']))
+ $_POST['old_passwd'] = trim($_POST['old_passwd']);
if (!Validate::isEmail($email))
$this->errors[] = Tools::displayError('This email address is not valid');
elseif ($this->customer->email != $email && Customer::customerExists($email, true))
$this->errors[] = Tools::displayError('An account using this email address has already been registered.');
- elseif (empty($_POST['old_passwd']) || (Tools::encrypt($_POST['old_passwd']) != $this->context->cookie->passwd))
+ elseif ((!isset($_POST['old_passwd']) || empty($_POST['old_passwd'])) || (Tools::encrypt($_POST['old_passwd']) != $this->context->cookie->passwd))
$this->errors[] = Tools::displayError('The password you entered is incorrect.');
elseif ($_POST['passwd'] != $_POST['confirmation'])
$this->errors[] = Tools::displayError('The password and confirmation do not match.');
diff --git a/controllers/front/ManufacturerController.php b/controllers/front/ManufacturerController.php
index 1aa4ae22e..4cc8d6b62 100644
--- a/controllers/front/ManufacturerController.php
+++ b/controllers/front/ManufacturerController.php
@@ -40,6 +40,8 @@ class ManufacturerControllerCore extends FrontController
public function canonicalRedirection($canonicalURL = '')
{
+ if (Tools::getValue('live_edit'))
+ return ;
if (Validate::isLoadedObject($this->manufacturer))
parent::canonicalRedirection($this->context->link->getManufacturerLink($this->manufacturer));
}
@@ -113,6 +115,9 @@ class ManufacturerControllerCore extends FrontController
{
$data = Manufacturer::getManufacturers(true, $this->context->language->id, true, false, false, false);
$nbProducts = count($data);
+ $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
+ $this->p = abs((int)(Tools::getValue('p', 1)));
+ $data = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, $this->n, false);
$this->pagination($nbProducts);
foreach ($data as &$item)
@@ -129,4 +134,12 @@ class ManufacturerControllerCore extends FrontController
else
$this->context->smarty->assign('nbManufacturers', 0);
}
+
+ /**
+ * Get instance of current manufacturer
+ */
+ public function getManufacturer()
+ {
+ return $this->manufacturer;
+ }
}
diff --git a/controllers/front/OrderController.php b/controllers/front/OrderController.php
index 37b5d90b8..3704de6d3 100644
--- a/controllers/front/OrderController.php
+++ b/controllers/front/OrderController.php
@@ -155,14 +155,18 @@ class OrderControllerCore extends ParentOrderController
Tools::redirect('index.php?controller=order&step=2');
Context::getContext()->cookie->check_cgv = true;
- // Check the delivery option is setted
+ // Check the delivery option is set
if (!$this->context->cart->isVirtualCart())
{
if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier)
Tools::redirect('index.php?controller=order&step=2');
elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier)
{
- foreach (Tools::getValue('delivery_option') as $delivery_option)
+ $deliveries_options = Tools::getValue('delivery_option');
+ if (!$deliveries_options) {
+ $deliveries_options = $this->context->cart->delivery_option;
+ }
+ foreach ($deliveries_options as $delivery_option)
if (empty($delivery_option))
Tools::redirect('index.php?controller=order&step=2');
}
diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php
index 7063114dc..a5f9321c1 100644
--- a/controllers/front/OrderDetailController.php
+++ b/controllers/front/OrderDetailController.php
@@ -114,6 +114,7 @@ class OrderDetailControllerCore extends FrontController
if (Tools::getValue('ajax') != 'true')
Tools::redirect('index.php?controller=order-detail&id_order='.(int)$idOrder);
+ $this->context->smarty->assign('message_confirmation', true);
}
else
$this->errors[] = Tools::displayError('Order not found');
diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php
index 9c152b127..8b6f6d0a0 100644
--- a/controllers/front/OrderOpcController.php
+++ b/controllers/front/OrderOpcController.php
@@ -28,6 +28,8 @@ class OrderOpcControllerCore extends ParentOrderController
{
public $php_self = 'order-opc';
public $isLogged;
+
+ protected $ajax_refresh = false;
/**
* Initialize order opc controller
@@ -199,8 +201,28 @@ class OrderOpcControllerCore extends ParentOrderController
}
// Address has changed, so we check if the cart rules still apply
+ $cart_rules = $this->context->cart->getCartRules();
CartRule::autoRemoveFromCart($this->context);
CartRule::autoAddToCart($this->context);
+ if ((int)Tools::getValue('allow_refresh'))
+ {
+ // If the cart rules has changed, we need to refresh the whole cart
+ $cart_rules2 = $this->context->cart->getCartRules();
+ if (count($cart_rules2) != count($cart_rules))
+ $this->ajax_refresh = true;
+ else
+ {
+ $rule_list = array();
+ foreach ($cart_rules2 as $rule)
+ $rule_list[] = $rule['id_cart_rule'];
+ foreach ($cart_rules as $rule)
+ if (!in_array($rule['id_cart_rule'], $rule_list))
+ {
+ $this->ajax_refresh = true;
+ break;
+ }
+ }
+ }
if (!$this->context->cart->isMultiAddressDelivery())
$this->context->cart->setNoMultishipping(); // As the cart is no multishipping, set each delivery address lines with the main delivery address
@@ -215,7 +237,8 @@ class OrderOpcControllerCore extends ParentOrderController
'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'),
'HOOK_PAYMENT' => $this->_getPaymentMethods(),
'gift_price' => Tools::displayPrice(Tools::convertPrice(Product::getTaxCalculationMethod() == 1 ? $wrapping_fees : $wrapping_fees_tax_inc, new Currency((int)($this->context->cookie->id_currency)))),
- 'carrier_data' => $this->_getCarrierList()),
+ 'carrier_data' => $this->_getCarrierList(),
+ 'refresh' => (bool)$this->ajax_refresh),
$this->getFormatedSummaryDetail()
);
die(Tools::jsonEncode($result));
@@ -531,7 +554,9 @@ class OrderOpcControllerCore extends ParentOrderController
$free_shipping = true;
break;
}
- }
+ }
+
+ $this->context->smarty->assign('isVirtualCart', $this->context->cart->isVirtualCart());
$vars = array(
'free_shipping' => $free_shipping,
@@ -591,13 +616,21 @@ class OrderOpcControllerCore extends ParentOrderController
protected function _processAddressFormat()
{
- $selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT'));
-
$address_delivery = new Address((int)$this->context->cart->id_address_delivery);
$address_invoice = new Address((int)$this->context->cart->id_address_invoice);
$inv_adr_fields = AddressFormat::getOrderedAddressFields((int)$address_delivery->id_country, false, true);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields((int)$address_invoice->id_country, false, true);
+ $requireFormFieldsList = AddressFormat::$requireFormFieldsList;
+
+ // Add missing require fields for a new user susbscription form
+ foreach ($requireFormFieldsList as $fieldName)
+ if (!in_array($fieldName, $dlv_adr_fields))
+ $dlv_adr_fields[] = trim($fieldName);
+
+ foreach ($requireFormFieldsList as $fieldName)
+ if (!in_array($fieldName, $inv_adr_fields))
+ $inv_adr_fields[] = trim($fieldName);
$inv_all_fields = array();
$dlv_all_fields = array();
@@ -608,6 +641,9 @@ class OrderOpcControllerCore extends ParentOrderController
foreach (explode(' ', $fields_line) as $field_item)
${$adr_type.'_all_fields'}[] = trim($field_item);
+ ${$adr_type.'_adr_fields'} = array_unique(${$adr_type.'_adr_fields'});
+ ${$adr_type.'_all_fields'} = array_unique(${$adr_type.'_all_fields'});
+
$this->context->smarty->assign($adr_type.'_adr_fields', ${$adr_type.'_adr_fields'});
$this->context->smarty->assign($adr_type.'_all_fields', ${$adr_type.'_all_fields'});
}
diff --git a/controllers/front/PageNotFoundController.php b/controllers/front/PageNotFoundController.php
index a2483d4ca..98babe654 100644
--- a/controllers/front/PageNotFoundController.php
+++ b/controllers/front/PageNotFoundController.php
@@ -40,6 +40,20 @@ class PageNotFoundControllerCore extends FrontController
if (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('png', 'jpg', 'gif')))
{
+ if ((bool)Configuration::get('PS_REWRITING_SETTINGS'))
+ preg_match('#([0-9]+)(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/(.+)\.(png|jpg|gif)$#', $_SERVER['REQUEST_URI'], $matches);
+ if ((!isset($matches[2]) || empty($matches[2])) && !(bool)Configuration::get('PS_REWRITING_SETTINGS'))
+ preg_match('#/([0-9]+)(\-[_a-zA-Z]*)\.(png|jpg|gif)$#', $_SERVER['REQUEST_URI'], $matches);
+
+ if (is_array($matches) && !empty($matches[2]) && Tools::strtolower(substr($matches[2], -8)) != '_default' && is_numeric($matches[1]))
+ {
+ $matches[2] = substr($matches[2], 1, Tools::strlen($matches[2])).'_default';
+ if (!isset($matches[4]))
+ $matches[4] = '';
+ header('Location: '.$this->context->link->getImageLink($matches[4], $matches[1], $matches[2]), true, 302);
+ exit;
+ }
+
header('Content-Type: image/gif');
readfile(_PS_IMG_DIR_.'404.gif');
exit;
diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php
index a60f194b1..10e17bb85 100644
--- a/controllers/front/ParentOrderController.php
+++ b/controllers/front/ParentOrderController.php
@@ -399,6 +399,7 @@ class ParentOrderControllerCore extends FrontController
// Getting a list of formated address fields with associated values
$formatedAddressFieldsValuesList = array();
+
foreach ($customerAddresses as $i => $address)
{
if (!Address::isCountryActiveById((int)($address['id_address'])))
@@ -411,6 +412,10 @@ class ParentOrderControllerCore extends FrontController
unset($tmpAddress);
}
+
+ if (key($customerAddresses) != 0)
+ $customerAddresses = array_values($customerAddresses);
+
$this->context->smarty->assign(array(
'addresses' => $customerAddresses,
'formatedAddressFieldsValuesList' => $formatedAddressFieldsValuesList));
diff --git a/controllers/front/PasswordController.php b/controllers/front/PasswordController.php
index 1a7959887..650b8fabf 100644
--- a/controllers/front/PasswordController.php
+++ b/controllers/front/PasswordController.php
@@ -36,10 +36,11 @@ class PasswordControllerCore extends FrontController
{
if (Tools::isSubmit('email'))
{
- if (!($email = Tools::getValue('email')) || !Validate::isEmail($email))
+ if (!($email = trim(Tools::getValue('email'))) || !Validate::isEmail($email))
$this->errors[] = Tools::displayError('Invalid email address.');
else
{
+
$customer = new Customer();
$customer->getByemail($email);
if (!Validate::isLoadedObject($customer))
@@ -57,7 +58,7 @@ class PasswordControllerCore extends FrontController
'{url}' => $this->context->link->getPageLink('password', true, null, 'token='.$customer->secure_key.'&id_customer='.(int)$customer->id)
);
if (Mail::Send($this->context->language->id, 'password_query', Mail::l('Password query confirmation'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
- $this->context->smarty->assign(array('confirmation' => 2, 'email' => $customer->email));
+ $this->context->smarty->assign(array('confirmation' => 2, 'customer_email' => $customer->email));
else
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
}
@@ -90,7 +91,7 @@ class PasswordControllerCore extends FrontController
'{passwd}' => $password
);
if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
- $this->context->smarty->assign(array('confirmation' => 1, 'email' => $customer->email));
+ $this->context->smarty->assign(array('confirmation' => 1, 'customer_email' => $customer->email));
else
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
}
diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php
index d55dc92b9..ed2454ab6 100644
--- a/controllers/front/ProductController.php
+++ b/controllers/front/ProductController.php
@@ -69,6 +69,8 @@ class ProductControllerCore extends FrontController
public function canonicalRedirection($canonical_url = '')
{
+ if (Tools::getValue('live_edit'))
+ return ;
if (Validate::isLoadedObject($this->product))
parent::canonicalRedirection($this->context->link->getProductLink($this->product));
}
@@ -158,8 +160,7 @@ class ProductControllerCore extends FrontController
$this->category = new Category($regs[5], (int)$this->context->cookie->id_lang);
}
}
- else
- // Set default product category
+ if (!isset($this->category))
$this->category = new Category($this->product->id_category_default, (int)$this->context->cookie->id_lang);
}
}
@@ -659,4 +660,9 @@ class ProductControllerCore extends FrontController
}
return $specific_prices;
}
+
+ public function getProduct()
+ {
+ return $this->product;
+ }
}
\ No newline at end of file
diff --git a/controllers/front/SupplierController.php b/controllers/front/SupplierController.php
index 5d39df6d6..78fda9152 100644
--- a/controllers/front/SupplierController.php
+++ b/controllers/front/SupplierController.php
@@ -41,6 +41,8 @@ class SupplierControllerCore extends FrontController
public function canonicalRedirection($canonicalURL = '')
{
+ if (Tools::getValue('live_edit'))
+ return ;
if (Validate::isLoadedObject($this->supplier))
parent::canonicalRedirection($this->context->link->getSupplierLink($this->supplier));
}
diff --git a/css/admin.css b/css/admin.css
index f5201ec60..7e82e6f62 100644
--- a/css/admin.css
+++ b/css/admin.css
@@ -332,6 +332,8 @@ select optgroup option {
.lab_modules_positions img {
float:left;
+ width:32px;
+ height:32px;
}
@@ -486,6 +488,7 @@ select optgroup option {
border: 1px solid #CC0000;
color:#D8000C;
}
+
#content .conf a, #content .warn a, #content .error a {
color:#D8000C;
font-weight: bold;
@@ -567,6 +570,12 @@ select optgroup option {
background: url(../img/admin/warning.gif) no-repeat 0 0;
}
+#blockNewVersionCheck .warn h3 {
+ padding: 0 0 0 5px;
+ margin: 0px;
+ background: none;
+}
+
#content .error h3 {
padding: 0 0 0 20px;
background: url(../img/admin/warning.gif) no-repeat 0 0;
@@ -1872,6 +1881,7 @@ div.progressBarImage
height: 15px;
margin-left: 3px;
width: 233px;
+ position:relative;
}
#showCounter
{
@@ -2394,3 +2404,269 @@ margin-bottom:7px;
min-width: 205px;
width: 205px;
}
+
+
+/******************** CSS Carrier Wizard ************************/
+#carrier_wizard.swMain {
+ position:relative;
+ display:block;
+ margin:0;
+ padding:0;
+ float:left;
+ min-width: 980px;
+ width: 100%;
+}
+#carrier_wizard.swMain .stepContainer {
+ display:block;
+ position: relative;
+ margin: 0;
+ padding:0;
+ overflow:hidden;
+ clear:both;
+}
+#carrier_wizard.swMain .stepContainer div.content {
+ width: 100%;
+ display:block;
+ position: absolute;
+ float:left;
+ margin: 0;
+ padding: 0;
+ text-align:left;
+ overflow:visible;
+ z-index:88;
+ clear:both;
+}
+#carrier_wizard.swMain div.actionBar {
+ display:block;
+ position: relative;
+ clear:both;
+ padding: 0;
+ text-align:left;
+ overflow:auto;
+ z-index:88;
+ background-color: #f7f8f7;
+ border: 1px solid #caccca;
+ height: 37px;
+ margin-bottom: 20px;
+}
+#carrier_wizard.swMain .stepContainer .StepTitle {
+ display:block;
+ position: relative;
+ margin:0;
+ padding:5px;
+ clear:both;
+ text-align:left;
+ z-index:88;
+ -webkit-border-radius: 5px;
+ -moz-border-radius : 5px;
+}
+#carrier_wizard.swMain ul.anchor {
+ position: relative;
+ display:block;
+ float:left;
+ list-style: none;
+ padding: 0;
+ margin: 0 0 10px 0;
+ clear: both;
+ width: 100%;
+}
+
+#carrier_wizard.swMain ul.anchor li{
+ position: relative;
+ display:block;
+ margin: 0;
+ padding: 0;
+ float: left;
+}
+#carrier_wizard.swMain ul.nbr_steps_4.anchor li{
+ width: 25%;
+}
+#carrier_wizard.swMain ul.nbr_steps_5.anchor li{
+ width: 20%;
+}
+#carrier_wizard.swMain ul.anchor li a {
+ height: 32px;
+ display:block;
+ position:relative;
+ margin: 0;
+ padding-right: 25px;
+ text-decoration: none;
+ outline-style:none;
+ z-index:99;
+ overflow: hidden;
+}
+#carrier_wizard.swMain ul.anchor li a .stepNumber{
+ position:relative;
+ float:left;
+ width: 24px;
+ height: 32px;
+ text-align: center;
+ padding:0 5px;
+ padding-top:0;
+ font-size: 30px;
+ line-height: 32px;
+ color: #fffffe;
+ text-shadow: none;
+ font-weight: normal;
+ font-style: normal;
+}
+#carrier_wizard.swMain ul.anchor li a .stepDesc{
+ position:relative;
+ text-align: left;
+ font-size: 15px;
+ height: 32px;
+ display: table-cell;
+ vertical-align: middle;
+ line-height: 13px;
+}
+#carrier_wizard.swMain ul.anchor li a.selected{
+ color:#F8F8F8;
+ cursor:text;
+ background: #404956 url(../img/admin/steps-carrierwizard.png) no-repeat right -32px;
+}
+#carrier_wizard.swMain ul.anchor li a.done,
+#carrier_wizard.swMain ul.anchor li.done.selected a.selected {
+ position:relative;
+ color:#FFF;
+ background: url(../img/admin/steps-carrierwizard.png) right 0 no-repeat #3f4856;
+ z-index:99;
+}
+#carrier_wizard.swMain ul.anchor li a.disabled {
+ cursor:text;
+ background: url(../img/admin/steps-carrierwizard.png) right -64px no-repeat #cbcccb;
+ color: #878787;
+}
+#carrier_wizard.swMain .buttonNext {
+ display:block;
+ float:right;
+ margin:5px 3px 0 3px;
+ padding:5px;
+ text-decoration: none;
+ text-align: center;
+ width:100px;
+ color:#FFF;
+ outline-style:none;
+ background-color: #5A5655;
+ border: 1px solid #5A5655;
+ -moz-border-radius : 5px;
+ -webkit-border-radius: 5px;
+}
+#carrier_wizard.swMain .buttonDisabled {
+ color:#F8F8F8 !important;
+ background-color: #CCCCCC !important;
+ border: 1px solid #CCCCCC !important;
+ cursor:text;
+}
+#carrier_wizard.swMain .buttonPrevious {
+ display:block;
+ float:right;
+ margin:5px 3px 0 3px;
+ padding:5px;
+ text-decoration: none;
+ text-align: center;
+ width:100px;
+ color:#FFF;
+ outline-style:none;
+ background-color: #5A5655;
+ border: 1px solid #5A5655;
+ -moz-border-radius : 5px;
+ -webkit-border-radius: 5px;
+}
+#carrier_wizard.swMain .buttonFinish {
+ display:block;
+ float:right;
+ margin:5px 10px 0 3px;
+ padding:5px;
+ text-decoration: none;
+ text-align: center;
+ width:100px;
+ color:#FFF;
+ outline-style:none;
+ background-color: #5A5655;
+ border: 1px solid #5A5655;
+ -moz-border-radius : 5px;
+ -webkit-border-radius: 5px;
+}
+#carrier_logo_block{
+ position: absolute;
+ right: 10px;
+ padding: 0;
+ margin: 0;
+}
+#carrier_wizard.swMain .msgBox {
+ position:relative;
+ display:none;
+ float:left;
+ margin: 4px 0 0 5px;
+ padding:5px;
+ border: 1px solid #FFD700;
+ background-color: #FFFFDD;
+ color:#5A5655;
+ -moz-border-radius : 5px;
+ -webkit-border-radius: 5px;
+ z-index:999;
+ min-width:200px;
+}
+#carrier_wizard.swMain .msgBox .content {
+ padding: 0px;
+ float:left;
+}
+#carrier_wizard.swMain .msgBox .close {
+ border: 1px solid #CCC;
+ border-radius: 3px;
+ color: #CCC;
+ display: block;
+ float: right;
+ margin: 0 0 0 5px;
+ outline-style: none;
+ padding: 0 2px 0 2px;
+ position: relative;
+ text-align: center;
+ text-decoration: none;
+}
+#carrier_wizard.swMain .msgBox .close:hover{color: #EA8511;border: 1px solid #EA8511;}
+#carrier_wizard.swMain ul.anchor li a.done .stepNumber {color: #A9B6C8;text-shadow: none;}
+#carrier_wizard.swMain ul.anchor li a.done .stepDesc {color: #A9B6C8;text-shadow: none;}
+#carrier_wizard .border_top {border-top:solid 1px #C0C0C0;}
+#carrier_wizard .border_bottom {border-bottom:solid 1px #C0C0C0;}
+#carrier_wizard .border_left {border-left:solid 1px #C0C0C0;}
+#carrier_wizard .border_right {border-right:solid 1px #C0C0C0;}
+#carrier_wizard .border_all {border:solid 1px #C0C0C0;}
+#carrier_wizard input.field_error {border : solid 1px red; background-color:#FFCCCC;}
+#carrier_wizard table td.center {text-align: center}
+#carrier_wizard .new_range, #carrier_wizard .validate_range {float: left; margin: 35px 0 0 10px; width: 130px;}
+#carrier_wizard tr.fees_all { background: #CCCCCC}
+#carrier_wizard #zones_table input[type=text] {width: 45px;}
+#carrier_wizard #fieldset_form { min-height: 190px}
+#carrier_wizard #zone_ranges label { float: none; width: inherit }
+#carrier_wizard #step_carrier_summary label {width: 40px}
+#carrier_wizard #step_carrier_summary .margin-form {padding-left: 60px;}
+#carrier_wizard #summary_zones, #carrier_wizard #summary_groups, #carrier_wizard #summary_shops {margin-left: 20px; margin-top: 10px; list-style: disc}
+#carrier_wizard .ranges_not_follow label {width: inherit; float:none}
+#carrier_wizard .ranges_not_follow {width: 300px; margin-bottom: 0}
+#carrier_wizard .assoShop { min-height: inherit}
+
+/*** IE10 ***/
+/*@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ #carrier_wizard.swMain ul.anchor li a{padding: 3px 19px 3px 19px;}
+ #carrier_wizard.swMain ul.anchor li{padding-right: 60px;}
+ #carrier_wizard.swMain ul.nbr_steps_3 li{ min-width: 30%;}
+ #carrier_wizard.swMain ul.nbr_steps_4 li{ min-width: 21.7%;}
+ #carrier_wizard.swMain ul.nbr_steps_5 li{ min-width: 16.7%;}
+
+}
+.ie9 #carrier_wizard.swMain ul.anchor li a,
+.ie8 #carrier_wizard.swMain ul.anchor li a{padding: 3px 19px 3px 19px;}
+.ie9 #carrier_wizard.swMain ul.anchor li,
+.ie8 #carrier_wizard.swMain ul.anchor li,
+.ie7 #carrier_wizard.swMain ul.anchor li{padding-right: 60px;}
+.ie7 #carrier_wizard.swMain ul.anchor li a{padding: 3px 19px 3px 19px;}
+.ie9 #carrier_wizard.swMain ul.nbr_steps_3 li,
+.ie8 #carrier_wizard.swMain ul.nbr_steps_3 li{ min-width: 30%;}
+.ie9 #carrier_wizard.swMain ul.nbr_steps_4 li,
+.ie8 #carrier_wizard.swMain ul.nbr_steps_4 li{ min-width: 21.7%;}
+.ie9 #carrier_wizard.swMain ul.nbr_steps_5 li,
+.ie8 #carrier_wizard.swMain ul.nbr_steps_5 li{ min-width: 16.7%;}
+.ie7 #carrier_wizard.swMain ul.nbr_steps_3 li{ width: 312px;}
+.ie7 #carrier_wizard.swMain ul.nbr_steps_4 li{ width: 312px;}
+.ie7 #carrier_wizard.swMain ul.nbr_steps_5 li{ width: 312px;}*/
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index 7244ffb36..7bdda3762 100755
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -1,4 +1,4 @@
-2007-2012 PrestaShop
+2007-2013 PrestaShop
NOTICE OF LICENSE
@@ -17,12 +17,519 @@ versions in the future. If you wish to customize PrestaShop for your
needs please refer to http://www.prestashop.com for more information.
@author PrestaShop SA
-@copyright 2007-2012 PrestaShop SA
+@copyright 2007-2013 PrestaShop SA
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registred Trademark & Property of PrestaShop SA
Release Notes for PrestaShop 1.5
--------------------------------
+####################################
+# v1.5.5.0 - (2013-08-22) #
+####################################
+
+ Fixed bugs:
+
+ [-] Installer : added ob_start() (required with the cookie mode when debug mode is activated)
+ [-] Installer : fixed clear smarty cache
+ [-] Installer : changed syntax from $class:func to call_user_func because it seems to be more compliant with old PHP versions
+ [-] INSTALLER : Force update of PS_LEGACY_IMAGES to 0
+ [-] INSTALLER : missing parenthesis in SQL in set_product_suppliers, thanks to @EvaldasUzkuras
+ [-] INSTALLER : Fix bug while updateing supplier reference, back from https://github.com/PrestaShop/PrestaShop/pull/618 thanks @EvaldasUzkuras
+ [-] Installer: update leftcolumn alias to enable live_edit on blockmyaccount
+ [-] INSTALLER : Errors in upgrader
+ [-] INSTALLER : Fix SQL warnings when upgrading
+ [-] INSTALLER : fix bug when updating add_new_tab not defined
+ [-] INSTALLER : Remove warnings
+ [-] Installer: Fix some sql queries
+ [-] INSTALLER : Shown index can return empty array
+ [-] INSTALLER : Prevent crash when populating data, MACOSX OS creates hidden files
+ [-] INSTALLER : Fix bug #PSCFV-8813 1.4.7.0.sql not uptodate
+ [-] INSTALLER : Fix bug #PSCFV-8813 missing file PHP:setAllGroupsOnHomeCategory();
+ [-] INSTALLER : Create reinsurance_lang when updating from below 1.5.0.13
+ [-] INSTALLER : SQL error during upgrade from 1.5.0.13
+ [-] INSTALLER : SQL error during upgrade from 1.5.0.9
+ [-] INSTALLER : Fix bug #PSCFV-8605 loop on ressource wether than n array
+ [-] INSTALLER : Fix bug #PSCFI-7075 too short column in PREFIX_webservice_account
+ [-] INSTALLER : Fix bug #PSCFV-8605 first part, do not affect memeory limit when upgrading if set to -1
+ [-] INSTALLER : Fix bug #PSCFV-8750 do not activate disabled module during upgrade
+
+ [-] FO : fixed bad search redirection #PSCFV-10158
+ [-] FO : FixBug Missing PS_STOCK_MANAGEMENT smarty variable
+ [-] FO : fixed html tags that should not appear in blockcategories
+ [-] FO: Fix quantity discount table display for non default attribute #PSCFV-9942
+ [-] FO : FixBug #PSCFV-10058 - Missing required form fields in address format
+ [-] FO : FixBug #PSCFV-10090 urlencode syntax error - Thanks Duarte
+ [-] FO : FixBug #PSCFV-10058 Invalid id country after allow to select no country
+ [-] FO : FixBug CGV does not pop-up in Fancy Box
+ [-] FO : FixBug generated_date error
+ [-] FO : input token missplaced in address.tpl
+ [-] FO : Do not redirect on 301 when POST request
+ [-] FO :ProductSale::getBestSales() by modified date renders SQL error, thanks @SebSept
+ [-] FO : expiration date not displayed in email for downloadable product
+ [-] FO : FixBug No warning message when no carriers available from advanced stock management
+ [-] Fo : Bad date format in order-detail, merge from https://github.com/PrestaShop/PrestaShop/pull/476 thanks @gbelorgey
+ [-] FO: fixed bug shopping cart price misplaced - #9971
+ [-] FO : Fix bug #PSCFV-9856 could not add Uncombinable cart rules and Minimum amount check badly calculated
+ [-] FO : Fix bug #PSCFV-9993 could not see product quantity in pack content
+ [-] FO : Fix bug #PSCFV-9847 Cart Rule not updated when address is updated on Checkout Page
+ [-] FO : FixBug #PSCFV-9846 Bookmark title escape problem on special language
+ [-] FO : FixBug #PSCFV-9766 All products in products list for email confirmation with multi-shipping
+ [-] FO : FixBug Wrong offset in more than one shipping address
+ [-] FO : FixBug #PSCFV-9961 Remove wishlists icon
+ [-] FO : FixBug #PSCFV-9951 Syntax error - Thanks to Oleacorner-Olivier B
+ [-] FO : Force browser language detection in Tools::setCookieLanguage
+ [-] FO : FixBug #PSCFV-9879 Email confirmation message not present
+ [-] FO : Prevent unsassigned category id, thans @PrestaCaptainFLAM
+ [-] FO : fixed pagination for p = 0 #PSCFV-9746
+ [-] FO : Removed useless live edit query #PSCFV-9845
+ [-] FO : FixBug of total products from supliers and manufacturer
+ [-] FO : FixBug #PSCFV-8018 All products was counted in manufacturer lsit even if products was set as hidden
+ [-] FO : FixBug #PSCFV-8018 All products was counted in manufacturer list even hidden products
+ [-] FO : FixBug #PSCFV-7723 Bad manufacturers list pagination
+ [-] FO : fixed group query for cart rules #PSCFV-8992
+ [-] FO : Fixed partial use of cart rules which does not offer free shipping #PSCFV-9216
+ [-] FO : Fix bug #PSCFV-9662 udpate payments means after delete thanks @maofree
+ [-] FO : Fix bug #PSCFV-9754 do not use back url on cart summary link in steps
+ [-] FO : fixed useless error when the product id in the URL is not an int #PSCFV-9726
+ [-] FO : Fix bug #PSCFV-9021 : bad category id for breadcrumb on product when url rewrite is on
+ [-] FO : you cannot access the front office with a disabled language anymore #PSCFV-9714
+ [-] FO : fixed bad condition in the dispatcher rules
+ [-] FO : Fix bug #PSCFV-9653 could not return a custom product
+ [-] FO : could not see old_price_display when specific price on one combination
+ [-] FO : Bad specific price for a combination // sorry
+ [-] FO : Bad specific price for a combination
+ [-] FO : Fix bug #PSCFV-9355 dleete button missing for custo in blockcart
+ [-] FO : Fix bug #PSCFV-9669, update total price on order-payment
+ [-] FO :Fix bug #PSCFV-9650 could not see delete href in block cart
+ [-] FO: OrderHistory - Unclosed tag
+ [-] FO : added smarty cache to blockcms
+ [-] FO: Fix #PSCFV-9325 all was included on 301 for root deprecated controllers
+ [-] FO : fixed remove button for free product in the cart block #PSCFV-8465
+ [-] FO : fixed entities issue in javascript alerts #PSCFV-9001
+ [-] FO : fixed bug #PSCFV-9388 - newsletter is required error, showing two times
+ [-] FO : Fix bug #PSCFV-8412 no zipcode for countries when default country has no zip code in adress format
+ [-] FO : fixed bug #PSCFV-7454
+ [-] FO : Css fix on first address and avaibility
+ [-] FO : Fix one_phone_at_leastphone again when PS_REGISTRATION_PROCESS_TYPE = 1 && PS_ORDER_PROCESS_TYPE =0
+ [-] FO : fixed bug #PSCFV-9007 - Best sales query has ambigious column when sorted on date_add
+ [-] FO : Fix #PSCFV-9414 submitGuestAccount is not submitAccount
+ [-] FO : #PSCFV-9532 remove hardcoded unidentified group number
+ [-] FO : Fix bug #PSCFV-9525 escape double quote in address formated fields
+ [-] FO : Fix #PSCFV-7388 again Instant checkout - State validation
+ [-] FO : fixed alternative row color on shopping cart summary #PSCFV-9208
+ [-] FO: Fixed bug PrestaShop 1.5.4.1 Catalog Mode Display Incorrect Header (mis-aligned) - #PSCFV-9327
+ [-] FO : fixed pdf template #PSCFV-9430
+ [-] FO: Fix shop restriction on features #PSCFV-7848
+ [-] FO : fixed bug #PSCFV-9092 - conflict on the company field during account creation
+ [-] FO: fixed w3c errors
+ [-] FO: solved some W3C errors
+ [-] FO: some W3C errors corrected
+ [-] FO: Fix no image displayed for products in the cart when it was added from another store in multishop #PSCFV-9385
+ [-] FO : In stock sort is now removed when Stock managment is disabled on default theme. Not to be confused for my pull #465, which was for default mobile theme. This is for the default regular theme.
+ [-] FO : Report of #PSCFI-7240 typos in cms.tpl
+ [-] FO: http page should be redirected to http when accessed with https #PSCFV-9212
+ [-] FO: Fix Category::getSubCategories() default group used #PSCFV-9356
+ [-] FO: Fix Order::getOrdersTotalPaid() reference is now a string #PSCFV-9342
+ [-] FO : In stock is now removed when Stock managment is disabled Fixes the bug where Stock managment is disabled, it stil show "In Stock" in the sort by list. Added $PS_STOCK_MANAGEMENT to line 64.
+ [-] FO: Fix Carrier::getDeliveredCountries for multishop #PSCFV-9279
+ [-] FO : Fix bug #PSCFV-9171, can not order with a unactivated country
+ [-] FO: Tools::getMediaServer() should return Tools::getShopDomain() instead of Tools::getHttpHost() #PSCFV-9217
+ [-] FO : first_item class don t exist if shopping cart have only one item if shopping cart have only one product, last_item class exist but not first_item because of "else if" after if isset($productLast)
+ [-] FO: Fix #PSCFV-9057 close output buffer before sending attachment and virtualproducts
+ [-] FO : Fix bug #PSCFV-8967 large image instead of thickbox when one image
+ [-] FO: fixed bug: Solved a javascript problem on the new 1.5.4.1 with the full image on product page - PSCFV-8967
+ [-] FO: improve some css for RTL language
+ [-] FO: replace logo on the left (fixed bug RTL language - #PSCFV-8891)
+ [-] FO : Jqzoom must be enabled to add class jqzoom
+ [-] FO : removed misleading label on the shipping total #PSCFV-8556
+ [-] FO : fixed truncate and entities in the cart block #PSCFV-8870
+
+ [-] BO : fixed bug when save carrier without range
+ [-] BO: Fix multishop association for tax rules group - #PSCFV-9967
+ [-] BO : fixed bug #PSCFV-10169 - now you can go backward from step 3 to 2 when no ranges are set
+ [-] BO : fixed bug #PSCFV-10073 - now you can upload carrier logo on windows
+ [-] BO: Delete from attribute_shop when an attribute group is deleted #PSCFV-9902
+ [-] BO : FixBug #PSCFV-10075 remove product attribute image association on delete product attribute
+ [-] BO : FixBug Preview product url
+ [-] BO : fixed bug #PSCFV-9782 - live edit bug with multistore
+ [-] BO : fixed range deletion when press enter on input 'all' on carrier wizard
+ [-] BO : FixBug #PSCFV-7571 Error checking available product quantity
+ [-] BO : FixBug update received quantity in suply order
+ [-] BO : fixed bug #PSCFV-10111 when carrier is free don't display ranges in summary
+ [-] BO : Added comprehensive error display when prestashop cannot write the .htaccess file
+ [-] BO :FixBug Suppliers and Warehouses accordion
+ [-] BO : fixed bug #PSCFV-10096
+ [-] BO : fixed bug when carrier is free and change shipping method
+ [-] BO : fixed bug #PSCFV-10091 - you can now enable all zone in one clic
+ [-] BO : fixed bug #PSCFV-10033 - disable next step if no range has been added on carrier wizard
+ [-] BO : fixed multistore thumbnail on product list
+ [-] BO : FixBug root category listed after list reset
+ [-] BO : Fix additional quote in live edit template
+ [-] BO : list of carriers should only contain the active one in AdminProducts
+ [-] BO : OrderSlip now correctly displays the order slip date, thanks @Jacky75
+ [-] BO : Do not display root category bool if addrootcategory not in url
+ [-] BO : Fix send e-mails updating tracking number Hi, We've fixed some bugs parameters about the Send function of Mail class in the AdminOrdersController.php. Regards, Massimo.
+ [-] BO : FixBug Multiple list pagination error.
+ [-] BO : FixBug Manufacturer multilist pagination, filter, order problems and manufacturer address filter exception
+ [-] BO : FixBug #PSCFV-8311 pagination, filter and order with multilist
+ [-] BO : Fix bug #PSCFV-8139 bad renderform on errors in AdminStatuses
+ [-] BO: Fix #PSCFV-9885 catalog price rules edition
+ [-] BO : FixBug #PSCFV-7839 No invoice file attached to payment email confirmation
+ [-] BO : Fix warning in AdminAttributesGroups after https://github.com/PrestaShop/PrestaShop/pull/392
+ [-] BO : FixBug #PSCFV-7824 No total tax not show in order email confirmation
+ [-] BO: FixBug #PSCFV-10005 Filter on COUNT field
+ [-] BO : Fix bug #PSCFV-9990 bad count on list header helper
+ [-] BO : FixBug #PSCFV-9859 Carriers free shipping inline edit
+ [-] BO : FixBug #PSCFV-9748 Missing confirmation and update button problem
+ [-] BO : fixed domain warning
+ [-] BO : FixBug Install currency on Localization Pack
+ [-] BO : FixBug Invalid offset when only one error in layout
+ [-] BO : Fix onchange event on Adminmodules list execption
+ [-] BO : Fix onchange event on adminmoudlue list execption
+ [-] BO : FixBug allow_url_fopen on BackOffice home page
+ [-] BO : fixed bug #PSCFV-9809 - carrier wizard tab access fix
+ [-] BO : FixBug #PSCFV-9959 file_get_contents error
+ [-] BO : Fix while of translation, to find in folder if translation exists
+ [-] BO : FixBug #PSCFV-9965 currency not active by default in Localization pack
+ [-] BO : fixed some bug on carrier wizard - added tabindex on input - new default carrier img
+ [-] BO : doesn't match available_fields of AdminImportController - Correct wrong position of available_fields - Add some of available_fields
+ [-] BO : fixed input action when set fees for all zones in carrier wizard
+ [-] BO : FixBug #PSCFV-9895 Mal function in products suppliers accordion
+ [-] BO : FixBug Impossible to remove available date from product attribute
+ [-] BO : FixBug #PSCFV-9042 Supply orders now accept 0 value to automatically load products
+ [-] BO : FixBug #PSCFV-9839 Update product warehouse on suply order - thanks @O'Donnell
+ [-] BO : FixBug #PSCFV-9894 undefined quantity_all_version variable in product.tpl
+ [-] BO : Fix SQL query when $join_category == false, pull request https://github.com/Captain-FLAM/PrestaShop/commit/d5f75c63b6e21dd87c77a027bf8dd293afb1a94f thanks @Captain-FLAM
+ [-] BO : Could not find cover when image table corrupted
+ [-] BO : FixBug #PSCFV-9881 Remove updateCarriersList on zip code blur
+ [-] BO : FixBug #PSCFV-9878 Wrong login tab order
+ [-] BO : FixBug #PSCFV-8060 Error getting last quantity and price in stock mouvement
+ [-] BO : FixBug #PSCFV-8237 Javascript Error setting default supplier
+ [-] BO : FixBug #PSCFV-9138 Error duplicate product group reduction
+ [-] BO : FixBug #PSCFV-9251 Meta Tag delete previous
+ [-] BO : FixBug #PSCFV-9049 Bad actionOrderSlipAdd hook description
+ [-] BO : FIxBug Correct image language in product
+ [-] BO : fixed sort by currency exchange rate #PSCFV-9840
+ [-] BO : If no nb, get default 8, not 10.
+ [-] BO : translation copy is now easier #PSCFV-8886
+ [-] BO : FixBug #PSCFV-5316 Translation problem in delete button link
+ [-] BO : FixBug #PSCFV-6140 Pagination link error
+ [-] BO : FixBug #PSCFV-9723 Exporting quantity in instant stock was not returning all rows
+ [-] BO : FixBug #PSCFV-8234 Products tags not correctly indexed in search
+ [-] BO : Bad return value for AdminCountries::processStatus()
+ [-] BO : FixBug Directory Separator on URL
+ [-] BO : FixBug #PSCFV-8217 Shop logo image not refresh after change
+ [-] BO : FixBug #PSCFV-9613 Fix product tax to be shop dependent
+ [-] BO : FixBug #PSCFV-8287 Breadcrumbs label was wrong
+ [-] BO : FixBug #PSCFV-8229 Default country value set to manufacturer country Default country value set to manufacturer country Click on manufacturer address line now redirect to manufacturer address edition
+ [-] BO : FixBug #PSCFV-6365 Missing message confirmation for Images modification in Preferences > Images
+ [-] BO : Fix bug #PSCFV-9722, do not propose adding root categories in categories when there is only one shop
+ [-] BO : Use only 0% reduction from category in group
+ [-] BO: Fix tax rule edition - unique tax rule can't be edited
+ [-] BO : Fix bug #PSCFV-9395 Missing vertical separation between flags
+ [-] BO : Fix Bug #PSCFV-9550 Bad URL redirection
+ [-] BO : Fix bug #PSCFV-9310 bad type for input in helper thankx @Piotr Moćko
+ [-] BO: Delete specific price after combination deletion && fix SpecificPrice::getByProductId() sql query
+ [-] BO : fixed charts and grids in multishop #PSCFV-8978
+ [-] BO : you can now have different mail topic for one mail template #PSCFV-9617
+ [-] BO : added checks on product attributes properties #PSCFV-9703
+ [-] BO: display vat number field should not depends of the vatnumber module #PSCFV-9672
+ [-] BO : products comments impossible if quantity > 0 The pull request https://github.com/PrestaShop/PrestaShop/pull/219 makes the module not working properly in v1.5.4.1. Indeed, after this change, the OosHook works as expected but now, as the product comments module is attached to the OosHook, comments information is only shown when the product is out of stock!
+ [-] BO: product supplier price should not be converted on product page #PSCFV-9420
+ [-] BO : Fix bug #PSCFV-8666 COD module association no more deleted when restrition on other currency
+ [-] BO : Fix bug #PSCFV-8619 update order weight when modifying products
+ [-] BO : fixed bug #PSCFV-9622
+ [-] BO: remove old icon into New Version block
+ [-] BO: Fix manufacturer addresses duplication #PSCFV-9601
+ [-] BO : fixed translation and languages issues
+ [-] BO : fixed addslashes on tpl translations (compatibility between "slashes" and "js" parameters) #PSCFV-9427
+ [-] BO : fixed bug #PSCFV-9586 - Unable to sort CMS page in back office
+ [-] BO: Fix #PSCFV-9455 stock was resetted if adv stock management is enable and product preference is submited on shop context
+ [-] BO : Fix warnings when product not available in Shop
+ [-] BO : fixed bug #PSCFV-7921 - Language selector (with flags) cant be translated
+ [-] BO : fixed bug #PSCFV-7634 - Add non-existent new product to order using autocomplete gives javascript error (data.products is not defined)
+ [-] BO: This is now not possible to move a tab with id_parent = 0 to an another tab
+ [-] BO : Fix bug #PSCFV-7353 can not see the thumb for a scene
+ [-] BO : Fix bug #PSCFV-7353 can not see the thumb for a scenes
+ [-] BO : remove "utm_*" rules preventing Google services from indexing the shop Google shopping refuses all products having their URL blocked by the robots.txt file
+ [-] BO : allow partial use for credit slip vouchers #PSCFV-9539
+ [-] BO : Fix bug #PSCFV-9264 bad cancel qty when refund / return
+ [-] BO : missing colspan after update product detail
+ [-] BO: Stock should not appears on product listing when stock management is disabled #PSCFV-8207
+ [-] BO: fixed bug button on module list
+ [-] BO: fixed bug #PSCFV-9463 + improve some css on BO menu
+ [-] BO: fixed bug #PSCFV-9461
+ [-] BO: fixed bug #PSCFV-7440
+ [-] BO : fixed quote issue with magic quote in customization in adminorders #PSCFV-9311
+ [-] BO : fixed parsing of discount value in AdminOrders #PSCFV-9481
+ [-] BO : Upload image name with trailing slash in name
+ [-] BO : fixed ajax in permissions tab #PSCFV-7442
+ [-] BO : fixed bug #PSCFV-9405 - Delete file of downloadable product when cancel
+ [-] BO : Fixed permission update #PSCFV-7441
+ [-] BO : postcode required in manufacturer address
+ [-] BO : fixed link in AdminTracking #PSCFV-7409
+ [-] BO : fix require path to config.inc.php
+ [-] BO: Fix #PSCFV-8904 bad id_warehouse is stored on ps_address table
+ [-] BO: association of product attributes on associating a product to another shop #PSCFV-8735
+ [-] BO: Fix #PSCFV-9428 features duplicated with multishop on Feature::getFeatures()
+ [-] BO: Fix #PSCFV-7763 Re-inject quantities after deleting a product from a order
+ [-] BO: Addresses are now totally deleted from the database if not used on a order
+ [-] BO: Fix #PSCFV-6657 translations of overriden admin templates
+ [-] BO : Fix bug #PNM-788 Loyalty points in adminCustomers when only one order
+ [-] Bo : Fix #PSCFV-9306 report of #PSCFI-7115 Add a new specific price = faulty validation
+ [-] BO: Fix combinations duplication on multishop with context all for the product duplication #PSCFV-9020
+ [-] BO : Report of #PSCFI-6790 REQUEST_URI badly recorded
+ [-] BO : Fix bug #PSCFI-7231 strtolower iso_lang for package download link
+ [-] BO : Fixed unregistered version field for some modules
+ [-] BO: Fix language deletion with multishop when shops still associate to the language #PSCFV-9244
+ [-] BO : fixed bug #PSCFV-9178 - is_color_group is not inserted correctly
+ [-] BO : Fix bug #PSCFI-6755 "+" in email
+ [-] BO: Fix PHP warning on orderslip generation without ecotax #PSCFV-8743
+ [-] BO : remove deprecated parameter when call Tools::displayDate()
+ [-] BO : remove deprecated parameter when call Tools::link_rewrite() part 2
+ [-] BO : remove deprecated parameter when call Tools::link_rewrite()
+ [-] BO : Fix #PSCFI-7186 incorrect return in Meta->deleteSelection()
+ [-] BO: Root category should be the shop category and not the higher category with multiple root and without multishop #PSCFV-8860
+ [-] BO : fixed gift deletion when there is no products anymore in the cart
+ [-] BO: Fix listing exports with image or other empty fields
+ [-] BO : catch prestashop exception and display smart error messages #PSCFV-9147
+ [-] BO : fixed issue with reduction in the category for groups #PSCFV-9101
+ [-] BO : Fix "The controller adminnotound is missing or invalid." error when no controller get variable
+ [-] BO: Ajax Confirmation / padding-left
+ [-] BO : fixed turkish characters replacement #PSCFV-8968
+ [-] BO : fixed potential warning with texture list #PSCFV-9050
+ [-] BO : tab cache wasn't emptied on delete #PSCFV-9053
+ [-] BO: You can now disable the email sent after account creation
+ [-] BO : don't show unecessary tpl module translations - complience with documentation
+ [-] BO: Fix #PSCFV-8179 shop domain used in emails sometimes was for the wrong shop
+ [-] BO : don't show translation for class/controler overrides when on modules translation page
+ [-] BO : fixed infinite loop in the categories #PSCFV-8965
+ [-] Bo : Admin login loop under Firefox
+ [-] BO : fixed image import with allow_url_fopen deactivated #PSCFV-8181
+ [-] BO : bug in BO translations when Windows OS [-] BO : bug in BO translations when Windows OS Impossible to translate the strings of the back office in the directory override/controllers/admin/... under windows environment. The statement " $parent_class = explode(DIRECTORY_SEPARATOR,..) " returns wrong result under windows environment. because the path name has '/' and '\' chars. $parent_class contains bad values and the string "override" is not found.
+ [-] BO: Fix #PSCFV-8957 order creation when id_cart=0 is present in database but should normally not happen
+ [-] BO : fixed automatic creation of email overrides in the template #PSCFV-8785
+ [-] BO : fixed error message in language form #PSCFV-8890
+ [-] BO : fixed bug #PSCFV-7411 - Store location problem with some longitude values
+ [-] BO : Fix bug #PSCFI-7141, wrong quantity and sales number in Product Sales, thankx to @Tuan Tran
+ [-] BO : Fixed display when you translate modules without theme selected
+
+ [-] Classes : fix memcache ext #PSCFV-5225 thanks @up2date
+ [-] Classes : ModuleFrontController updated. Thank you @codeurWeb
+ [-] Classes : ModuleFrontController & templates overrides fixed
+ [-] Classes : Bug fix Validate.php - Error with $mail_name
+ [-] Classes : SwiftMailer - Fix deprecated preg_replace (PHP 5. 5.0)
+ [-] Classes : fixed cachefs and memcache classes #PSCFV-5225 thanks @prestalab
+ [-] Classes : Mail - check instance of link in the context
+ [-] Classes : Db : Fixed $link
+ [-] Classes : Db classe fixed (check InnoDB support MySQL >= 5.6)
+
+ [-] Core: Fix language link with multishop from another shop #PSCFV-10063
+ [-] CORE : Do not delete index.php in smarty cache or /img/tmp/
+ [-] Core: Fix #PSCFV-8887 - improve performance of search indexation
+ [-] CORE : Fix bug #PSCFV-8542 could not have rewrited link for modules in blocklanguage
+ [-] CORE : getModuleLink not working on module custom route, merge from https://github.com/PrestaShop/PrestaShop/pull/487 thanks @zimmi1
+ [-] CORE : Addslashes on not translated strings for javascript js=1
+ [-] CORE : Fix for field validation in ObjectModel::validateFieldsLang() when default lang value not set, thanks @rimas-kudelis
+ [-] CORE : Cast product price to float instead of int when adding supplier reference, thanks @rimas-kudelis
+ [-] CORE : Merge from PrestaEdit last pull request again
+ [-] CORE : Fix warning #PSCFV-9678 when sending message to customer
+ [-] CORE : Fix bug #PSCFV-9572 when seizing in 0 in forms input fields for objects
+ [-] CORE: Copy live_edit bool when register alias hook
+ [-] CORE: No category in url preview on BO product page
+ [-] Core: ObjectModel::toggleStatus should change only active field on multishop with global context #PSCFV-9707
+ [-] Core: Fix #PSCFV-9652 too much payments for multishipping orders
+ [-] CORE : fixed bug #PSCFV-8745 Contact form e-mail template with incomplete information
+ [-] CORE : fixed bug #PSCFV-9460
+ [-] CORE: Fix bug #PSCFV-9474 missing unity and unit_price_ratio in Cart::getProducts
+ [-] CORE : fixed #PSCFV-7451 - error in classes Carrier
+ [-] CORE : Report of https://github.com/PrestaShop/PrestaShop/pull/504 Thanks @aseques
+ [-] CORE : CartRule::checkProductRestrictions : A gift product in the same category as its restrictions causes the gift to stay in the cart even if emptied
+ [-] CORE : fixed bug #PSCFV-9121 - virtual product does not have link after upgrade - part 2
+ [-] CORE : fixed bug #PSCFV-9121 - virtual product does not have link after upgrade
+ [-] Core: Hook actionPaymentConfirmation should also be called for PS_OS_WS_PAYMENT order statuse
+ [-] CORE : Report of https://github.com/PrestaShop/PrestaShop-1.4/commit/ec8deb289185daa03cd11d239797bbe5bdbaecd0
+ [-] CORE : Report of https://github.com/PrestaShop/PrestaShop-1.4/commit/a6e8a2eda7fe3bab5245df9b98df7b2f6f7d541f
+ [-] Core : fixed URL regexp #PSCFV-8986
+ [-] Core: Fix StockManager::getProductRealQuantities() per warehouse with some orderstatuses #PSCFV-9219
+ [-] CORE: Fix #PSCFV-9185 Wrong product price display on list by manufacturer Added default_on condition on getProducts() query in Manufacturer class.
+ [-] CORE : Fix bug #PSCFI-7168 cast and truncate POST values for statistics.php controller
+ [-] CORE : TRACKING_DIRECT_TRAFFIC not respected
+ [-] CORE : referer keywords truncated before insertion in connections table
+ [-] CORE : Fix bug #PSCFI-7072 redundant configuration get
+ [-] Core: Fix StockManager::getProductRealQuantities() for refunded quantities on non delivered orders
+ [-] Core: Fix specific prices if they are configured to count quantity per product and not per combination
+ [-] CORE : fixed PHP Notice: Undefined index: date_expiration on virtual product
+
+ [-] MO : fixed smarty cache on blocksearch #PSCFV-8739
+ [-] MO : multilines translations does not work #PNM-1645
+ [-] MO : sendtofriend FixBug Form error
+ [-] MO : fixed potential warning in pscleaner #PSCFV-10070
+ [-] MO: no more 1.4 support for blocklayered
+ [-] MO : fixed bug #PNM-792 : remove unused js file in blocklayered
+ [-] MO : fixed category link on blocklayered #PNM-1427
+ [-] MO : blocklayered also try to find the translations in the translations directory
+ [-] MO : added `visibility` IN ("both", "catalog") in blocklayered
+ [-] MO : fixed module upgrade with common version number
+ [-] MO: cover image issue with layered block on multishop, thanks @theginie
+ [-] MO : My account column block should not display module icon in list
+ [-] MO : blocktopmenu should clear cache when adding a new subcategory
+ [-] MO : Missing image in my account for MODULE WishList
+ [-] MO : mod='blockmyaccount' missing in blockmyaccountfooter.tpl
+ [-] MO : mod='blockmyaccount' missing in blockmyaccountfooter.tpl (translation doesnt work), thanks @mypresta-eu
+ [-] MO : Fix sort order for combinations, report of pull request https://github.com/PrestaShop/PrestaShop/pull/364
+ [-] MO : blockviewed Fix bug adding last product to list, thanks @kluevandrew
+ [-] MO : Fix bug discount display in mail, manual merge from https://github.com/202-ecommerce/PrestaShop/commit/1d5df338c46aef723d13aef3e213792df6ea92e2
+ [-] MO : fixed disappearing form in sekeyword #PSCFV-9743
+ [-] MO : Followup : don't send emails for empty carts thanks @axometeam
+ [-] MO : fixed bad redirection in trackingfront #PSCFV-8378
+ [-] MO : Bug fix - PS Cleaner, check if module favoriteproducts is installed. Fix Bug when favoriteproducts is not install.
+ [-] MO: exec hook on hook registration #PSCFV-8977
+ [-] MO : fixed bug #PSCFV-5724 - 1.5.2.0 cms block error when adding more than one column to the categories block in the footer
+ [-] MO : fixed bug #PSCFV-8654 - 1.5.4.0 My Favorites doesn't add product
+ [-] MO : fixed bug #PSCFV-9040 - Block CMS Multishop bug
+ [-] MO : fixed bug #PSCFV-8910 - Productcomments module allows post only one comment per product
+ [-] MO : do not check the VAT number if the module is disabled #PSCFV-9397
+ [-] MO : removed doubled "/" in homeslider template #PSCFV-9439
+ [-] MO : fixed editorial issue when the entity does not exist yet for a shop #PSCFV-9442
+ [-] MO : do not truncate order return state in pscleaner #PSCFV-9431
+ [-] MO : loyalty small smarty fix #PNM-1305
+ [-] MO : Fixed double creation of vouchers in loyalty and some redirections #PNM-1317
+ [-] MO : Followup : Don't send followup vouchers to guest accounts
+ [-] MO : Followup : Don't execute crontasks if the module is disabled
+ [-] MO : Report of #PNM-1413 when alert already set on default combination
+ [-] MO: Fix newsletter module mail like newsletter_voucher.html - Edit html/css/translation for newsletter_conf.html and newsletter_verif.html - Use {color} variable
+ [-] MO: Fix sendtoafriend module #PSCFV-8340 http://code.google.com/p/jquery-json/issues/detail?id=43
+ [-] MO : Remove link "Notify me when available" when in stock
+ [-] MO: Fix double html entities on link edition in the blocktopmenumodule #PSCFV-8808
+ [-] MO: Don't make unnecessary request to ajax cart
+ [-] MO: Fix #PSCFV-8973 product images in the blockviewed module
+ [-] MO : Fix bug #PSCFI-7055 do not relay on ".html" in referer to find previous category
+ [-] MO: blockcart ajax cart product insert missing html class Added the same HTML class as the other product names have in the ajax cart. Perhaps it would be nice to add an added_from_ajax as well in case you would want to differ between the newly added items and previously added ones? Another potential issue is on line 445 where there is no space after the insert. If Prestashop is set to minify the normal page, this is correct, otherwise there will be a space missing.
+ [-] MO : fixed hug #PSCFV-8994 - clear cache when truncate catalog
+ [-] MO : fixed bug #PSCFV-7703 - Images for bank wire, cheque and cash payment missing on Order Summary
+
+ [-] WS: Fix retrieve of stock_availables when stock is shared on the shop group
+ [-] WS: add id_address_delivery on cart products association
+ [-] WS: Sanity check before creating packs As it is before this commit, every product that is created from the schema without removing the empty bundle item in the schema will become a pack containing one broken item. Sorry, this bug was introduced by my previous pull request.
+ [-] WS: Enable feature request #PSCFV-5581, thanks @codl for pull request #593
+ [-] WS: do not escape shop name overzealously
+ [-] WS : fixed ?schema=blank (performance issue)
+ [-] WS: Fix accessories duplication on product update
+ [-] WS: Fix webservice sort for multishop fields #PSCFV-5634
+ [-] WS: Fix #PSCFI-7009 product prices on orders with specific prices
+ [-] WS: Fix deletion of product_features on product update #PSCFI-6740
+ [-] WS: Fix memory leak when getting synopsis
+
+ [-] PDF : Fix columns error
+ [-] PDF : Fix dejavusans font for en lang
+
+ [-] TR : fixed missing space in RMA PDF
+
+ Improved/changed features:
+
+ [*] Installer : added cookie mode instead of session for the installer
+ [*] Installer: you can now choose to send an email to the administrator after installation with php-cli
+
+ [*] Security : deny access to this folder as already done for classes
+
+ [*] FO : added chinese/japanese search
+ [*] FO : Add reference sort to theme
+ [*] FO : Blur for tab navigation, followup a0ee3d3, thanks @Seynaeve
+ [*] FO : Blur for tab navigation, followup a0ee3d3c34b7fc5d149228197be382af59a49e47, thanks @Seynaeve
+ [*] FO : Fix bug #PSCFV-9611, autocomplete to off on opc page and other pages
+ [*] FO : updated Fancybox plug-in
+ [*] FO : a few more SQL improvements
+ [*] FO : lots of performance improvements (removed or merged useless SQL queries)
+ [*] FO: display Error500 if no database access Sometimes, we have some problems with the MySQL Database and a Fatal Error is done. With this, we show the error500 template.
+ [*] FO : getCatImageLink doesn't work without type thanks @axometeam
+ [*] FO : Retrieve invoice address in OPC + guest checkout, thanks @Piotr Moćko
+ [*] FO : Fix bug #PSCFV-9440 add another address in guest checkout in OPC
+ [*] FO : removed code specific to multishipping from the no-multishipping process
+ [*] FO : added smarty cache on productscategory
+ [*] FO : added smarty cache on crossselling module
+ [*] FO : improved entity links retrieval (no need to instanciate an object when there is no need... to instanciate un object)
+ [*] FO : added smarty cache to blockspecials
+ [*] FO : added smarty cache on blockbestsellers
+ [*] FO : added smarty cache on homefeatured module
+ [*] FO : added smarty cache on blocknewproducts
+ [*] FO: Don't make useless ajax requests to blockcart on the cart page
+ [*] FO : AuthController can now have its own template
+ [*] FO: use Tools::fileAttachment() in ContactController
+
+ [*] BO: Warehouse name is now displayed on each product line orders
+ [*] BO : Clear smarty cache when submitting SEO rules
+ [*] BO : Add clear smarty cache button
+ [*] BO: Add reference to Options
+ [*] BO: Add reference to FrontController
+ [*] BO : Do not insert duplicates in product_carrier, thanks @edamart
+ [*] BO : Do not insert duplicates in poruct_carrier, thanks @edamart
+ [*] BO : Add filter choices in title of List, thankx to @ccauw
+ [*] BO : refact for modules exeptions regarding https://github.com/PrestaShop/PrestaShop/pull/614
+ [*] BO : Fix statistics redirection when change date When going into a special stats module (for exemple "statsproduct") if you change the date, Prestashop redirect to the "home" of statistics.
+ [*] BO : shipping enlarge listbox carriers enlarge listbox carriers to see all the name of the carrier
+ [*] BO : skip the first line by default All sample csv file use a first line of information
+ [*] BO : Proposition : IMPROVEMENT Admin Modules Positions You can see in action over there : http://www.youtube.com/watch?v=e7KXuCU3RIM
+ [*] BO: Add an option to allow iframes on descriptions
+ [*] BO : #PSCFV-8498 You can now use 0% in groups category rules in order to not apply discount on this category
+ [*] BO : Not increment stock if statut change fom Error to Canceled Not increment stock if statut change fom Error => Canceled or Canceled => Error (stock should stay the same). Add a code simplification too
+ [*] BO : Correct the getList() request for quantity and id_product Quantity and Id_product should be fixe as Int, else the Mysql request do something like : quantity LIKE "%0%" When an admin key-in quantity as 0, he want product with quantity as 0, not as 0 / 10 /20 / 30... ect (The same for id_product)
+ [*] BO : improved unicode characters replacement in URLs
+ [*] BO : Fix #PSCFV-8504 carrier on invoice and delivery slip
+ [*] BO : Correct Request Sql Manager validate options Correct Request Sql Manager validate options : - No size limit for the request - cutJoin() doesn't work for multiple Join (exemple : LEFT JOIN `XXX ON XXX AND XXX) => Then you can't save the request, even if it work
+ [*] BO : AdminControllers : Keep active filter on pagination
+ [*] BO: more than one image in HelperForm
+ [*] BO : Reselect current step in AdminOrders
+ [*] BO : Enable current subtab active class
+ [*] BO : attributes taken into account for the language entity in the localization packs
+ [*] BO: use Translate::getAdminTranslation instead of translate()
+ [*] BO: hook displayAdminForm / add param fieldset
+
+ [*] CORE : Allow external css loading, manual merge of https://github.com/PrestaShop/PrestaShop/pull/406 thanks @m-hume
+ [*] CORE : Fix bug #PSCFV-9811 doc on display404Error
+ [*] Core: that is now easier to get links for another shop
+ [*] Core : Smarty updated from 3.1.13 to 3.1.14 (cache issues fixed)
+ [*] CORE: can not delete class_index.php
+ [*] Core: you can now pass a query string with php-cli which will merged with for cronjobs and other things
+
+ [*] MO : added manufactureres order by name, thanks@Jacky75
+ [*] MO : Templates overrides works with the new structure (/views/templates/admin|front|hook)
+ [*] MO : Added customer and product object to hook sending email
+ [*] MO : added configuration cleaning to pscleaner
+ [*] MO : you can now exclude IP addresses from the online visitors module #PSCFV-9056
+ [*] MO : pscleaner reset employees notyfications pscleaner afetr truncating orders, messages and customers reset also employees notyfications
+ [*] MO : blocklayered optimization
+ [*] MO : Followup https://github.com/runningz/PrestaShop/commit/040ff3396ac32a1cc35d4d2464e8d36486cac418
+ [*] MO : blockcart - simpler selectors
+ [*] MO: Add smarty cache on blocksupplier and blockmanufacturer
+ [*] MO: blockcart animation optimization The animated element would not be removed upon the animation being finished. This made the site slow and unresponsive if the animated image was heavy (eg. a transparent png) and added to cart many times without reloading the page. This addition makes the animation behave as expected also when performing it multiple times.
+
+ [*] WS : order history add(POST) send customer email if sendemail=1 url parameter, thanks @gerdus
+ [*] WS : improved performances
+ [*] WS : improved web service performances
+
+ [*] PDF : Free shipping in invoice PDF display X2 thanks @axometeam
+ [*] PDF : Small column width fix
+
+ [*] TR : Added 10 new localization packs
+
+ [*] LO: Improved Argentina Localization Pack
+ [*] LO : corrected Israel standard tax rate
+ [*] LO : Fixed units in Belgium localization pack
+ [*] LO : Fix PSCFV-9330 (decimals=2)
+ [*] LO : Updated it & nl localization files
+
+ Added Features:
+
+ [+] BO: Add a wizard to create and edit your carriers
+ [+] BO: Addition, deletion and edition are now logged
+ [+] BO: Fix Bug Progress Bar Upload Image Product Lorsque l'on ajoute des images a des produits, la barre de progression s'affiche en dehors de son cadre. "position:relative" n'est pas présent pour "div.progressBarImage" dans le fichier admin.css . ---- When we add pictures to products, the progress bar is out of his wrapper. "position:relative" is missing for "div.progressBarImage" in admin.css file.
+
+ [+] CORE : new jquery UI version (1.10.3)
+
+ [+] TR: Created file structure for Dutch installer
+
+
####################################
# v1.5.4.1 - (2013-04-25) #
####################################
@@ -7578,4 +8085,4 @@ Release Notes for PrestaShop 1.5
[+] SQL : add the replication SQL
-Release Notes for PrestaShop 1.3
+Release Notes for PrestaShop 1.3
\ No newline at end of file
diff --git a/docs/csv_import/products_import.csv b/docs/csv_import/products_import.csv
index b49f79225..7253bc2eb 100644
--- a/docs/csv_import/products_import.csv
+++ b/docs/csv_import/products_import.csv
@@ -1,3 +1,3 @@
-id;Active (0/1);Name*;Categories (x,y,z,...);Price tax excl. Or Price tax excl;Tax rules id;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyy-mm-dd);Discount to (yyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Weight;Quantity;Short description;Description;Tags (x,y,z,...);Meta-title;Meta-keywords;Meta-description;URL rewritten;Text when in-stock;Text if back-order allowed;Image URLs (x,y,z,...);Feature;Only available online
-1;1;iPod Nano;Home, iPods;49;1;;1;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;;;;0.5;800;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;;;;ipod-nano;In stock;;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;;
-2;1;iPod shuffle;Home, iPods;66.05;1;79;1;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;;;;0;500;iPod shuffle, the world’s most wearabl….;;ipod, shuffle;;;;ipod-shuffle;In stock;;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;;
\ No newline at end of file
+id;Active (0/1);Name*;Categories (x,y,z,...);Price tax excl. Or Price tax excl;Tax rules id;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyy-mm-dd);Discount to (yyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Weight;Quantity;Short description;Description;Tags (x,y,z,...);Meta-title;Meta-keywords;Meta-description;URL rewritten;Text when in-stock;Text if back-order allowed;Available for order (0 = No, 1 = Yes);Product creation date;Show price (0 = No, 1 = Yes);Image URLs (x,y,z,...);Delete existing images (0 = No, 1 = Yes);Feature (Name:Value:Position);Available online only (0 = No, 1 = Yes);Condition (new,used,refurbished);ID / Name of shop
+1;1;iPod Nano;Home, iPods;49;1;;1;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;;;;0.5;800;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;;;;ipod-nano;In stock;Out stock;1;;1;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;1;;0;new;1
+2;1;iPod shuffle;Home, iPods;66.05;1;79;1;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;;;;0;500;iPod shuffle, the world’s most wearabl….;;ipod, shuffle;;;;ipod-shuffle;In stock;Out stock;1;;1;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;1;;0;new;1
diff --git a/docs/readme_de.txt b/docs/readme_de.txt
index c5038ba98..829309cc7 100755
--- a/docs/readme_de.txt
+++ b/docs/readme_de.txt
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA
-NAME: Prestashop 1.5.4.1
-VERSION: 1.5.4.1
+NAME: Prestashop 1.5.5.0
+VERSION: 1.5.5.0
VORBEREITUNG
===========
diff --git a/docs/readme_en.txt b/docs/readme_en.txt
index 8fd02b40c..52e111108 100755
--- a/docs/readme_en.txt
+++ b/docs/readme_en.txt
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA
-NAME: Prestashop 1.5.4.1
-VERSION: 1.5.4.1
+NAME: Prestashop 1.5.5.0
+VERSION: 1.5.5.0
PREPARATION
===========
diff --git a/docs/readme_es.txt b/docs/readme_es.txt
index dd37179d4..c67c99b47 100755
--- a/docs/readme_es.txt
+++ b/docs/readme_es.txt
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA
-NAME: Prestashop 1.5.4.1
-VERSION: 1.5.4.1
+NAME: Prestashop 1.5.5.0
+VERSION: 1.5.5.0
PREPARACI�N
===========
diff --git a/docs/readme_fr.txt b/docs/readme_fr.txt
index 64eae1dc2..9f03d88eb 100755
--- a/docs/readme_fr.txt
+++ b/docs/readme_fr.txt
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA
-NAME: Prestashop 1.5.4.1
-VERSION: 1.5.4.1
+NAME: Prestashop 1.5.5.0
+VERSION: 1.5.5.0
PREPARATION
===========
diff --git a/docs/readme_it.txt b/docs/readme_it.txt
index e07a67d29..cb9f844f6 100755
--- a/docs/readme_it.txt
+++ b/docs/readme_it.txt
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA
-NAME: Prestashop 1.5.4.1
-VERSION: 1.5.4.1
+NAME: Prestashop 1.5.5.0
+VERSION: 1.5.5.0
PREPARAZIONE
===========
diff --git a/img/admin/carrier-default.jpg b/img/admin/carrier-default.jpg
new file mode 100644
index 000000000..5677b65c1
Binary files /dev/null and b/img/admin/carrier-default.jpg differ
diff --git a/img/admin/steps-carrierwizard.png b/img/admin/steps-carrierwizard.png
new file mode 100644
index 000000000..4c0d980be
Binary files /dev/null and b/img/admin/steps-carrierwizard.png differ
diff --git a/install-dev/classes/controllerHttp.php b/install-dev/classes/controllerHttp.php
index 33c6f9d97..7cef69f5f 100644
--- a/install-dev/classes/controllerHttp.php
+++ b/install-dev/classes/controllerHttp.php
@@ -30,7 +30,7 @@ abstract class InstallControllerHttp
* @var array List of installer steps
*/
protected static $steps = array('welcome', 'license', 'system', 'configure', 'database', 'process');
-
+ protected $phone;
protected static $instances = array();
/**
@@ -318,7 +318,14 @@ abstract class InstallControllerHttp
*/
public function getPhone()
{
- return $this->language->getInformation('phone', false);
+ if ($this->phone === null)
+ {
+ $this->phone = $this->language->getInformation('phone', false);
+ if ($iframe = Tools::file_get_contents('http://api.prestashop.com/iframe/install.php?lang='.$this->language->getLanguageIso()))
+ if (preg_match('//Ui', $iframe, $matches) && isset($matches[1]))
+ $this->phone = $matches[1];
+ }
+ return $this->phone;
}
/**
diff --git a/install-dev/classes/xmlLoader.php b/install-dev/classes/xmlLoader.php
index b2c86ddc3..c2ca37576 100644
--- a/install-dev/classes/xmlLoader.php
+++ b/install-dev/classes/xmlLoader.php
@@ -81,12 +81,15 @@ class InstallXmlLoader
$this->img_path = _PS_INSTALL_DATA_PATH_.'img/';
}
- public function setFixturesPath()
+ public function setFixturesPath($path = null)
{
+ if ($path === null)
+ $path = _PS_INSTALL_FIXTURES_PATH_.'apple/';
+
$this->path_type = 'fixture';
- $this->data_path = _PS_INSTALL_FIXTURES_PATH_.'apple/data/';
- $this->lang_path = _PS_INSTALL_FIXTURES_PATH_.'apple/langs/';
- $this->img_path = _PS_INSTALL_FIXTURES_PATH_.'apple/img/';
+ $this->data_path = $path.'data/';
+ $this->lang_path = $path.'langs/';
+ $this->img_path = $path.'img/';
}
/**
@@ -693,16 +696,12 @@ class InstallXmlLoader
if (is_null($tables))
{
- $sql = 'SHOW TABLES';
$tables = array();
- foreach (Db::getInstance()->executeS($sql) as $row)
+ foreach (Db::getInstance()->executeS('SHOW TABLES') as $row)
{
$table = current($row);
if (preg_match('#^'._DB_PREFIX_.'(.+?)(_lang)?$#i', $table, $m))
- if (preg_match('#^'._DB_PREFIX_.'(.+?)_shop$#i', $table, $m2) && !isset($tables[$m2[1]]))
- $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false;
- else
- $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false;
+ $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false;
}
}
diff --git a/install-dev/controllers/console/process.php b/install-dev/controllers/console/process.php
index 4fc78079b..48ac9e674 100644
--- a/install-dev/controllers/console/process.php
+++ b/install-dev/controllers/console/process.php
@@ -225,7 +225,7 @@ class InstallControllerConsoleProcess extends InstallControllerConsole
$this->initializeContext();
$this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
- $result = $this->model_install->installFixtures();
+ $result = $this->model_install->installFixtures(null, array('shop_activity' => $this->datas->shop_activity, 'shop_country' => $this->datas->shop_country));
$this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
return $result;
}
@@ -288,4 +288,4 @@ class InstallControllerConsoleProcess extends InstallControllerConsole
{
return $this->model_install->installModulesAddons();
}
-}
\ No newline at end of file
+}
diff --git a/install-dev/controllers/http/configure.php b/install-dev/controllers/http/configure.php
index 1b35a3a9f..c600c04ad 100644
--- a/install-dev/controllers/http/configure.php
+++ b/install-dev/controllers/http/configure.php
@@ -56,7 +56,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
$params = http_build_query(array(
'email' => $this->session->admin_email,
'method' => 'addMemberToNewsletter',
- 'language' => $this->session->lang,
+ 'language' => $this->language->getLanguageIso(),
'visitorType' => 1,
'source' => 'installer'
));
diff --git a/install-dev/controllers/http/process.php b/install-dev/controllers/http/process.php
index 38d497ce2..8ab8b0286 100644
--- a/install-dev/controllers/http/process.php
+++ b/install-dev/controllers/http/process.php
@@ -260,7 +260,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->initializeContext();
$this->model_install->xml_loader_ids = $this->session->xml_loader_ids;
- if (!$this->model_install->installFixtures(Tools::getValue('entity')) || $this->model_install->getErrors())
+ if (!$this->model_install->installFixtures(Tools::getValue('entity', null), array('shop_activity' => $this->session->shop_activity, 'shop_country' => $this->session->shop_country)) || $this->model_install->getErrors())
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
$this->session->xml_loader_ids = $this->model_install->xml_loader_ids;
$this->ajaxJsonAnswer(true);
diff --git a/install-dev/controllers/http/system.php b/install-dev/controllers/http/system.php
index 4db6d3ce1..00341a461 100644
--- a/install-dev/controllers/http/system.php
+++ b/install-dev/controllers/http/system.php
@@ -85,7 +85,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'upload' => $this->l('Cannot upload files'),
'system' => $this->l('Cannot create new files and folders'),
'gd' => $this->l('GD Library is not installed'),
- 'mysql_support' => $this->l('MySQL support is not activated'),
+ 'mysql_support' => $this->l('MySQL support is not activated')
)
),
array(
@@ -103,8 +103,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'theme_cache_dir' => '~/themes/default/cache/',
'translations_dir' => '~/translations/',
'customizable_products_dir' => '~/upload/',
- 'virtual_products_dir' => '~/download/',
- 'sitemap' => '~/sitemap.xml',
+ 'virtual_products_dir' => '~/download/'
)
),
),
@@ -120,7 +119,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'mbstring' => $this->l('Mbstring extension is not enabled'),
'magicquotes' => $this->l('PHP magic quotes option is enabled'),
'dom' => $this->l('Dom extension is not loaded'),
- 'pdo_mysql' => $this->l('PDO MySQL extension is not loaded'),
+ 'pdo_mysql' => $this->l('PDO MySQL extension is not loaded')
)
),
),
diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql
index b5b3ff8ed..4ad6974fc 100644
--- a/install-dev/data/db_structure.sql
+++ b/install-dev/data/db_structure.sql
@@ -936,7 +936,7 @@ CREATE TABLE `PREFIX_manufacturer_lang` (
`id_manufacturer` int(10) unsigned NOT NULL,
`id_lang` int(10) unsigned NOT NULL,
`description` text,
- `short_description` varchar(254) default NULL,
+ `short_description` text,
`meta_title` varchar(128) default NULL,
`meta_keywords` varchar(255) default NULL,
`meta_description` varchar(255) default NULL,
@@ -1437,7 +1437,7 @@ CREATE TABLE IF NOT EXISTS `PREFIX_product_shop` (
`date_upd` datetime NOT NULL,
PRIMARY KEY (`id_product`, `id_shop`),
KEY `id_category_default` (`id_category_default`),
- KEY `date_add` (`date_add`)
+ KEY `date_add` (`date_add` , `active` , `visibility`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE `PREFIX_product_attribute` (
diff --git a/install-dev/data/xml/access.xml b/install-dev/data/xml/access.xml
index 97c2e66ea..9b71e93fc 100644
--- a/install-dev/data/xml/access.xml
+++ b/install-dev/data/xml/access.xml
@@ -51,6 +51,7 @@
+
diff --git a/install-dev/data/xml/configuration.xml b/install-dev/data/xml/configuration.xml
index 2494938f3..828538b0e 100644
--- a/install-dev/data/xml/configuration.xml
+++ b/install-dev/data/xml/configuration.xml
@@ -689,7 +689,7 @@ Country
7700
- 1.5.0.9
+ 1.5.5.0
m
@@ -701,7 +701,7 @@ Country
localhost
- 1.5.0.9
+ 1.5.5.0
PrestaShop
@@ -771,6 +771,9 @@ Country
1
+
+
+ SMARTY_DEBUG
diff --git a/install-dev/data/xml/hook.xml b/install-dev/data/xml/hook.xml
index 1139431f2..005284227 100644
--- a/install-dev/data/xml/hook.xml
+++ b/install-dev/data/xml/hook.xml
@@ -86,7 +86,7 @@
displayCustomerAccountCustomer account displayed in Front OfficeThis hook displays new elements on the customer account page
- actionOrderSlipAddOrder slip creationThis hook is called when a product's quantity is modified
+ actionOrderSlipAddOrder slip creationThis hook is called when a new credit slip is added regarding client order
displayProductTabTabs on product pageThis hook is called on the product page's tab
diff --git a/install-dev/data/xml/tab.xml b/install-dev/data/xml/tab.xml
index efc6295cc..477d81b3d 100644
--- a/install-dev/data/xml/tab.xml
+++ b/install-dev/data/xml/tab.xml
@@ -156,11 +156,8 @@
AdminCarriers
-
- AdminRangePrice
-
-
- AdminRangeWeight
+
+ AdminCarrierWizard
AdminLocalization
diff --git a/install-dev/fixtures/apple/langs/nl/data/attribute.xml b/install-dev/fixtures/apple/langs/nl/data/attribute.xml
new file mode 100644
index 000000000..f27df851c
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/attribute.xml
@@ -0,0 +1,63 @@
+
+
+
+ 2GB
+
+
+ 4GB
+
+
+ Metal
+
+
+ Blue
+
+
+ Pink
+
+
+ Green
+
+
+ Orange
+
+
+ Optional 64GB solid-state drive
+
+
+ 80GB Parallel ATA Drive @ 4200 rpm
+
+
+ 1.60GHz Intel Core 2 Duo
+
+
+ 1.80GHz Intel Core 2 Duo
+
+
+ 80GB: 20,000 Songs
+
+
+ 160GB: 40,000 Songs
+
+
+ Black
+
+
+ 8GB
+
+
+ 16GB
+
+
+ 32GB
+
+
+ Purple
+
+
+ Yellow
+
+
+ Red
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/attribute_group.xml b/install-dev/fixtures/apple/langs/nl/data/attribute_group.xml
new file mode 100644
index 000000000..221a81bc7
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/attribute_group.xml
@@ -0,0 +1,15 @@
+
+
+
+ Disk space
+ Disk space
+
+
+ Color
+ Color
+
+
+ ICU
+ Processor
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/attributegroup.xml b/install-dev/fixtures/apple/langs/nl/data/attributegroup.xml
new file mode 100644
index 000000000..977fceeb7
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/attributegroup.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/carrier.xml b/install-dev/fixtures/apple/langs/nl/data/carrier.xml
new file mode 100644
index 000000000..c59766e73
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/carrier.xml
@@ -0,0 +1,6 @@
+
+
+
+ Delivery next day!
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/category.xml b/install-dev/fixtures/apple/langs/nl/data/category.xml
new file mode 100644
index 000000000..eeae63831
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/category.xml
@@ -0,0 +1,27 @@
+
+
+
+ iPods
+ Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater.
+ music-ipods
+
+
+
+
+
+ Accessories
+ Wonderful accessories for your iPod
+ accessories-ipod
+
+
+
+
+
+ Laptops
+ The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.
+ laptops
+ Apple laptops
+ Apple laptops MacBook Air
+ Powerful and chic Apple laptops
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/feature.xml b/install-dev/fixtures/apple/langs/nl/data/feature.xml
new file mode 100644
index 000000000..7682c6495
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/feature.xml
@@ -0,0 +1,18 @@
+
+
+
+ Height
+
+
+ Width
+
+
+ Depth
+
+
+ Weight
+
+
+ Headphone
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/feature_value.xml b/install-dev/fixtures/apple/langs/nl/data/feature_value.xml
new file mode 100644
index 000000000..d3a824d22
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/feature_value.xml
@@ -0,0 +1,45 @@
+
+
+
+ Jack stereo
+
+
+ Mini-jack stereo
+
+
+ 2.75 in
+
+
+ 2.06 in
+
+
+ 49.2 g
+
+
+ 0.26 in
+
+
+ 1.07 in
+
+
+ 1.62 in
+
+
+ 15.5 g
+
+
+ 0.41 in (clip included)
+
+
+ 4.33 in
+
+
+ 2.76 in
+
+
+ 120g
+
+
+ 0.31 in
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/featurevalue.xml b/install-dev/fixtures/apple/langs/nl/data/featurevalue.xml
new file mode 100644
index 000000000..d101bed96
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/featurevalue.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/image.xml b/install-dev/fixtures/apple/langs/nl/data/image.xml
new file mode 100644
index 000000000..49a836dc3
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/image.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin-dev/themes/default/template/controllers/shipping/index.php b/install-dev/fixtures/apple/langs/nl/data/index.php
similarity index 100%
rename from admin-dev/themes/default/template/controllers/shipping/index.php
rename to install-dev/fixtures/apple/langs/nl/data/index.php
diff --git a/install-dev/fixtures/apple/langs/nl/data/manufacturer.xml b/install-dev/fixtures/apple/langs/nl/data/manufacturer.xml
new file mode 100644
index 000000000..f06ff9661
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/manufacturer.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/order_message.xml b/install-dev/fixtures/apple/langs/nl/data/order_message.xml
new file mode 100644
index 000000000..93ad3b501
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/order_message.xml
@@ -0,0 +1,12 @@
+
+
+
+ Delay
+ Hi,
+
+Unfortunately, an item on your order is currently out of stock. This may cause a slight delay in delivery.
+Please accept our apologies and rest assured that we are working hard to rectify this.
+
+Best regards,
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/ordermessage.xml b/install-dev/fixtures/apple/langs/nl/data/ordermessage.xml
new file mode 100644
index 000000000..e743f5d97
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/ordermessage.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/product.xml b/install-dev/fixtures/apple/langs/nl/data/product.xml
new file mode 100644
index 000000000..0c405b001
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/product.xml
@@ -0,0 +1,135 @@
+
+
+
+ <p><strong><span style="font-size: small;">Curved ahead of the curve.</span></strong></p>
+<p>For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass design and you won't want to put iPod nano down.</p>
+<p><strong><span style="font-size: small;">Great looks. And brains, too.</span></strong></p>
+<p>The new Genius feature turns iPod nano into your own highly intelligent, personal DJ. It creates playlists by finding songs in your library that go great together.</p>
+<p><strong><span style="font-size: small;">Made to move with your moves.</span></strong></p>
+<p>The accelerometer comes to iPod nano. Give it a shake to shuffle your music. Turn it sideways to view Cover Flow. And play games designed with your moves in mind.</p>
+ <p>New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.</p>
+ ipod-nano
+
+
+
+ iPod Nano
+ In stock
+
+
+
+ <p><span style="font-size: small;"><strong>Instant attachment.</strong></span></p>
+<p>Wear up to 500 songs on your sleeve. Or your belt. Or your gym shorts. iPod shuffle is a badge of musical devotion. Now in new, more brilliant colors.</p>
+<p><span style="font-size: small;"><strong>Feed your iPod shuffle.</strong></span></p>
+<p>iTunes is your entertainment superstore. It’s your ultra-organized music collection and jukebox. And it’s how you load up your iPod shuffle in one click.</p>
+<p><span style="font-size: small;"><strong>Beauty and the beat.</strong></span></p>
+<p>Intensely colorful anodized aluminum complements the simple design of iPod shuffle. Now in blue, green, pink, red, and original silver.</p>
+ <p>iPod shuffle, the world’s most wearable music player, now clips on in more vibrant blue, green, pink, and red.</p>
+ ipod-shuffle
+
+
+
+ iPod shuffle
+ In stock
+
+
+
+ <p>MacBook Air is nearly as thin as your index finger. Practically every detail that could be streamlined has been. Yet it still has a 13.3-inch widescreen LED display, full-size keyboard, and large multi-touch trackpad. It’s incomparably portable without the usual ultraportable screen and keyboard compromises.</p><p>The incredible thinness of MacBook Air is the result of numerous size- and weight-shaving innovations. From a slimmer hard drive to strategically hidden I/O ports to a lower-profile battery, everything has been considered and reconsidered with thinness in mind.</p><p>MacBook Air is designed and engineered to take full advantage of the wireless world. A world in which 802.11n Wi-Fi is now so fast and so available, people are truly living untethered — buying and renting movies online, downloading software, and sharing and storing files on the web. </p>
+ MacBook Air is ultrathin, ultraportable, and ultra unlike anything else. But you don’t lose inches and pounds overnight. It’s the result of rethinking conventions. Of multiple wireless innovations. And of breakthrough design. With MacBook Air, mobile computing suddenly has a new standard.
+ macbook-air
+
+
+
+ MacBook Air
+
+
+
+
+ Every MacBook has a larger hard drive, up to 250GB, to store growing media collections and valuable data.<br /><br />The 2.4GHz MacBook models now include 2GB of memory standard — perfect for running more of your favorite applications smoothly.
+ MacBook makes it easy to hit the road thanks to its tough polycarbonate case, built-in wireless technologies, and innovative MagSafe Power Adapter that releases automatically if someone accidentally trips on the cord.
+ macbook
+
+
+
+ MacBook
+
+
+
+
+ <h3>Five new hands-on applications</h3>
+<p>View rich HTML email with photos as well as PDF, Word, and Excel attachments. Get maps, directions, and real-time traffic information. Take notes and read stock and weather reports.</p>
+<h3>Touch your music, movies, and more</h3>
+<p>The revolutionary Multi-Touch technology built into the gorgeous 3.5-inch display lets you pinch, zoom, scroll, and flick with your fingers.</p>
+<h3>Internet in your pocket</h3>
+<p>With the Safari web browser, see websites the way they were designed to be seen and zoom in and out with a tap.<sup>2</sup> And add Web Clips to your Home screen for quick access to favorite sites.</p>
+<h3>What's in the box</h3>
+<ul>
+<li><span></span>iPod touch</li>
+<li><span></span>Earphones</li>
+<li><span></span>USB 2.0 cable</li>
+<li><span></span>Dock adapter</li>
+<li><span></span>Polishing cloth</li>
+<li><span></span>Stand</li>
+<li><span></span>Quick Start guide</li>
+</ul>
+ <ul>
+<li>Revolutionary Multi-Touch interface</li>
+<li>3.5-inch widescreen color display</li>
+<li>Wi-Fi (802.11b/g)</li>
+<li>8 mm thin</li>
+<li>Safari, YouTube, Mail, Stocks, Weather, Notes, iTunes Wi-Fi Music Store, Maps</li>
+</ul>
+ ipod-touch
+
+
+
+ iPod touch
+
+
+
+
+ <p>Lorem ipsum</p>
+ <p>Lorem ipsum</p>
+ belkin-leather-folio-for-ipod-nano-black-chocolate
+
+
+
+ Belkin Leather Folio for iPod nano - Black / Chocolate
+
+
+
+
+ <div class="product-overview-full">Using Hi-Definition MicroSpeakers to deliver full-range audio, the ergonomic and lightweight design of the SE210 earphones is ideal for premium on-the-go listening on your iPod or iPhone. They offer the most accurate audio reproduction from both portable and home stereo audio sources--for the ultimate in precision highs and rich low end. In addition, the flexible design allows you to choose the most comfortable fit from a variety of wearing positions. <br /> <br /> <strong>Features </strong> <br />
+<ul>
+<li>Sound-isolating design </li>
+<li> Hi-Definition MicroSpeaker with a single balanced armature driver </li>
+<li> Detachable, modular cable so you can make the cable longer or shorter depending on your activity </li>
+<li> Connector compatible with earphone ports on both iPod and iPhone </li>
+</ul>
+<strong>Specifications </strong><br />
+<ul>
+<li>Speaker type: Hi-Definition MicroSpeaker </li>
+<li> Frequency range: 25Hz-18.5kHz </li>
+<li> Impedance (1kHz): 26 Ohms </li>
+<li> Sensitivity (1mW): 114 dB SPL/mW </li>
+<li> Cable length (with extension): 18.0 in./45.0 cm (54.0 in./137.1 cm) </li>
+</ul>
+<strong>In the box</strong><br />
+<ul>
+<li>Shure SE210 earphones </li>
+<li> Extension cable (36.0 in./91.4 cm) </li>
+<li> Three pairs foam earpiece sleeves (small, medium, large) </li>
+<li> Three pairs soft flex earpiece sleeves (small, medium, large) </li>
+<li> One pair triple-flange earpiece sleeves </li>
+<li> Carrying case </li>
+</ul>
+Warranty<br /> Two-year limited <br />(For details, please visit <br />www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm.) <br /><br /> Mfr. Part No.: SE210-A-EFS <br /><br />Note: Products sold through this website that do not bear the Apple Brand name are serviced and supported exclusively by their manufacturers in accordance with terms and conditions packaged with the products. Apple's Limited Warranty does not apply to products that are not Apple-branded, even if packaged or sold with Apple products. Please contact the manufacturer directly for technical support and customer service.</div>
+ <p>Evolved from personal monitor technology road-tested by pro musicians and perfected by Shure engineers, the lightweight and stylish SE210 delivers full-range audio that's free from outside noise.</p>
+ ecouteurs-a-isolation-sonore-shure-se210-blanc
+
+
+
+ Shure SE210 Sound-Isolating Earphones for iPod and iPhone
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/profile.xml b/install-dev/fixtures/apple/langs/nl/data/profile.xml
new file mode 100644
index 000000000..02aa4d76c
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/profile.xml
@@ -0,0 +1,15 @@
+
+
+
+ Administrator
+
+
+ Logistician
+
+
+ Translator
+
+
+ Salesman
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/scene.xml b/install-dev/fixtures/apple/langs/nl/data/scene.xml
new file mode 100644
index 000000000..f7270d3ff
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/scene.xml
@@ -0,0 +1,12 @@
+
+
+
+ The iPods Nano
+
+
+ The iPods
+
+
+ The MacBooks
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/supplier.xml b/install-dev/fixtures/apple/langs/nl/data/supplier.xml
new file mode 100644
index 000000000..e9db64034
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/supplier.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/data/tag.xml b/install-dev/fixtures/apple/langs/nl/data/tag.xml
new file mode 100644
index 000000000..b781c0ed2
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/data/tag.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/install-dev/fixtures/apple/langs/nl/index.php b/install-dev/fixtures/apple/langs/nl/index.php
new file mode 100644
index 000000000..67d9932bf
--- /dev/null
+++ b/install-dev/fixtures/apple/langs/nl/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Cache-Control: post-check=0, pre-check=0', false);
+header('Pragma: no-cache');
+
+header('Location: ../../../../../');
+exit;
\ No newline at end of file
diff --git a/install-dev/index.php b/install-dev/index.php
index 995a182ca..67ad72e8f 100644
--- a/install-dev/index.php
+++ b/install-dev/index.php
@@ -24,14 +24,11 @@
* International Registered Trademark & Property of PrestaShop SA
*/
-require_once 'init.php';
+require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'init.php');
-try
-{
- require_once _PS_INSTALL_PATH_.'classes/controllerHttp.php';
+try {
+ require_once(_PS_INSTALL_PATH_.'classes'.DIRECTORY_SEPARATOR.'controllerHttp.php');
InstallControllerHttp::execute();
-}
-catch (PrestashopInstallerException $e)
-{
+} catch (PrestashopInstallerException $e) {
$e->displayMessage();
}
diff --git a/install-dev/init.php b/install-dev/init.php
index cf0d611ab..d55d22b87 100644
--- a/install-dev/init.php
+++ b/install-dev/init.php
@@ -24,6 +24,8 @@
* International Registered Trademark & Property of PrestaShop SA
*/
+ob_start();
+
// Check PHP version
if (version_compare(PHP_VERSION, '5.1.3', '<'))
die('You need at least PHP 5.1.3 to run PrestaShop. Your current PHP version is '.PHP_VERSION);
@@ -37,7 +39,7 @@ define('_PS_INSTALL_MODELS_PATH_', _PS_INSTALL_PATH_.'models/');
define('_PS_INSTALL_LANGS_PATH_', _PS_INSTALL_PATH_.'langs/');
define('_PS_INSTALL_FIXTURES_PATH_', _PS_INSTALL_PATH_.'fixtures/');
-require_once(_PS_INSTALL_PATH_ . 'install_version.php');
+require_once(_PS_INSTALL_PATH_.'install_version.php');
// we check if theses constants are defined
// in order to use init.php in upgrade.php script
@@ -71,8 +73,8 @@ if (!@ini_get('date.timezone'))
ini_set('magic_quotes_runtime', 0);
// Try to improve memory limit if it's under 32M
-if (psinstall_get_memory_limit() < psinstall_get_octets('32M'))
- ini_set('memory_limit', '32M');
+if (psinstall_get_memory_limit() < psinstall_get_octets('64M'))
+ ini_set('memory_limit', '64M');
function psinstall_get_octets($option)
{
diff --git a/install-dev/install_version.php b/install-dev/install_version.php
index 5d86dc4df..0eb85db70 100644
--- a/install-dev/install_version.php
+++ b/install-dev/install_version.php
@@ -24,4 +24,4 @@
* International Registered Trademark & Property of PrestaShop SA
*/
-define('_PS_INSTALL_VERSION_', '1.5.4.1');
+define('_PS_INSTALL_VERSION_', '1.5.5.0');
diff --git a/install-dev/langs/br/data/tab.xml b/install-dev/langs/br/data/tab.xml
index 27e2d2651..d0dd5591e 100644
--- a/install-dev/langs/br/data/tab.xml
+++ b/install-dev/langs/br/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -76,7 +75,7 @@
-
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/br/install.php b/install-dev/langs/br/install.php
index e379bec88..ab4e5715b 100644
--- a/install-dev/langs/br/install.php
+++ b/install-dev/langs/br/install.php
@@ -2,7 +2,8 @@
return array(
'informations' => array(
'phone' => '+1 888.947.6543',
- 'support' => 'https://www.prestashop.com/pt/support',
+ 'support' => 'https://www.prestashop.com/pt/support',
+ 'blog' => 'http://www.prestashop.com/blog/pt/'
),
'translations' => array(
'menu_welcome' => 'Escolha seu idioma',
@@ -162,7 +163,7 @@ return array(
'Test message from PrestaShop' => 'Mensagem de teste do PrestaShop',
'This is a test message, your server is now available to send email' => 'Esta é uma mensagem de teste, seu servidor está disponível agora para enviar emails.',
'%s - Login information' => '%s - Informação de identificação',
- 'An SQL error occured for entity %1$s: %2$s' => 'Um erro SQL ocorrey para a entidade %1$s : %2$s',
+ 'An SQL error occured for entity %1$s: %2$s' => 'Um erro SQL ocorreu para a entidade %1$s : %2$s',
'Cannot create image "%1$s" for entity "%2$s"' => 'Não é possível criar imagem "%1$s" para a entidade "%2$s"',
'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => 'Não é possível criar imagem "%1$s" (permissão inválida na pasta "%2$s")',
'Cannot create image "%s"' => 'Não é possível criar imagem "%s"',
@@ -211,7 +212,7 @@ return array(
'We are currently checking PrestaShop compatibility with your system environment' => 'Neste momento, nós estamos verificando a compatibilidade do PrestaShop com seu ambiente de sistema.',
'PrestaShop compatibility with your system environment has been verified!' => 'A compatibilidade do PrestaShop com seu ambiente de sistema foi verificada!',
'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Ups! Por favor corrija o(s) item(s) abaixo, e depois clique “Atualizar Informação” para testar a compatibilidade do seu novo sistema.',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'A instalação do PrestaShop é rápida e fácil. Em alguns minutos, você vai se tornar parte de uma comunidade composta por mais de 130 mil comerciantes. Você está no caminho certo para criar sua própria loja virtual original que você pode gerenciar facilmente todos os dias.',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'A instalação do PrestaShop é rápida e fácil. Em alguns minutos, você vai se tornar parte de uma comunidade composta por mais de 150 mil comerciantes. Você está no caminho certo para criar sua própria loja virtual original que você pode gerenciar facilmente todos os dias.',
'Continue the installation in:' => 'Continue a instalação em:',
'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'A seleção de idioma acima é válida somente para o Assistente de Instalação. Uma vez que a loja for instalada, você pode escolher o idioma da sua loja entre mais de %d traduções disponíveis, totalmente grátis!',
'The field %s is limited to %d characters' => 'O campo %s está limitado a %d caractéres',
@@ -237,5 +238,14 @@ return array(
'E-mail:' => 'E-mail:',
'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'PrestaShop requer pelo menos 32M de memória para funcionar, por favor verifique memory_limit no php.ini ou contate seu provedor de hospedagem.',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'O caminho para sessão PHP não pode ser escrito - verifique com o seu provedor de hospedagem',
+ 'Database is created' => 'Banco de dados está criado',
+ 'Cannot create the database automatically' => 'Não é possível criar o banco de dados automaticamente',
+ 'Install modules Addons' => 'Instalar módulos Addons',
+ 'Attempt to create the database automatically' => 'Tentativa de criar o banco de dados automaticamente',
+ 'Country:' => 'País:',
+ 'Must be letters and numbers with at least 8 characters' => 'Deve ser letras e números com pelo menos 8 caractéres',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Para instalar o PrestaShop, você precisa ter JavaScript ativado no seu navegador',
+ 'To enjoy the many features that are offered for free 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.' => 'Para aproveitar os muitos recursos que são oferecidos grátis pelo PrestaShop, por favor, leia os termos de licença abaixo. O núcleo do PrestaShop é licenciado sob OSL 3.0, enquanto os módulos e temas são licenciados sob AFL 3.0.',
+ 'For security purposes, you must delete the "install" folder.' => 'Por questões de segurança, você deve deletar a pasta "install"',
),
-);
\ No newline at end of file
+);
diff --git a/install-dev/langs/de/data/tab.xml b/install-dev/langs/de/data/tab.xml
index fdda483e3..237e792eb 100644
--- a/install-dev/langs/de/data/tab.xml
+++ b/install-dev/langs/de/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -76,7 +75,7 @@
-
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/de/install.php b/install-dev/langs/de/install.php
index b09b8ac8b..b39302665 100644
--- a/install-dev/langs/de/install.php
+++ b/install-dev/langs/de/install.php
@@ -204,7 +204,7 @@ return array(
'Print my login information' => 'Meine Zugangsinformationen ausdrucken',
'We are currently checking PrestaShop compatibility with your system environment' => 'Wir überprüfen derzeit die Kompatibilität von PrestaShop mit Ihrer Systemumgebung.',
'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Bitte korrigieren Sie untenstehende(n) Punkt(e) und klicken Sie anschließend auf den Refresh-Button, um erneut die Kompatibilität Ihres Systems zu überprüfen.',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'Die PrestaShop-Installation ist schnell und einfach. In nur wenigen Minuten werden Sie Teil einer Community aus über 130 000 Händlern und erstellen einen Onlineshop, der genau zu Ihnen passt und der einfach in der täglichen Verwaltung ist.',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'Die PrestaShop-Installation ist schnell und einfach. In nur wenigen Minuten werden Sie Teil einer Community aus über 150 000 Händlern und erstellen einen Onlineshop, der genau zu Ihnen passt und der einfach in der täglichen Verwaltung ist.',
'Continue the installation in:' => 'Die Installation fortführen als:',
'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'Die untenstehende Sprachauswahl bezieht sich auf den Installationsassistenten. Sobald Ihr Shop installiert ist, können Sie aus %d Sprachen Ihre Shopsprache wählen!',
'An error occurred during logo copy.' => 'Beim Logo Copy ist ein Fehler aufgetreten.',
diff --git a/install-dev/langs/en/data/meta.xml b/install-dev/langs/en/data/meta.xml
index bae593782..9fc060f31 100644
--- a/install-dev/langs/en/data/meta.xml
+++ b/install-dev/langs/en/data/meta.xml
@@ -3,61 +3,61 @@
404 error
This page cannot be found
- error, 404, not found
+
page-not-found
Best sales
Our best sales
- best sales
+
best-sales
Contact us
Use our form to contact us
- contact, form, e-mail
+
contact-us
Shop powered by PrestaShop
- shop, prestashop
+
Manufacturers
Manufacturers list
- manufacturer
+
manufacturers
New products
Our new products
- new, products
+
new-products
Forgot your password
Enter your e-mail address used to register in goal to get e-mail with your new password
- forgot, password, e-mail, new, reset
+
password-recovery
Prices drop
Our special products
- special, prices drop
+
prices-drop
Sitemap
Lost ? Find what your are looking for
- sitemap
+
sitemap
Suppliers
Suppliers list
- supplier
+
supplier
@@ -73,10 +73,10 @@
addresses
- Authentication
+ Login
- authentication
+ login
Cart
diff --git a/install-dev/langs/en/data/tab.xml b/install-dev/langs/en/data/tab.xml
index e6d9c8f35..4eaf19c75 100644
--- a/install-dev/langs/en/data/tab.xml
+++ b/install-dev/langs/en/data/tab.xml
@@ -48,10 +48,8 @@
-
+
-
-
diff --git a/install-dev/langs/es/data/tab.xml b/install-dev/langs/es/data/tab.xml
index 0d83e4f2a..6d0c59194 100644
--- a/install-dev/langs/es/data/tab.xml
+++ b/install-dev/langs/es/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -75,8 +74,8 @@
-
-
+
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/es/install.php b/install-dev/langs/es/install.php
index 78401e6cb..cb7234192 100644
--- a/install-dev/langs/es/install.php
+++ b/install-dev/langs/es/install.php
@@ -1,8 +1,9 @@
array(
- 'phone' => '+1 (888) 947-6543',
- 'support' => 'https://www.prestashop.com/es/support',
+ 'phone' => '+34 917.872.909',
+ 'support' => 'https://www.prestashop.com/es/support',
+ 'blog' => 'http://www.prestashop.com/blog/es/'
),
'translations' => array(
'menu_welcome' => 'Elegir el idioma',
@@ -205,7 +206,7 @@ return array(
'Print my login information' => 'Imprimir la información e inicio de sesión',
'We are currently checking PrestaShop compatibility with your system environment' => 'Verificamos en este momento la compatibilidad de PrestaShop con tu entorno del sistema',
'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => '¡Uups! Por favor corrija los siguientes puntos marcados como errores y después hacer Clic en el botón "Actualizar esta información" con el fin de probar de nuevo la compatibilidad de tu sistema.',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'La instalación de PrestaShop es rápida y fácil. En solo unos minutos, podrás unirte a una comunidad de más de 130.000 comerciantes electrónicos. Así podrás crear tu propia tienda Online con tu imagen corporativa y administrarla a diario de forma muy sencilla.',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'La instalación de PrestaShop es rápida y fácil. En solo unos minutos, podrás unirte a una comunidad de más de 150.000 comerciantes electrónicos. Así podrás crear tu propia tienda Online con tu imagen corporativa y administrarla a diario de forma muy sencilla.',
'Continue the installation in:' => 'Continuar la instalación en:',
'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'La elección del idioma se realiza sólo al inicio y se aplica al asistente de instalación. Una vez que tu tienda Online está instalada, podrás elegir el idioma de tu tienda, ¡entre las más de %d traducciones disponibles, ¡todas ellas de forma gratuitas!',
'The field %s is limited to %d characters' => 'El campo %s está limitado a %d caracteres',
@@ -234,5 +235,16 @@ return array(
'PrestaShop compatibility with your system environment has been verified!' => '¡La compatibilidad de PrestaShop con su entorno del sistema ha sido verificada correctamente!',
'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'PrestaShop requiere al menos 32MB de memoria para funcionar, por favor verifica la directiva memory_limit que se encuentra en el fichero php.ini o contacta con su proveedor de alojamiento',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'El fichero de almacenamiento no está disponible en modo escritura, consulte con su proveedor de alojamiento',
+ 'Database is created' => 'Base de datos se creada',
+ 'Cannot create the database automatically' => 'No se puede crear la base de datos automáticamente',
+ 'Install modules Addons' => 'Instalar módulos Addons',
+ 'Attempt to create the database automatically' => 'Tentativa de crear la base de datos automáticamente',
+ 'Country:' => 'País:',
+ 'Must be letters and numbers with at least 8 characters' => 'Deben ser letras y números con un mínimo de 8 caracteres',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Para instalar PrestaShop, usted necesita tener el Javascript activado en su navegador.',
+ 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript' => 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript',
+ 'To enjoy the many features that are offered for free 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.' => 'Para disfrutar de las numerosas funcionalidades ofrecidas de forma gratuita por PrestaShop, por favor lea los términos de la licencia a continuación. Core PrestaShop está disponible bajo la licencia OSL 3.0, mientras que los módulos y los temas están licenciados bajo la AFL 3.0.',
+ 'For security purposes, you must delete the "install" folder.' => 'Por razones de seguridad, debe eliminar la carpeta "install".',
+ 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation' => 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation',
),
-);
\ No newline at end of file
+);
diff --git a/install-dev/langs/fr/data/meta.xml b/install-dev/langs/fr/data/meta.xml
index a197ea60a..9d845be18 100644
--- a/install-dev/langs/fr/data/meta.xml
+++ b/install-dev/langs/fr/data/meta.xml
@@ -3,61 +3,61 @@
Erreur 404
Cette page est introuvable
- erreur, 404, introuvable
+
page-non-trouvee
Meilleures ventes
Liste de nos produits les mieux vendus
- meilleures ventes
+
meilleures-ventes
Contactez-nous
Utilisez notre formulaire pour nous contacter
- contact, formulaire, e-mail
+
contactez-nous
Boutique propulsée par PrestaShop
- boutique, prestashop
+
Fabricants
Liste de nos fabricants
- fabricants
+
fabricants
Nouveaux produits
Liste de nos nouveaux produits
- nouveau, produit
+
nouveaux-produits
Mot de passe oublié
Renseignez votre adresse e-mail afin de recevoir votre nouveau mot de passe.
- mot de passe, oublié, e-mail, nouveau, regénération
+
mot-de-passe-oublie
Promotions
Nos produits en promotion
- promotion, réduction
+
promotions
Plan du site
Perdu ? Trouvez ce que vous cherchez
- plan, site
+
plan-du-site
Fournisseurs
Liste de nos fournisseurs
- fournisseurs
+
fournisseurs
diff --git a/install-dev/langs/fr/data/tab.xml b/install-dev/langs/fr/data/tab.xml
index 0da00ee0b..db545d6b9 100644
--- a/install-dev/langs/fr/data/tab.xml
+++ b/install-dev/langs/fr/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -76,7 +75,7 @@
-
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/fr/install.php b/install-dev/langs/fr/install.php
index 2d78ecee2..c4a31b4f5 100644
--- a/install-dev/langs/fr/install.php
+++ b/install-dev/langs/fr/install.php
@@ -209,7 +209,7 @@ return array(
'PrestaShop compatibility with your system environment has been verified!' => 'La compatibilité de PrestaShop avec votre système a été vérifiée',
'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Merci de bien vouloir corriger le(s) point(s) ci-dessous puis de cliquer sur le bouton "Rafraichir ces informations" afin de tester à nouveau la compatibilité de votre système.',
'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'PrestaShop nécessite au moins 32Mo de mémoire pour fonctionner, merci de vérifier la valeur de la directive memory_limit dans votre fichier php.ini ou de contacter votre hébergeur.',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installation de PrestaShop est simple et rapide. En quelques minutes seulement, vous rejoindrez une communauté de plus de 130 000 marchands pour créer une boutique en ligne à votre image et la gérer facilement au quotidien.',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installation de PrestaShop est simple et rapide. En quelques minutes seulement, vous rejoindrez une communauté de plus de 150 000 marchands pour créer une boutique en ligne à votre image et la gérer facilement au quotidien.',
'Continue the installation in:' => 'Continuer l\'installation en :',
'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'Le choix de la langue ci-dessus s\'applique à l\'assistant d\'installation. Une fois votre boutique installée, vous pourrez choisir la langue de votre boutique parmi plus de %d traductions disponibles gratuitement !',
'To use PrestaShop, you must create a database to collect all of your store’s data-related activities.' => 'Pour utiliser PrestaShop, vous devez créer une base de données afin de rassembler l\'ensemble des données liées à l\'activité de votre boutique.',
@@ -240,5 +240,13 @@ return array(
'Sign-up to the newsletter' => 'S\'inscrire à la newsletter de PrestaShop',
'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, please uncheck this box.' => 'PrestaShop peut vous guider de façon régulière en vous faisant parvenir des conseils afin d\'optimiser la gestion de votre boutique et développer votre activité. Si vous ne souhaitez pas recevoir ces conseils, nous vous invitons à décocher cette case.',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'Le dossier de stockage n\'est pas accessible en écriture - consultez votre hébergeur',
+ 'Database is created' => 'Base de données créée',
+ 'Cannot create the database automatically' => 'Impossible de créer la base de données automatiquement',
+ 'Install modules Addons' => 'Installation des modules Addons',
+ 'Attempt to create the database automatically' => 'Essayer de créer la base de données automatiquement',
+ 'Country:' => 'Pays :',
+ 'Must be letters and numbers with at least 8 characters' => 'Lettres et chiffres avec au moins 8 caractères',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Pour installer PrestaShop, vous devez avoir JavaScript activé dans votre navigateur',
+ 'For security purposes, you must delete the "install" folder.' => 'Pour des raisons de sécurité, vous devez supprimer le dossier "install" manuellement.',
),
-);
+);
\ No newline at end of file
diff --git a/install-dev/langs/it/data/tab.xml b/install-dev/langs/it/data/tab.xml
index cbf510160..d92e19771 100644
--- a/install-dev/langs/it/data/tab.xml
+++ b/install-dev/langs/it/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -76,7 +75,7 @@
-
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/it/install.php b/install-dev/langs/it/install.php
index 47bccfb0e..ac4e5c6c7 100644
--- a/install-dev/langs/it/install.php
+++ b/install-dev/langs/it/install.php
@@ -2,7 +2,8 @@
return array(
'informations' => array(
'phone' => '+33 (0)1.40.18.30.04',
- 'support' => 'https://www.prestashop.com/it/support',
+ 'support' => 'https://www.prestashop.com/it/support',
+ 'blog' => 'http://www.prestashop.com/blog/it/'
),
'translations' => array(
'menu_welcome' => 'Scelta della lingua',
@@ -16,9 +17,9 @@ return array(
'Invalid shop name' => 'Nome negozio non valido',
'Your firstname contains some invalid characters' => 'Il tuo nome contiene caratteri non validi',
'Your lastname contains some invalid characters' => 'Il tuo cognome contiene caratteri non validi',
- 'The password is incorrect (alphanumeric string with at least 8 characters)' => 'La password non è corretta (stringa alfanumerica di almeno 8 caratteri)',
- 'Password and its confirmation are different' => 'La prima password digitata non coincide con la seconda',
- 'This e-mail address is invalid' => 'L\'indirizzo e-mail non è valido',
+ 'The password is incorrect (alphanumeric string with at least 8 characters)' => 'La password non è corretta (sequenza alfanumerica di almeno 8 caratteri)',
+ 'Password and its confirmation are different' => 'La password digitata non coincide con la conferma della stessa',
+ 'This e-mail address is invalid' => 'L\'indirizzo email non è valido',
'The uploaded file exceeds the upload_max_filesize directive in php.ini' => 'Il file inviato supera la dimensione massima autorizzata.',
'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form' => 'Il file inviato supera la dimensione massima autorizzata.',
'The uploaded file was only partially uploaded' => 'Il file è stato parzialmente inviato.',
@@ -34,7 +35,7 @@ return array(
'Lingerie and Adult' => 'Intimo e adulti',
'Animals and Pets' => 'Animali',
'Art and Culture' => 'Arte e cultura',
- 'Babies' => 'Neonato',
+ 'Babies' => 'Neonati',
'Beauty and Personal Care' => 'Bellezza e cura del corpo',
'Cars' => 'Automobili',
'Computer Hardware and Software' => 'Informatica e software',
@@ -50,7 +51,7 @@ return array(
'Services' => 'Servizi',
'Shoes and accessories' => 'Scarpe e accessori',
'Sports and Entertainment' => 'Sport e divertimenti',
- 'Travel' => 'Viaggi e turismo',
+ 'Travel' => 'Viaggi',
'Database is connected' => 'Il database è connesso',
'A test e-mail has been sent to %s' => 'Un\'e-mail di prova è stata inviata a %s',
'An error occurred while sending email, please verify your parameters' => 'Si è verificato un errore nell\'invio dell\'e-mail. Controlla le impostazioni.',
@@ -59,7 +60,7 @@ return array(
'Populate database tables' => 'Compilazione tabelle nel database',
'Configure shop information' => 'Configurazione del negozio',
'Install modules' => 'Installazione moduli',
- 'Install demonstration data' => 'Installazione demo',
+ 'Install demonstration data' => 'Installazione dati dimostrativi',
'Install theme' => 'Installazione del tema',
'PHP parameters:' => 'Parametri PHP:',
'Is PHP 5.1.2 or later installed ?' => 'PHP 5.1.2 o successivi installato?',
@@ -81,21 +82,21 @@ return array(
'Please choose your main activity' => 'Seleziona l\'attività principale',
'Other activity...' => 'Altre attività...',
'This information is not required, it will only be used for statistical purposes. This information does not change anything in your store.' => 'Queste informazioni non sono obbligatorie, saranno utilizzate a fini statistici. Queste informazioni non cambieranno nulla nel tuo negozio.',
- 'Install demo products:' => 'Installazione prodotti demo:',
+ 'Install demo products:' => 'Installazione prodotti dimostrativi:',
'Yes' => 'Sì',
'No' => 'No',
- 'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => 'I prodotti demo sono un buon modo per imparare a utilizzare PrestaShop. Dovresti installarli se non hai ancora dimestichezza con la soluzione',
+ 'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => 'I prodotti dimostrativi sono un buon modo per imparare a utilizzare PrestaShop. Dovresti installarli se non hai ancora dimestichezza con la piattaforma.',
'Default country:' => 'Paese di default:',
'Select your country' => 'Seleziona il tuo paese',
- 'Shop timezone:' => 'Zona oraria del negozio:',
- 'Select your timezone' => 'Seleziona la tua zona oraria',
+ 'Shop timezone:' => 'Fuso orario del negozio:',
+ 'Select your timezone' => 'Seleziona il tuo fuso orario',
'Shop logo:' => 'Logo del negozio:',
'Recommended dimensions:' => 'Dimensioni suggerite:',
'First name:' => 'Nome:',
'Last name:' => 'Cognome:',
- 'E-mail address:' => 'Indirizzo e-mail:',
+ 'E-mail address:' => 'Indirizzo email:',
'Shop password:' => 'Password del negozio:',
- 'Re-type to confirm:' => 'Ridigita la password:',
+ 'Re-type to confirm:' => 'Digita nuovamente la password:',
'Receive this information by e-mail' => 'Riceverò le mie informazioni tramite e-mail',
'Warning: You will receive this information only if your e-mail configuration is correct.' => 'Attenzione: riceverai queste informazioni per email solo le la configurazione è corretta',
'Configure your database by filling out the following fields:' => 'Configura il database compilando i campi sottostanti:',
@@ -103,23 +104,23 @@ return array(
'Database server address:' => 'Indirizzo server del database:',
'If you want to use a different port, add :XX after your server address where XX is your port number.' => 'Se vuoi utilizzare una porta differente aggiungi :XX dopo il tuo indirizzo dove XX è il numero della porta',
'Database name:' => 'Nome del database:',
- 'Database login:' => 'ID del database:',
+ 'Database login:' => 'Nome di accesso database:',
'Database password:' => 'Password del database:',
'Database Engine:' => 'Motore del database:',
'Tables prefix:' => 'Prefisso delle tabelle:',
- 'Drop existing tables (mode dev):' => 'Cancella le tabelle esistenti (modalità DEV):',
+ 'Drop existing tables (mode dev):' => 'Cancella le tabelle esistenti (modalità dev):',
'Verify now!' => 'Controlla ora!',
'E-mail delivery set-up' => 'Impostazioni invio e-mail',
'Configure SMTP manually (advanced users only)' => 'Configura il server SMTP manualmente (solo per utenti esperti)',
'By default, the PHP mail() function is used' => 'La funzione PHP mail() è utilizzata per default',
'SMTP server address:' => 'Indirizzo server SMTP:',
- 'Encryption:' => 'Criptaggio:',
+ 'Encryption:' => 'Crittografia:',
'None' => 'Nessuno',
'Port:' => 'Porta:',
- 'Login:' => 'ID:',
+ 'Login:' => 'Nome:',
'Password:' => 'Password:',
- 'enter@your.email' => 'inserisci@latua.email',
- 'Send me a test email!' => 'Inviami un\'e-mail di prova!',
+ 'enter@your.email' => 'inserisci@la.tua.email',
+ 'Send me a test email!' => 'Inviami un\'email di prova!',
'Next' => 'Avanti',
'Back' => 'Indietro',
'Official forum' => 'Forum ufficiale',
@@ -129,17 +130,17 @@ return array(
'Forum' => 'Forum',
'Blog' => 'Blog',
'Done!' => 'Fatto!',
- 'An error occured during installation...' => 'Si è verificato un errore in fase di installazione…',
+ 'An error occured during installation...' => 'Si è verificato un errore durane la fase di installazione…',
'You can use the links on the left column to go back to the previous steps, or restart the installation process by clicking here.' => 'Puoi usare i link sulla colonna di sinistra per tornare indietro alle fasi precedenti, oppure puoi riavviare il processo di installazione cliccando qui.',
'Your installation is finished!' => 'Installazione conclusa!',
- 'You have just finished installing your shop. Thank you for using PrestaShop!' => 'Il tuo negozio è stato installato correttamente. Grazie di aver scelto PrestaShop!',
- 'Please remember your login information:' => 'Ricorda i dati per il login:',
+ 'You have just finished installing your shop. Thank you for using PrestaShop!' => 'Il tuo negozio è stato installato correttamente. Grazie per aver scelto PrestaShop!',
+ 'Please remember your login information:' => 'Ricorda le credenziali per il login:',
'WARNING: For security purposes, you must delete the "install" folder.' => 'ATTENZIONE: per motivi di sicurezza, devi cancellare la cartella \'install\'.',
'Back Office' => 'Back Office',
- 'Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.' => 'Gestisci il tuo negozio a partire dal Back Office. Gestisci ordini e clienti, aggiungi moduli, modifica i temi...',
+ 'Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.' => 'Gestisci il tuo negozio tramite il Back Office. Gestisci ordini e clienti, aggiungi moduli, modifica i temi, ecc.',
'Manage your store' => 'Gestisci il negozio',
'Front Office' => 'Front Office',
- 'Discover your store as your future customers will see it!' => 'Scopri come vedranno il negozio i tuoi futuri clienti!',
+ 'Discover your store as your future customers will see it!' => 'Scopri come i tuoi futuri clienti vedranno il negozio!',
'Discover your store' => 'Scopri il negozio',
'Required set-up. Please verify the following checklist items are true.' => 'Impostazioni obbligatorie. Per favore verifica che la lista sia ok',
'Your configuration is valid, click next to continue!' => 'La tua configurazione è valida, clicca su avanti per continuare',
@@ -148,62 +149,62 @@ return array(
'Refresh these settings' => 'Aggiorna le impostazioni',
'Welcome to the PrestaShop %s Installer.' => 'Benvenuto nell\'Assistente di Installazione di PrestaShop %s .',
'The installation process should take only few minutes!' => 'Il processo di installazione dovrebbe durare solo pochi minuti!',
- 'If you need help, do not hesitate to check our documentation or to contact our support team: %2$s' => 'Se hai bisogno di aiuto, consulta i nostri documenti oppure contatta il nostro servizio di assistenza: %2$s',
+ 'If you need help, do not hesitate to check our documentation or to contact our support team: %2$s' => 'Se hai bisogno di aiuto, consulta la nostra documentazione oppure contatta il nostro servizio di assistenza: %2$s',
'Did you know?' => 'Lo sapevi?',
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e la sua comunità offre %d diverse lingue gratuite, direttamente accessibile nel tuo back office nel tab Traduzioni',
- 'License Agreements' => 'Contratti di Licenza',
+ 'License Agreements' => 'Accordi di licenza',
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Il core di PrestaShop è rilasicata sollo licenza OSL 3.0 mentre i moduli e i temi prestashop sono rilasciati sotto licenza AFL 3.0',
- 'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni dei presenti contratti.',
- 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Accetto di contribuire al miglioramento della soluzione inviando informazioni anonime sulla mia configurazione.',
- 'If you have any questions, please visit our documentation and community forum.' => 'Se hai domande o dubbi, visita i nostri documenti e il forum dedicato alla nostra comunità.',
+ 'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni dei presenti accordi.',
+ 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Accetto di contribuire al miglioramento della piattaforma mediante l\'invio di informazioni anonime sulla mia configurazione.',
+ 'If you have any questions, please visit our documentation and community forum.' => 'Se hai domande o dubbi, visita la nostra documentazione e il forum dedicato alla nostra comunità.',
'Test message from PrestaShop' => 'Messaggio di prova da parte di Prestashop',
'This is a test message, your server is now available to send email' => 'Questo è un messaggio di prova, il tuo server può ora inviare e-mail',
'%s - Login information' => '%s - credenziali per il login',
'An SQL error occured for entity %1$s: %2$s' => 'Si è verificato un errore SQL per l\'entità %1$s: %2$s',
'Cannot create image "%1$s" for entity "%2$s"' => 'Impossibile creare l\'immagine "%1$s" per l\'entità "%2$s"',
- 'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => 'Impossibile creare l\'immagine "%1$s" (errore permessi cartella "%2$s")',
+ 'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => 'Impossibile creare l\'immagine "%1$s" (errore permessi nella cartella "%2$s")',
'Cannot create image "%s"' => 'Impossibile creare l\'immagine "%s"',
- 'SQL error on query %s' => 'Errore SQL nella ricerca %s',
+ 'SQL error on query %s' => 'Errore SQL nella query %s',
'Server name is not valid' => 'Il nome del server non è valido',
- 'You must enter a database name' => 'Digita il nome del database',
- 'You must enter a database login' => 'Digita i dati di accesso al database',
+ 'You must enter a database name' => 'Devi inserire il nome del database',
+ 'You must enter a database login' => 'Devi inserire un nome di accesso al database',
'Tables prefix is invalid' => 'Prefisso tabelle non valido',
'Wrong engine chosen for MySQL' => 'Il motore selezionato non è valido per MySQL',
'Cannot convert database data to utf-8' => 'Impossibile convertire i dati del database in utf-8',
'At least one table with same prefix was already found, please change your prefix or drop your database' => 'È stata trovata almeno un\'altra tabella con lo stesso prefisso. Cambia il prefisso o cancella le altre tabelle esistenti.',
- 'Database Server is not found. Please verify the login, password and server fields' => 'Impossibile connettersi al server del database. Verifica l\'ID, la password e i campi riservati al server',
+ 'Database Server is not found. Please verify the login, password and server fields' => 'Impossibile connettersi al server del database. Verifica i campi con il nome di accesso, la password e il server',
'Connection to MySQL server succeeded, but database "%s" not found' => 'La connessione al server MySQL è avvenuta con successo, ma è impossibile trovare il database "%s"',
'Engine innoDB is not supported by your MySQL server, please use MyISAM' => 'Il motore innoDB non è supportato dal tuo server MySQL. Adopera MyISAM',
'%s file is not writable (check permissions)' => 'Il file %s non è scrivibile (verifica i permessi)',
'%s folder is not writable (check permissions)' => 'La cartella %s non è scrivibile (verifica i permessi)',
- 'Cannot write settings file' => 'Impossibile generare il file settings',
+ 'Cannot write settings file' => 'Impossibile generare il file di impostazioni (settings)',
'Database structure file not found' => 'Struttura del database non trovata',
- 'Cannot create group shop' => 'Impossibile accedere al gruppo del negozio',
+ 'Cannot create group shop' => 'Impossibile creare il gruppo negozi',
'Cannot create shop' => 'Impossibile creare il negozio',
'Cannot create shop URL' => 'Impossibile creare l\'URL del negozio',
- 'File "language.xml" not found for language iso "%s"' => 'File "language.xml" non trovato per l\'iso "%s"',
- 'File "language.xml" not valid for language iso "%s"' => 'File "language.xml" non valido per l\'iso "%s"',
+ 'File "language.xml" not found for language iso "%s"' => 'File "language.xml" non trovato per la lingua con iso "%s"',
+ 'File "language.xml" not valid for language iso "%s"' => 'File "language.xml" non valido per la lingua con iso "%s"',
'Cannot install language "%s"' => 'Impossibile installare la lingua "%s"',
'Cannot create admin account' => 'Impossibile creare l\'account admin',
'Cannot install module "%s"' => 'Impossibile installare il modulo "%s"',
- 'Fixtures class "%s" not found' => 'Classe "%s" per le fixture non trovata',
+ 'Fixtures class "%s" not found' => 'Classe fixture "%s" non trovata',
'"%s" must be an instane of "InstallXmlLoader"' => '"%s" deve essere un\'istanza di "InstallXmlLoader"',
'Information about your Store' => 'Informazioni relative al negozio',
'Help us learn more about your store so we can offer you optimal guidance and the best features for your business!' => 'Aiutaci a conoscerti per orientarti al meglio e proporti le funzioni più adatte alla tua attività!',
'Optional - You can add you logo at a later time.' => 'Facoltativo – Potrai aggiungerlo in un secondo momento.',
'Your Account' => 'Il tuo account',
- 'This email address will be your username to access your store\'s back office.' => 'Questo indirizzo e-mail sarà l\'ID con cui potrai accedere all’interfaccia di gestione del negozio.',
- 'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, please uncheck this box.' => 'PrestaShop può assisterti regolarmente facendoti pervenire i suoi consigli per ottimizzare la gestione del negozio e sviluppare la tua attività online. Se non desideri ricevere i nostri consigli, ti invitiamo a deselezionare questa casella.',
+ 'This email address will be your username to access your store\'s back office.' => 'Questo indirizzo email sarà il tuo nome utente con cui potrai accedere all’interfaccia di gestione del negozio.',
+ 'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, please uncheck this box.' => 'PrestaShop può assisterti regolarmente facendoti pervenire i suoi consigli per ottimizzare la gestione del negozio e sviluppare la tua attività online. Se non desideri ricevere i nostri consigli, deseleziona questa casella.',
'The field %s is limited to %d characters' => 'Il campo %s può comprendere fino a %d caratteri',
- 'An error occurred during logo copy.' => 'Si è verificato un errore durante la copiatura del logo',
- 'An error occurred during logo upload.' => 'Si è verificato un errore durante il caricamento del logo',
- 'Create default shop and languages' => 'Creazione negozio e lingue per default',
+ 'An error occurred during logo copy.' => 'Si è verificato un errore durante la copiatura del logo.',
+ 'An error occurred during logo upload.' => 'Si è verificato un errore durante il caricamento del logo.',
+ 'Create default shop and languages' => 'Creazione negozio e lingue di default',
'PHP 5.1.2 or later is not enabled' => 'PHP 5.1.2 o successivo non attivo',
'Cannot upload files' => 'Impossibile caricare i file',
'Cannot create new files and folders' => 'Impossibile creare nuovi file e cartelle',
- 'GD Library is not installed' => 'La GD Library non è installata',
- 'MySQL support is not activated' => 'L\'assistenza di MySQL non è attiva',
- 'Recursive write permissions on files and folders:' => 'Permessi scrittura ricorsiva su file e cartelle:',
+ 'GD Library is not installed' => 'La libreria GD non è installata',
+ 'MySQL support is not activated' => 'Il supporto MySQL non è attivo',
+ 'Recursive write permissions on files and folders:' => 'Permessi di scrittura ricorsivi su file e cartelle:',
'Cannot open external URLs' => 'Impossibile aprire URL esterne',
'PHP register global option is on' => 'L\'opzione PHP register global è attiva',
'GZIP compression is not activated' => 'La compressione GZIP non è attiva',
@@ -214,26 +215,35 @@ return array(
'PDO MySQL extension is not loaded' => 'L\'estensione PDO MySQL non è caricata',
'Cannot copy flag language "%s"' => 'Impossibile copiare la bandiera per la lingua "%s"',
'Must be alphanumeric string with at least 8 characters' => 'Deve essere una stringa alfanumerica di almeno 8 caratteri',
- 'Sign-up to the newsletter' => 'Mi abbono alla newsletter',
+ 'Sign-up to the newsletter' => 'Abbonamento alla newsletter',
'To use PrestaShop, you must create a database to collect all of your store’s data-related activities.' => 'Per usare PrestaShop, devi creare un database per riunire tutti i dati inerenti alle attività del tuo negozio.',
'Please complete the fields below in order for PrestaShop to connect to your database. ' => 'Compila i campi sottostanti per far sì che PrestaShop possa connettersi al tuo database.',
- 'The default port is 3306. To use a different port, add the port number at the end of your server’s address i.e ":4242".' => 'La porta di default è 3306. Per usare un\'altra porta, digita il numero della porta alla fine del tuo indirizzo di server. Per esempio: "4242".',
- 'Test your database connection now!' => 'Verifica subito la connessione al tuo database!',
- 'If you need some assistance during the installation process, please call our team at %s and one of our experts will be happy to help.' => 'Se si verificano problemi durante il processo di installazione, chiamaci allo %s. Uno dei nostri esperti sarà felice di aiutarti.',
+ 'The default port is 3306. To use a different port, add the port number at the end of your server’s address i.e ":4242".' => 'La porta di default è 3306. Per usare un\'altra porta, digita il numero della porta alla fine dell\'indirizzo server. Ad esempio ":4242".',
+ 'Test your database connection now!' => 'Verifica adesso la connessione al tuo database!',
+ 'If you need some assistance during the installation process, please call our team at %s and one of our experts will be happy to help.' => 'Se si verificano problemi durante il processo di installazione, chiamaci: %s. Uno dei nostri esperti sarà felice di aiutarti.',
'PrestaShop Installation Assistant' => 'Assistente di Installazione PrestaShop',
'Contact us!' => 'Contattaci!',
'Installation Assistant' => 'Assistente di Installazione',
'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.' => 'Per usufruire delle numerose funzioni offerte da PrestaShop, leggi i termini e le condizioni dei contratti di licenza. Il core di PrestaShop è pubblicato sotto licenza OSL 3.0, mentre i moduli e i temi sotto licenza AFL 3.0. ',
- 'E-mail:' => 'E-mail:',
- 'Print my login information' => 'Stampa delle credenziali per il login',
+ 'E-mail:' => 'Email:',
+ 'Print my login information' => 'Stampa le credenziali per il login',
'Display' => 'Visualizza',
'We are currently checking PrestaShop compatibility with your system environment' => 'Stiamo verificando la compatibilità di PrestaShop con il tuo sistema',
- 'PrestaShop compatibility with your system environment has been verified!' => 'Abbiamo verificato la compatibilità del tuo sistema con PrestaShop!',
- 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Correggi i punti seguenti, quindi clicca sul pulsante "Aggiorna" per verificare la compatibilità di PrestaShop con il nuovo sistema.',
- 'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'L\'esecuzione di PrestaShop necessita di almeno 32M di memoria. Controlla i limiti della tua memoria in php.ini o contatta il tuo fornitore di hosting',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installazione di PrestaShop è semplice e veloce. Tra pochi minuti, farai parte di una comunità di oltre 130.000 commercianti. Potrai creare un negozio a tua immagina e facile da gestire giorno dopo giorno.',
+ 'PrestaShop compatibility with your system environment has been verified!' => 'La compatibilità del tuo sistema con PrestaShop è stata verificata!',
+ 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Ops! Correggi i seguenti punti, quindi clicca sul pulsante "Aggiorna" per verificare la compatibilità di PrestaShop del tuo nuovo sistema.',
+ 'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'L\'esecuzione di PrestaShop necessita di almeno 32M di memoria. Controlla la voce memory_limit nel file php.ini o contatta il tuo fornitore di hosting',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'L\'installazione di PrestaShop è semplice e veloce. In pochi minuti, farai parte di una comunità di oltre 150.000 commercianti. Potrai creare un negozio unico a tuo piacere, facile da gestire giorno dopo giorno.',
'Continue the installation in:' => 'Continua l\'installazione in:',
- 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'La selezione della lingua si applica solo all\'Assistente di Installazione. Una volta che il negozio è installato, potrai scegliere la lingua del negozio tra le oltre %d traduzioni disponibili gratuitamente!',
+ 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'La selezione della lingua qui sopra è valida solamente nell\'Assistente di Installazione. Una volta che il negozio è installato, potrai scegliere la lingua del negozio tra le oltre %d traduzioni disponibili gratuitamente!',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'La cartella di backup non è accessibile per scrittura - consulta il nostro servizio di hosting',
+ 'Database is created' => 'Il database è creato',
+ 'Cannot create the database automatically' => 'Non è possibile creare il database automaticamente',
+ 'Install modules Addons' => 'Installazione moduli Addons',
+ 'Attempt to create the database automatically' => 'Tentativo di creare il database automaticamente',
+ 'Country:' => 'Paese:',
+ 'Must be letters and numbers with at least 8 characters' => 'Deve contenere lettere e numeri ed essere composta da almeno 8 caratteri',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Per installare PrestaShop, devi avere JavaScript abilitato nel tuo browser.',
+ 'To enjoy the many features that are offered for free 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.' => 'Per godere delle svariate funzioni che PrestaShop offre gratuitamente, si prega di leggere le condizioni di licenza qui di seguito. Il nucleo di PrestaShop è rilasciato sotto licenza OSL 3.0, mentre i moduli e i temi sono rilasciati sotto licenza AFL 3.0.',
+ 'For security purposes, you must delete the "install" folder.' => 'Per motivi di sicurezza, devi cancellare la cartella "install".',
),
-);
\ No newline at end of file
+);
diff --git a/install-dev/langs/nl/data/carrier.xml b/install-dev/langs/nl/data/carrier.xml
new file mode 100644
index 000000000..343fa6f51
--- /dev/null
+++ b/install-dev/langs/nl/data/carrier.xml
@@ -0,0 +1,6 @@
+
+
+
+ Pick up in-store
+
+
diff --git a/install-dev/langs/nl/data/category.xml b/install-dev/langs/nl/data/category.xml
new file mode 100644
index 000000000..87b90b95e
--- /dev/null
+++ b/install-dev/langs/nl/data/category.xml
@@ -0,0 +1,19 @@
+
+
+
+ Root
+
+ root
+
+
+
+
+
+ Home
+
+ home
+
+
+
+
+
diff --git a/install-dev/langs/nl/data/cms.xml b/install-dev/langs/nl/data/cms.xml
new file mode 100644
index 000000000..37edee2c4
--- /dev/null
+++ b/install-dev/langs/nl/data/cms.xml
@@ -0,0 +1,45 @@
+
+
+
+ Delivery
+ Our terms and conditions of delivery
+ conditions, delivery, delay, shipment, pack
+ <h2>Shipments and returns</h2><h3>Your pack shipment</h3><p>Packages are generally dispatched within 2 days after receipt of payment and are shipped via UPS with tracking and drop-off without signature. If you prefer delivery by UPS Extra with required signature, an additional cost will be applied, so please contact us before choosing this method. Whichever shipment choice you make, we will provide you with a link to track your package online.</p><p>Shipping fees include handling and packing fees as well as postage costs. Handling fees are fixed, whereas transport fees vary according to total weight of the shipment. We advise you to group your items in one order. We cannot group two distinct orders placed separately, and shipping fees will apply to each of them. Your package will be dispatched at your own risk, but special care is taken to protect fragile objects.<br /><br />Boxes are amply sized and your items are well-protected.</p>
+ delivery
+
+
+ Legal Notice
+ Legal notice
+ notice, legal, credits
+ <h2>Legal</h2><h3>Credits</h3><p>Concept and production:</p><p>This Web site was created using <a href="http://www.prestashop.com">PrestaShop</a>™ open-source software.</p>
+ legal-notice
+
+
+ Terms and conditions of use
+ Our terms and conditions of use
+ conditions, terms, use, sell
+ <h2>Your terms and conditions of use</h2><h3>Rule 1</h3><p>Here is the rule 1 content</p>
+<h3>Rule 2</h3><p>Here is the rule 2 content</p>
+<h3>Rule 3</h3><p>Here is the rule 3 content</p>
+ terms-and-conditions-of-use
+
+
+ About us
+ Learn more about us
+ about us, informations
+ <h2>About us</h2>
+<h3>Our company</h3><p>Our company</p>
+<h3>Our team</h3><p>Our team</p>
+<h3>Informations</h3><p>Informations</p>
+ about-us
+
+
+ Secure payment
+ Our secure payment mean
+ secure payment, ssl, visa, mastercard, paypal
+ <h2>Secure payment</h2>
+<h3>Our secure payment</h3><p>With SSL</p>
+<h3>Using Visa/Mastercard/Paypal</h3><p>About this services</p>
+ secure-payment
+
+
diff --git a/install-dev/langs/nl/data/cms_category.xml b/install-dev/langs/nl/data/cms_category.xml
new file mode 100644
index 000000000..ceb8cf491
--- /dev/null
+++ b/install-dev/langs/nl/data/cms_category.xml
@@ -0,0 +1,11 @@
+
+
+
+ Home
+
+ home
+
+
+
+
+
diff --git a/install-dev/langs/nl/data/configuration.xml b/install-dev/langs/nl/data/configuration.xml
new file mode 100644
index 000000000..ef31b5d07
--- /dev/null
+++ b/install-dev/langs/nl/data/configuration.xml
@@ -0,0 +1,21 @@
+
+
+
+ IN
+
+
+ DE
+
+
+ a|the|of|on|in|and|to
+
+
+ 0
+
+
+ Dear Customer,
+
+Regards,
+Customer service
+
+
diff --git a/install-dev/langs/nl/data/contact.xml b/install-dev/langs/nl/data/contact.xml
new file mode 100644
index 000000000..bdc0b24d9
--- /dev/null
+++ b/install-dev/langs/nl/data/contact.xml
@@ -0,0 +1,9 @@
+
+
+
+ If a technical problem occurs on this website
+
+
+ For any question about a product, an order
+
+
diff --git a/install-dev/langs/nl/data/country.xml b/install-dev/langs/nl/data/country.xml
new file mode 100644
index 000000000..d57ea1e36
--- /dev/null
+++ b/install-dev/langs/nl/data/country.xml
@@ -0,0 +1,735 @@
+
+
+
+ Germany
+
+
+ Austria
+
+
+ Belgium
+
+
+ Canada
+
+
+ China
+
+
+ Spain
+
+
+ Finland
+
+
+ France
+
+
+ Greece
+
+
+ Italy
+
+
+ Japan
+
+
+ Luxemburg
+
+
+ Netherlands
+
+
+ Poland
+
+
+ Portugal
+
+
+ Czech Republic
+
+
+ United Kingdom
+
+
+ Sweden
+
+
+ Switzerland
+
+
+ Denmark
+
+
+ United States
+
+
+ HongKong
+
+
+ Norway
+
+
+ Australia
+
+
+ Singapore
+
+
+ Ireland
+
+
+ New Zealand
+
+
+ South Korea
+
+
+ Israel
+
+
+ South Africa
+
+
+ Nigeria
+
+
+ Ivory Coast
+
+
+ Togo
+
+
+ Bolivia
+
+
+ Mauritius
+
+
+ Romania
+
+
+ Slovakia
+
+
+ Algeria
+
+
+ American Samoa
+
+
+ Andorra
+
+
+ Angola
+
+
+ Anguilla
+
+
+ Antigua and Barbuda
+
+
+ Argentina
+
+
+ Armenia
+
+
+ Aruba
+
+
+ Azerbaijan
+
+
+ Bahamas
+
+
+ Bahrain
+
+
+ Bangladesh
+
+
+ Barbados
+
+
+ Belarus
+
+
+ Belize
+
+
+ Benin
+
+
+ Bermuda
+
+
+ Bhutan
+
+
+ Botswana
+
+
+ Brazil
+
+
+ Brunei
+
+
+ Burkina Faso
+
+
+ Burma (Myanmar)
+
+
+ Burundi
+
+
+ Cambodia
+
+
+ Cameroon
+
+
+ Cape Verde
+
+
+ Central African Republic
+
+
+ Chad
+
+
+ Chile
+
+
+ Colombia
+
+
+ Comoros
+
+
+ Congo, Dem. Republic
+
+
+ Congo, Republic
+
+
+ Costa Rica
+
+
+ Croatia
+
+
+ Cuba
+
+
+ Cyprus
+
+
+ Djibouti
+
+
+ Dominica
+
+
+ Dominican Republic
+
+
+ East Timor
+
+
+ Ecuador
+
+
+ Egypt
+
+
+ El Salvador
+
+
+ Equatorial Guinea
+
+
+ Eritrea
+
+
+ Estonia
+
+
+ Ethiopia
+
+
+ Falkland Islands
+
+
+ Faroe Islands
+
+
+ Fiji
+
+
+ Gabon
+
+
+ Gambia
+
+
+ Georgia
+
+
+ Ghana
+
+
+ Grenada
+
+
+ Greenland
+
+
+ Gibraltar
+
+
+ Guadeloupe
+
+
+ Guam
+
+
+ Guatemala
+
+
+ Guernsey
+
+
+ Guinea
+
+
+ Guinea-Bissau
+
+
+ Guyana
+
+
+ Haiti
+
+
+ Heard Island and McDonald Islands
+
+
+ Vatican City State
+
+
+ Honduras
+
+
+ Iceland
+
+
+ India
+
+
+ Indonesia
+
+
+ Iran
+
+
+ Iraq
+
+
+ Man Island
+
+
+ Jamaica
+
+
+ Jersey
+
+
+ Jordan
+
+
+ Kazakhstan
+
+
+ Kenya
+
+
+ Kiribati
+
+
+ Korea, Dem. Republic of
+
+
+ Kuwait
+
+
+ Kyrgyzstan
+
+
+ Laos
+
+
+ Latvia
+
+
+ Lebanon
+
+
+ Lesotho
+
+
+ Liberia
+
+
+ Libya
+
+
+ Liechtenstein
+
+
+ Lithuania
+
+
+ Macau
+
+
+ Macedonia
+
+
+ Madagascar
+
+
+ Malawi
+
+
+ Malaysia
+
+
+ Maldives
+
+
+ Mali
+
+
+ Malta
+
+
+ Marshall Islands
+
+
+ Martinique
+
+
+ Mauritania
+
+
+ Hungary
+
+
+ Mayotte
+
+
+ Mexico
+
+
+ Micronesia
+
+
+ Moldova
+
+
+ Monaco
+
+
+ Mongolia
+
+
+ Montenegro
+
+
+ Montserrat
+
+
+ Morocco
+
+
+ Mozambique
+
+
+ Namibia
+
+
+ Nauru
+
+
+ Nepal
+
+
+ Netherlands Antilles
+
+
+ New Caledonia
+
+
+ Nicaragua
+
+
+ Niger
+
+
+ Niue
+
+
+ Norfolk Island
+
+
+ Northern Mariana Islands
+
+
+ Oman
+
+
+ Pakistan
+
+
+ Palau
+
+
+ Palestinian Territories
+
+
+ Panama
+
+
+ Papua New Guinea
+
+
+ Paraguay
+
+
+ Peru
+
+
+ Philippines
+
+
+ Pitcairn
+
+
+ Puerto Rico
+
+
+ Qatar
+
+
+ Reunion Island
+
+
+ Russian Federation
+
+
+ Rwanda
+
+
+ Saint Barthelemy
+
+
+ Saint Kitts and Nevis
+
+
+ Saint Lucia
+
+
+ Saint Martin
+
+
+ Saint Pierre and Miquelon
+
+
+ Saint Vincent and the Grenadines
+
+
+ Samoa
+
+
+ San Marino
+
+
+ São Tomé and Príncipe
+
+
+ Saudi Arabia
+
+
+ Senegal
+
+
+ Serbia
+
+
+ Seychelles
+
+
+ Sierra Leone
+
+
+ Slovenia
+
+
+ Solomon Islands
+
+
+ Somalia
+
+
+ South Georgia and the South Sandwich Islands
+
+
+ Sri Lanka
+
+
+ Sudan
+
+
+ Suriname
+
+
+ Svalbard and Jan Mayen
+
+
+ Swaziland
+
+
+ Syria
+
+
+ Taiwan
+
+
+ Tajikistan
+
+
+ Tanzania
+
+
+ Thailand
+
+
+ Tokelau
+
+
+ Tonga
+
+
+ Trinidad and Tobago
+
+
+ Tunisia
+
+
+ Turkey
+
+
+ Turkmenistan
+
+
+ Turks and Caicos Islands
+
+
+ Tuvalu
+
+
+ Uganda
+
+
+ Ukraine
+
+
+ United Arab Emirates
+
+
+ Uruguay
+
+
+ Uzbekistan
+
+
+ Vanuatu
+
+
+ Venezuela
+
+
+ Vietnam
+
+
+ Virgin Islands (British)
+
+
+ Virgin Islands (U.S.)
+
+
+ Wallis and Futuna
+
+
+ Western Sahara
+
+
+ Yemen
+
+
+ Zambia
+
+
+ Zimbabwe
+
+
+ Albania
+
+
+ Afghanistan
+
+
+ Antarctica
+
+
+ Bosnia and Herzegovina
+
+
+ Bouvet Island
+
+
+ British Indian Ocean Territory
+
+
+ Bulgaria
+
+
+ Cayman Islands
+
+
+ Christmas Island
+
+
+ Cocos (Keeling) Islands
+
+
+ Cook Islands
+
+
+ French Guiana
+
+
+ French Polynesia
+
+
+ French Southern Territories
+
+
+ Åland Islands
+
+
diff --git a/install-dev/langs/nl/data/gender.xml b/install-dev/langs/nl/data/gender.xml
new file mode 100644
index 000000000..75fc2ed2a
--- /dev/null
+++ b/install-dev/langs/nl/data/gender.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/install-dev/langs/nl/data/group.xml b/install-dev/langs/nl/data/group.xml
new file mode 100644
index 000000000..2d1b70934
--- /dev/null
+++ b/install-dev/langs/nl/data/group.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/install-dev/langs/nl/data/index.php b/install-dev/langs/nl/data/index.php
new file mode 100644
index 000000000..10edbfe91
--- /dev/null
+++ b/install-dev/langs/nl/data/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Cache-Control: post-check=0, pre-check=0', false);
+header('Pragma: no-cache');
+
+header('Location: ../../../../');
+exit;
\ No newline at end of file
diff --git a/install-dev/langs/nl/data/meta.xml b/install-dev/langs/nl/data/meta.xml
new file mode 100644
index 000000000..bae593782
--- /dev/null
+++ b/install-dev/langs/nl/data/meta.xml
@@ -0,0 +1,159 @@
+
+
+
+ 404 error
+ This page cannot be found
+ error, 404, not found
+ page-not-found
+
+
+ Best sales
+ Our best sales
+ best sales
+ best-sales
+
+
+ Contact us
+ Use our form to contact us
+ contact, form, e-mail
+ contact-us
+
+
+
+ Shop powered by PrestaShop
+ shop, prestashop
+
+
+
+ Manufacturers
+ Manufacturers list
+ manufacturer
+ manufacturers
+
+
+ New products
+ Our new products
+ new, products
+ new-products
+
+
+ Forgot your password
+ Enter your e-mail address used to register in goal to get e-mail with your new password
+ forgot, password, e-mail, new, reset
+ password-recovery
+
+
+ Prices drop
+ Our special products
+ special, prices drop
+ prices-drop
+
+
+ Sitemap
+ Lost ? Find what your are looking for
+ sitemap
+ sitemap
+
+
+ Suppliers
+ Suppliers list
+ supplier
+ supplier
+
+
+ Address
+
+
+ address
+
+
+ Addresses
+
+
+ addresses
+
+
+ Authentication
+
+
+ authentication
+
+
+ Cart
+
+
+ cart
+
+
+ Discount
+
+
+ discount
+
+
+ Order history
+
+
+ order-history
+
+
+ Identity
+
+
+ identity
+
+
+ My account
+
+
+ my-account
+
+
+ Order follow
+
+
+ order-follow
+
+
+ Order slip
+
+
+ order-slip
+
+
+ Order
+
+
+ order
+
+
+ Search
+
+
+ search
+
+
+ Stores
+
+
+ stores
+
+
+ Order
+
+
+ quick-order
+
+
+ Guest tracking
+
+
+ guest-tracking
+
+
+ Order confirmation
+
+
+ order-confirmation
+
+
diff --git a/install-dev/langs/nl/data/order_return_state.xml b/install-dev/langs/nl/data/order_return_state.xml
new file mode 100644
index 000000000..37ad31de9
--- /dev/null
+++ b/install-dev/langs/nl/data/order_return_state.xml
@@ -0,0 +1,18 @@
+
+
+
+ Waiting for confirmation
+
+
+ Waiting for package
+
+
+ Package received
+
+
+ Return denied
+
+
+ Return completed
+
+
diff --git a/install-dev/langs/nl/data/order_state.xml b/install-dev/langs/nl/data/order_state.xml
new file mode 100644
index 000000000..c44dc3358
--- /dev/null
+++ b/install-dev/langs/nl/data/order_state.xml
@@ -0,0 +1,51 @@
+
+
+
+ Awaiting cheque payment
+ cheque
+
+
+ Payment accepted
+ payment
+
+
+ Preparation in progress
+ preparation
+
+
+ Shipped
+ shipped
+
+
+ Delivered
+
+
+
+ Canceled
+ order_canceled
+
+
+ Refund
+ refund
+
+
+ Payment error
+ payment_error
+
+
+ On backorder
+ outofstock
+
+
+ Awaiting bank wire payment
+ bankwire
+
+
+ Awaiting PayPal payment
+
+
+
+ Payment remotely accepted
+ payment
+
+
diff --git a/install-dev/langs/nl/data/profile.xml b/install-dev/langs/nl/data/profile.xml
new file mode 100644
index 000000000..7352a78c7
--- /dev/null
+++ b/install-dev/langs/nl/data/profile.xml
@@ -0,0 +1,6 @@
+
+
+
+ SuperAdmin
+
+
diff --git a/install-dev/langs/nl/data/quick_access.xml b/install-dev/langs/nl/data/quick_access.xml
new file mode 100644
index 000000000..72e5a5b9b
--- /dev/null
+++ b/install-dev/langs/nl/data/quick_access.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/install-dev/langs/nl/data/risk.xml b/install-dev/langs/nl/data/risk.xml
new file mode 100644
index 000000000..bb8bf6dd1
--- /dev/null
+++ b/install-dev/langs/nl/data/risk.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/install-dev/langs/nl/data/stock_mvt_reason.xml b/install-dev/langs/nl/data/stock_mvt_reason.xml
new file mode 100644
index 000000000..e04ec4eb1
--- /dev/null
+++ b/install-dev/langs/nl/data/stock_mvt_reason.xml
@@ -0,0 +1,27 @@
+
+
+
+ Increase
+
+
+ Decrease
+
+
+ Customer Order
+
+
+ Regulation following an inventory of stock
+
+
+ Regulation following an inventory of stock
+
+
+ Transfer to another warehouse
+
+
+ Transfer from another warehouse
+
+
+ Supply Order
+
+
diff --git a/install-dev/langs/nl/data/supplier_order_state.xml b/install-dev/langs/nl/data/supplier_order_state.xml
new file mode 100644
index 000000000..dfc4ce42e
--- /dev/null
+++ b/install-dev/langs/nl/data/supplier_order_state.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/install-dev/langs/nl/data/supply_order_state.xml b/install-dev/langs/nl/data/supply_order_state.xml
new file mode 100644
index 000000000..1e8903f0f
--- /dev/null
+++ b/install-dev/langs/nl/data/supply_order_state.xml
@@ -0,0 +1,21 @@
+
+
+
+ 1 - Creation in progress
+
+
+ 2 - Order validated
+
+
+ 3 - Pending receipt
+
+
+ 4 - Order received in part
+
+
+ 5 - Order received completely
+
+
+ 6 - Order canceled
+
+
diff --git a/install-dev/langs/nl/data/tab.xml b/install-dev/langs/nl/data/tab.xml
new file mode 100644
index 000000000..ddb0ba5fa
--- /dev/null
+++ b/install-dev/langs/nl/data/tab.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install-dev/langs/nl/flag.jpg b/install-dev/langs/nl/flag.jpg
new file mode 100644
index 000000000..733bf752c
Binary files /dev/null and b/install-dev/langs/nl/flag.jpg differ
diff --git a/install-dev/langs/nl/img/index.php b/install-dev/langs/nl/img/index.php
new file mode 100644
index 000000000..10edbfe91
--- /dev/null
+++ b/install-dev/langs/nl/img/index.php
@@ -0,0 +1,35 @@
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Cache-Control: post-check=0, pre-check=0', false);
+header('Pragma: no-cache');
+
+header('Location: ../../../../');
+exit;
\ No newline at end of file
diff --git a/install-dev/langs/nl/img/nl-default-category.jpg b/install-dev/langs/nl/img/nl-default-category.jpg
new file mode 100644
index 000000000..c28c90de1
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-category.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-home.jpg b/install-dev/langs/nl/img/nl-default-home.jpg
new file mode 100644
index 000000000..ae6658431
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-home.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-large.jpg b/install-dev/langs/nl/img/nl-default-large.jpg
new file mode 100644
index 000000000..83f20252e
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-large.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-large_scene.jpg b/install-dev/langs/nl/img/nl-default-large_scene.jpg
new file mode 100644
index 000000000..0c8b30dbe
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-large_scene.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-medium.jpg b/install-dev/langs/nl/img/nl-default-medium.jpg
new file mode 100644
index 000000000..13546aa40
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-medium.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-small.jpg b/install-dev/langs/nl/img/nl-default-small.jpg
new file mode 100644
index 000000000..8cb9417b6
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-small.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-thickbox.jpg b/install-dev/langs/nl/img/nl-default-thickbox.jpg
new file mode 100644
index 000000000..6bd5603f7
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-thickbox.jpg differ
diff --git a/install-dev/langs/nl/img/nl-default-thumb_scene.jpg b/install-dev/langs/nl/img/nl-default-thumb_scene.jpg
new file mode 100644
index 000000000..47d2def48
Binary files /dev/null and b/install-dev/langs/nl/img/nl-default-thumb_scene.jpg differ
diff --git a/install-dev/langs/nl/img/nl.jpg b/install-dev/langs/nl/img/nl.jpg
new file mode 100644
index 000000000..7d07b871d
Binary files /dev/null and b/install-dev/langs/nl/img/nl.jpg differ
diff --git a/js/jquery/plugins/fancybox/images/index.php b/install-dev/langs/nl/index.php
similarity index 74%
rename from js/jquery/plugins/fancybox/images/index.php
rename to install-dev/langs/nl/index.php
index 195fab225..5e4749107 100644
--- a/js/jquery/plugins/fancybox/images/index.php
+++ b/install-dev/langs/nl/index.php
@@ -1,35 +1,35 @@
-
-* @copyright 2007-2013 PrestaShop SA
-* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
-
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
-
-header("Location: ../");
-exit;
+
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Cache-Control: post-check=0, pre-check=0', false);
+header('Pragma: no-cache');
+
+header('Location: ../../../');
+exit;
\ No newline at end of file
diff --git a/install-dev/langs/nl/install.php b/install-dev/langs/nl/install.php
new file mode 100644
index 000000000..62e59d74e
--- /dev/null
+++ b/install-dev/langs/nl/install.php
@@ -0,0 +1,202 @@
+ array(
+ 'phone' => '+1 (888) 947-6543',
+ 'documentation' => 'http://doc.prestashop.com/',
+ 'documentation_upgrade' => 'http://docs.prestashop.com/display/PS15/Updating+PrestaShop',
+ 'forum' => 'http://www.prestashop.com/forums/',
+ 'blog' => 'http://www.prestashop.com/blog/',
+ 'support' => 'https://www.prestashop.com/en/support',
+ ),
+ 'translations' => array(
+ 'menu_welcome' => 'Kies uw taal',
+ 'menu_license' => 'Licentieovereenkomsten',
+ 'menu_system' => 'Systeemcompabiliteit',
+ 'menu_database' => 'Systeemconfiguratie',
+ 'menu_configure' => 'Winkel informatie',
+ 'menu_process' => 'Winkel installatie',
+ 'Welcome to the PrestaShop %s Installer.' => 'Welkom bij het PrestaShop %s installatieprogramma.',
+ 'PrestaShop Installation Assistant' => 'PrestaShop Installatie Assistent',
+ 'Installation Assistant' => 'Installatie Assistent',
+ 'Continue the installation in:' => 'Ga verder met de installatie in:',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'De installatie van PrestaShop is snel en eenvoudig. Binnen enkele minuten maakt u deel uit van een community met meer dan 150.000 handelaren. U staat op het punt om uw eigen unieke webwinkel te maken, die u dagelijks eenvoudig kunt beheren.',
+ 'If you need help, do not hesitate to check our documentation or to contact our support team: %2$s' => 'Als u hulp nodig hebt, lees onze documentatie door of neem contact op met onze support team: %2$s',
+ 'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'De talenselectie hierboven geldt alleen voor de installatie assistent. Zodra uw webwinkel is geïnstalleerd, kunt u geheel gratis de taal voor uw webwinkel uit meer dan %d vertalingen kiezen.',
+ 'If you need some assistance during the installation process, please call our team at %s and one of our experts will be happy to help.' => 'Hulp nodig tijdens de installatie? Neem dan contact met ons team op via %s en onze experts helpen u verder.',
+ 'License Agreements' => 'Licentieovereenkomsten',
+ 'To enjoy the many features that are offered for free 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.' => 'Om van de vele functies, die door PrestaShop gratis worden aangebonden, gebruik te maken, lees dan de onderstaande licentievoorwaarden. De PrestaShop-kern is onder OSL 3.0 gelicenseerd, terwijl de modules en thema\'s onder AFL 3.0 zijn gelicenseerd.',
+ 'I agree to the above terms and conditions.' => 'Ik ga akkoord met de bovenstaande voorwaarden.',
+ 'Information about your Store' => 'Informatie over uw webwinkel',
+ 'Shop name:' => 'Winkelnaam:',
+ 'Main activity:' => 'Hoofdactiviteit:',
+ 'Please choose your main activity' => 'Selecteer uw hoofdactiviteit:',
+ 'Animals and Pets' => 'Huisdieren',
+ 'Art and Culture' => 'Kunst en cultuur',
+ 'Babies' => 'Baby\'s',
+ 'Beauty and Personal Care' => 'Schoonheid en persoonlijke verzorging',
+ 'Cars' => 'Auto\'s',
+ 'Computer Hardware and Software' => 'Computer hardware en software',
+ 'Download' => 'Download',
+ 'Fashion and accessories' => 'Mode en accessoires',
+ 'Flowers, Gifts and Crafts' => 'Bloemen, cadeaus en handwerken',
+ 'Food and beverage' => 'Eten en drinken',
+ 'HiFi, Photo and Video' => 'HiFi, foto en video',
+ 'Home and Garden' => 'Huis en tuin',
+ 'Home Appliances' => 'Huishoudelijke apparaten',
+ 'Jewelry' => 'Sierraden',
+ 'Mobile and Telecom' => 'Mobiel en telecom',
+ 'Services' => 'Diensten',
+ 'Shoes and accessories' => 'Schoenen en accessoires',
+ 'Sports and Entertainment' => 'Sport en vermaak',
+ 'Travel' => 'Reizen',
+ 'Lingerie and Adult' => 'Lingerie en volwassen',
+ 'Help us learn more about your store so we can offer you optimal guidance and the best features for your business!' => 'Help ons om zoveel mogelijk informatie over uw webwinkel te ontvangen, zodat wij u een optimale begeleiding en de beste functies kunnen bieden.',
+ 'Yes' => 'Ja',
+ 'No' => 'Nee',
+ 'Field required' => 'Verplicht veld',
+ 'Invalid shop name' => 'Ongeldige winkelnaam',
+ 'This e-mail address is invalid' => 'Dit e-mailadres is ongeldig',
+ 'Country:' => 'Land:',
+ 'Select your country' => 'Selecteer uw land',
+ 'Your Account' => 'Uw account',
+ 'First name:' => 'Voornaam:',
+ 'Last name:' => 'Achternaam:',
+ 'E-mail address:' => 'E-mailadres:',
+ 'Shop password:' => 'Wachtwoord:',
+ 'Must be letters and numbers with at least 8 characters' => 'Moet tenminste uit 8 letters en nummers bestaan',
+ 'Re-type to confirm:' => 'Bevestig wachtwoord:',
+ 'Sign-up to the newsletter' => 'Aanmelden voor de nieuwbrief',
+ 'Install demo products:' => 'Installeer demo producten:',
+ 'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => 'Demo producten zijn een goede manier om te ontdekken hoe PrestaShop werkt. Installeer deze als u er nog niet bekend mee bent.',
+ 'This email address will be your username to access your store\'s back office.' => 'Dit e-mailadres is uw backoffice gebruikersnaam.',
+ 'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, please uncheck this box.' => 'PrestaShop kan op regelmatige basis tips naar u toesturen over hoe u het beheer van uw winkel kunt verbeteren wat u tevens zult helpen om uw bedrijf te laten groeien. Indien u niet wenst om deze tips te ontvangen, vink dit vakje dan uit.',
+ 'Next' => 'Volgende',
+ 'Back' => 'Terug',
+ 'The field %s is limited to %d characters' => 'Dit veld %s is gelimiteerd tot %d karakters',
+ 'Your firstname contains some invalid characters' => 'Uw voornaam bevat enkele ongelidge karakters',
+ 'Your lastname contains some invalid characters' => 'Uw achternaam bevat enkele ongelidge karakters',
+ 'The password is incorrect (alphanumeric string with at least 8 characters)' => 'Het wachtwoord is onjuist (alfanumerieke reeks met tenministe 8 karakters)',
+ 'Password and its confirmation are different' => 'Wachtwoord en de bevestiging zijn verschillend',
+ 'Other activity...' => 'Andere activiteit',
+ 'Configure your database by filling out the following fields:' => 'Configureer uw database door de volgende velden in te vullen:',
+ 'To use PrestaShop, you must create a database to collect all of your store’s data-related activities.' => 'Om PrestaShop te gebruiken, moet u een database maken om alle data-gerelateerde activiteiten van uw winkel te verzamelen',
+ 'Please complete the fields below in order for PrestaShop to connect to your database. ' => 'Vul de onderstaande velden in, zodat PrestaShop een verbinding kan maken met uw database.',
+ 'Database server address:' => 'Database serveradres:',
+ 'The default port is 3306. To use a different port, add the port number at the end of your server’s address i.e ":4242".' => 'De standaardpoort is 3306. Om een andere poort te gebruiken, voeg het poortnummer aan het einde van uw serveradres toe, bijv. ":4242".',
+ 'Database name:' => 'Database naam:',
+ 'Database login:' => 'Database login:',
+ 'Database password:' => 'Database wachtwoord:',
+ 'Tables prefix:' => 'Tabellen prefix:',
+ 'Test your database connection now!' => 'Test uw databaseverbinding nu!',
+ 'None' => 'Geen',
+ 'Port:' => 'Poort:',
+ 'Login:' => 'Login:',
+ 'enter@your.email' => 'enter@your.email',
+ 'Send me a test email!' => 'Stuur mij een test e-mail!',
+ 'Drop existing tables (mode dev):' => 'Bestaande tabellen verwijderen (mode dev):',
+ 'Configure SMTP manually (advanced users only)' => 'Configureer SMTP handmatig (enkel voor geavanceerde gebruikers)',
+ 'SMTP server address:' => 'SMTP serveradres:',
+ 'Encryption:' => 'Encryptie',
+ 'Forum' => 'Forum',
+ 'At least one table with same prefix was already found, please change your prefix or drop your database' => 'Tenminste één table met dezelfde prefix is gevonden. Verander uw prefix of verwijder uw database.',
+ 'Database Server is not found. Please verify the login, password and server fields' => 'Databaseserver is niet gevonden. Controleer de login-, wachtwoord- en servervelden',
+ 'Shop timezone:' => 'Winkel tijdzone',
+ 'Select your timezone' => 'Selecteer uw tijdzone',
+ 'Shop logo:' => 'Winkel logo:',
+ 'Optional - You can add you logo at a later time.' => 'Optioneel - U kunt uw logo later toevoegen',
+ 'Password:' => 'Wachtwoord:',
+ 'E-mail:' => 'E-mail:',
+ 'Print my login information' => 'Print mijn login informatie',
+ 'Official forum' => 'Officiële forum',
+ 'Support' => 'Support',
+ 'Documentation' => 'Documentatie',
+ 'Blog' => 'Blog',
+ 'Your installation is finished!' => 'Uw installatie is voltooid!',
+ 'You have just finished installing your shop. Thank you for using PrestaShop!' => 'U hebt zojuist uw winkel geïnstalleerd. Dank u voor het gebruiken van PrestaShop!',
+ 'Please remember your login information:' => 'Gelieve uw login informatie te onthouden:',
+ 'An SQL error occured for entity %1$s: %2$s' => 'Een SQL fout is opgetreden voor entiteit %1$s: %2$s ',
+ '%s - Login information' => '%s - Login informatie',
+ 'Database is connected' => 'Database is verbonden',
+ 'Database is created' => 'Database is gemaakt',
+ 'Cannot create the database automatically' => 'Kan de database niet automatisch creëren',
+ 'Manage your store' => 'Beheer uw winkel',
+ 'Front Office' => 'Frontoffice',
+ 'Discover your store as your future customers will see it!' => 'Ontdek uw winkel zoals u toekomstige klanten het zullen zien!',
+ 'Discover your store' => 'Ontdek uw winkel',
+ 'We are currently checking PrestaShop compatibility with your system environment' => 'Wij controleren momenteel de compabiliteit van PrestaShop met uw systeemomgeving',
+ 'PrestaShop compatibility with your system environment has been verified!' => 'PrestaShop compabiliteit met uw systeemomgeving is gecontroleerd!',
+ 'Display' => 'Weergave',
+ 'For security purposes, you must delete the "install" folder.' => 'Om beveiligingsredenen moet u de "install" map verwijderen.',
+ 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation' => 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation ',
+ 'Back Office' => 'Backoffice',
+ 'Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.' => 'Beheer uw winkel door uw backoffice te gebruiken. Beheer uw bestellen en klanten, voeg modules toe, verander thema\'s, enz.',
+ 'If you have any questions, please visit our documentation and community forum.' => 'Als u vragen hebt, bezoek dan onze documentatie en community forum. ',
+ 'Oops! Please correct the item(s) below, and then click "Refresh information" to test the compatibility of your new system.' => 'Oeps! Corrigeer de onderstaande item(s) en klik dan "Vernieuw informatie" om de compatibiliteit van uw nieuwe systeem te testen.',
+ 'Refresh these settings' => 'Vernieuw deze instellingen',
+ 'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'PrestaShop vereist tenminste 32MB geheugen om te draaien, controleer de memory_limit richtlijn in php.ini of neem contact op met uw hostingprovider',
+ 'Done!' => 'Klaar!',
+ 'An error occured during installation...' => 'Een fout is optreden tijdens de installatie...',
+ 'You can use the links on the left column to go back to the previous steps, or restart the installation process by clicking here.' => 'In de linkerkolom kunt u van de links gebruikmaken om terug te gaan naar vorige stappen, of het installatieproces opnieuw starten door hier te klikken.',
+ 'Contact us' => 'Contacteer ons',
+ 'Contact us!' => 'Contacteer ons!',
+ 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript' => 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript ',
+ 'Database Engine:' => 'Database engine:',
+ 'E-mail delivery set-up' => 'E-mailinstellingen',
+ 'By default, the PHP mail() function is used' => 'De PHP mail() functie wordt standaard gebruikt',
+ 'Image folder %s is not writable' => 'Afbeeldingmap %s is niet schrijfbaar',
+ 'An error occurred during logo copy.' => 'Een fout is opgetreden tijdens het kopiëren van het logo',
+ 'An error occurred during logo upload.' => 'Een fout is opgetreden tijdens het uploaden van het logo',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Om PrestaShop te installeren moet u JavaScript in uw browser inschakelen.',
+ 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Ik ga akkoord om deel te nemen aan het verbeteren van de software met het sturen van anonieme informatie over mijn configuratie.',
+ 'Cannot create image "%1$s" for entity "%2$s"' => 'Kan afbeelding "%1$s" voor entiteit "%2$s" niet creëren',
+ 'Cannot create image "%s"' => 'Kan afbeelding "%1$s" niet creëren',
+ 'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => 'Kan afbeelding "%1$s" (verkeerde rechten op map "%2$s") niet creëren',
+ 'Create settings.inc file' => 'Creëren settings.inc bestand',
+ 'Create database tables' => 'Creëren database tabellen',
+ 'Create default shop and languages' => 'Creëren standaardwinkel en talen',
+ 'Populate database tables' => 'Vullen database tabellen',
+ 'Configure shop information' => 'Configureren winkelinformatie',
+ 'Install modules' => 'Installeren modules',
+ 'Install modules Addons' => 'Installeren Addons modules',
+ 'Install demonstration data' => 'Installeren demonstratiegegevens',
+ 'Install theme' => 'Installeren thema',
+ 'Cannot upload files' => 'Kan bestanden niet uploaden',
+ 'Cannot create new files and folders' => 'Kan nieuwe bestanden en mappen niet creëren',
+ 'GD Library is not installed' => 'GD Library is niet geïnstalleerd',
+ 'PHP parameters:' => 'PHP parameters:',
+ 'PHP 5.1.2 or later is not enabled' => 'PHP 5.1.2 of hoger is niet geactiveerd',
+ 'MySQL support is not activated' => 'MySQL support is niet geactiveerd',
+ 'Recursive write permissions on files and folders:' => 'Recursieve schrijfrechten op bestanden en mappen:',
+ 'Cannot open external URLs' => 'Kan externe URLs niet openen',
+ 'GZIP compression is not activated' => 'GZIP compressie is niet geactiveerd',
+ 'Mcrypt extension is not enabled' => 'Mcrypt extensie is niet geactiveerd',
+ 'Mbstring extension is not enabled' => 'Mbstring extensie is niet geactiveerd',
+ 'Dom extension is not loaded' => 'Dom extensie is niet geactiveerd',
+ 'Server name is not valid' => 'Servernaam is ongeldig',
+ 'You must enter a database name' => 'U moet een database naam invoeren',
+ 'You must enter a database login' => 'U moet een database login invoeren',
+ 'Tables prefix is invalid' => 'Tabellen prefex is ongeldig',
+ 'SQL error on query %s' => 'SQL fout in zoekopdracht %s',
+ '%s file is not writable (check permissions)' => ' %s bestand is niet schrijfbaar (controleer rechten)',
+ '%s folder is not writable (check permissions)' => ' %s map is niet schrijfbaar (controleer rechten)',
+ 'Database structure file not found' => 'Database structuurbestand is niet gevonden',
+ 'Cannot create group shop' => 'Kan groep winkel niet creëren',
+ 'Cannot create shop' => 'Kan winkel niet creëren',
+ 'Cannot create shop URL' => 'Kan winkel URL niet creëren',
+ 'Cannot install language "%s"' => 'Kan taal "%s" niet installeren',
+ 'Cannot copy flag language "%s"' => 'Kan vlag taal "%s" niet installeren',
+ 'Cannot create admin account' => 'Kan admin account niet creëren',
+ 'Cannot install module "%s"' => 'Kan module "%s" niet installeren',
+ 'Cannot write settings file' => 'Kan instellingbestand niet schrijven',
+ 'File "language.xml" not found for language iso "%s"' => 'Bestand "language.xml" niet gevonden voor taal iso "%s"',
+ 'File "language.xml" not valid for language iso "%s"' => 'Bestand "language.xml" niet gevonden voor taal iso "%s"',
+ '"%s" must be an instane of "InstallXmlLoader"' => '"%s" moet een instantie van "InstallXmlLoader" zijn',
+ 'PHP magic quotes option is enabled' => 'PHP magic quotes optie is geactiveerd',
+ 'PDO MySQL extension is not loaded' => 'PDO MySQL extensie is niet geladen',
+ 'Cannot convert database data to utf-8' => 'Kan databasegegevens niet naar utf-8 converteren',
+ 'Connection to MySQL server succeeded, but database "%s" not found' => 'Verbinding met MySQL server geslaagd, maar database "%s" niet gevonden',
+ 'Attempt to create the database automatically' => 'Poging om de database automatisch te creëren',
+ 'Fixtures class "%s" not found' => 'Fixtures class "%s" niet gevonden',
+ 'PHP register global option is on' => 'PHP register global optie is ingeschakeld',
+ ),
+);
diff --git a/install-dev/langs/nl/language.xml b/install-dev/langs/nl/language.xml
new file mode 100644
index 000000000..588cc5e49
--- /dev/null
+++ b/install-dev/langs/nl/language.xml
@@ -0,0 +1,8 @@
+
+
+
+ nl-nl
+ m/j/Y
+ m/j/Y H:i:s
+ false
+
diff --git a/install-dev/langs/nl/mail_identifiers.txt b/install-dev/langs/nl/mail_identifiers.txt
new file mode 100644
index 000000000..3f768acb3
--- /dev/null
+++ b/install-dev/langs/nl/mail_identifiers.txt
@@ -0,0 +1,10 @@
+Hi {firstname} {lastname},
+
+Here is your personal login information for {shop_name}:
+
+Password: {passwd}
+E-mail address: {email}
+
+{shop_name} - {shop_url}
+
+{shop_url} powered by PrestaShop™
\ No newline at end of file
diff --git a/install-dev/langs/pl/data/tab.xml b/install-dev/langs/pl/data/tab.xml
index beb217285..5594c813a 100644
--- a/install-dev/langs/pl/data/tab.xml
+++ b/install-dev/langs/pl/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -76,7 +75,7 @@
-
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/pl/img/index.php b/install-dev/langs/pl/img/index.php
index f9382edba..5ddf5bce0 100644
--- a/install-dev/langs/pl/img/index.php
+++ b/install-dev/langs/pl/img/index.php
@@ -1,6 +1,6 @@
-* @copyright 2007-2012 PrestaShop SA
+* @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
*/
diff --git a/install-dev/langs/pl/index.php b/install-dev/langs/pl/index.php
index 04675e9e1..8fdf0d3e3 100644
--- a/install-dev/langs/pl/index.php
+++ b/install-dev/langs/pl/index.php
@@ -1,6 +1,6 @@
-* @copyright 2007-2012 PrestaShop SA
+* @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
*/
diff --git a/install-dev/langs/pl/install.php b/install-dev/langs/pl/install.php
index 3197cf69b..7b23e1327 100644
--- a/install-dev/langs/pl/install.php
+++ b/install-dev/langs/pl/install.php
@@ -2,7 +2,8 @@
return array(
'informations' => array(
'phone' => '+33 (0)1.40.18.30.04',
- 'support' => 'https://www.prestashop.com/pl/wsparcie-techniczne',
+ 'support' => 'https://www.prestashop.com/pl/wsparcie-techniczne',
+ 'blog' => 'http://www.prestashop.com/blog/pl/'
),
'translations' => array(
'An SQL error occured for entity %1$s: %2$s' => 'Wystąpił błąd SQL w rekordzie %1$s: %2$s',
@@ -184,7 +185,7 @@ return array(
'Welcome to the PrestaShop %s Installer.' => 'Etapy instalacji PrestaShop %s ',
'Continue the installation in:' => 'Kontynuuj instalację w:',
'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'PrestaShop wymaga co namniej 32M pamięci do odpowiedniego funkcjonowania. Proszę o sprawdzenie wartości dyrektywy memory_limit w pliku php.ini lub skontaktowanie się z Twoim hostingowcem. ',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'Instalacja PrestaShop odbywa się w łatwy i szybki sposób! W kilka minut dołączysz do 130 000 właścicieli sklepów internetowych w Europie, korzystających z naszego oprogramowania e-commerce. Będziesz mógł stworzyć swój sklep według własnych potrzeb i zarządzać nim w prosty sposób.',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'Instalacja PrestaShop odbywa się w łatwy i szybki sposób! W kilka minut dołączysz do 150 000 właścicieli sklepów internetowych w Europie, korzystających z naszego oprogramowania e-commerce. Będziesz mógł stworzyć swój sklep według własnych potrzeb i zarządzać nim w prosty sposób.',
'If you need help, do not hesitate to check our documentation or to contact our support team: %2$s' => 'Jeśli potrzebujesz pomocy zapoznaj się z naszą dokumentacją lub skontaktuj się z działem technicznym;%2$s',
'The language selection above only applies to the Installation Assistant. Once your store is installed, you can choose the language of your store from over %d translations, all for free!' => 'Po dokonaniu instalacji sklepu, wybierz język spośród %d darmowych tłumaczeń.',
'menu_welcome' => 'Wybierz język',
@@ -194,5 +195,16 @@ return array(
'menu_configure' => 'Informacje o sklepie',
'menu_process' => 'Instalacja sklepu',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'Twoja ścieżka sesji PHP jest niezapisywalna - skontaktuj się z dostawcą usług hostingowych:',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Aby zainstalować PrestaShop, musisz mieć włączoną obsługę JavaScript w przeglądarce.',
+ 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript' => 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript ',
+ 'To enjoy the many features that are offered for free 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.' => 'Przed skorzystaniem z darmowych funkcji oferowanych przez PrestaShop zapoznaj się z warunkami licencji. PrestaShop funkcjonuje na licencji OSL 3,0 zaś moduły i szablony na AFL 3,0.',
+ 'For security purposes, you must delete the "install" folder.' => 'Ze względów bezpieczeństwa należy usunąć folder \'\'install\'\'.',
+ 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation' => 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation ',
+ 'Database is created' => 'Baza danych jest tworzona ',
+ 'Cannot create the database automatically' => 'Nie można automatycznie utworzyć bazy danych',
+ 'Install modules Addons' => 'Instalacja modułów Addons',
+ 'Attempt to create the database automatically' => 'Próba utworzenia automatycznie bazy danych',
+ 'Country:' => 'Kraj',
+ 'Must be letters and numbers with at least 8 characters' => 'Minimum 8 znaków z użyciem liter i cyfr',
),
-);
\ No newline at end of file
+);
diff --git a/install-dev/langs/ru/data/tab.xml b/install-dev/langs/ru/data/tab.xml
index 3c835cde1..61e2c4856 100644
--- a/install-dev/langs/ru/data/tab.xml
+++ b/install-dev/langs/ru/data/tab.xml
@@ -64,7 +64,6 @@
-
@@ -76,7 +75,7 @@
-
+
@@ -100,6 +99,5 @@
-
diff --git a/install-dev/langs/ru/img/index.php b/install-dev/langs/ru/img/index.php
index f9382edba..5ddf5bce0 100644
--- a/install-dev/langs/ru/img/index.php
+++ b/install-dev/langs/ru/img/index.php
@@ -1,6 +1,6 @@
-* @copyright 2007-2012 PrestaShop SA
+* @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
*/
diff --git a/install-dev/langs/ru/index.php b/install-dev/langs/ru/index.php
index 04675e9e1..8fdf0d3e3 100644
--- a/install-dev/langs/ru/index.php
+++ b/install-dev/langs/ru/index.php
@@ -1,6 +1,6 @@
-* @copyright 2007-2012 PrestaShop SA
+* @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
*/
diff --git a/install-dev/langs/ru/install.php b/install-dev/langs/ru/install.php
index 063103cd6..cfa04da4a 100644
--- a/install-dev/langs/ru/install.php
+++ b/install-dev/langs/ru/install.php
@@ -2,7 +2,8 @@
return array(
'informations' => array(
'phone' => '+33 (0)1.40.18.30.04',
- 'support' => 'https://www.prestashop.com/en/support',
+ 'support' => 'https://www.prestashop.com/ru/support',
+ 'blog' => 'http://www.prestashop.com/blog/ru/'
),
'translations' => array(
'An SQL error occured for entity %1$s: %2$s' => 'В SQL произошла ошибка для значения %1$s: %2$s',
@@ -223,7 +224,7 @@ return array(
'PrestaShop can provide you with guidance on a regular basis by sending you tips on how to optimize the management of your store which will help you grow your business. If you do not wish to receive these tips, please uncheck this box.' => 'PrestaShop предоставит Вам поддержку, отправляя уведомления о том, как оптимизировать менеджмент Вашего магазина. Если Вы не хотите получать данные уведомления, то снимите флажок с данного поля. ',
'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.' => 'Чтобы использовать многочисленные свойства PrestaShop, прочитайте нижеприведенное лицензионное соглашение. Ядро PrestaShop лицензировано на OSL 3.0,модули и шаблоны - на AFL 3.0.',
'We are currently checking PrestaShop compatibility with your system environment' => 'Мы проверяем совместимость PrestaShop с Вашей системой',
- 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 130,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'У PrestaShop простая и быстрая установка. Всего через несколько минут Вы станете членом сообщества, которое уже насчитывает около 130 000 членов. Вы уже сделали первый шаг для создании Вашего уникального магазина с простым управлением!',
+ 'The installation of PrestaShop is quick and easy. In just a few moments, you will become part of a community consisting of more than 150,000 merchants. You are on the way to creating your own unique online store that you can manage easily every day.' => 'У PrestaShop простая и быстрая установка. Всего через несколько минут Вы станете членом сообщества, которое уже насчитывает около 150 000 членов. Вы уже сделали первый шаг для создании Вашего уникального магазина с простым управлением!',
'menu_system' => 'Совместимость системы',
'menu_database' => 'Конфигурация системы',
'menu_process' => 'Установка магазина',
@@ -231,5 +232,15 @@ return array(
'menu_welcome' => 'Выберите язык',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'Дисковая память недоступна в письменном виде - обратитесь к Вашему хостинг-провайдеру',
'Install modules Addons' => 'Установка модулей Addons',
+ 'Database is created' => 'База данных создана',
+ 'Cannot create the database automatically' => 'Невозможно автоматически создать базу данных',
+ 'Attempt to create the database automatically' => 'Попытка автоматического создания базы данных',
+ 'Country:' => 'Страна:',
+ 'Must be letters and numbers with at least 8 characters' => 'Должен состоять из букв и цифр и содержать минимум 8 символов',
+ 'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Чтобы установить PrestaShop, Вам нужно включить JavaScript в Вашем браузере.',
+ 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript' => 'http://doc.prestashop.com/display/PS15/What+you+need+to+get+started#HowtoenableJavaScript-HowtoenableJavaScript',
+ 'To enjoy the many features that are offered for free 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.' => 'Чтобы пользоваться всем функционалом PrestaShop, прочтите лицензионное соглашение. Ядро PrestaShop разработано на OSL 3.0, модули и темы - на AFL 3.0.',
+ 'For security purposes, you must delete the "install" folder.' => 'В целях безопасности, удалите папку "install\'.',
+ 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation' => 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation',
),
-);
\ No newline at end of file
+);
diff --git a/install-dev/models/database.php b/install-dev/models/database.php
index bb3d78d2d..5ba9dbd84 100644
--- a/install-dev/models/database.php
+++ b/install-dev/models/database.php
@@ -96,7 +96,7 @@ class InstallModelDatabase extends InstallAbstractModel
public function createDatabase($server, $database, $login, $password, $dropit = false)
{
$class = Db::getClass();
- return $class::createDatabase($server, $login, $password, $database, $dropit);
+ return call_user_func(array($class, 'createDatabase'), $server, $login, $password, $database, $dropit);
}
public function getBestEngine($server, $database, $login, $password)
diff --git a/install-dev/models/install.php b/install-dev/models/install.php
index f2be6f8ee..00008c856 100644
--- a/install-dev/models/install.php
+++ b/install-dev/models/install.php
@@ -368,11 +368,14 @@ class InstallModelInstall extends InstallAbstractModel
public function configureShop(array $data = array())
{
// Clear smarty cache
- $this->clearSmartyCache();
-
+ Tools::clearSmartyCache();
+
//clear image cache in tmp folder
- Tools::deleteDirectory(_PS_TMP_IMG_DIR_, false);
-
+ if (file_exists(_PS_TMP_IMG_DIR_))
+ foreach (scandir(_PS_TMP_IMG_DIR_) as $file)
+ if ($file[0] != '.' && $file != 'index.php')
+ Tools::deleteDirectory(_PS_TMP_IMG_DIR_.DIRECTORY_SEPARATOR.$file);
+
$default_data = array(
'shop_name' => 'My Shop',
'shop_activity' => '',
@@ -395,7 +398,7 @@ class InstallModelInstall extends InstallAbstractModel
// use the old image system if the safe_mod is enabled otherwise the installer will fail with the fixtures installation
if (InstallSession::getInstance()->safe_mode)
- Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1);
+ Configuration::updateGlobalValue('PS_LEGACY_IMAGES', 1);
$id_country = Country::getByIso($data['shop_country']);
@@ -494,18 +497,6 @@ class InstallModelInstall extends InstallAbstractModel
return true;
}
- /**
- * Clear smarty cache folders
- */
- public function clearSmartyCache()
- {
- foreach (array(_PS_CACHE_DIR_.'smarty/cache', _PS_CACHE_DIR_.'smarty/compile') as $dir)
- if (file_exists($dir))
- foreach (scandir($dir) as $file)
- if ($file[0] != '.' && $file != 'index.php')
- @unlink($dir.$file);
- }
-
public function getModulesList()
{
// @todo REMOVE DEV MODE
@@ -551,7 +542,6 @@ class InstallModelInstall extends InstallAbstractModel
'blockviewed',
'cheque',
'favoriteproducts',
- 'feeder',
'graphartichow',
'graphgooglechart',
'graphvisifire',
@@ -661,13 +651,40 @@ class InstallModelInstall extends InstallAbstractModel
* PROCESS : installFixtures
* Install fixtures (E.g. demo products)
*/
- public function installFixtures($entity = null)
+ public function installFixtures($entity = null, array $data = array())
{
- // Load class (use fixture class if one exists, or use InstallXmlLoader)
- if (file_exists(_PS_INSTALL_FIXTURES_PATH_.'apple/install.php'))
+ $fixtures_path = _PS_INSTALL_FIXTURES_PATH_.'apple/';
+ $fixtures_name = 'apple';
+ $zip_file = _PS_ROOT_DIR_.'/download/fixtures.zip';
+ $temp_dir = _PS_ROOT_DIR_.'/download/fixtures/';
+
+ // try to download fixtures if no low memory mode
+ if ($entity === null)
{
- require_once _PS_INSTALL_FIXTURES_PATH_.'apple/install.php';
- $class = 'InstallFixtures'.Tools::toCamelCase('apple');
+ if (Tools::copy('http://api.prestashop.com/fixtures/'.$data['shop_country'].'/'.$data['shop_activity'].'/fixtures.zip', $zip_file))
+ {
+ Tools::deleteDirectory($temp_dir, true);
+ if (Tools::ZipTest($zip_file))
+ if (Tools::ZipExtract($zip_file, $temp_dir))
+ {
+ $files = scandir($temp_dir);
+ if (count($files))
+ foreach ($files as $file)
+ if (!preg_match('/^\./', $file) && is_dir($temp_dir.$file.'/'))
+ {
+ $fixtures_path = $temp_dir.$file.'/';
+ $fixtures_name = $file;
+ break;
+ }
+ }
+ }
+ }
+
+ // Load class (use fixture class if one exists, or use InstallXmlLoader)
+ if (file_exists($fixtures_path.'/install.php'))
+ {
+ require_once $fixtures_path.'/install.php';
+ $class = 'InstallFixtures'.Tools::toCamelCase($fixtures_name);
if (!class_exists($class, false))
{
$this->setError($this->language->l('Fixtures class "%s" not found', $class));
@@ -685,7 +702,7 @@ class InstallModelInstall extends InstallAbstractModel
$xml_loader = new InstallXmlLoader();
// Install XML data (data/xml/ folder)
- $xml_loader->setFixturesPath();
+ $xml_loader->setFixturesPath($fixtures_path);
if (isset($this->xml_loader_ids) && $this->xml_loader_ids)
$xml_loader->setIds($this->xml_loader_ids);
@@ -697,7 +714,11 @@ class InstallModelInstall extends InstallAbstractModel
if ($entity)
$xml_loader->populateEntity($entity);
else
+ {
$xml_loader->populateFromXmlFiles();
+ Tools::deleteDirectory($temp_dir, true);
+ @unlink($zip_file);
+ }
if ($errors = $xml_loader->getErrors())
{
diff --git a/install-dev/theme/views/footer.phtml b/install-dev/theme/views/footer.phtml
index 95b11994d..3f2f8d2ad 100644
--- a/install-dev/theme/views/footer.phtml
+++ b/install-dev/theme/views/footer.phtml
@@ -36,6 +36,8 @@
errors.push($(this).text().trim());
});
psuser_assistance.setStep('install_step) ?>', {'error':errors});
+ if (errors.length)
+ $('#iframe_help').attr('src', $('#iframe_help').attr('src') + '&errors=' + encodeURI(errors.join(', ')));
}