Files
sanihome/Ai-data/prompt-cart.txt
T
Alireza HassaniandCursor 0d6e98bf89 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 <cursoragent@cursor.com>
2026-08-25 16:41:02 +03:30

15 lines
941 B
Plaintext

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).