From 898bff71f6e3f158b9cb73431306de00384b2e9d Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 26 Jul 2023 14:10:26 +0700
Subject: update cart mobile web

---
 src/lib/product/components/Product/ProductMobile.jsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/lib/product/components/Product/ProductMobile.jsx')

diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx
index 91de173a..2edd1a5f 100644
--- a/src/lib/product/components/Product/ProductMobile.jsx
+++ b/src/lib/product/components/Product/ProductMobile.jsx
@@ -137,7 +137,15 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => {
 
   const handleClickBuy = () => {
     if (!validAction()) return
-    router.push(`/shop/checkout?productId=${activeVariant.id}&quantity=${quantity}`)
+
+    updateItemCart({
+      productId: activeVariant.id,
+      quantity,
+      programLineId: promotionActiveId,
+      selected: true,
+      source : 'buy'
+    })
+    router.push(`/shop/checkout?source=buy`)
   }
 
   const productSimilarQuery = [
-- 
cgit v1.2.3

