File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/code/Magento/Catalog/Model/Product/Attribute/Backend/TierPrice Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 15
15
use Magento \Customer \Api \GroupManagementInterface ;
16
16
use Magento \Framework \EntityManager \MetadataPool ;
17
17
use Magento \Catalog \Model \ResourceModel \Product \Attribute \Backend \Tierprice ;
18
+ use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
18
19
19
20
/**
20
21
* Process tier price data for handled existing product.
@@ -84,6 +85,10 @@ public function execute($entity, $arguments = [])
84
85
{
85
86
$ attribute = $ this ->attributeRepository ->get ('tier_price ' );
86
87
$ priceRows = $ entity ->getData ($ attribute ->getName ());
88
+ $ origPrices = $ entity ->getOrigData ($ attribute ->getName ());
89
+ if ($ entity ->getTypeId () === Configurable::TYPE_CODE && null !== $ origPrices ){
90
+ $ priceRows = [];
91
+ }
87
92
if (null !== $ priceRows ) {
88
93
if (!is_array ($ priceRows )) {
89
94
throw new \Magento \Framework \Exception \InputException (
@@ -96,7 +101,6 @@ public function execute($entity, $arguments = [])
96
101
$ productId = (int )$ entity ->getData ($ identifierField );
97
102
98
103
// prepare original data to compare
99
- $ origPrices = $ entity ->getOrigData ($ attribute ->getName ());
100
104
$ old = $ this ->prepareOldTierPriceToCompare ($ origPrices );
101
105
// prepare data for save
102
106
$ new = $ this ->prepareNewDataForSave ($ priceRows , $ isGlobal );
You can’t perform that action at this time.
0 commit comments