Magento 2 How to change currency symbol position left to right












1















How to display price currency symbol after the amount on the right side.
from: USD333
to: 333USD










share|improve this question

























  • I hope my answer will solve your issue

    – Nikunj Vadariya
    Jun 9 '18 at 11:05











  • Please share your code.

    – kunj
    Jun 9 '18 at 11:17
















1















How to display price currency symbol after the amount on the right side.
from: USD333
to: 333USD










share|improve this question

























  • I hope my answer will solve your issue

    – Nikunj Vadariya
    Jun 9 '18 at 11:05











  • Please share your code.

    – kunj
    Jun 9 '18 at 11:17














1












1








1








How to display price currency symbol after the amount on the right side.
from: USD333
to: 333USD










share|improve this question
















How to display price currency symbol after the amount on the right side.
from: USD333
to: 333USD







price currency magento2.2.3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 9 '18 at 11:56









Nikunj Vadariya

2,8741821




2,8741821










asked Jun 9 '18 at 10:51









Ahmad DarwishAhmad Darwish

1661520




1661520













  • I hope my answer will solve your issue

    – Nikunj Vadariya
    Jun 9 '18 at 11:05











  • Please share your code.

    – kunj
    Jun 9 '18 at 11:17



















  • I hope my answer will solve your issue

    – Nikunj Vadariya
    Jun 9 '18 at 11:05











  • Please share your code.

    – kunj
    Jun 9 '18 at 11:17

















I hope my answer will solve your issue

– Nikunj Vadariya
Jun 9 '18 at 11:05





I hope my answer will solve your issue

– Nikunj Vadariya
Jun 9 '18 at 11:05













Please share your code.

– kunj
Jun 9 '18 at 11:17





Please share your code.

– kunj
Jun 9 '18 at 11:17










1 Answer
1






active

oldest

votes


















2














You can do it by writing single event observer



Create registration file:




VendorModuleregistration.php




<?php

MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__
);


Create module file:




VendorModuleetcmodule.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.0"></module>
</config>


Create event File:




app/code/Vendor/Module/etc/events.xml




<?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="VendorModuleModelObserverChangeCurrencyPosition" />
</event>
</config>


Create observer File:



Write a observer file in app/code/Vendor/Module/Model/Observer with the file name ChangeCurrencyPosition.php



<?php        
namespace VendorModuleModelObserver;
use MagentoFrameworkEventObserverInterface;
class ChangeCurrencyPosition implements ObserverInterface
{
public function execute(MagentoFrameworkEventObserver $observer)
{
$currencyOptions = $observer->getEvent()->getCurrencyOptions();
$currencyOptions->setData('position', MagentoFrameworkCurrency::RIGHT);
return $this;
}
}


Run Command:




php bin/magento setup:upgrade







share|improve this answer


























  • It did not work, Magento 2.2.3 and base currency is AED not USD

    – Ahmad Darwish
    Jun 9 '18 at 11:11













  • @AhmadDarwish what error you got after doing same?

    – Nikunj Vadariya
    Jun 9 '18 at 11:15











  • No errors, nothing changing, where to trace the errors any log?

    – Ahmad Darwish
    Jun 9 '18 at 11:17











  • check error in var/log @AhmadDarwish

    – Nikunj Vadariya
    Jun 9 '18 at 11:19











  • I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

    – Ahmad Darwish
    Jun 9 '18 at 11:25













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f229295%2fmagento-2-how-to-change-currency-symbol-position-left-to-right%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














You can do it by writing single event observer



Create registration file:




VendorModuleregistration.php




<?php

MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__
);


Create module file:




VendorModuleetcmodule.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.0"></module>
</config>


Create event File:




app/code/Vendor/Module/etc/events.xml




<?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="VendorModuleModelObserverChangeCurrencyPosition" />
</event>
</config>


Create observer File:



Write a observer file in app/code/Vendor/Module/Model/Observer with the file name ChangeCurrencyPosition.php



<?php        
namespace VendorModuleModelObserver;
use MagentoFrameworkEventObserverInterface;
class ChangeCurrencyPosition implements ObserverInterface
{
public function execute(MagentoFrameworkEventObserver $observer)
{
$currencyOptions = $observer->getEvent()->getCurrencyOptions();
$currencyOptions->setData('position', MagentoFrameworkCurrency::RIGHT);
return $this;
}
}


Run Command:




php bin/magento setup:upgrade







share|improve this answer


























  • It did not work, Magento 2.2.3 and base currency is AED not USD

    – Ahmad Darwish
    Jun 9 '18 at 11:11













  • @AhmadDarwish what error you got after doing same?

    – Nikunj Vadariya
    Jun 9 '18 at 11:15











  • No errors, nothing changing, where to trace the errors any log?

    – Ahmad Darwish
    Jun 9 '18 at 11:17











  • check error in var/log @AhmadDarwish

    – Nikunj Vadariya
    Jun 9 '18 at 11:19











  • I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

    – Ahmad Darwish
    Jun 9 '18 at 11:25


















2














You can do it by writing single event observer



Create registration file:




VendorModuleregistration.php




<?php

MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__
);


Create module file:




VendorModuleetcmodule.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.0"></module>
</config>


Create event File:




app/code/Vendor/Module/etc/events.xml




<?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="VendorModuleModelObserverChangeCurrencyPosition" />
</event>
</config>


Create observer File:



Write a observer file in app/code/Vendor/Module/Model/Observer with the file name ChangeCurrencyPosition.php



