瀏覽代碼

상품상세 추천스크립트 적용

eskim 5 年之前
父節點
當前提交
67fb625c56

+ 38 - 8
src/main/webapp/WEB-INF/views/web/common/advertisements/GoodsDetailScriptsWeb.html

@@ -16,14 +16,13 @@
  -->
  -->
 <th:block th:fragment="scripts">
 <th:block th:fragment="scripts">
 	<script th:inline="javascript">
 	<script th:inline="javascript">
-		var goodsInfo = [[${goodsInfo}]];
 		
 		
 		window._eglqueue = window._eglqueue || [];
 		window._eglqueue = window._eglqueue || [];
-		_eglqueue.push(['setVar', 'cuid', '1252aed4-78dc-46e8-b784-94ac42e86dd4']);
-		_eglqueue.push(['setVar', 'itemId', goodsInfo.goodsCd]);
-		_eglqueue.push(['setVar', 'userId', custId]);
+		_eglqueue.push(['setVar', 'cuid', eglqueueCuid);
+		_eglqueue.push(['setVar', 'itemId', [[${goodsInfo.goodsCd}]]);
+		_eglqueue.push(['setVar', 'userId', hCustId]);
 		_eglqueue.push(['setVar', 'categoryId', cateNm);
 		_eglqueue.push(['setVar', 'categoryId', cateNm);
-		_eglqueue.push(['setVar', 'brandId', goodsInfo.brandGroupNo]);
+		_eglqueue.push(['setVar', 'brandId', [[${goodsInfo.brandGroupNo}]]);
 		_eglqueue.push(['track', 'view']);
 		_eglqueue.push(['track', 'view']);
 		_eglqueue.push(['track', 'product']);
 		_eglqueue.push(['track', 'product']);
 		(function (s, x) {
 		(function (s, x) {
@@ -35,17 +34,48 @@
 	</script>
 	</script>
 
 
 	<!-- Criteo 상품 태그 --> <!-- 적용완료 --> 
 	<!-- Criteo 상품 태그 --> <!-- 적용완료 --> 
-	<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
+<!-- 	<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
 	<script type="text/javascript">
 	<script type="text/javascript">
 	window.criteo_q = window.criteo_q || [];
 	window.criteo_q = window.criteo_q || [];
 	var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
 	var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
 	window.criteo_q.push(
 	window.criteo_q.push(
 	 { event: "setAccount", account: 6762}, // 이 라인은 업데이트하면 안됩니다
 	 { event: "setAccount", account: 6762}, // 이 라인은 업데이트하면 안됩니다
-	 { event: "setEmail", email: "##Email Address of user##" }, // 유저가 로그인이 안되 있는 경우 빈 문자열을 전달
+	 { event: "setEmail", email: hEmail}, // 유저가 로그인이 안되 있는 경우 빈 문자열을 전달
 	 { event: "setSiteType", type: deviceType},
 	 { event: "setSiteType", type: deviceType},
-	 { event: "viewItem", item: goodsInfo.goodsCd+''});
+	 { event: "viewItem", item:  [[${goodsInfo.goodsCd}]]+''}); 
+-->
 	</script>
 	</script>
 	<!-- END Criteo 상품 태그 -->
 	<!-- END Criteo 상품 태그 -->
 
 
+	<!-- 모비온 -->
+	<!-- Withpan]g Shop Log Tracker v3.0 strat -->
+<!-- 	<script src="http://cdn.megadata.co.kr/js/enliple_min2.js"></script>
+	Withpang Tracker v3.0 start
+	<script type="text/javascript">
+	var sh = new EN();
+	sh.setData("sc", "b3663f40e0088be0fc9041fa372a3afc");
+	sh.setData("userid", "is24");
+	sh.setData("pcode", [[${goodsInfo.goodsCd}]]);
+	sh.setData("pnm", encodeURIComponent(encodeURIComponent(snsGoodsFullNm)));
+	sh.setData("img", encodeURIComponent(snsGoodsImg));   //전체URL
+	sh.setData("price",[[${goodsInfo.currPrice}]]);
+	sh.setData("cate1", encodeURIComponent(encodeURIComponent(cateNm))); 
+	 
+	sh.sendRfShop();
+	
+	//위시담기
+	document.getElementById("btnGoodsWish").onmouseup = sendWish;
+    function sendWish() {
+        sh.sendWish();
+    } 
+    
+    //장바구니
+    document.getElementById("btnGoodsCart").onmouseup = sendCart;
+    function sendCart() {
+      sh.sendCart(); 
+-->
+	</script>
+	<!-- END 모비온 상품 태그 -->
+	
 </th:block>
 </th:block>
 </html>
 </html>

+ 3 - 2
src/main/webapp/WEB-INF/views/web/common/fragments/HeadWeb.html

@@ -19,7 +19,6 @@
 	<meta property="og:locale" content="ko_KR"/>
 	<meta property="og:locale" content="ko_KR"/>
 	<meta property="og:site_name" th:content="${metaBrowserTitle}" content="한세공식몰 스타일24"/>
 	<meta property="og:site_name" th:content="${metaBrowserTitle}" content="한세공식몰 스타일24"/>
 	
 	
-	<!-- <meta property="eg:type" content="product" /> -->
 	<meta property="eg:cuid" content="" />
 	<meta property="eg:cuid" content="" />
 	<meta property="eg:itemId" content="" />
 	<meta property="eg:itemId" content="" />
 	<meta property="eg:itemName" content="" />
 	<meta property="eg:itemName" content="" />
@@ -41,7 +40,6 @@
 	<meta property="eg:extraImage" content="" />
 	<meta property="eg:extraImage" content="" />
 	<meta property="eg:locale" content="" />
 	<meta property="eg:locale" content="" />
 	<meta property="eg:etc1" content="" />
 	<meta property="eg:etc1" content="" />
-
 	
 	
 	<title th:text="${metaBrowserTitle}">한세공식몰 스타일24</title>
 	<title th:text="${metaBrowserTitle}">한세공식몰 스타일24</title>
 	<link rel="icon" th:href="@{/images/favicon.ico}" href="favicon.ico" type="image/x-icon"/>
 	<link rel="icon" th:href="@{/images/favicon.ico}" href="favicon.ico" type="image/x-icon"/>
@@ -76,6 +74,7 @@
 		<script th:inline="javascript">
 		<script th:inline="javascript">
 		/*<![CDATA[*/
 		/*<![CDATA[*/
 			var gCustId = [[${sessionInfo.custId}]];
 			var gCustId = [[${sessionInfo.custId}]];
+			var gEmail = [[${sessionInfo.Email}]];
 			/*]]>*/
 			/*]]>*/
 		</script>
 		</script>
 	</th:block>
 	</th:block>
@@ -83,6 +82,7 @@
 		<script th:inline="javascript">
 		<script th:inline="javascript">
 		/*<![CDATA[*/
 		/*<![CDATA[*/
 			var gCustId = '';
 			var gCustId = '';
+			var gEmail = '';
 			/*]]>*/
 			/*]]>*/
 		</script>
 		</script>
 	</th:block>
 	</th:block>
@@ -100,6 +100,7 @@
 		}
 		}
 		var eglqueueCuid = '1252aed4-78dc-46e8-b784-94ac42e86dd4';
 		var eglqueueCuid = '1252aed4-78dc-46e8-b784-94ac42e86dd4';
 		var hCustId = gCustId ? hex_sha512(gCustId).toString().hashCode() : '';
 		var hCustId = gCustId ? hex_sha512(gCustId).toString().hashCode() : '';
+		var hEmail = gCustId ? hex_sha512(gEmail).toString().hashCode() : '';
 		
 		
 		/* Eiengine Script (Visit) */
 		/* Eiengine Script (Visit) */
 		window._eglqueue = window._eglqueue || [];
 		window._eglqueue = window._eglqueue || [];

+ 0 - 41
src/main/webapp/WEB-INF/views/web/common/layout/GoodsLayoutWeb.html

@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html lang="ko"
-	xmlns:th="http://www.thymeleaf.org"
-	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
-
-<head th:replace="~{web/common/fragments/HeadWeb :: head}"></head>
-
-<body>
-
-<div class="skipComment">
-	<a href="#content">본문 바로가기</a>
-	<a href="#gnb">주메뉴 바로가기</a>
-	<a href="#footer">하단메뉴 바로가기</a>
-</div>
-	
-<th:block th:replace="~{web/common/fragments/VariablesWeb :: variables}"></th:block>
-
-<!-- GNB -->
-<header id="header" th:replace="~{web/common/fragments/GnbWeb :: gnb}"></header>
-<!--// GNB -->
-
-<!-- CONTENT AREA -->
-<th:block layout:fragment="content"></th:block>
-<!-- // CONTENT AREA -->
-
-<!-- Footer -->
-<footer id="footer" th:replace="~{web/common/fragments/FooterWeb :: footer}"></footer>
-
-<th:block th:replace="~{web/common/fragments/ScriptsWeb :: scripts}"></th:block>
-<!-- <th:block th:replace="~{web/common/fragments/MarketingScripts :: mscripts}"></th:block> -->
-
-<script th:inline="javascript">
-/*<![CDATA[*/
-	$(document).ready(function() {
-		
-	});
-/*]]>*/
-</script>
-
-</body>
-</html>

+ 5 - 8
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailFormWeb.html

@@ -2,7 +2,7 @@
 <html lang="ko"
 <html lang="ko"
 	xmlns:th="http://www.thymeleaf.org"
 	xmlns:th="http://www.thymeleaf.org"
 	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
 	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
-	layout:decorator="web/common/layout/GoodsLayoutWeb">
+	layout:decorator="web/common/layout/DefaultLayoutWeb">
 <!--
 <!--
  *******************************************************************************
  *******************************************************************************
  * @source  : GoodsDetailFormWeb.html
  * @source  : GoodsDetailFormWeb.html
@@ -249,10 +249,10 @@
 								<div class="btn_group_block ui_row">
 								<div class="btn_group_block ui_row">
 								<th:block  th:if="${goodsInfo.stockQty > 0}">
 								<th:block  th:if="${goodsInfo.stockQty > 0}">
 									<div class="ui_col_6">
 									<div class="ui_col_6">
-										<button type="button" class="btn btn_dark btn_block" onclick="jfAddCart('C');"><span>쇼핑백</span></button>
+										<button type="button" class="btn btn_dark btn_block" id="btnGoodsWish" onclick="jfAddCart('C');"><span>쇼핑백</span></button>
 									</div>
 									</div>
 									<div class="ui_col_6">
 									<div class="ui_col_6">
-										<button type="button" class="btn btn_primary btn_block" onclick="jfAddCart('O');"><span>바로구매</span></button>
+										<button type="button" class="btn btn_primary btn_block" id="btnGoodsCart" onclick="jfAddCart('O');"><span>바로구매</span></button>
 									</div>
 									</div>
 								</th:block>
 								</th:block>
 								<th:block  th:unless="${goodsInfo.stockQty > 0}">
 								<th:block  th:unless="${goodsInfo.stockQty > 0}">
@@ -922,9 +922,6 @@
 			}); */
 			}); */
 		}
 		}
 		
 		
-		
-
-		
 		// 장바구니담기
 		// 장바구니담기
 		cfnAddCart(params);
 		cfnAddCart(params);
 	}
 	}
