Skip to content

Commit 78327c1

Browse files
author
Alexey Yakimovich
committed
MAGETWO-91657: Advanced pricing the bulk discounts by percentage returns error when set
- Added validation for discount value field in Advanced Pricing section of product.
1 parent 2eb6f84 commit 78327c1

File tree

1 file changed

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

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
}
4646

4747
/**
48-
* {@inheritdoc}
48+
* @inheritdoc
4949
* @since 101.1.0
5050
*/
5151
public function modifyData(array $data)
@@ -54,8 +54,11 @@ public function modifyData(array $data)
5454
}
5555

5656
/**
57-
* {@inheritdoc}
57+
* Add tier price info to meta array. {@inheritdoc}
58+
*
5859
* @since 101.1.0
60+
* @param array $meta
61+
* @return array
5962
*/
6063
public function modifyMeta(array $meta)
6164
{
@@ -150,7 +153,9 @@ private function getUpdatedTierPriceStructure(array $priceMeta)
150153
'dataType' => Price::NAME,
151154
'addbefore' => '%',
152155
'validation' => [
156+
'required-entry' => true,
153157
'validate-number' => true,
158+
'validate-greater-than-zero' => true,
154159
'less-than-equals-to' => 100
155160
],
156161
'visible' => $firstOption

0 commit comments

Comments
 (0)