ltsecurityinc安防产品在线商城代码
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2018 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
|
||||
<acl>
|
||||
<resources>
|
||||
<resource id="Magento_Backend::admin">
|
||||
<resource id="Plumrocket_Base::elements">
|
||||
<resource id="Plumrocket_GeoIPLookup::prgeoiplookup" title="IP Geolocation Lookup" sortOrder="3786959" />
|
||||
</resource>
|
||||
<resource id="Magento_Backend::stores">
|
||||
<resource id="Magento_Backend::stores_settings">
|
||||
<resource id="Magento_Config::config">
|
||||
<resource id="Plumrocket_GeoIPLookup::configuration" title="IP Geolocation Lookup Section" />
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2018 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
|
||||
<menu>
|
||||
<add module="Plumrocket_GeoIPLookup" parent="Plumrocket_Base::elements" id="Plumrocket_GeoIPLookup::prgeoiplookup" resource="Plumrocket_GeoIPLookup::prgeoiplookup" title="IP Geolocation Lookup" sortOrder="3786959"/>
|
||||
<add module="Plumrocket_GeoIPLookup" parent="Plumrocket_GeoIPLookup::prgeoiplookup" id="Plumrocket_GeoIPLookup::configuration" resource="Plumrocket_GeoIPLookup::configuration" action="adminhtml/system_config/edit/section/prgeoiplookup" title="Configuration" sortOrder="100"/>
|
||||
</menu>
|
||||
</config>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2018 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
|
||||
<router id="admin">
|
||||
<route frontName="prgeoiplookup" id="prgeoiplookup">
|
||||
<module name="Plumrocket_GeoIPLookup"/>
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2018 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
|
||||
<system>
|
||||
<section id="prgeoiplookup" translate="label" type="text" sortOrder="3786959" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>IP Geolocation Lookup</label>
|
||||
<tab>plumrocket</tab>
|
||||
<resource>Plumrocket_GeoIPLookup::configuration</resource>
|
||||
<group id="toolbox" translate="label" type="text" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<frontend_model>Plumrocket\Base\Block\Adminhtml\System\Config\Form\ToolbarFieldset</frontend_model>
|
||||
<field id="version" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<frontend_model>Plumrocket\Base\Block\Adminhtml\System\Config\Form\Version</frontend_model>
|
||||
<attribute type="pr_extension_name">GeoIPLookup</attribute>
|
||||
</field>
|
||||
</group>
|
||||
<!-- Begin of GENERAL group -->
|
||||
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>General</label>
|
||||
<attribute type="expanded">1</attribute>
|
||||
<field id="enabled" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Enable Extension</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
</field>
|
||||
<field id="serial" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Serial Key</label>
|
||||
<frontend_model>Plumrocket\Base\Block\Adminhtml\System\Config\Form\Serial</frontend_model>
|
||||
<attribute type="pr_extension_name">GeoIPLookup</attribute>
|
||||
</field>
|
||||
</group>
|
||||
<!-- End GENERAL -->
|
||||
|
||||
<!-- Begin of METHODS group -->
|
||||
<group id="methods" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Services</label>
|
||||
<attribute type="expanded">1</attribute>
|
||||
<field id="notice" translate="label comment" type="text" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Notice</frontend_model>
|
||||
</field>
|
||||
<!-- Begin of MAXMAINDGEOIP group -->
|
||||
<group id="maxmindgeoip" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Maxmind IP Geolocation Database</label>
|
||||
<field id="enabled" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Enable</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Enable</frontend_model>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
</field>
|
||||
<field id="status" translate="label" type="note" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Database Status</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Status</frontend_model>
|
||||
</field>
|
||||
<field id="install_method" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Installation Method</label>
|
||||
<source_model>Plumrocket\GeoIPLookup\Model\System\Config\Source\Installmethods</source_model>
|
||||
<frontend_class>install-method</frontend_class>
|
||||
<comment><![CDATA[<span class="method_comment"></span>]]></comment>
|
||||
</field>
|
||||
<field id="install" translate="button_label" type="button" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<button_label>Install Database</button_label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Buttons\Install</frontend_model>
|
||||
<depends>
|
||||
<field id="install_method">automatic</field>
|
||||
</depends>
|
||||
</field>
|
||||
</group>
|
||||
<!-- End MAXMAINDGEOIP -->
|
||||
|
||||
<!-- Begin of IPTOCOUNTRY group -->
|
||||
<group id="iptocountry" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>IpToCountry IP Geolocation Database</label>
|
||||
<field id="enabled" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Enable</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Enable</frontend_model>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
</field>
|
||||
<field id="status" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Database Status</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Status</frontend_model>
|
||||
</field>
|
||||
<field id="install_method" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Installation Method</label>
|
||||
<source_model>Plumrocket\GeoIPLookup\Model\System\Config\Source\Installmethods</source_model>
|
||||
<frontend_class>install-method</frontend_class>
|
||||
<comment><![CDATA[<span class="method_comment"></span>]]></comment>
|
||||
</field>
|
||||
<field id="install" translate="button_label" type="button" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<button_label>Install Database</button_label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Buttons\Install</frontend_model>
|
||||
<depends>
|
||||
<field id="install_method">automatic</field>
|
||||
</depends>
|
||||
</field>
|
||||
</group>
|
||||
<!-- End IPTOCOUNTRY -->
|
||||
|
||||
<!-- Begin of Ipapi group -->
|
||||
<group id="ipapigeoip" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Ipapi.Com - IP Geolocation API</label>
|
||||
<field id="enabled" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Enable</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<comment><![CDATA[
|
||||
The API is provided by: <a target="_blank" href="https://ipapi.com">https://ipapi.com</a>.<br>
|
||||
Limits: 10,000 Lookups in Free Plan. You can get more IP lookups with paid plans.
|
||||
]]></comment>
|
||||
</field>
|
||||
<field id="use_https" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Use HTTPS Encryption</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<comment><![CDATA[HTTPS encryption is not available for the free plan, it can only be used with pro plans.]]></comment>
|
||||
</field>
|
||||
<field id="access_key" translate="label" type="password" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Access Key</label>
|
||||
</field>
|
||||
<field id="connection_test" translate="button_label" type="button" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<button_label>Test Connection</button_label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Buttons\Connection</frontend_model>
|
||||
</field>
|
||||
</group>
|
||||
<!-- End Ipapi -->
|
||||
</group>
|
||||
<!-- End METHODS -->
|
||||
|
||||
<!-- Begin of GEOIPTEST group -->
|
||||
<group id="geoiptest" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>IP Geolocation Lookup Test</label>
|
||||
<field id="ip_address" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>IP Address</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Test\Ipaddress</frontend_model>
|
||||
<comment><![CDATA[
|
||||
Enter IP address to test IP geolocation lookup. Your own IP address is automatically populated in this field.
|
||||
]]></comment>
|
||||
</field>
|
||||
<field id="test_geoip_lookup" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Test IP Geolocation Lookup</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Test\Button</frontend_model>
|
||||
</field>
|
||||
<field id="geoinfo" translate="label" type="textarea" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>IP Geolocation Information</label>
|
||||
</field>
|
||||
<field id="location_on_map" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>View Location on Map</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Test\Map</frontend_model>
|
||||
</field>
|
||||
<field id="rest_ip" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>REST API</label>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Data\Test\Api</frontend_model>
|
||||
<comment><![CDATA[
|
||||
Read more about REST API and other methods of retrieving Geolocation Lookup data in our <a target="_blank" href="https://plumrocket.com/docs/magento-geoip-lookup/v1">developer's guide</a>
|
||||
]]></comment>
|
||||
</field>
|
||||
</group>
|
||||
<!-- End GEOIPTEST -->
|
||||
|
||||
</section>
|
||||
|
||||
<section id="pr_cookie">
|
||||
<group id="main_settings">
|
||||
<field id="geo_targeting" translate="label comment" type="multiselect" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Geo Targeting</label>
|
||||
<source_model>Plumrocket\GeoIPLookup\Model\System\Config\Source\GeoTargeting</source_model>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Form\GeoTargetingMultiSelect</frontend_model>
|
||||
<frontend_class>geoip-select-with-chosen prgdpr-coutry</frontend_class>
|
||||
<comment>Show cookie consent notice only to visitors from the selected list of countries / states.</comment>
|
||||
</field>
|
||||
<field id="states_geo_targeting" translate="label comment" type="multiselect" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>U.S. States</label>
|
||||
<source_model>Plumrocket\GeoIPLookup\Model\System\Config\Source\GeoTargetingStates</source_model>
|
||||
<frontend_model>Plumrocket\GeoIPLookup\Block\Adminhtml\System\Config\Form\StatesGeoTargetingMultiSelect</frontend_model>
|
||||
<frontend_class>geoip-select-with-chosen prgdpr-ccpa</frontend_class>
|
||||
<comment>You can select one or multiple U.S. states. For example, select "California" for CCPA law.</comment>
|
||||
</field>
|
||||
</group>
|
||||
</section>
|
||||
</system>
|
||||
</config>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2018 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
|
||||
<default>
|
||||
<prgeoiplookup>
|
||||
<general>
|
||||
<serial></serial>
|
||||
</general>
|
||||
<methods>
|
||||
<ipapigeoip>
|
||||
<use_https>0</use_https>
|
||||
</ipapigeoip>
|
||||
</methods>
|
||||
</prgeoiplookup>
|
||||
<!-- Default values for fields with "config_path" attribute -->
|
||||
<prgdpr>
|
||||
<cookie_consent>
|
||||
<geoip_restriction>all</geoip_restriction>
|
||||
</cookie_consent>
|
||||
</prgdpr>
|
||||
</default>
|
||||
</config>
|
||||
Executable
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<preference for="Plumrocket\GeoIPLookup\Api\GeoIPLookupInterface" type="Plumrocket\GeoIPLookup\Model\Api\GeoIPLookup" />
|
||||
<preference for="Plumrocket\GeoIPLookup\Api\GeoLocationValidatorInterface" type="Plumrocket\GeoIPLookup\Model\GeoLocationValidator" />
|
||||
<preference for="Plumrocket\GeoIPLookup\Api\LocationsListInterface" type="Plumrocket\GeoIPLookup\Model\LocationsList" />
|
||||
<preference for="Plumrocket\GeoIPLookup\Model\Cache\GeoIpInterface" type="Plumrocket\GeoIPLookup\Model\Cache\Session" />
|
||||
|
||||
<type name="Plumrocket\CCPA\Model\Validator\CcpaGeoLocationValidator">
|
||||
<arguments>
|
||||
<argument name="geoIpModel" xsi:type="object">Plumrocket\GeoIPLookup\Model\GeoIPLookup</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Plumrocket\GeoIPLookup\Plugin\Plumrocket\CanManageCookie">
|
||||
<arguments>
|
||||
<argument name="geoLocationValidator" xsi:type="object">Plumrocket\GeoIPLookup\Api\GeoLocationValidatorInterface\Proxy</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Plumrocket\CookieConsent\Api\CanManageCookieInterface">
|
||||
<plugin name="prGeoIpCanManageCookie"
|
||||
type="Plumrocket\GeoIPLookup\Plugin\Plumrocket\CanManageCookie" sortOrder="10"/>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Framework\HTTP\PhpEnvironment\RemoteAddress">
|
||||
<arguments>
|
||||
<argument name="alternativeHeaders" xsi:type="array">
|
||||
<item name="cloud-flare-real-visitor-ip" xsi:type="string">HTTP_CF_CONNECTING_IP</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Plumrocket\DataPrivacyApi\Api\ConsentCheckboxProviderInterface">
|
||||
<plugin name="pr-geo-ip-filter-checkboxes"
|
||||
type="Plumrocket\GeoIPLookup\Plugin\Plumrocket\DataPrivacy\FilterConsentCheckboxesPlugin"
|
||||
sortOrder="10"/>
|
||||
</type>
|
||||
|
||||
<virtualType name="Plumrocket\GeoIPLookup\Model\Services\IpToCountry\DbReader" type="Plumrocket\GeoIPLookup\Model\MmdbReader">
|
||||
<arguments>
|
||||
<argument name="fileName" xsi:type="const">Plumrocket\GeoIPLookup\Helper\Config::IPTOCOUNTRY_SOURCE_FILE_NAME</argument>
|
||||
<argument name="databaseName" xsi:type="const">Plumrocket\GeoIPLookup\Helper\Config::IPTOCOUNTRY_DATABASE_NAME</argument>
|
||||
<argument name="fieldsMap" xsi:type="array">
|
||||
<item name="continent_code" xsi:type="string">continent.code</item>
|
||||
<item name="continent_name" xsi:type="string">continent.names.en</item>
|
||||
<item name="country_code" xsi:type="string">country.iso_code</item>
|
||||
<item name="country_name" xsi:type="string">country.names.en</item>
|
||||
<item name="is_in_european_union" xsi:type="string">country.is_in_european_union</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Plumrocket\GeoIPLookup\Model\Services\MaxMind\DbReader" type="Plumrocket\GeoIPLookup\Model\MmdbReader">
|
||||
<arguments>
|
||||
<argument name="fileName" xsi:type="const">Plumrocket\GeoIPLookup\Helper\Config::MAXMIND_SOURCE_FILE_NAME</argument>
|
||||
<argument name="databaseName" xsi:type="const">Plumrocket\GeoIPLookup\Helper\Config::MAXMIND_DATABASE_NAME</argument>
|
||||
<argument name="fieldsMap" xsi:type="array">
|
||||
<item name="postal_code" xsi:type="string">postal.code</item>
|
||||
<item name="latitude" xsi:type="string">location.latitude</item>
|
||||
<item name="longitude" xsi:type="string">location.longitude</item>
|
||||
<item name="continent_code" xsi:type="string">continent.code</item>
|
||||
<item name="continent_name" xsi:type="string">continent.names.en</item>
|
||||
<item name="country_code" xsi:type="string">country.iso_code</item>
|
||||
<item name="country_name" xsi:type="string">country.names.en</item>
|
||||
<item name="subdivision_1_iso_code" xsi:type="string">subdivisions.0.iso_code</item>
|
||||
<item name="subdivision_1_name" xsi:type="string">subdivisions.0.names.en</item>
|
||||
<item name="subdivision_2_iso_code" xsi:type="string">subdivisions.1.iso_code</item>
|
||||
<item name="subdivision_2_name" xsi:type="string">subdivisions.1.names.en</item>
|
||||
<item name="city_name" xsi:type="string">city.names.en</item>
|
||||
<item name="time_zone" xsi:type="string">location.time_zone</item>
|
||||
<item name="is_in_european_union" xsi:type="string">country.is_in_european_union</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<virtualType name="Plumrocket\GeoIPLookup\Model\Services\IpToCountry" type="Plumrocket\GeoIPLookup\Model\Services\AbstractMmdb">
|
||||
<arguments>
|
||||
<argument name="mmdbReader" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\IpToCountry\DbReader</argument>
|
||||
<argument name="cacheKeyPostfixes" xsi:type="array">
|
||||
<item name="getGeoLocation" xsi:type="string">_gl_itc</item>
|
||||
<item name="getCountryCode" xsi:type="string">_cc_itc</item>
|
||||
<item name="getCurrentCountryState" xsi:type="string">_cc_itc_cs</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Plumrocket\GeoIPLookup\Model\Services\MaxMind" type="Plumrocket\GeoIPLookup\Model\Services\AbstractMmdb">
|
||||
<arguments>
|
||||
<argument name="mmdbReader" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\MaxMind\DbReader</argument>
|
||||
<argument name="cacheKeyPostfixes" xsi:type="array">
|
||||
<item name="getGeoLocation" xsi:type="string">_gl_mx</item>
|
||||
<item name="getCountryCode" xsi:type="string">_cc_mx</item>
|
||||
<item name="getCurrentCountryState" xsi:type="string">_cc_mx_cs</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<type name="Plumrocket\GeoIPLookup\Model\GeoIPLookup">
|
||||
<arguments>
|
||||
<argument name="geoIpServices" xsi:type="array">
|
||||
<item name="MaxMind" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\MaxMind</item>
|
||||
<item name="IpToCountry" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\IpToCountry</item>
|
||||
<item name="IpApi" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\IpApi</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Plumrocket\GeoIPLookup\Model\Data\Import\Iptocountry">
|
||||
<arguments>
|
||||
<argument name="mmdbReader" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\IpToCountry\DbReader</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Plumrocket\GeoIPLookup\Model\Data\Import\Maxmindgeoip">
|
||||
<arguments>
|
||||
<argument name="mmdbReader" xsi:type="object">Plumrocket\GeoIPLookup\Model\Services\MaxMind\DbReader</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
</config>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
/**
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2019 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license/ End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Plumrocket_GeoIPLookup">
|
||||
<sequence>
|
||||
<module name="Plumrocket_Base" />
|
||||
</sequence>
|
||||
</module>
|
||||
</config>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license/ End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
<extensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Plumrocket_Base:etc/pr_extensions.xsd">
|
||||
<extension name="GeoIPLookup"
|
||||
title="IP Geolocation Lookup"
|
||||
config_section="prgeoiplookup"
|
||||
is_enabled_path="prgeoiplookup/general/enabled"
|
||||
documentation="https://plumrocket.com/docs/magento-ip-geolocation-lookup/v2"
|
||||
url="https://plumrocket.com/magento-ip-geolocation-lookup"
|
||||
marketplace_url="https://marketplace.magento.com/ip-geolocation-lookup.html"
|
||||
>
|
||||
<customer key="18771d78aa85ca47851fca7fdf3dd545bad4a02358"/>
|
||||
</extension>
|
||||
</extensions>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Plumrocket Inc.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the End-user License Agreement
|
||||
* that is available through the world-wide-web at this URL:
|
||||
* http://wiki.plumrocket.net/wiki/EULA
|
||||
* If you are unable to obtain it through the world-wide-web, please
|
||||
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
||||
*
|
||||
* @package Plumrocket_GeoIPLookup
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
|
||||
<route url="/V1/prgeoiplookup/:ip/params/:params" method="GET">
|
||||
<service class="Plumrocket\GeoIPLookup\Api\GeoIPLookupInterface" method="getGeoIpData"/>
|
||||
<resources>
|
||||
<resource ref="anonymous"/>
|
||||
</resources>
|
||||
</route>
|
||||
<route url="/V1/prgeoiplookup/:ip" method="GET">
|
||||
<service class="Plumrocket\GeoIPLookup\Api\GeoIPLookupInterface" method="getGeoIpDataWithDefaultServices"/>
|
||||
<resources>
|
||||
<resource ref="anonymous"/>
|
||||
</resources>
|
||||
</route>
|
||||
</routes>
|
||||
Reference in New Issue
Block a user