Install the Multiple Carts + Reorder feature

Edit on GitHub

Install feature core

Prerequisites

Install the required features:

NAME VERSION
Multiple Carts 202404.0
Reorder 202404.0
Spryker Core 202404.0

1) Set up behavior

Register the following plugins:

PLUGIN SPECIFICATION PREREQUISITES NAMESPACE
ReorderPersistentCartChangeExpanderPlugin Adds a default reorder name and adds it to add item request. 1 Spryker\Client\MultiCart\Plugin

src/Pyz/Client/PersistentCart/PersistentCartDependencyProvider.php

<?php

namespace Pyz\Client\PersistentCart;

use Spryker\Client\MultiCart\Plugin\ReorderPersistentCartChangeExpanderPlugin;
use Spryker\Client\PersistentCart\PersistentCartDependencyProvider as SprykerPersistentCartDependencyProvider;

class PersistentCartDependencyProvider extends SprykerPersistentCartDependencyProvider
{
 /**
 * @return \Spryker\Client\PersistentCartExtension\Dependency\Plugin\PersistentCartChangeExpanderPluginInterface[]
 */
 protected function getChangeRequestExtendPlugins(): array
 {
 return [
 new ReorderPersistentCartChangeExpanderPlugin(),
 ];
 }
}
Verification

When using the reorder feature, a new customer quote must be created with the name “Cart from order {Order reference}”.