Cart Process
- Within
\Shopware\Core\Checkout\Cart\CartProcessorInterface::process, no queries may be executed because this method is executed several times in a row to resolve the dependencies of the elements in the shopping cart. - The
\Shopware\Core\Checkout\Cart\CartDataCollectorInterface::collectmethod must always check if the required data has already been loaded. This is to avoid having to execute unnecessarily many queries on the database. The loaded data will be appended to the passed CartDataCollection. - The creation of line items must always take place via a
LineItemFactoryHandlerclass. - All price calculations must take place via an appropriate
PriceCalculator. All price calculators are stored inside theShopware\Core\Checkout\Cart\Priceclass. - All shopping cart functions must be mapped via a corresponding store API route. The routes are located in the
Shopware\Core\Checkout\Cart\SalesChannelnamespace.