Install the Cart feature + Dynamic Multistore

Edit on GitHub

Dynamic Multistore is currently running under an Early Access Release. Early Access Releases are subject to specific legal terms, they are unsupported and do not provide production-ready SLAs. They can also be deprecated without a General Availability Release. Nevertheless, we welcome feedback from early adopters on these cutting-edge, exploratory features.

This document describes how to install Dynamic Multistore + the Cart feature.

Install feature core

Prerequisites

Install the required features:

NAME VERSION
Spryker Core 202311.0
Cart 202311.0

Set up behavior

Register the following plugins:

PLUGIN SPECIFICATION PREREQUISITES NAMESPACE
QuoteSyncDatabaseStrategyReaderPlugin If persistent strategy is used and QuoteTransfer.id is empty, sets the quote retrieved from Persistence in session storage. None Spryker\Zed\PriceCartConnector\Communication\Plugin

src/Pyz/Client/Quote/QuoteDependencyProvider.php

<?php

namespace Pyz\Client\Quote;

use Spryker\Client\PersistentCart\Plugin\Quote\QuoteSyncDatabaseStrategyReaderPlugin;
use Spryker\Client\Quote\QuoteDependencyProvider as SprykerQuoteDependencyProvider;

class QuoteDependencyProvider extends SprykerQuoteDependencyProvider
{
    /**
     * @return array<\Spryker\Client\QuoteExtension\Dependency\Plugin\DatabaseStrategyReaderPluginInterface>
     */
    protected function getDatabaseStrategyReaderPlugins(): array
    {
        return [
            ...
            new QuoteSyncDatabaseStrategyReaderPlugin(),
            ...
        ];
    }
}
Verification

When a persistent strategy is used and QuoteTransfer.id is empty, make sure the following happens:

  1. A Zed request is made.
  2. Using the provided customer, a quote is retrieved from Persistence.
  3. The quote retrieved from Persistence is set in session storage.