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 202307.0 Install the Spryker Core Glue API
Multiple Carts 202307.0 Install the Multiple Carts feature
Cart 202307.0 Install the Cart feature

1) Install the required modules

Install the required modules using Composer:

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

Generate transfer changes:

console transfer:generate

Make sure 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.