diff --git a/Helper/Data.php b/Helper/Data.php index d462ee3..f0cb87d 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -215,4 +215,20 @@ public function getUrl($route, $params = []) { return $this->_urlBuilder->getUrl($route, $params); } + + /** + * Force convert to float + * + * @param mixed $value + * @return float + */ + public function formatToNumber($value) + { + $value = floatval(str_replace( + [' ', ','], + ['', '.'], + $value + )); + return $value; + } } diff --git a/composer.json b/composer.json index 15cf107..e6bdd9a 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "mygento/base", "type": "magento2-module", - "version": "2.2.2", + "version": "2.2.3", "license": "OSL-3.0", "homepage": "https://github.com/mygento/base", "description": "Mygento Base", diff --git a/etc/module.xml b/etc/module.xml index 1efac58..5e35c31 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -7,5 +7,5 @@ */ --> - +