@@ -1235,7 +1232,7 @@
 
 
 		// 추천솔류션 meta 설정
 		// 추천솔류션 meta 설정
 		$("meta[property='eg:type']").attr('content',"product");
 		$("meta[property='eg:type']").attr('content',"product");
-		$("meta[property='eg:cuid']").attr('content',"1252aed4-78dc-46e8-b784-94ac42e86dd4");
+		$("meta[property='eg:cuid']").attr('content',eglqueueCuid);
 		$("meta[property='eg:itemId']").attr('content', [[${goodsInfo.goodsCd}]] );
 		$("meta[property='eg:itemId']").attr('content', [[${goodsInfo.goodsCd}]] );
 		$("meta[property='eg:itemName']").attr('content',[[${goodsInfo.goodsFullNm}]] );
 		$("meta[property='eg:itemName']").attr('content',[[${goodsInfo.goodsFullNm}]] );
 		$("meta[property='eg:itemImage']").attr('content', snsGoodsImg);
 		$("meta[property='eg:itemImage']").attr('content', snsGoodsImg);
@@ -1285,7 +1282,7 @@
 
 
 
 
 <!-- 광고 스크립트 -->
 <!-- 광고 스크립트 -->
-<!-- <th:block th:replace="~{web/common/advertisements/GoodsDetailScriptsWeb :: scripts}"></th:block> -->
+<th:block th:replace="~{web/common/advertisements/GoodsDetailScriptsWeb :: scripts}"></th:block>
 <!-- //광고 스크립트 -->
 <!-- //광고 스크립트 -->