Install the Multiple Carts Glue API

Edit on GitHub

This document describes how to install the Multiple Carts Glue API.


Install the required features:

Spryker Core 202311.0 Glue Application feature integration
Multiple Carts 202311.0 Install the Multiple Carts feature
Cart 202311.0 Cart feature integration

1) Install the required modules using Composer

Run the following command(s) to install the required modules:

composer require spryker/multi-carts-rest-api:"^1.0.0" --update-with-dependencies

Make sure that the following modules have been installed:

MultiCartsRestApi vendor/spryker/multi-carts-rest-api

2) Set up transfer objects

Run the following commands to generate transfer changes:

console transfer:generate

Make sure that the following changes have been applied in transfer objects:

Transfer Type Event Path
RestCartsAttributesTransfer:name property added src/Generated/Shared/Transfer/RestCartsAttributesTransfer
RestCartsAttributesTransfer:isDefault property added src/Generated/Shared/Transfer/RestCartsAttributesTransfer

3) Enable resources and relationships

On a project level, install the following plugins:

Plugin Specification Prerequisites Namespace
QuoteCreatorPlugin Creates a quote for a customer. None Spryker\Zed\PersistentCart\Communication\Plugin\CartsRestApi

namespace Pyz\Zed\CartsRestApi;

use Spryker\Zed\CartsRestApi\CartsRestApiDependencyProvider as SprykerCartsRestApiDependencyProvider;
use Spryker\Zed\CartsRestApiExtension\Dependency\Plugin\QuoteCreatorPluginInterface;
use Spryker\Zed\PersistentCart\Communication\Plugin\CartsRestApi\QuoteCreatorPlugin;

class CartsRestApiDependencyProvider extends SprykerCartsRestApiDependencyProvider
	* @return \Spryker\Zed\CartsRestApiExtension\Dependency\Plugin\QuoteCreatorPluginInterface
	protected function getQuoteCreatorPlugin(): QuoteCreatorPluginInterface
		return new QuoteCreatorPlugin();

Make sure that the following endpoints are available:


Make sure that it is possible to create more than one cart.


Make sure that after creating several carts, a response from the GET request contains data about all created carts.