@@ -82,7 +82,7 @@ protected function customizeWeightFormat(array $data)
82
82
$ data = $ this ->arrayManager ->replace (
83
83
$ path ,
84
84
$ data ,
85
- $ this ->formatNumber ($ this ->arrayManager ->get ($ path , $ data ))
85
+ $ this ->formatWeight ($ this ->arrayManager ->get ($ path , $ data ))
86
86
);
87
87
}
88
88
@@ -105,7 +105,7 @@ protected function customizeAdvancedPriceFormat(array $data)
105
105
$ value [ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE ] =
106
106
$ this ->formatPrice ($ value [ProductAttributeInterface::CODE_TIER_PRICE_FIELD_PRICE ]);
107
107
$ 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 ];
109
109
}
110
110
}
111
111
@@ -378,23 +378,6 @@ private function getLocaleCurrency()
378
378
return $ this ->localeCurrency ;
379
379
}
380
380
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
-
398
381
/**
399
382
* Format price according to the locale of the currency
400
383
*
@@ -407,7 +390,7 @@ protected function formatPrice($value)
407
390
return null ;
408
391
}
409
392
410
- $ store = $ this ->getStoreManager () ->getStore ();
393
+ $ store = $ this ->locator ->getStore ();
411
394
$ currency = $ this ->getLocaleCurrency ()->getCurrency ($ store ->getBaseCurrencyCode ());
412
395
$ value = $ currency ->toCurrency ($ value , ['display ' => \Magento \Framework \Currency::NO_SYMBOL ]);
413
396
@@ -428,7 +411,7 @@ protected function formatNumber($value)
428
411
429
412
$ value = (float )$ value ;
430
413
$ precision = strlen (substr (strrchr ($ value , ". " ), 1 ));
431
- $ store = $ this ->getStoreManager () ->getStore ();
414
+ $ store = $ this ->locator ->getStore ();
432
415
$ currency = $ this ->getLocaleCurrency ()->getCurrency ($ store ->getBaseCurrencyCode ());
433
416
$ value = $ currency ->toCurrency ($ value , ['display ' => \Magento \Framework \Currency::NO_SYMBOL ,
434
417
'precision ' => $ precision ]);
0 commit comments