Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/css/modules.css admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl admin-dev/themes/default/template/controllers/products/images.tpl admin-dev/themes/default/template/controllers/products/prices.tpl admin-dev/themes/default/template/helpers/form/form.tpl admin-dev/themes/default/template/helpers/list/list_header.tpl classes/Autoload.php classes/Carrier.php classes/Product.php classes/ProductSale.php classes/Tools.php classes/Validate.php classes/tax/TaxRulesTaxManager.php controllers/admin/AdminPPreferencesController.php controllers/admin/AdminPerformanceController.php install-dev/install_version.php js/admin_carrier_wizard.js modules/blockcategories/blockcategories.php modules/blocklayered/blocklayered.php modules/statsequipment/statsequipment.php modules/statsproduct/statsproduct.php modules/watermark/watermark.php themes/default/address.tpl themes/default/authentication.tpl themes/default/category.tpl themes/default/contact-form.tpl themes/default/css/history.css themes/default/header.tpl themes/default/js/cart-summary.js themes/default/js/product.js themes/default/mobile/order-detail.tpl themes/default/modules/blocksearch/blocksearch.tpl themes/default/modules/productcomments/productcomments.tpl themes/default/order-carrier.tpl themes/default/order-detail.tpl themes/default/order-opc-new-account.tpl themes/default/product.tpl
This commit is contained in:
@@ -143,6 +143,8 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('Reduction amount cannot be lower than zero.');
|
||||
if (Tools::getValue('code') && ($same_code = (int)CartRule::getIdByCode(Tools::getValue('code'))) && $same_code != Tools::getValue('id_cart_rule'))
|
||||
$this->errors[] = sprintf(Tools::displayError('This cart rule code is already used (conflict with cart rule %d)'), $same_code);
|
||||
if (Tools::getValue('apply_discount') == 'off' && !Tools::getValue('free_shipping') && !Tools::getValue('free_gift'))
|
||||
$this->errors[] = Tools::displayError('An action is required for this cart rule.');
|
||||
}
|
||||
|
||||
return parent::postProcess();
|
||||
|
||||
@@ -309,12 +309,15 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm = new CustomerMessage();
|
||||
$cm->id_employee = (int)$this->context->employee->id;
|
||||
$cm->id_customer_thread = (int)Tools::getValue('id_customer_thread');
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$current_employee = $this->context->employee;
|
||||
$id_employee = (int)Tools::getValue('id_employee_forward');
|
||||
$employee = new Employee($id_employee);
|
||||
$email = Tools::getValue('email');
|
||||
if ($id_employee && $employee && Validate::isLoadedObject($employee))
|
||||
$message = Tools::getValue('message_forward');
|
||||
if (($error = $cm->validateField('message', $message, null, array(), true)) !== true)
|
||||
$this->errors[] = $error;
|
||||
elseif ($id_employee && $employee && Validate::isLoadedObject($employee))
|
||||
{
|
||||
$params = array(
|
||||
'{messages}' => Tools::nl2br(stripslashes($output)),
|
||||
@@ -333,7 +336,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
null, null, _PS_MAIL_DIR_, true))
|
||||
{
|
||||
$cm->private = 1;
|
||||
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$_POST['message_forward'];
|
||||
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$message;
|
||||
$cm->add();
|
||||
}
|
||||
}
|
||||
@@ -352,7 +355,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$current_employee->email, $current_employee->firstname.' '.$current_employee->lastname,
|
||||
null, null, _PS_MAIL_DIR_, true))
|
||||
{
|
||||
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$_POST['message_forward'];
|
||||
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$message;
|
||||
$cm->add();
|
||||
}
|
||||
}
|
||||
@@ -368,10 +371,11 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm = new CustomerMessage();
|
||||
$cm->id_employee = (int)$this->context->employee->id;
|
||||
$cm->id_customer_thread = $ct->id;
|
||||
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$cm->message = Tools::getValue('reply_message');
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
if (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
if (($error = $cm->validateField('message', $cm->message, null, array(), true)) !== true)
|
||||
$this->errors[] = $error;
|
||||
elseif (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
$this->errors[] = Tools::displayError('An error occurred during the file upload process.');
|
||||
elseif ($cm->add())
|
||||
{
|
||||
|
||||
@@ -2019,7 +2019,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$myGroup = new Group();
|
||||
$myGroup->name = Array($id_lang => $group);
|
||||
if ($id_lang != $default_language_id)
|
||||
$myGroup->name = array_merge($myGroup->name, array($default_language_id => $group));
|
||||
$myGroup->name = $myGroup->name + array($default_language_id => $group);
|
||||
$myGroup->price_display_method = 1;
|
||||
$myGroup->add();
|
||||
if (Validate::isLoadedObject($myGroup))
|
||||
|
||||
@@ -142,8 +142,10 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
|
||||
if (Validate::isFileName(Tools::getValue('iso_localization_pack')))
|
||||
{
|
||||
|
||||
$pack = @Tools::file_get_contents('http://api.prestashop.com/localization/'.$version.'/'.Tools::getValue('iso_localization_pack').'.xml');
|
||||
if (Tools::getValue('download_updated_pack') == '1')
|
||||
$pack = @Tools::file_get_contents('http://api.prestashop.com/localization/'.$version.'/'.Tools::getValue('iso_localization_pack').'.xml');
|
||||
else
|
||||
$pack = false;
|
||||
|
||||
if (!$pack && !($pack = @Tools::file_get_contents(_PS_ROOT_DIR_.'/localization/'.Tools::getValue('iso_localization_pack').'.xml')))
|
||||
$this->errors[] = Tools::displayError('Cannot load the localization pack.');
|
||||
@@ -266,6 +268,26 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Download pack data'),
|
||||
'desc' => $this->l('If set to yes then the localization pack will be downloaded from prestashop.com. Otherwise the local xml file found in the localization folder of your PrestaShop installation will be used.'),
|
||||
'name' => 'download_updated_pack',
|
||||
'class' => 't',
|
||||
'is_bool'=> true,
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'download_updated_pack_yes',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Yes')
|
||||
),
|
||||
array(
|
||||
'id' => 'download_updated_pack_no',
|
||||
'value' => 0,
|
||||
'label' => $this->l('No')
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
@@ -280,7 +302,8 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
'selection[]_taxes' => true,
|
||||
'selection[]_currencies' => true,
|
||||
'selection[]_languages' => true,
|
||||
'selection[]_units' => true
|
||||
'selection[]_units' => true,
|
||||
'download_updated_pack' => 1
|
||||
);
|
||||
|
||||
$this->show_toolbar = false;
|
||||
|
||||
@@ -897,7 +897,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayErrror('This address can\'t be loaded');
|
||||
$this->errors[] = Tools::displayError('This address can\'t be loaded');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
|
||||
@@ -188,6 +188,14 @@ class AdminPPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'identifier' => 'id'
|
||||
)
|
||||
'PS_DISPLAY_DISCOUNT_PRICE' => array(
|
||||
'title' => $this->l('Display discounted price'),
|
||||
'desc' => $this->l('Instead of showing the discount (-5%) it will instead show the new price with the discount applied'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'required' => false,
|
||||
'type' => 'bool'
|
||||
),
|
||||
)
|
||||
),
|
||||
'stock' => array(
|
||||
|
||||
@@ -793,7 +793,7 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
{
|
||||
$new_settings = $prev_settings = file_get_contents(_PS_ROOT_DIR_.'/config/settings.inc.php');
|
||||
$cache_active = (bool)Tools::getValue('cache_active');
|
||||
|
||||
|
||||
if ($caching_system = Tools::getValue('caching_system'))
|
||||
{
|
||||
$new_settings = preg_replace(
|
||||
@@ -807,7 +807,6 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
$cache_active = false;
|
||||
$this->errors[] = Tools::displayError('The caching system is missing.');
|
||||
}
|
||||
|
||||
if ($cache_active)
|
||||
{
|
||||
if ($caching_system == 'CacheMemcache' && !extension_loaded('memcache'))
|
||||
@@ -912,5 +911,4 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
}
|
||||
die;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2688,6 +2688,10 @@ class AdminProductsControllerCore extends AdminController
|
||||
$product_supplier->id_product = $product->id;
|
||||
$product_supplier->id_product_attribute = 0;
|
||||
$product_supplier->id_supplier = $id;
|
||||
if ($this->context->currency->id)
|
||||
$product_supplier->id_currency = (int)$this->context->currency->id;
|
||||
else
|
||||
$product_supplier->id_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
$product_supplier->save();
|
||||
|
||||
$associated_suppliers[] = $product_supplier;
|
||||
|
||||
@@ -148,7 +148,7 @@ class AdminShopControllerCore extends AdminController
|
||||
{
|
||||
parent::initContent();
|
||||
|
||||
$this->addJqueryPlugin('cookie-plugin');
|
||||
$this->addJqueryPlugin('cooki-plugin');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ class AdminShopGroupControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
$this->addJqueryPlugin('cookie-plugin');
|
||||
$this->addJqueryPlugin('cooki-plugin');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ class AdminShopUrlControllerCore extends AdminController
|
||||
{
|
||||
parent::initContent();
|
||||
|
||||
$this->addJqueryPlugin('cookie-plugin');
|
||||
$this->addJqueryPlugin('cooki-plugin');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user