[+] BO : you can now choose if a voucher is displayed under the cart in the frontend
This commit is contained in:
@@ -24,6 +24,18 @@
|
||||
<a href="javascript:gencode(8);" class="button">{l s='(Click to generate random code)'}</a>
|
||||
<p class="preference_description">{l s='Caution! The rule will automatically be applied if you leave this field blank.'}</p>
|
||||
</div>
|
||||
<label>{l s='Highlight'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
<input type="radio" name="highlight" id="highlight_on" value="1" {if $currentTab->getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="highlight_on"> <img src="../img/admin/enabled.gif" alt="{l s='Yes'}" title="{l s='Yes'}" style="cursor:pointer" /></label>
|
||||
|
||||
<input type="radio" name="highlight" id="highlight_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="highlight_off"> <img src="../img/admin/disabled.gif" alt="{l s='No'}" title="{l s='No'}" style="cursor:pointer" /></label>
|
||||
<p class="preference_description">
|
||||
{l s='If the voucher is not yet in the cart, it will be displayed under the cart in the cart summary.'}
|
||||
</p>
|
||||
</div>
|
||||
<label>{l s='Partial use'}</label>
|
||||
<div class="margin-form">
|
||||
|
||||
|
||||
@@ -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' : ''));
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user