Install the Merchant Portal - Marketplace Product + Tax feature

Edit on GitHub

This document describes how to install the Merchant Portal - Marketplace Product + Tax feature.

Install feature core

Follow the steps below to install the Merchant Portal - Marketplace Product + Tax feature core.

Prerequisites

Install the required features:

NAME VERSION INSTALLATION GUIDE
Marketplace Product 202307.0 Install the Marketplace Product feature
Marketplace Merchant Portal Core 202307.0 Install the Merchant Portal Core feature
Tax 202307.0 Install the Tax feature

1) Install the required modules

Install the required modules using Composer:

composer require spryker/tax-merchant-portal-gui:"202307.0" --update-with-dependencies
Verification

Make sure that the following modules have been installed:

MODULE EXPECTED DIRECTORY
TaxMerchantPortalGui spryker/tax-merchant-portal-gui

2) Set up transfer objects

Generate transfer changes:

console transfer:generate
Verification

Make sure the following changes have been applied in transfer objects:

TRANSFER TYPE EVENT PATH
TaxSetCollection class Created src/Generated/Shared/Transfer/TaxSetCollectionTransfer
TaxSet class Created src/Generated/Shared/Transfer/TaxSetTransfer

3) Set up behavior

Enable the following behaviors by registering the plugins:

PLUGIN DESCRIPTION PREREQUISITES NAMESPACE
TaxProductAbstractFormExpanderPlugin Expands ProductAbstractForm with the Tax Set field. Spryker\Zed\TaxMerchantPortalGui\Communication\Plugin\ProductMerchantPortalGui

src\Pyz\Zed\ProductMerchantPortalGui\ProductMerchantPortalGuiDependencyProvider.php

<?php

namespace Pyz\Zed\ProductMerchantPortalGui;

use Spryker\Zed\ProductMerchantPortalGui\ProductMerchantPortalGuiDependencyProvider as SprykerProductMerchantPortalGuiDependencyProvider;
use Spryker\Zed\TaxMerchantPortalGui\Communication\Plugin\ProductMerchantPortalGui\TaxProductAbstractFormExpanderPlugin;

class ProductMerchantPortalGuiDependencyProvider extends SprykerProductMerchantPortalGuiDependencyProvider
{
    /**
     * @return array<\Spryker\Zed\ProductMerchantPortalGuiExtension\Dependency\Plugin\ProductAbstractFormExpanderPluginInterface>
     */
    protected function getProductAbstractFormExpanderPlugins(): array
    {
        return [
            new TaxProductAbstractFormExpanderPlugin(),
        ];
    }
}
Verification

Make sure ProductAbstractForm has the TaxSet field.