MultiCart support in GLUE CartsRestApi missing


#1

We recently updated Spryker Core.

It seems that multiCart support in GLUE cartsRestApi module was removed. Currently in

\Spryker\Glue\CartsRestApi\Processor\Quote\QuoteCollectionReader

only one quoteTransfer is added to the QuoteCollectionTransfer:

/**
 * @param \Generated\Shared\Transfer\QuoteCriteriaFilterTransfer $quoteCriteriaFilterTransfer
 *
 * @return \Generated\Shared\Transfer\QuoteCollectionTransfer
 */
public function getQuoteCollectionByCriteria(QuoteCriteriaFilterTransfer $quoteCriteriaFilterTransfer): QuoteCollectionTransfer
{
    $quoteCollectionTransfer = new QuoteCollectionTransfer();

    $quoteTransfer = $this->cartClient->getQuote();
    if ($quoteTransfer->getIdQuote() === null) {
        return $quoteCollectionTransfer;
    }

    return $quoteCollectionTransfer->addQuote($quoteTransfer);
}

Previously in

\Spryker\Glue\CartsRestApi\Processor\Carts\CartsReader

the quotes of the customer were determined by multiCartClient:

/**
 * @param \Spryker\Glue\GlueApplication\Rest\Request\Data\RestRequestInterface $restRequest
 *
 * @return \Generated\Shared\Transfer\QuoteCollectionTransfer
 */
protected function getCustomerQuotes(RestRequestInterface $restRequest): QuoteCollectionTransfer
{
    $quoteCriteriaFilterTransfer = new QuoteCriteriaFilterTransfer();
    $quoteCriteriaFilterTransfer->setCustomerReference($restRequest->getUser()->getNaturalIdentifier());
    $quoteCollectionTransfer = $this->multiCartClient->getQuoteCollectionByCriteria($quoteCriteriaFilterTransfer);

    return $quoteCollectionTransfer;
}

We really need multiCart support at GLUE API. Please help!


#2

Hello Steffen, I will contact you via Slack to get more details about the project.