diff --git a/admin-dev/themes/default/template/controllers/cart_rules/informations.tpl b/admin-dev/themes/default/template/controllers/cart_rules/informations.tpl
index de1b93b60..45e17277e 100644
--- a/admin-dev/themes/default/template/controllers/cart_rules/informations.tpl
+++ b/admin-dev/themes/default/template/controllers/cart_rules/informations.tpl
@@ -24,6 +24,18 @@
{l s='(Click to generate random code)'}
{l s='Caution! The rule will automatically be applied if you leave this field blank.'}
+
+
diff --git a/classes/CartRule.php b/classes/CartRule.php
index 5f1bf625a..08f9460bd 100644
--- a/classes/CartRule.php
+++ b/classes/CartRule.php
@@ -64,6 +64,7 @@ class CartRuleCore extends ObjectModel
public $reduction_product;
public $gift_product;
public $gift_product_attribute;
+ public $highlight;
public $active = 1;
public $date_add;
public $date_upd;
@@ -103,6 +104,7 @@ class CartRuleCore extends ObjectModel
'reduction_product' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'gift_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'gift_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
+ 'highlight' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
@@ -215,6 +217,7 @@ class CartRuleCore extends ObjectModel
cr.`id_customer` = '.(int)$id_customer.'
'.($includeGeneric ? 'OR cr.`id_customer` = 0' : '').'
)
+ AND highlight = 1
'.($active ? 'AND cr.`active` = 1' : '').'
'.($inStock ? 'AND cr.`quantity` > 0' : ''));
diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql
index f07bfd5b4..65fc06d8d 100644
--- a/install-dev/data/db_structure.sql
+++ b/install-dev/data/db_structure.sql
@@ -225,6 +225,7 @@ CREATE TABLE `PREFIX_cart_rule` (
`reduction_product` int(10) NOT NULL default 0,
`gift_product` int(10) unsigned NOT NULL default 0,
`gift_product_attribute` int(10) unsigned NOT NULL default 0,
+ `highlight` tinyint(1) unsigned NOT NULL default 0,
`active` tinyint(1) unsigned NOT NULL default 0,
`date_add` datetime NOT NULL,
`date_upd` datetime NOT NULL,
diff --git a/install-dev/upgrade/sql/1.5.3.0.sql b/install-dev/upgrade/sql/1.5.3.0.sql
index 40d23ae80..a29a7e98a 100644
--- a/install-dev/upgrade/sql/1.5.3.0.sql
+++ b/install-dev/upgrade/sql/1.5.3.0.sql
@@ -36,3 +36,5 @@ INSERT INTO `PREFIX_configuration`(`name`, `value`, `id_shop`, `id_shop_group`,
);
DELETE FROM `PREFIX_configuration` WHERE name='PS_GIFT_WRAPPING_TAX';
+
+ALTER TABLE `PREFIX_cart_rule` ADD `highlight` tinyint(1) unsigned NOT NULL default 0 AFTER `gift_product_attribute`;