Skip to content

Commit 62afb15

Browse files
committed
MAGETWO-50552: Four decimal characters saved in new product attribute with type "Price"
1 parent 823b081 commit 62afb15

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public function modifyData(array $data)
353353

354354
foreach ($attributes as $attribute) {
355355
if (null !== ($attributeValue = $this->setupAttributeData($attribute))) {
356-
if ($attribute->getFrontendInput() === 'price') {
356+
if ($attribute->getFrontendInput() === 'price' && is_scalar($attributeValue)) {
357357
$attributeValue = number_format((float)$attributeValue, 2);
358358
}
359359
$data[$productId][self::DATA_SOURCE_DEFAULT][$attribute->getAttributeCode()] = $attributeValue;

0 commit comments

Comments
 (0)