Init
This commit is contained in:
parent
b9997b82e7
commit
c1eee06596
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
/.idea/
|
||||
/atlassian-ide-plugin.xml
|
||||
/tmp/
|
11
Config.php
Normal file
11
Config.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* Authors: Alex Gusev <alex@flancer64.com>
|
||||
* Since: 2018
|
||||
*/
|
||||
|
||||
namespace Flancer32\FreeRates;
|
||||
class Config
|
||||
{
|
||||
const MODULE = 'Flancer32_FreeRates';
|
||||
}
|
15
Model/Currency/Import/Fcc.php
Normal file
15
Model/Currency/Import/Fcc.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* Authors:
|
||||
* krybbio <https://magento.stackexchange.com/users/15051/krybbio>
|
||||
* Alex Gusev <alex@flancer64.com>
|
||||
* Since: 2018
|
||||
*/
|
||||
|
||||
namespace Flancer32\FreeRates\Model\Currency\Import;
|
||||
|
||||
|
||||
class Fcc
|
||||
{
|
||||
|
||||
}
|
|
@ -1,2 +1,5 @@
|
|||
# mage2_ext_free_rates
|
||||
|
||||
Magento 2: Currency converter to get rates from https://free.currencyconverterapi.com/
|
||||
|
||||
[Based on "krybbio" code](https://magento.stackexchange.com/a/228671/33058).
|
22
composer.json
Normal file
22
composer.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "flancer32/mage2_ext_free_rates",
|
||||
"description": "Magento 2: Currency converter to get rates from https://free.currencyconverterapi.com/",
|
||||
"type": "magento2-module",
|
||||
"homepage": "https://github.com/flancer32/mage2_ext_free_rates",
|
||||
"license": "GPL-3.0-only",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Alex Gusev",
|
||||
"email": "alex@flancer64.com"
|
||||
}
|
||||
],
|
||||
"require": {},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"registration.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Flancer32\\FreeRates\\": ""
|
||||
}
|
||||
}
|
||||
}
|
20
etc/adminhtml/system.xml
Normal file
20
etc/adminhtml/system.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
|
||||
<system>
|
||||
<section id="currency">
|
||||
<group id="fcc" translate="label"
|
||||
sortOrder="41" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Free Currency Converter</label>
|
||||
<field id="timeout" translate="label" type="text"
|
||||
sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Connection Timeout in Seconds</label>
|
||||
</field>
|
||||
<field id="delay" translate="label" type="text"
|
||||
sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Connection Delay Time in Seconds</label>
|
||||
</field>
|
||||
</group>
|
||||
</section>
|
||||
</system>
|
||||
</config>
|
12
etc/config.xml
Normal file
12
etc/config.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
|
||||
<default>
|
||||
<currency>
|
||||
<fcc>
|
||||
<timeout>100</timeout>
|
||||
<delay>1</delay>
|
||||
</fcc>
|
||||
</currency>
|
||||
</default>
|
||||
</config>
|
16
etc/di.xml
Normal file
16
etc/di.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
|
||||
<type name="Magento\Directory\Model\Currency\Import\Config">
|
||||
<arguments>
|
||||
<argument name="servicesConfig" xsi:type="array">
|
||||
<item name="fcc" xsi:type="array">
|
||||
<item name="label" xsi:type="string">Free Currency Converter</item>
|
||||
<item name="class" xsi:type="string">Flancer32\FreeRates\Model\Currency\Import\Fcc</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
</config>
|
10
etc/module.xml
Normal file
10
etc/module.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<config
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Flancer32_FreeRates" setup_version="0.1.0">
|
||||
<sequence>
|
||||
<module name="Magento_Directory"/>
|
||||
</sequence>
|
||||
</module>
|
||||
</config>
|
10
registration.php
Normal file
10
registration.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
/**
|
||||
* Authors: Alex Gusev <alex@flancer64.com>
|
||||
* Since: 2018
|
||||
*/
|
||||
\Magento\Framework\Component\ComponentRegistrar::register(
|
||||
\Magento\Framework\Component\ComponentRegistrar::MODULE,
|
||||
\Flancer32\FreeRates\Config::MODULE,
|
||||
__DIR__
|
||||
);
|
Reference in a new issue