You can set the driver that should be used to store and retrieve cart details in the cart_manager.php config file. You can use existing ones or create your own driver.

Database Driver

Databse driver stores the cart data in 2 tables: carts and cart_items. You can also remove stale data by running ClearCartDataCommand.

Using this driver allows you to store cart data on server and customer can be displayed the same cart across channels i.e. Mobile app, website, etc.

Session Driver

This driver stores the cart data in the session according to the session driver. This driver does not support cart management for guests via API as we cannot have a uniform way to track the user.

Cart Management