Marketplace Product Option + Checkout feature integration

Edit on GitHub

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

Install feature core

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

Prerequisites

To start feature integration, integrate the required features:

NAME VERSION LINK
Marketplace Product Option 202108.0 Marketplace Product Option Feature Integration
Checkout 202108.0 Checkout feature integration

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 \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.