|
|
@@ -50,14 +50,14 @@
|
|
|
<div class="itemSpecialPrice"><span>특가</span></div>
|
|
|
<p class="itemBrand" th:text="${SocialData.brandKnm}"></p>
|
|
|
<div class="itemName" th:text="${SocialData.goodsNm}"></div>
|
|
|
- <!-- <div class="itemComment">#주문 폭주 상품</div> -->
|
|
|
+ <div class="itemComment" th:if="${SocialData.goodsTnm!=null}" th:text="${SocialData.goodsTnm}"></div>
|
|
|
<p class="itemPrice">
|
|
|
[[${#numbers.formatInteger(SocialData.currPrice,0,'COMMA')} + 원]]
|
|
|
<span class="itemPrice_original" th:text="${#numbers.formatInteger(SocialData.listPrice,0,'COMMA')} + '원'"></span>
|
|
|
<span class=" itemPercent" th:text="${#numbers.formatDecimal(SocialData.dcRate,1,0)} + '%'"></span>
|
|
|
- </p>
|
|
|
+ </p>100 - ROUND((Z.CURR_PRICE / Z.LIST_PRICE) * 100 ,0) AS DC_RATE
|
|
|
<div class="shopBagBtn">
|
|
|
- <button class="btn btn_defalt" onclick="AddCart(this)">
|
|
|
+ <button class="btn btn_defalt" onclick="socialAddCart(this)" th:attr="goodsCd=${SocialData.goodsCd}, minOrdQty=${SocialData.minOrdQty}, goodsType=${SocialData.goodsType}">
|
|
|
<span>쇼핑백 담기</span>
|
|
|
</button>
|
|
|
</div>
|
|
|
@@ -73,7 +73,27 @@
|
|
|
</div>
|
|
|
<script th:inline="javascript">
|
|
|
var socialInfo = [[${socialInfo}]];
|
|
|
+var socialAddCart = function (obj) {
|
|
|
+ let btnType = "C";
|
|
|
+ let params = [];
|
|
|
|
|
|
+ let cart = new Object();
|
|
|
+ cart.goodsCd = $(obj).attr("goodsCd");
|
|
|
+ cart.optCd = $(obj).attr("optCd");
|
|
|
+ cart.goodsQty = $(obj).attr("minOrdQty");
|
|
|
+ cart.goodsType = $(obj).attr("goodsType");
|
|
|
+ cart.cartGb = btnType;
|
|
|
+ cart.afLinkCd = $(obj).attr("afLinkCd");
|
|
|
+ cart.ithrCd = "";
|
|
|
+ cart.contentsLoc "";
|
|
|
+ cart.planDtlSq = '';
|
|
|
+ params.push(cart);
|
|
|
+
|
|
|
+ // 장바구니담기
|
|
|
+ if (params.length > 0){
|
|
|
+ cfnAddCart(params);
|
|
|
+ }
|
|
|
+}
|
|
|
$(function(){
|
|
|
/* 핫딜 countDown */
|
|
|
function hotdealTimer() {
|