duncanmcclean/statamic-cargo
Cargo is a Statamic addon that simplifies importing content into your collections. Bring in data from CSV files, map columns to fields, and create or update entries without manual copy-paste, making migrations and bulk content updates easier.
composer require duncanmcclean/statamic-cargo, then run the package's install/publish steps (vendor:publish for config + migrations), and php artisan migrate. Cargo stores products/variants as Statamic entries (flat file) but carts, orders and customers in the database, so both halves of setup matter.config/cargo.php — currency, tax classes/rates, shipping methods, payment gateways, route registration.products collection blueprint (installer provides a starter) — the variants field is what drives pricing/stock/SKU, so understand its shape before writing templates.database/migrations (cargo_orders, cargo_order_items, cargo_carts, cargo_customers) — this is where reporting/queries will live./cart (update quantity, remove) → /checkout with a gateway in test mode → confirm an order row exists and the order events fire. Do this in test/sandbox credentials before touching tax or shipping config.APP_URL and the Cargo routes correctly early; checkout callbacks/redirects from payment gateways break silently if the base URL is wrong.config/services.php/env, not in config/cargo.php.number_format, so currency config and rounding stay consistent between cart, checkout and emails.Event::fake() for order events so tests don't send mail or call out./cart, /checkout and any account pages from full-page/CDN caching, and be careful with Statamic's static caching./cart, /checkout, etc. If you already own those URLs, either disable the built-in routes in config or namespace yours — Laravel will happily let the last-registered route win in confusing ways.UPDATE on cargo_orders.total will drift from cargo_order_items and break refunds/reporting. Write adjustments through the API or a new order-note/refund path.Event::listen('*') (or Telescope) on Cargo's events plus a look at the cargo_* tables usually explains "order placed but nothing happened". For cart weirdness, check the session/cart binding first — a cart resolved from the wrong guard (guest vs. logged-in user) is a frequent cause of "my cart emptied".How can I help you explore Laravel packages today?