Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -637,7 +637,8 @@ class CartRuleCore extends ObjectModel
|
||||
FROM `'._DB_PREFIX_.'cart_product` cp
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_product` catp ON cp.id_product = catp.id_product
|
||||
WHERE cp.`id_cart` = '.(int)$context->cart->id.'
|
||||
AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')');
|
||||
AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')
|
||||
AND cp.`id_product` <> '.(int)$this->gift_product);
|
||||
$countMatchingProducts = 0;
|
||||
$matchingProductsList = array();
|
||||
foreach ($cartCategories as $cartCategory)
|
||||
|
||||
@@ -157,7 +157,7 @@ class AdminAccessControllerCore extends AdminController
|
||||
$sql = '
|
||||
UPDATE `'._DB_PREFIX_.'access` a
|
||||
SET `view` = '.(int)$enabled.', `add` = '.(int)$enabled.', `edit` = '.(int)$enabled.', `delete` = '.(int)$enabled.'
|
||||
WHERE `id_profile` = '.(int)$id_profile.' AND `id_tab` != '.(int)$this->id_tab_access;
|
||||
WHERE `id_profile` = '.(int)$id_profile;
|
||||
else if ($id_tab == -1 && $perm == 'all')
|
||||
$sql = '
|
||||
UPDATE `'._DB_PREFIX_.'access` a
|
||||
|
||||
@@ -297,7 +297,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
}
|
||||
$this->fields_form['input'][] = array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Profile:'),
|
||||
'label' => $this->l('Profile Permission:'),
|
||||
'name' => 'id_profile',
|
||||
'required' => true,
|
||||
'options' => array(
|
||||
|
||||
@@ -53,7 +53,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
);
|
||||
|
||||
// No need to display the old image system if the install has been made later than 2013-03-26
|
||||
$this->display_move = (defined('_PS_CREATION_DATE_') && strtotime(_PS_CREATION_DATE_) > strtotime('2013-03-26')) ? false : true;
|
||||
$this->display_move = (!Configuration::get('PS_LEGACY_IMAGES') && defined('_PS_CREATION_DATE_') && strtotime(_PS_CREATION_DATE_) > strtotime('2013-03-26')) ? false : true;
|
||||
|
||||
$this->fields_options = array(
|
||||
'images' => array(
|
||||
@@ -62,7 +62,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
'top' => '',
|
||||
'bottom' => '',
|
||||
'description' => $this->l('JPEG images have a small file size and standard quality. PNG images have a larger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'
|
||||
<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme, or with some of your modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issues, turn it off by selecting "Use JPEG".'),
|
||||
<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme, or with some of your modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issues, turn it off by selecting "Use JPEG".'),
|
||||
'fields' => array(
|
||||
'PS_IMAGE_QUALITY' => array(
|
||||
'title' => $this->l('Image quality'),
|
||||
|
||||
@@ -440,6 +440,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Zip Code/Postal Code'),
|
||||
'name' => 'postcode',
|
||||
'required' => true,
|
||||
'size' => 33,
|
||||
'required' => false,
|
||||
);
|
||||
|
||||
@@ -52,6 +52,9 @@ class AdminTrackingControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
if ($id_category = Tools::getValue('id_category') && Tools::getIsset('viewcategory'))
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts').'&id_category='.(int)$id_category.'&viewcategory');
|
||||
|
||||
$this->_helper_list = new HelperList();
|
||||
|
||||
if (!Configuration::get('PS_STOCK_MANAGEMENT'))
|
||||
|
||||
@@ -47,6 +47,13 @@ class NewProductsControllerCore extends FrontController
|
||||
|
||||
$this->productSort();
|
||||
|
||||
// Override default configuration values: cause the new products page must display latest products first.
|
||||
if (!Tools::getIsset('orderway') || !Tools::getIsset('orderby'))
|
||||
{
|
||||
$this->orderBy = 'date_add';
|
||||
$this->orderWay = 'DESC';
|
||||
}
|
||||
|
||||
$nbProducts = (int)Product::getNewProducts(
|
||||
$this->context->language->id,
|
||||
(isset($this->p) ? (int)($this->p) - 1 : null),
|
||||
|
||||
@@ -52,9 +52,14 @@ function p1540_add_missing_columns()
|
||||
}
|
||||
|
||||
$key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"');;
|
||||
if (is_array($key_exists))
|
||||
if (is_array($key_exists) && count($key_exists))
|
||||
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `product_sqlstock`'))
|
||||
$errors[] = Db::getInstance()->getMsgError();
|
||||
|
||||
$key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "id_product_2"');;
|
||||
if (is_array($key_exists) && count($key_exists))
|
||||
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `id_product_2`'))
|
||||
$errors[] = Db::getInstance()->getMsgError();
|
||||
|
||||
if (count($errors))
|
||||
return array('error' => 1, 'msg' => implode(',', $errors)) ;
|
||||
|
||||
Reference in New Issue
Block a user