Skip to content

Commit 46db7bb

Browse files
Update UpdateConfigurations.php
1 parent 0e71ee6 commit 46db7bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/UpdateConfigurations.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*/
88
namespace Magento\ConfigurableProduct\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
99

10+
use \Magento\Catalog\Model\Product\Edit\WeightResolver;
11+
1012
class UpdateConfigurations
1113
{
1214
/**
@@ -111,10 +113,10 @@ protected function getConfigurations()
111113
$result[$item['id']]['quantity_and_stock_status']['qty'] = $item['qty'];
112114
}
113115

114-
/* Changing product to simple on weight change*/
116+
// Changing product to simple on weight change
115117
if (isset($item['weight']) && $item['weight'] >= 0) {
116118
$result[$item['id']]['type_id'] = \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE;
117-
$result[$item['id']]['product_has_weight'] = \Magento\Catalog\Model\Product\Edit\WeightResolver::HAS_WEIGHT;
119+
$result[$item['id']]['product_has_weight'] = WeightResolver::HAS_WEIGHT;
118120
}
119121
}
120122
}

0 commit comments

Comments
 (0)