Skip to content

Commit 21c8a66

Browse files
miakushaigrybkov
authored andcommitted
MAGETWO-55847: [GitHub] When tier price qty above 1000 adds a thousand separator in the Admin Panel #5745
1 parent 4ecd6e8 commit 21c8a66

File tree

1 file changed

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

1 file changed

+4
-21
lines changed

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

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function customizeWeightFormat(array $data)
8282
$data = $this->arrayManager->replace(
8383
$path,
8484
$data,
85-
$this->formatNumber($this->arrayManager->get($path, $data))
85+
$this->formatWeight($this->arrayManager->get($path, $data))
8686
);
8787
}
8888

@@ -105,7 +105,7 @@ protected function customizeAdvancedPriceFormat(array $data)
105105
$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE] =
106106
$this->formatPrice($value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE]);
107107
$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE_QTY] =
108-
$this->formatNumber((int)$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE_QTY]);
108+
(int)$value[ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE_QTY];
109109
}
110110
}
111111

@@ -378,23 +378,6 @@ private function getLocaleCurrency()
378378
return $this->localeCurrency;
379379
}
380380

381-
/**
382-
* The getter function to get the store manager for real application code
383-
*
384-
* @return \Magento\Store\Model\StoreManagerInterface
385-
*
386-
* @deprecated
387-
*/
388-
private function getStoreManager()
389-
{
390-
if ($this->storeManager === null) {
391-
$this->storeManager =
392-
\Magento\Framework\App\ObjectManager::getInstance()->get(StoreManagerInterface::class);
393-
}
394-
return $this->storeManager;
395-
}
396-
397-
398381
/**
399382
* Format price according to the locale of the currency
400383
*
@@ -407,7 +390,7 @@ protected function formatPrice($value)
407390
return null;
408391
}
409392

410-
$store = $this->getStoreManager()->getStore();
393+
$store = $this->locator->getStore();
411394
$currency = $this->getLocaleCurrency()->getCurrency($store->getBaseCurrencyCode());
412395
$value = $currency->toCurrency($value, ['display' => \Magento\Framework\Currency::NO_SYMBOL]);
413396

@@ -428,7 +411,7 @@ protected function formatNumber($value)
428411

429412
$value = (float)$value;
430413
$precision = strlen(substr(strrchr($value, "."), 1));
431-
$store = $this->getStoreManager()->getStore();
414+
$store = $this->locator->getStore();
432415
$currency = $this->getLocaleCurrency()->getCurrency($store->getBaseCurrencyCode());
433416
$value = $currency->toCurrency($value, ['display' => \Magento\Framework\Currency::NO_SYMBOL,
434417
'precision' => $precision]);

0 commit comments

Comments
 (0)