Upgrade the DiscountCalculatorConnector module

Edit on GitHub

Upgrading from version 4.* to version 5.*

This module no longer has any calculator plugins, except DiscountCalculatorPlugin. All other plugins were moved to the separate repository in spryker/calculation-migration.

To learn how to migrate to the new structure see, the Upgrading from version 3.* to version 4.* section in Upgrade the Calculation module.

Upgrading from version 2.* to version 3.*

The tax plugins are using the version 3.* of the Tax module. See Upgrade the Tax module for more details.

A new tax calculator must be registered in CalculationDependencyProvider::getCalculatorStack().

Add ExpenseTaxWithDiscountsCalculatorPlugin to the discount calculator block, after DiscountCalculatorPlugin.

//..
use Spryker\Zed\DiscountCalculationConnector\Communication\Plugin;

class CalculationDependencyProvider extends SprykerCalculationDependencyProvider
{

    /**
     * @param \Spryker\Zed\Kernel\Container $container
     * @return \Spryker\Zed\Calculation\Dependency\Plugin\CalculatorPluginInterface[]
     */
    protected function getCalculatorStack(Container $container)
    {
        return [
            .... other existing plugins .....

            new ExpenseTaxWithDiscountsCalculatorPlugin(),

        ];
    }