Install the Cart feature + Dynamic Multistore
Edit on GitHubDynamic 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 | 202404.0 |
Cart | 202404.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:
- A Zed request is made.
- Using the provided customer, a quote is retrieved from Persistence.
- The quote retrieved from Persistence is set in session storage.
Thank you!
For submitting the form