File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed
app/code/Magento/Catalog/Model/Product/Attribute/Backend Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -180,15 +180,8 @@ protected function updateValues(array $valuesToUpdate, array $oldValues)
180
180
{
181
181
$ isChanged = false ;
182
182
foreach ($ valuesToUpdate as $ key => $ value ) {
183
- $ oldPrice = $ this ->prepareFloatValue ($ oldValues [$ key ]['price ' ]);
184
- $ newPrice = $ this ->prepareFloatValue ($ value ['value ' ]);
185
- $ oldQty = $ this ->prepareFloatValue ($ oldValues [$ key ]['price_qty ' ]);
186
- $ newQty = $ this ->prepareFloatValue ($ value ['qty ' ]);
187
- $ oldPercentageValue = $ this ->prepareFloatValue ($ this ->getPercentage ($ oldValues [$ key ]));
188
- $ newPercentageValue = $ this ->prepareFloatValue ($ this ->getPercentage ($ value ));
189
- if (($ oldPrice !== $ newPrice )
190
- || ($ oldQty !== $ newQty )
191
- || ($ oldPercentageValue !== $ newPercentageValue )
183
+ if ($ oldValues [$ key ]['price ' ] != $ value ['value ' ]
184
+ || $ this ->getPercentage ($ oldValues [$ key ]) != $ this ->getPercentage ($ value )
192
185
) {
193
186
$ price = new \Magento \Framework \DataObject (
194
187
[
@@ -205,17 +198,6 @@ protected function updateValues(array $valuesToUpdate, array $oldValues)
205
198
return $ isChanged ;
206
199
}
207
200
208
- /**
209
- * Prepare float value for comparison
210
- *
211
- * @param string|float|int $value
212
- * @return float
213
- */
214
- private function prepareFloatValue ($ value )
215
- {
216
- return floatval (str_replace (', ' , '. ' , (string )$ value ));
217
- }
218
-
219
201
/**
220
202
* Check whether price has percentage value.
221
203
*
You can’t perform that action at this time.
0 commit comments