6. Add to cart, save and export the order
Add to cart
Bulk add to cart (footer, bottom-right) is the main path: every row with qty > 0 is added to the cart in a single request. After a successful add, the theme's cart badge updates and the added quantities reset to 0.
A per-row cart button (a small cart icon at the end of each row) can also be enabled so a single variant can be added on its own.
The Reset order control (bottom-left, visible once any quantity is set) clears all quantities without adding to the cart.
Stock validation runs before adding: variants that don't allow overselling are capped at their available stock; if anything is capped or rejected, a toast explains what happened.
Saved order templates
Let returning customers save frequent orders and reload them in one click.
| Customer | Storage | Default limit |
|---|---|---|
| Logged-in | Server database (per customer) | 50 |
| Guest | Browser localStorage | 20 |
Save: enter quantities → Save order → name it (max 128 characters) → Save.
Load / manage: click Saved orders to see each template with its name, item count and date, and per-template Load, Overwrite and Delete actions.

Loading replaces the grid quantities with the saved values; if some saved variants no longer exist, a toast reports how many were skipped. Delete asks for confirmation and can't be undone.
Multi-format export
Export the current order (all rows with qty > 0) in four formats.
- Enter quantities.
- Click Export and pick a format.

The file downloads as quickorder-YYYY-MM-DD.<ext>.
| Format | Best for | Notes |
|---|---|---|
| CSV | ERP / data import | UTF-8 with BOM, semicolon separator, rows with qty > 0 |
| XLSX | Approvals, archives | Real Excel file with =Qty*Price row formulas and a SUM() total |
| Printing, supplier email | Landscape A4, coloured header, page breaks — white-label | |
| XML | System integration | <quickorder> root with <products> and <totals> |
Exports include only the currently visible columns, with Sum always last. Exporting with no quantities shows a "No items to export" toast.