Skip to content

Commit 25de49d

Browse files
author
Yurii Hryhoriev
committed
MAGETWO-61560: Moving all attributes out from 'Advanced Pricing' group causes error
1 parent ea0272d commit 25de49d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/ConfigurablePrice.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ public function modifyData(array $data)
4949
*/
5050
public function modifyMeta(array $meta)
5151
{
52-
if ($groupCode = $this->getGroupCodeByField($meta, ProductAttributeInterface::CODE_PRICE)
53-
?: $this->getGroupCodeByField($meta, self::CODE_GROUP_PRICE)
54-
) {
52+
$groupCode = $this->getGroupCodeByField($meta, ProductAttributeInterface::CODE_PRICE)
53+
?: $this->getGroupCodeByField($meta, self::CODE_GROUP_PRICE);
54+
55+
if ($groupCode && !empty($meta[$groupCode]['children'][self::CODE_GROUP_PRICE])) {
5556
if (!empty($meta[$groupCode]['children'][self::CODE_GROUP_PRICE])) {
5657
$meta[$groupCode]['children'][self::CODE_GROUP_PRICE] = array_replace_recursive(
5758
$meta[$groupCode]['children'][self::CODE_GROUP_PRICE],
@@ -71,7 +72,9 @@ public function modifyMeta(array $meta)
7172
]
7273
);
7374
}
74-
if (!empty($meta[$groupCode]['children'][self::CODE_GROUP_PRICE])) {
75+
if (
76+
!empty($meta[$groupCode]['children'][self::CODE_GROUP_PRICE]['children'][self::$advancedPricingButton])
77+
) {
7578
$productTypeId = $this->locator->getProduct()->getTypeId();
7679
$visibilityConfig = ($productTypeId === ConfigurableType::TYPE_CODE)
7780
? ['visible' => 0, 'disabled' => 1]

0 commit comments

Comments
 (0)