From 2fb0bd187d97636ef4d108d1010e5f26e838825b Mon Sep 17 00:00:00 2001
From: Michael RICOIS
Date: Mon, 6 Nov 2017 12:00:30 +0100
Subject: [PATCH] Discount only for applications
---
adm/tabs/AdminDiscounts.php | 9 ++++++++-
classes/Discount.php | 25 ++++++++++++++++++++-----
2 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/adm/tabs/AdminDiscounts.php b/adm/tabs/AdminDiscounts.php
index 7852c5a4..b082df6f 100755
--- a/adm/tabs/AdminDiscounts.php
+++ b/adm/tabs/AdminDiscounts.php
@@ -77,6 +77,7 @@ class AdminDiscounts extends AdminTab
$object->cumulable = (!isset($_POST['cumulable']) ? false : true);
$object->cumulable_reduction = (!isset($_POST['cumulable_reduction']) ? false : true);
+ $object->appli = (!isset($_POST['appli']) ? 0 : 1);
}
public function postProcess()
@@ -133,7 +134,6 @@ class AdminDiscounts extends AdminTab
$this->_errors[] = Tools::displayError('Please set a category for this voucher.');
$this->copyFromPost($object, $this->table);
$result = $object->update(true, false, $categories);
-
// @Override Antadis - link discount to custom group
if ($discount_custom_group_id = Tools::getValue("discount_custom_group")) {
CustomGroup::linkToDiscount($discount_custom_group_id, $object->id);
@@ -350,6 +350,13 @@ class AdminDiscounts extends AdminTab
+
+