|
|
@@ -99,7 +99,7 @@
|
|
|
<div class="swiper-slide">
|
|
|
<div class="item_prod">
|
|
|
<div class="item_state">
|
|
|
- <button type="button" class="itemLike" onclick="cfnPutWishList(this);" th:attr="goodscd=${cart.itemId}, ithrCd='IN18_01', contentsLoc='', planDtlSq=''">관심상품 추가</button>
|
|
|
+ <button type="button" class="itemLike" th:classappend="${cart.wishCnt > 0} ? 'likeit active'" onclick="cfnPutWishList(this);" th:attr="goodscd=${cart.itemId}, ithrCd='IN18_01', contentsLoc='', planDtlSq=''">관심상품 추가</button>
|
|
|
<a th:href="${cart.itemUrl}" class="itemLink">
|
|
|
<div class="itemPic">
|
|
|
<img alt="BLACK-a" class=" vLHTC pd_img" th:src="${cart.imageUrl}" src="">
|
|
|
@@ -148,32 +148,10 @@
|
|
|
// 장바구니 상품 정보 select
|
|
|
getCartList();
|
|
|
|
|
|
- // 로그인 되어 있을 경우 체크
|
|
|
- if("[[${cartSize}]]" == "" || "[[${cartSize}]]" == "0") {
|
|
|
+ // 장바구니 수량이 존재하는경우
|
|
|
+ if("[[${cartSize}]]" != "" && [[${cartSize}]] > 0) {
|
|
|
if(cfCheckLogin()) {
|
|
|
- // 장바구니 보유 상품 없을 경우 추천솔루션 > "지금 많이 보고있어요" 영역
|
|
|
- let targetT = $('#container .od_realtime').find('.item_state').find('button');
|
|
|
- targetT.each(function(){
|
|
|
- let goodsCd = $(this).attr('goodscd');
|
|
|
- var $this = $(this);
|
|
|
- let url = "/mypage/wish/list/check/"+goodsCd;
|
|
|
- var result = '';
|
|
|
- $.ajax({
|
|
|
- type: 'get'
|
|
|
- , async: false
|
|
|
- , url: url
|
|
|
- , success: function (data) {
|
|
|
- //likeit active
|
|
|
- if ("Y" == data){
|
|
|
- $this.addClass('likeit').addClass('active');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- if(cfCheckLogin()) {
|
|
|
- // 장바구니 보유 상품 없을 경우 추천솔루션 > "지금 많이 보고있어요" 영역
|
|
|
+ // 장바구니 보유 상품 있을 경우 추천솔루션 > "추천 상품" 영역
|
|
|
let targetT = $('#container .od_recommend').find('.item_state').find('button');
|
|
|
targetT.each(function(){
|
|
|
let goodsCd = $(this).attr('goodscd');
|