From 0d6e98bf89f68727dbc0576b1ec96c12333615d8 Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Tue, 25 Aug 2026 16:41:02 +0330 Subject: [PATCH] Add Meshkee cart checkout with guest cart and customer login. Wire add-to-cart for guests and signed-in users, cart popup with continue flow, and checkout via customer.sanihome.ir login redirect. Co-authored-by: Cursor --- Ai-data/prompt-cart.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Ai-data/prompt-cart.txt diff --git a/Ai-data/prompt-cart.txt b/Ai-data/prompt-cart.txt new file mode 100644 index 0000000..7690e5e --- /dev/null +++ b/Ai-data/prompt-cart.txt @@ -0,0 +1,14 @@ +Build the shopping cart for this Meshkee storefront using the Website API only (https://api.meshkee.com/api/v1). + +Domain: sanihome.ir (replace if different) + +Resolve tenant: GET /tenants/{domain} → save businessId. +Add to cart: authenticated POST /businesses/{businessId}/cart/items. +Cart popup/drawer: list items, update qty, remove item, show total; header badge with item count. +Click on popup cart list Continue button: +If logged in → go to /checkout (or /checkout/cart). +If not logged in → /login?redirect=/checkout/cart (same-origin path only). +After login/register: read redirect from URL and send user back to cart/checkout (not home). +Checkout: address + payment; for online pay use payment.type = "e_payment_gate", gatewayType, and absolute returnUrl. +Use bearer token for all cart/order calls. Register/login must include "domain": "{domain}". +Do not use CMS/dashboard APIs. Keep cart state in API (not only localStorage).