Skip to content

Commit c63d1e6

Browse files
author
Magently
committed
Don't format Special Price value for Bundle Product
1 parent 0ddea98 commit c63d1e6

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier

1 file changed

+6
-1
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use Magento\Ui\DataProvider\Mapper\FormElement as FormElementMapper;
3333
use Magento\Ui\DataProvider\Mapper\MetaProperties as MetaPropertiesMapper;
3434
use Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory as AttributeCollectionFactory;
35+
use \Magento\Catalog\Model\Product\Type as ProductType;
3536

3637
/**
3738
* Class Eav
@@ -399,7 +400,11 @@ public function modifyData(array $data)
399400
foreach ($attributes as $attribute) {
400401
if (null !== ($attributeValue = $this->setupAttributeData($attribute))) {
401402
if ($attribute->getFrontendInput() === 'price' && is_scalar($attributeValue)) {
402-
$attributeValue = $this->formatPrice($attributeValue);
403+
if ($this->locator->getProduct()->getTypeId() !== ProductType::TYPE_BUNDLE
404+
|| $attribute->getAttributeCode() !== ProductAttributeInterface::CODE_SPECIAL_PRICE
405+
) {
406+
$attributeValue = $this->formatPrice($attributeValue);
407+
}
403408
}
404409
$data[$productId][self::DATA_SOURCE_DEFAULT][$attribute->getAttributeCode()] = $attributeValue;
405410
}

0 commit comments

Comments
 (0)