Merchant Portal - Marketplace Order Management feature integration

Edit on GitHub
You are browsing a previous version of the document. The latest version is 202204.0.

This document describes how to integrate the Merchant Portal - Marketplace Order Management feature into a Spryker project.

Prerequisites

To start feature integration, integrate the required features:

NAME VERSION INTEGRATION GUIDE
Marketplace Merchant Portal Core 202108.0 Merchant Portal Core feature integration
Marketplace Order Management 202108.0 Marketplace Order Management feature integration

1) Install the required modules using Composer

Install the required modules:

composer require spryker/sales-merchant-portal-gui:"^1.2.0" --update-with-dependencies
Verification

Make sure that the following modules have been installed:

MODULE EXPECTED DIRECTORY
SalesMerchantPortalGui vendor/spryker/sales-merchant-portal-gui

2) Set up transfer objects

Generate transfer changes:

console transfer:generate
Verification

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

TRANSFER TYPE EVENT PATH
MerchantOrderTableCriteria class Created src/Generated/Shared/Transfer/MerchantOrderTableCriteriaTransfer
MerchantOrderItemTableCriteria class Created src/Generated/Shared/Transfer/MerchantOrderItemTableCriteriaTransfer
MerchantOrderCounts class Created src/Generated/Shared/Transfer/MerchantOrderCountsTransfer
MerchantOrderCollection.pagination property Created src/Generated/Shared/Transfer/MerchantOrderCollectionTransfer
MerchantOrder.merchantOrderItemCount property Created src/Generated/Shared/Transfer/MerchantOrderTransfer
MerchantOrderItem.product property Created src/Generated/Shared/Transfer/MerchantOrderItemTransfer
MerchantOrderItemCollection.pagination property Created src/Generated/Shared/Transfer/MerchantOrderItemCollectionTransfer

3) Add translations

Generate a new translation cache for Zed:

console translator:generate-cache

4) Set up behavior

Register the following plugins to enable widgets:

PLUGIN SPECIFICATION PREREQUISITES NAMESPACE
OrdersMerchantDashboardCardPlugin Adds Merchant orders card to MerchantDashboard Spryker\Zed\SalesMerchantPortalGui\Communication\Plugin

src/Pyz/Zed/DashboardMerchantPortalGui/DashboardMerchantPortalGuiDependencyProvider.php

<?php

namespace Pyz\Zed\DashboardMerchantPortalGui;

use Spryker\Zed\DashboardMerchantPortalGui\DashboardMerchantPortalGuiDependencyProvider as SprykerDashboardMerchantPortalGuiDependencyProvider;
use Spryker\Zed\SalesMerchantPortalGui\Communication\Plugin\DashboardMerchantPortalGui\OrdersMerchantDashboardCardPlugin;

class DashboardMerchantPortalGuiDependencyProvider extends SprykerDashboardMerchantPortalGuiDependencyProvider
{
    protected function getDashboardCardPlugins(): array
    {
        return [
            new OrdersMerchantDashboardCardPlugin(),
        ];
    }
}

Verification

Make sure that the OrdersMerchantDashboardCardPlugin plugin is set up by opening http://mp.mysprykershop.com/dashboard-portal-gui. The Merchant Orders card should be presented on the page.

Integrate the following related features:

FEATURE REQUIRED FOR THE CURRENT FEATURE INTEGRATION GUIDE
Merchant Portal - Marketplace Merchant Portal Product Offer Management + Merchant Portal Order Management Merchant Portal - Marketplace Merchant Portal Product Offer Management + Marketplace Order Management feature integration