Skip to content

Commit f6f414b

Browse files
committed
Fix #6310 - set default value for weight switcher to 0
1 parent 2506c08 commit f6f414b

File tree

1 file changed

+1
-5
lines changed
  • app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form

1 file changed

+1
-5
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct(
6060
$this->localeFormat = $localeFormat;
6161
$this->weightSwitcher = $factoryElement->create('radios');
6262
$this->weightSwitcher->setValue(
63-
WeightResolver::HAS_WEIGHT
63+
WeightResolver::HAS_NO_WEIGHT
6464
)->setValues(
6565
[
6666
['value' => WeightResolver::HAS_WEIGHT, 'label' => __('Yes')],
@@ -84,10 +84,6 @@ public function __construct(
8484
*/
8585
public function getElementHtml()
8686
{
87-
if (!$this->getForm()->getDataObject()->getTypeInstance()->hasWeight()) {
88-
$this->weightSwitcher->setValue(WeightResolver::HAS_NO_WEIGHT);
89-
}
90-
9187
if ($this->getDisabled()) {
9288
$this->weightSwitcher->setDisabled($this->getDisabled());
9389
}

0 commit comments

Comments
 (0)