Install the Checkout + Marketplace Product Options feature

Edit on GitHub

This document describes how to integrate the Marketplace Product Options + Checkout feature into a Spryker project.

Install feature core

Follow the steps below to install the Marketplace Product Options + Checkout feature core.

Prerequisites

To start feature integration, integrate the required features:

NAME VERSION INTEGRATION GUIDE
Marketplace Product Options 202212.0 Marketplace Product Options feature Integration
Checkout 202212.0 Install the Checkout feature

1) Set up behavior

Enable the following behaviors by registering the plugins:

PLUGIN DESCRIPTION PREREQUISITES NAMESPACE
MerchantProductOptionCheckoutPreConditionPlugin Checks the approval status for merchant product option groups. None Spryker\Zed\MerchantProductOption\Communication\Plugin\Checkout

src/Pyz/Zed/Checkout/CheckoutDependencyProvider.php

<?php

namespace Pyz\Zed\Checkout;

use Spryker\Zed\MerchantProductOption\Communication\Plugin\Checkout\MerchantProductOptionCheckoutPreConditionPlugin;
use Spryker\Zed\Checkout\CheckoutDependencyProvider as SprykerCheckoutDependencyProvider;

class CheckoutDependencyProvider extends SprykerCheckoutDependencyProvider
{
    /**
     * @param \Spryker\Zed\Kernel\Container $container
     *
     * @return array<\Spryker\Zed\CheckoutExtension\Dependency\Plugin\CheckoutPreConditionPluginInterface>
     */
    protected function getCheckoutPreConditions(Container $container)
    {
        return [
            new MerchantProductOptionCheckoutPreConditionPlugin(),
        ];
    }
}
Verification

Make sure that validation works correctly for merchants product options with not approved status and checkout process does not go to next step.