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>
This commit is contained in:
co-authored by
Cursor
parent
c53fb99330
commit
0d6e98bf89
@@ -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).
|
||||||
Reference in New Issue
Block a user