Install the Marketplace Cart feature

Edit on GitHub

This document describes how to install the Marketplace Cart feature.

Install feature core

Follow the steps below to install the Marketplace Cart feature core.

Prerequisites

Install the required features:

NAME VERSION INSTALLATION GUIDE
Cart 202212.0 Cart feature integration
Order Threshold 202212.0 Order Threshold feature integration
Marketplace Order Management 202212.0 Install the Marketplace Order Management feature

1) Install the required modules

Install the required modules using Composer:

composer require spryker-feature/marketplace-cart:"202212.0" --update-with-dependencies
Verification

Make sure that the following modules have been installed:

MODULE EXPECTED DIRECTORY
CartNoteMerchantSalesOrderGui vendor/spryker/cart-note-merchant-sales-order-gui

2) Set up configuration

Add the following configuration:

CONFIGURATION SPECIFICATION NAMESPACE
MerchantSalesOrderMerchantUserGuiConfig::getMerchantSalesOrderDetailExternalBlocksUrls() Introduces a list of urls for order details page configuration. src/Pyz/Zed/MerchantSalesOrderMerchantUserGui/MerchantSalesOrderMerchantUserGuiConfig.php
<?php

namespace Pyz\Zed\MerchantSalesOrderMerchantUserGui;

use Spryker\Zed\MerchantSalesOrderMerchantUserGui\MerchantSalesOrderMerchantUserGuiConfig as SprykerMerchantSalesOrderMerchantUserGuiConfig;

class MerchantSalesOrderMerchantUserGuiConfig extends SprykerMerchantSalesOrderMerchantUserGuiConfig
{
    /**
     * @return array<string>
     */
    public function getMerchantSalesOrderDetailExternalBlocksUrls(): array
    {
        return [
            'cart_note' => '/cart-note-merchant-sales-order-gui/merchant-sales-order/list',
        ];
    }
}
Verification

Ensure that the cart notes are displayed on the order view page when looking at merchant orders in the Back Office.

Install feature frontend

Follow the steps below to install the Marketplace Cart feature frontend.

Prerequisites

Install the required features:

NAME VERSION
Order Threshold 202212.0
Cart 202212.0
Merchant Portal Core 202212.0
Marketplace Order Management 202212.0

1) Install the required modules

Install the required modules using Composer:

composer require spryker/cart-note-merchant-portal-gui:"^1.0.0" --update-with-dependencies
Verification

Make sure that the following modules have been installed:

MODULE EXPECTED DIRECTORY
CartNoteMerchantPortalGui spryker/cart-note-merchant-portal-gui

2) Set up behavior

Add the following configuration to the project:

PLUGIN SPECIFICATION PREREQUISITES NAMESPACE
CartNoteMerchantOrderItemTableExpanderPlugin Adds CartNote column to Sales tables in MerchantPortal Marketplace Sales Merchant Portal integrated Spryker\Zed\CartNoteMerchantPortalGui\Communication\Plugin

src/Pyz/Zed/SalesMerchantPortalGui/SalesMerchantPortalGuiDependencyProvider.php

<?php

namespace Pyz\Zed\SalesMerchantPortalGui;

use Spryker\Zed\CartNoteMerchantPortalGui\Communication\Plugin\SalesMerchantPortalGui\CartNoteMerchantOrderItemTableExpanderPlugin;
use Spryker\Zed\SalesMerchantPortalGui\SalesMerchantPortalGuiDependencyProvider as SprykerSalesMerchantPortalGuiDependencyProvider;

class SalesMerchantPortalGuiDependencyProvider extends SprykerSalesMerchantPortalGuiDependencyProvider
{
    /**
     * @return array<\Spryker\Zed\SalesMerchantPortalGuiExtension\Dependency\Plugin\MerchantOrderItemTableExpanderPluginInterface>
     */
    protected function getMerchantOrderItemTableExpanderPlugins(): array
    {
        return [
            new CartNoteMerchantOrderItemTableExpanderPlugin(),
        ];
    }
}
Verification

Make sure that the CartNoteMerchantOrderItemTableExpanderPlugin plugin is set up by opening http://zed.mysprykershop.com/sales-merchant-portal-gui/orders. Click on any order and check that the Cart Note column is present.