hyva-themes / magento2-react-checkout

Highly Customizable Checkout for Magento 2, Built with React.
BSD 3-Clause "New" or "Revised" License
178 stars 53 forks source link

Currency symbol issue #278

Closed rajeev-k-tomy closed 1 year ago

rajeev-k-tomy commented 2 years ago

For certain currencies, the following error is observed. image (1)

See related slack chat: https://hyva-themes.slack.com/archives/C01C5DBHL64/p1635659160006700

rajeev-k-tomy commented 2 years ago

In order to get rid off the above error breaking the entire checkout page, we can do following change: https://github.com/hyva-themes/magento2-react-checkout/blob/main/src/ViewModel/CurrencyProvider.php#L78

return $this->getCurrentCurrency()->getCurrencySymbol() ?? '';

But, I don't consider this as a correct solution, rather a trick to hiding the dirt. It is very important to have a currency symbol passed through the configuration.

@wigman You may have some insight on this as you are the one who build the feature :)