<?php        
namespace VendorModuleModelObserver;
use MagentoFrameworkEventObserverInterface;
class ChangeCurrencyPosition implements ObserverInterface
{
public function execute(MagentoFrameworkEventObserver $observer)
{
$currencyOptions = $observer->getEvent()->getCurrencyOptions();
$currencyOptions->setData('position', MagentoFrameworkCurrency::RIGHT);
return $this;
}
}


Run Command:




php bin/magento setup:upgrade







share|improve this answer


























  • It did not work, Magento 2.2.3 and base currency is AED not USD

    – Ahmad Darwish
    Jun 9 '18 at 11:11













  • @AhmadDarwish what error you got after doing same?

    – Nikunj Vadariya
    Jun 9 '18 at 11:15











  • No errors, nothing changing, where to trace the errors any log?

    – Ahmad Darwish
    Jun 9 '18 at 11:17











  • check error in var/log @AhmadDarwish

    – Nikunj Vadariya
    Jun 9 '18 at 11:19











  • I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

    – Ahmad Darwish
    Jun 9 '18 at 11:25
















2












2








2







You can do it by writing single event observer



Create registration file:




VendorModuleregistration.php




<?php

MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__
);


Create module file:




VendorModuleetcmodule.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.0"></module>
</config>


Create event File:




app/code/Vendor/Module/etc/events.xml




<?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="VendorModuleModelObserverChangeCurrencyPosition" />
</event>
</config>


Create observer File:



Write a observer file in app/code/Vendor/Module/Model/Observer with the file name ChangeCurrencyPosition.php



<?php        
namespace VendorModuleModelObserver;
use MagentoFrameworkEventObserverInterface;
class ChangeCurrencyPosition implements ObserverInterface
{
public function execute(MagentoFrameworkEventObserver $observer)
{
$currencyOptions = $observer->getEvent()->getCurrencyOptions();
$currencyOptions->setData('position', MagentoFrameworkCurrency::RIGHT);
return $this;
}
}


Run Command:




php bin/magento setup:upgrade







share|improve this answer















You can do it by writing single event observer



Create registration file:




VendorModuleregistration.php




<?php

MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__
);


Create module file:




VendorModuleetcmodule.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.0"></module>
</config>


Create event File:




app/code/Vendor/Module/etc/events.xml




<?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="VendorModuleModelObserverChangeCurrencyPosition" />
</event>
</config>


Create observer File:



Write a observer file in app/code/Vendor/Module/Model/Observer with the file name ChangeCurrencyPosition.php



<?php        
namespace VendorModuleModelObserver;
use MagentoFrameworkEventObserverInterface;
class ChangeCurrencyPosition implements ObserverInterface
{
public function execute(MagentoFrameworkEventObserver $observer)
{
$currencyOptions = $observer->getEvent()->getCurrencyOptions();
$currencyOptions->setData('position', MagentoFrameworkCurrency::RIGHT);
return $this;
}
}


Run Command:




php bin/magento setup:upgrade








share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 9 '18 at 12:28

























answered Jun 9 '18 at 11:02









Nikunj VadariyaNikunj Vadariya

2,8741821




2,8741821













  • It did not work, Magento 2.2.3 and base currency is AED not USD

    – Ahmad Darwish
    Jun 9 '18 at 11:11













  • @AhmadDarwish what error you got after doing same?

    – Nikunj Vadariya
    Jun 9 '18 at 11:15











  • No errors, nothing changing, where to trace the errors any log?

    – Ahmad Darwish
    Jun 9 '18 at 11:17











  • check error in var/log @AhmadDarwish

    – Nikunj Vadariya
    Jun 9 '18 at 11:19











  • I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

    – Ahmad Darwish
    Jun 9 '18 at 11:25





















  • It did not work, Magento 2.2.3 and base currency is AED not USD

    – Ahmad Darwish
    Jun 9 '18 at 11:11













  • @AhmadDarwish what error you got after doing same?

    – Nikunj Vadariya
    Jun 9 '18 at 11:15











  • No errors, nothing changing, where to trace the errors any log?

    – Ahmad Darwish
    Jun 9 '18 at 11:17











  • check error in var/log @AhmadDarwish

    – Nikunj Vadariya
    Jun 9 '18 at 11:19











  • I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

    – Ahmad Darwish
    Jun 9 '18 at 11:25



















It did not work, Magento 2.2.3 and base currency is AED not USD

– Ahmad Darwish
Jun 9 '18 at 11:11







It did not work, Magento 2.2.3 and base currency is AED not USD

– Ahmad Darwish
Jun 9 '18 at 11:11















@AhmadDarwish what error you got after doing same?

– Nikunj Vadariya
Jun 9 '18 at 11:15





@AhmadDarwish what error you got after doing same?

– Nikunj Vadariya
Jun 9 '18 at 11:15













No errors, nothing changing, where to trace the errors any log?

– Ahmad Darwish
Jun 9 '18 at 11:17





No errors, nothing changing, where to trace the errors any log?

– Ahmad Darwish
Jun 9 '18 at 11:17













check error in var/log @AhmadDarwish

– Nikunj Vadariya
Jun 9 '18 at 11:19





check error in var/log @AhmadDarwish

– Nikunj Vadariya
Jun 9 '18 at 11:19













I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

– Ahmad Darwish
Jun 9 '18 at 11:25







I can see in exception.log : the Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "704" already exists. at /var/www/html/herara/vendor/magento/framework/Data/Collection.php:404)

– Ahmad Darwish
Jun 9 '18 at 11:25




















draft saved

draft discarded




















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f229295%2fmagento-2-how-to-change-currency-symbol-position-left-to-right%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

What other Star Trek series did the main TNG cast show up in?

Berlina muro

Berlina aerponto