Note : You can use any extension
1. Create events.xml file at app/code/vendor/Exenstion/etc/frontend
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="currency_display_options_forming">
<observer name="change_currency_position" instance="vendor\Exenstion\Observer\ChangeCurrencyPosition"/>
</event>
</config>
2. Create ChangeCurrencyPosition.php file at app/code/vendor/Exenstion/Observer
<?php
namespace vendor\Exenstion\Observer;
use Magento\Framework\Event\ObserverInterface;
class ChangeCurrencyPosition implements ObserverInterface
{
public function execute(\Magento\Framework\Event\Observer $observer)
{
$currencyOptions = $observer->getEvent()->getCurrencyOptions();
$currencyOptions->setData('position', \Magento\Framework\Currency::RIGHT);
return $this;
}
}
That’s it.
Don't forget to change vendor\Exenstion in both
Thanks
Comments
Post a Comment