Skip to content

Commit 7b92199

Browse files
author
Prabhu Ram
committed
MC-19226: Cart Promotions :: Store promotions detail on the quote
- Reverted Db and API changes
1 parent 02dbe1b commit 7b92199

File tree

12 files changed

+23
-612
lines changed

12 files changed

+23
-612
lines changed

app/code/Magento/Quote/etc/db_schema.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@
175175
<column xsi:type="text" name="applied_taxes" nullable="true" comment="Applied Taxes"/>
176176
<column xsi:type="varchar" name="discount_description" nullable="true" length="255"
177177
comment="Discount Description"/>
178-
<column xsi:type="text" name="discounts" nullable="true" comment="Individual serialized discounts"/>
179178
<column xsi:type="decimal" name="shipping_discount_amount" scale="4" precision="20" unsigned="false"
180179
nullable="true" comment="Shipping Discount Amount"/>
181180
<column xsi:type="decimal" name="base_shipping_discount_amount" scale="4" precision="20" unsigned="false"
@@ -235,7 +234,6 @@
235234
<column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
236235
<column xsi:type="text" name="description" nullable="true" comment="Description"/>
237236
<column xsi:type="text" name="applied_rule_ids" nullable="true" comment="Applied Rule Ids"/>
238-
<column xsi:type="text" name="discounts" nullable="true" comment="Individual serialized discounts"/>
239237
<column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
240238
<column xsi:type="smallint" name="is_qty_decimal" padding="5" unsigned="true" nullable="true" identity="false"
241239
comment="Is Qty Decimal"/>

app/code/Magento/SalesRule/Api/Data/DiscountDataInterface.php

Lines changed: 0 additions & 74 deletions
This file was deleted.

app/code/Magento/SalesRule/Api/Data/RuleDiscountInterface.php

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,28 @@
99
namespace Magento\SalesRule\Api\Data;
1010

1111
/**
12-
* @api
12+
* Rule discount Interface
1313
*/
1414
interface RuleDiscountInterface
1515
{
1616
/**
1717
* Get Discount Data
1818
*
19-
* @return \Magento\SalesRule\Api\Data\DiscountDataInterface
19+
* @return mixed | \Magento\SalesRule\Model\Rule\Action\Discount\Data
2020
*/
21-
public function getDiscountData(): DiscountDataInterface;
22-
23-
/**
24-
* Set discount data
25-
*
26-
* @param DiscountDataInterface $discountData
27-
* @return $this
28-
*/
29-
public function setDiscountData(DiscountDataInterface $discountData);
30-
31-
/**
32-
* Set Rule Label
33-
*
34-
* @param string $ruleLabel
35-
* @return $this
36-
*/
37-
public function setRuleLabel(string $ruleLabel);
21+
public function getDiscountData();
3822

3923
/**
4024
* Get Rule Label
4125
*
4226
* @return string
4327
*/
44-
public function getRuleLabel(): ?string;
45-
46-
/**
47-
* Set Rule Id
48-
*
49-
* @param int $ruleID
50-
* @return $this
51-
*/
52-
public function setRuleID(int $ruleID);
28+
public function getRuleLabel();
5329

5430
/**
5531
* Get Rule ID
5632
*
5733
* @return int
5834
*/
59-
public function getRuleID(): ?int;
35+
public function getRuleID();
6036
}

app/code/Magento/SalesRule/Model/Data/RuleDiscount.php

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
namespace Magento\SalesRule\Model\Data;
99

10+
use Magento\SalesRule\Model\Rule\Action\Discount\Data;
1011
use Magento\SalesRule\Api\Data\RuleDiscountInterface;
11-
use Magento\SalesRule\Api\Data\DiscountDataInterface;
1212
use Magento\Framework\Api\ExtensionAttributesInterface;
1313

1414
/**
@@ -23,9 +23,9 @@ class RuleDiscount extends \Magento\Framework\Api\AbstractExtensibleObject imple
2323
/**
2424
* Get Discount Data
2525
*
26-
* @return DiscountDataInterface
26+
* @return Data
2727
*/
28-
public function getDiscountData(): DiscountDataInterface
28+
public function getDiscountData()
2929
{
3030
return $this->_get(self::KEY_DISCOUNT_DATA);
3131
}
@@ -35,54 +35,21 @@ public function getDiscountData(): DiscountDataInterface
3535
*
3636
* @return string
3737
*/
38-
public function getRuleLabel(): ?string
38+
public function getRuleLabel()
3939
{
4040
return $this->_get(self::KEY_RULE_LABEL);
4141
}
4242

43-
/**
44-
* Set Discount Data
45-
*
46-
* @param DiscountDataInterface $discountData
47-
* @return RuleDiscount
48-
*/
49-
public function setDiscountData(DiscountDataInterface $discountData)
50-
{
51-
return $this->setData(self::KEY_DISCOUNT_DATA, $discountData);
52-
}
53-
54-
/**
55-
* Set Rule Label
56-
*
57-
* @param string $ruleLabel
58-
* @return RuleDiscount
59-
*/
60-
public function setRuleLabel(string $ruleLabel)
61-
{
62-
return $this->setData(self::KEY_RULE_LABEL, $ruleLabel);
63-
}
64-
6543
/**
6644
* Get Rule ID
6745
*
6846
* @return int
6947
*/
70-
public function getRuleID(): ?int
48+
public function getRuleID()
7149
{
7250
return $this->_get(self::KEY_RULE_ID);
7351
}
7452

75-
/**
76-
* Set Rule ID
77-
*
78-
* @param int $ruleID
79-
* @return RuleDiscount
80-
*/
81-
public function setRuleID(int $ruleID)
82-
{
83-
return $this->setData(self::KEY_RULE_ID, $ruleID);
84-
}
85-
8653
/**
8754
* Retrieve existing extension attributes object or create a new one.
8855
*

app/code/Magento/SalesRule/Model/Plugin/Discount.php

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)