Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Cart Manager

Laravel Cart Manager Laravel Package

freshbitsweb/laravel-cart-manager

A Laravel package for adding shopping cart functionality to your app. It supports multiple carts, cart items, quantities, and totals, with a simple API and database migrations to persist carts and items. Easily integrate e-commerce cart features into any Laravel project.

View on GitHub
Deep Wiki
Context7

Managing the cart in your Laravel/E-commerce application is a breeze

Frequently asked questions about Laravel Cart Manager
How do I install freshbitsweb/laravel-cart-manager in a Laravel app?
Install the package with Composer using composer require freshbitsweb/laravel-cart-manager, then publish its config and migrations and run php artisan migrate. It is a standard Laravel package built around Eloquent Cart and CartItem models, so integration is familiar CRUD work. Wrap the package behind an internal CartService or repository adapter instead of calling its models directly from controllers.
Does laravel-cart-manager support multiple carts per user?
Yes. The package supports multiple carts, cart items, quantities, and totals, which makes it suitable for saved carts, wishlist-style lists, and guest or session carts. You can use an internal service to decide which cart is active for a user or session. Keep business rules for cart selection and merging in your application rather than in controllers.
Which Laravel and PHP versions does laravel-cart-manager support?
You should verify the package composer.json constraints against your target Laravel and PHP versions before committing. The last release was 2023-02-28, and the repository has community-only support with no vendor SLA, so newer Laravel or PHP versions may not be tested. If your application runs a newer framework version, budget for a fork, patch release, or replacement.
How do I store item options or attributes in the cart?
The package supports item option attributes as part of the cart item data, which is useful for sizes, colors, and similar product options. Confirm that your production database supports JSON columns, especially if you use MySQL or PostgreSQL. Test attribute storage on the exact production database rather than only SQLite, and expose DTOs instead of raw package models in your APIs.
Can I use laravel-cart-manager for guest carts and cart merging after login?
Yes, guest or session carts and cart merging are part of the package's intended use cases. However, merge rules for duplicate SKUs, quantity caps, price changes, and deleted products must be defined at the application level. Add tests for the guest add-to-cart, login, cart merge, quantity update, and checkout handoff flow before relying on it in production.
How are cart totals, taxes, and currency handled by laravel-cart-manager?
The package provides cart item quantities, totals, taxes, and currency formatting at a basic line-item level. It is not an advanced tax engine, so inclusive versus exclusive tax, rounding, per-item rates, and multi-jurisdiction rules may need to be computed outside the package. If multi-currency is required, verify the currency configuration carefully and keep pricing ownership in your application.
Is laravel-cart-manager suitable for production or high-traffic checkout?
Treat it as a tactical cart persistence accelerator for Laravel and Eloquent applications, not as a full commerce engine. It has a low opportunity score of 2.65, 226 stars, and community-only support, so it is a weaker fit for headless, marketplace, multi-tenant, or high-concurrency checkout platforms. For production, wrap it behind an adapter and keep pricing, promotions, inventory, tax, and order orchestration in your own services.
How do I update item quantities and handle concurrent cart updates?
Quantity updates are normal Eloquent CRUD operations through the package's cart item model. Concurrent quantity updates and cart merges need explicit application-level rules, plus locking or optimistic-concurrency controls where appropriate. Test race conditions and avoid exposing package models directly to frontend APIs.
Does laravel-cart-manager handle coupons, inventory, shipping, or payments?
No. The package is intentionally narrow and does not cover stock reservation, coupons, shipping, payment, checkout idempotency, price revalidation, or advanced tax. It should act as a line-item store while your application or dedicated services own those concerns. Plan for significant logic to live outside the package if your storefront has custom pricing or promotion rules.
How do I test and customize laravel-cart-manager, and what are the alternatives?
Start with a time-boxed spike in a branch: install the package, publish config and migrations, create a thin adapter, and model guest add-to-cart, login, cart merge, quantity update, totals, and checkout handoff. Test on your exact production database and run dual-read comparisons if replacing legacy cart tables. Alternatives include building a custom Eloquent cart or using a broader commerce platform; keeping a service boundary lets you replace the package later.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections