2 deleted 5 characters in body
source | link

You can observe to the event sales_quote_address_collect_totals_after and achieve it.

File : app\code\Vendor\Module\etc\events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_quote_address_collect_totals_after">
        <observer name="changeTax" instance="Vendor\Module\Observer\ChangeTax"/>
    </event>
</config>

File : app\code\Vendor\Module\Observer\ChangeTaxTotalapp\code\Vendor\Module\Observer\ChangeTax.php

<?php
namespace Vendor\Module\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Framework\Event\Observer;

class ChangeTax implements ObserverInterface
{


    public function execute(Observer $observer)
    {
        /** @var Magento\Quote\Model\Quote\Address\Total */
        $total = $observer->getData('your_data');

    }
}

You can observe to the event sales_quote_address_collect_totals_after and achieve it.

File : app\code\Vendor\Module\etc\events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_quote_address_collect_totals_after">
        <observer name="changeTax" instance="Vendor\Module\Observer\ChangeTax"/>
    </event>
</config>

File : app\code\Vendor\Module\Observer\ChangeTaxTotal.php

<?php
namespace Vendor\Module\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Framework\Event\Observer;

class ChangeTax implements ObserverInterface
{


    public function execute(Observer $observer)
    {
        /** @var Magento\Quote\Model\Quote\Address\Total */
        $total = $observer->getData('your_data');

    }
}

You can observe to the event sales_quote_address_collect_totals_after and achieve it.

File : app\code\Vendor\Module\etc\events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_quote_address_collect_totals_after">
        <observer name="changeTax" instance="Vendor\Module\Observer\ChangeTax"/>
    </event>
</config>

File : app\code\Vendor\Module\Observer\ChangeTax.php

<?php
namespace Vendor\Module\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Framework\Event\Observer;

class ChangeTax implements ObserverInterface
{


    public function execute(Observer $observer)
    {
        /** @var Magento\Quote\Model\Quote\Address\Total */
        $total = $observer->getData('your_data');

    }
}
1
source | link

You can observe to the event sales_quote_address_collect_totals_after and achieve it.

File : app\code\Vendor\Module\etc\events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_quote_address_collect_totals_after">
        <observer name="changeTax" instance="Vendor\Module\Observer\ChangeTax"/>
    </event>
</config>

File : app\code\Vendor\Module\Observer\ChangeTaxTotal.php

<?php
namespace Vendor\Module\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Framework\Event\Observer;

class ChangeTax implements ObserverInterface
{


    public function execute(Observer $observer)
    {
        /** @var Magento\Quote\Model\Quote\Address\Total */
        $total = $observer->getData('your_data');

    }
}