diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx index 6bd0822b..f9d42091 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx @@ -67,7 +67,7 @@ import TVirtualGridList from '../../../components/TVirtualGridList/TVirtualGridList.jsx'; import useReviews from '../../../hooks/useReviews/useReviews'; import useScrollTo from '../../../hooks/useScrollTo'; -import { formatGMTString } from '../../../../utils/helperMethods'; +import { formatGMTString } from '../../../utils/helperMethods'; import { BUYNOW_CONFIG } from '../../../utils/BuyNowConfig'; import * as Config from '../../../utils/Config.js'; import { @@ -806,6 +806,35 @@ export default function ProductAllSection({ // console.log('[BuyNow] Buy Now button clicked'); e.stopPropagation(); + // 🚀 SingleOption.jsx의 sendLogTotalRecommend 로직 추가 + if (productData && Object.keys(productData).length > 0) { + const { priceInfo, patncNm, prdtId, prdtNm, brndNm, catNm, showId, showNm } = productData; + const regularPrice = priceInfo?.split("|")[0]; + const discountPrice = priceInfo?.split("|")[1]; + const discountRate = priceInfo?.split("|")[4]; + + // Option 정보는 현재 선택된 옵션이 없으므로 기본값 사용 + const prodOptCval = ""; // 실제로는 선택된 옵션 값이 들어가야 함 + + dispatch( + sendLogTotalRecommend({ + nowMenu: nowMenu, + productId: prdtId, + productTitle: prdtNm, + partner: patncNm, + price: discountRate ? discountPrice : regularPrice, + discount: discountRate, + brand: brndNm, + productOption: prodOptCval, + category: catNm, + contextName: Config.LOG_CONTEXT_NAME.DETAILPAGE, + messageId: Config.LOG_MESSAGE_ID.BUY_NOW, + showId: showId ?? "", + showNm: showNm ?? "", + }) + ); + } + // console.log('[ProductAllSection] 🛒 BUY NOW clicked - productData:', { // prdtId: productData?.prdtId, // patnrId: productData?.patnrId, @@ -837,7 +866,7 @@ export default function ProductAllSection({ setOpenToast(true); } }, - [dispatch, productData, openToast] + [dispatch, productData, openToast, nowMenu] ); //닫히도록 @@ -1061,7 +1090,7 @@ export default function ProductAllSection({ pipe(() => { // sendLogShopByMobile - Source와 동일한 로깅 추가 if (productData && Object.keys(productData).length > 0) { - const { priceInfo, patncNm, prdtId, prdtNm, brndNm, catNm } = productData; + const { priceInfo, patncNm, patnrId, prdtId, prdtNm, brndNm, catNm } = productData; const regularPrice = priceInfo?.split("|")[0]; const discountPrice = priceInfo?.split("|")[1]; const discountRate = priceInfo?.split("|")[4];