Commit Graph
4 Commits
Author SHA1 Message Date
Andymick f4a80d2a50 Improve: Cart clearing on success page with better state management
Use useCart.getState() to ensure we're clearing the current store state
and delete IndexedDB before clearing store. Add detailed logging to help
debug cart clearing issues. Ensures cart is completely emptied on checkout
success.
2026-07-18 20:29:51 +01:00
Andymick 43da81bd66 Fix: Ensure cart is completely cleared after payment success
ClearCartOnMount now explicitly deletes the IndexedDB storage in addition
to clearing the in-memory state. This prevents the cart from being
restored from IndexedDB on subsequent page loads after payment completes.

Fixes issue where cart items remained in bag after successful checkout.
2026-07-18 20:23:45 +01:00
AndymickandClaude Haiku 4.5 345e4b9656 Fix cart clearing on success page
Use empty dependency array to ensure clear() runs once on mount.
Add logging and also clear isCheckingOut flag.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-18 07:10:17 +01:00
Andymick 41937ffc15 Initial commit: Craft2Prints with Stages 1-3 2026-07-15 18:09:59 +01:00