QuestionQ26

APIs and Services

An Adobe Commerce developer is asked to provide additional information on a quote. When retrieving several quotes, the extension attributes are returned; however, when retrieving a single quote, they are not returned.

What is one reason the extension attributes are missing?

Explanation

Magento\Quote\Api\CartRepositoryInterface::getList() retrieves multiple quotes, while CartRepositoryInterface::get($cartId) retrieves one quote. Extension attributes that are populated only through the list retrieval path will not be attached during the single-quote retrieval, so a plugin for CartRepositoryInterface::get is required.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!