ecommpro / custom-currency Goto Github PK
View Code? Open in Web Editor NEWCustom Currency for Magento 2
License: MIT License
Custom Currency for Magento 2
License: MIT License
The Zend class throws an exception if the locale is empty or not 5 characters long.
We are relying on CurrencyInterface->getLocale() to find the currency locale but it looks like this can be empty, or taken from the user's Accept-Language header. If the Accept-Language header contains only 'de' (not 'de_DE'), then the exception is thrown.
We should use the Magento locale resolver instead as it will always return a valid locale.
When deploying in the Cloud (have tried through composer and copying directly into app/code), the process fails with:
[2022-***2-***4 ***5:***:40] ERROR: [***] The command "php ./bin/magento module:enable --all --ansi --no-interaction" failed. There are no commands defined in the "module" namespace.
Magento version: 2.3.1
Plugin version: 1.0.1
I have the following error when I try to reach the front office:
Error filtering template: Notice: Undefined variable: precision in /app/vendor/ecommpro/module-custom-currency/Plugin/PriceCurrencyInterfacePlugin.php on line 17
There is a typo in $precission
here: https://github.com/ecommpro/custom-currency/blob/master/Plugin/PriceCurrencyInterfacePlugin.php#L13
(23e4a57)
Magento version: 2.3.1
Plugin version: 1.0.0
I have the following error when I try to reach the front office:
1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: '/app/vendor/composer/../ecommpro/module-custom-currency/view/frontend/templates/bootstrap.phtml' in module: '' block's name: 'custom-currency-bootstrap'
It looks like it comes from https://github.com/ecommpro/custom-currency/blob/master/registration.php#L5 as if I replace:
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'EcommPro_CustomCurrency',
isset($file) ? dirname($file) : __DIR__
);
with:
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'EcommPro_CustomCurrency',
__DIR__
);
(from 4de1a3e), the error is gone.
Hi,
Commit 5176526 added a plugin to \Magento\Config\Model\Config\Structure\Data
, which adds to the config array regardless of context. I have another module (BSSCommerce Customer Approval) which sends email out from a frontend controller, in a backend context (to notify the admin). Somehow that results in use of \Magento\Email\Model\BackendTemplate
being used which triggers this plugin but with an empty config array. Our plugin adds the 'tabs' entry which then triggers an undefined variable on line 235 of \Magento\Config\Model\Config\Structure
because the 'sections' entry isn't there.
That undefined variable notice gets turned into an exception by Magento's error handler, which in the case of an email template will turn the template output into "We're sorry, an error has occurred while generating this content".
We should either move this plugin into etc/adminhtml/di.xml
or add an extra check so it only adds the tab if the 'tabs' entry is present already. Do you have a preference?
Is it also possible this isn't needed? I guess it was a workaround for some issue!
Magento version: 2.3.1
Plugin version: 1.0.0
I have the following error when I try to reach Stores > Settings > Configuration:
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in /app/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63
It looks like it comes from https://github.com/ecommpro/custom-currency/blob/master/etc/adminhtml/system.xml#L10 as the tab has been removed (211aa74).
I noticed an issue with another modules which looks at the Currency field code for the chosen Currency.
This seems to mae an exception when you have a Custom Currency with a code with more than 3 characters...
I don't know if you can take that into account or list it as an known issue or something.
Magento Version: 2.3.5
Plugin Version: 1.1.3
Good afternoon,
I have spent a good amount of time trying to get a custom currency to run at install time following the instructions in the README. I edit the di.xml file to include:
<type name="EcommPro\CustomCurrency\Model\Config"><arguments><argument name="currencies" xsi:type="array"><item name=“EXAMPLE” xsi:type="array"><item name="code" xsi:type="string">EXAMPLE</item><item name="singular" xsi:type="string">Example</item><item name="plural" xsi:type="string">Examples</item></item></argument></arguments></type>
After that, I have tried all of the following, but none of them cause the currency to show in the currency config screen or the ecom custom currency screen.
bin/magento cache:clean
bin/magento cache:flush
bin/magento setup:upgrade
bin/magento setup:di:compile
/generated
folderI am able to run bin/magento dev:di:info "EcommPro\CustomCurrency\Model\Config"
and see the example json as the value of currences, but nothing is changing in the UI.
I'm not a php expert, but I saw that this commit removed reference the currencies variable, maybe that is the issue? Any help to get this working is appreciated. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.