b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / dev2.destoffenstraat.com / app / code / Geissweb / Euvat / etc /
Filename/home/dev2.destoffenstraat.com/app/code/Geissweb/Euvat/etc/di.xml
Size8.93 kb
Permissionrwxrwxrwx
Ownerroot : root
Create time17-Aug-2025 10:26
Last modified09-Jul-2024 08:40
Last accessed22-Aug-2025 02:07
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?xml version="1.0"?>
<!--
/**
* ||GEISSWEB| EU VAT Enhanced
*
* NOTICE OF LICENSE
*
* This source file is subject to the GEISSWEB End User License Agreement
* that is available through the world-wide-web at this URL: https://www.geissweb.de/legal-information/eula
*
* DISCLAIMER
*
* Do not edit this file if you wish to update the extension in the future. If you wish to customize the extension
* for your needs please refer to our support for more information.
*
* @copyright Copyright (c) 2015 GEISS Weblösungen (https://www.geissweb.de)
* @license https://www.geissweb.de/legal-information/eula GEISSWEB End User License Agreement
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

<!-- Custom Logger -->
<type name="Geissweb\Euvat\Logger\Handler">
<arguments>
<argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
</arguments>
</type>
<type name="Geissweb\Euvat\Logger\Logger">
<arguments>
<argument name="name" xsi:type="string">VAT</argument>
<argument name="handlers" xsi:type="array">
<item name="debug" xsi:type="object">Geissweb\Euvat\Logger\Handler</item>
</argument>
</arguments>
</type>

<!-- Workaround for marketplace tech review,
see https://app.slack.com/client/T4YUW69CM/C7SL5CGDN/thread/C7SL5CGDN-1649070855.039549 -->
<type name="Geissweb\Euvat\Console\Command\CleanVatNumbers">
<arguments>
<argument name="vatNumberFormatter" xsi:type="object">Geissweb\Euvat\Helper\VatNumber\Formatter\Proxy</argument>
<argument name="validationRepository" xsi:type="object">Geissweb\Euvat\Model\ValidationRepository\Proxy</argument>
<argument name="syntaxValidator" xsi:type="object">Geissweb\Euvat\Validator\Syntax\Proxy</argument>
<argument name="logger" xsi:type="object">Geissweb\Euvat\Logger\Logger\Proxy</argument>
<argument name="searchCriteriaBuilder" xsi:type="object">Magento\Framework\Api\SearchCriteriaBuilder\Proxy</argument>
<argument name="filterBuilder" xsi:type="object">Magento\Framework\Api\FilterBuilder\Proxy</argument>
<argument name="addressRepository" xsi:type="object">Magento\Customer\Api\AddressRepositoryInterface\Proxy</argument>
</arguments>
</type>

<!-- Rewrites to prevent Magento core VAT validation execution -->
<preference for="Magento\Customer\Observer\BeforeAddressSaveObserver"
type="Geissweb\Euvat\Observer\BeforeAddressSaveObserver"/>

<preference for="Magento\Customer\Observer\AfterAddressSaveObserver"
type="Geissweb\Euvat\Observer\AfterAddressSaveObserver"/>

<!-- Rewrite for adminhtml sales order create VAT validation -->
<preference for="Magento\Customer\Block\Adminhtml\Sales\Order\Address\Form\Renderer\Vat"
type="Geissweb\Euvat\Block\Adminhtml\SalesOrderAddressFormRendererVat"/>

<!-- Plugin and arguments -->
<type name="Magento\Tax\Model\Calculation">
<arguments>
<argument name="data" xsi:type="array">
<item name="euvat_logger" xsi:type="object">Geissweb\Euvat\Logger\Logger</item>
<item name="euvat_current_tax_country_registry" xsi:type="object">Geissweb\Euvat\Registry\CurrentTaxCountry</item>
<item name="euvat_config" xsi:type="object">Geissweb\Euvat\Helper\Configuration</item>
</argument>
</arguments>
<!-- Dynamic tax class -->
<plugin name="Geissweb_TaxCalculation" type="Geissweb\Euvat\Plugin\Tax\Calculation" sortOrder="10" disabled="false" />
</type>

<!-- Rewrite tax calculation model -->
<preference for="Magento\Tax\Model\Calculation"
type="Geissweb\Euvat\Model\Rewrite\TaxCalculation"/>

<!-- Adjust Default Checkout Layout -->
<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
<plugin name="Geissweb_VatNumberCheckoutLayout" type="Geissweb\Euvat\Plugin\CheckoutLayout\DefaultCheckout" sortOrder="20" disabled="false"/>
</type>

<!-- Adjust Mageplaza_Osc Checkout Layout -->
<type name="Mageplaza\Osc\Block\Checkout\LayoutProcessor">
<plugin name="Geissweb_VatNumberCheckoutLayoutMageplaza" type="Geissweb\Euvat\Plugin\CheckoutLayout\MageplazaOsc" sortOrder="30" disabled="false"/>
</type>

<!-- Aheadworks OneStepCheckout -->
<type name="Aheadworks\OneStepCheckout\Block\Checkout">
<plugin name="Geissweb_VatNumberCheckoutLayoutAheadworks" type="Geissweb\Euvat\Plugin\CheckoutLayout\AheadworksOsc" sortOrder="30" disabled="false"/>
</type>

<!-- Plugin for tax config -->
<type name="Magento\Tax\Model\Config">
<plugin name="Geissweb_TaxConfig" type="Geissweb\Euvat\Plugin\Tax\Config" sortOrder="10" disabled="false" />
</type>

<!-- Plugin for MinimalTierPriceCalculator for using the website price -->
<type name="Magento\Catalog\Pricing\Price\MinimalTierPriceCalculator">
<plugin name="Geissweb_MinimalTierPriceCalculator" type="Geissweb\Euvat\Plugin\Pricing\MinimalTierPriceCalculator" sortOrder="10" disabled="false" />
</type>
<!-- Plugin for assigning customer group -->
<type name="Magento\Customer\Model\ResourceModel\CustomerRepository">
<plugin name="Geissweb_CustomerRepository" type="Geissweb\Euvat\Plugin\CustomerRepository" sortOrder="10" disabled="false"/>
</type>
<!-- Make sure quote address uses existing values -->
<type name="Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector">
<plugin name="Geissweb_QuoteTaxCollector" type="Geissweb\Euvat\Plugin\Tax\QuoteCollector" sortOrder="10" disabled="false" />
</type>

<!-- Assigns customer group to guest orders (if enabled) and adds order comment with validation information -->
<type name="Magento\Sales\Api\OrderManagementInterface">
<plugin name="Geissweb_OrderManagement" type="Geissweb\Euvat\Plugin\OrderManagement" sortOrder="10" disabled="false"/>
</type>

<!-- Fix trigger_recollect on quote loading - otherwise there will be an endless loop -->
<type name="Magento\Quote\Model\Quote">
<plugin name="Geissweb_RecollectFix" type="Geissweb\Euvat\Plugin\Model\Quote" sortOrder="5" disabled="false" />
</type>

<!-- Console commands -->
<type name="Magento\Framework\Console\CommandList">
<arguments>
<argument name="commands" xsi:type="array">
<item name="CleanVatNumbers" xsi:type="object">Geissweb\Euvat\Console\Command\CleanVatNumbers</item>
</argument>
</arguments>
</type>

<!-- Model implementation -->
<preference for="Geissweb\Euvat\Api\ValidationRepositoryInterface" type="Geissweb\Euvat\Model\ValidationRepository"/>
<preference for="Geissweb\Euvat\Api\Data\ValidationInterface" type="Geissweb\Euvat\Model\Validation"/>
<preference for="Geissweb\Euvat\Api\Data\ValidationSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>

<!-- Admin Grid for VAT Validations List (must not go to adminhtml/di.xml) -->
<virtualType name="Geissweb\Euvat\Model\ResourceModel\Validation\Grid\Collection"
type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
<arguments>
<argument name="mainTable" xsi:type="string">vat_validation</argument>
<argument name="resourceModel" xsi:type="string">
Geissweb\Euvat\Model\ResourceModel\Validation\Collection
</argument>
</arguments>
</virtualType>
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
<arguments>
<argument name="collections" xsi:type="array">
<item name="euvat_validation_listing_data_source" xsi:type="string">
Geissweb\Euvat\Model\ResourceModel\Validation\Grid\Collection
</item>
</argument>
</arguments>
</type>

<!-- Use customer session proxy -->
<type name="Geissweb\Euvat\Model\CaseIdentifier">
<arguments>
<argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
</arguments>
</type>
<type name="Geissweb\Euvat\Plugin\Tax\Calculation">
<arguments>
<argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
</arguments>
</type>
<type name="Geissweb\Euvat\Model\Checkout\ConfigProvider">
<arguments>
<argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
</arguments>
</type>

<!-- Avoid "Area code is not set" -->
<type name="Geissweb\Euvat\Plugin\Tax\Config">
<arguments>
<argument name="appState" xsi:type="object">Magento\Framework\App\State\Proxy</argument>
</arguments>
</type>
</config>