|
|
@@ -1175,16 +1175,16 @@
|
|
|
let goodsSize = $target.length;
|
|
|
let btnType = "C";
|
|
|
let params = [];
|
|
|
- let idx = 0;
|
|
|
+ let goodsIdx = 0;
|
|
|
$target.each(function(){
|
|
|
- idx ++;
|
|
|
+ goodsIdx ++;
|
|
|
if ($(this).hasClass('unable')) {
|
|
|
|
|
|
}else{
|
|
|
|
|
|
// 옵션확인
|
|
|
let goodsCnt = $(this).find('input[name=lookbookGoodsOptCd]').length;
|
|
|
- if (goodsCnt = 1){
|
|
|
+ if (goodsCnt == 1){
|
|
|
let arrOpt = $(this).find('input[name=lookbookGoodsOptCd]').val();
|
|
|
let arrOptInfo = arrOpt.split(':');
|
|
|
|
|
|
@@ -1200,7 +1200,7 @@
|
|
|
obj.contentsLoc = $(this).attr("contentsLoc");
|
|
|
obj.planDtlSq = '';
|
|
|
obj.multiGoodsGb = 'O' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
- if (idx == goodsSize){
|
|
|
+ if (goodsIdx == goodsSize){
|
|
|
obj.multiGoodsGb = 'E' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
}
|
|
|
params.push(obj);
|
|
|
@@ -1208,6 +1208,7 @@
|
|
|
// 장바구니담기
|
|
|
cfnAddCart(params);
|
|
|
}else{
|
|
|
+ let $goods = $(this);
|
|
|
let cartGoodsList = [];
|
|
|
let compsList = [];
|
|
|
let goodsList = {
|
|
|
@@ -1216,20 +1217,25 @@
|
|
|
|
|
|
let arrInfo = $(this).find('input[name=lookbookGoodsOptCd]').val().split(','); // 상품코드단위
|
|
|
|
|
|
- arrInfo.each(function() {
|
|
|
- let arrOptInfo = $(this).split(':');
|
|
|
+
|
|
|
+ $.each(arrInfo, function(idx, item) {
|
|
|
+ let arrOptInfo = item.split(':');
|
|
|
|
|
|
let obj = new Object();
|
|
|
obj.cartGb = btnType;
|
|
|
- obj.goodsType = $(this).attr("goodsType");
|
|
|
- obj.goodsCd = $(this).attr("goodsCd");
|
|
|
+ obj.goodsType = $goods.attr("goodsType");
|
|
|
+ obj.goodsCd = $goods.attr("goodsCd");
|
|
|
obj.itemCd =arrOptInfo[0];
|
|
|
obj.optCd = arrOptInfo[1];
|
|
|
- obj.goodsQty = $(this).attr("minOrdQty");
|
|
|
+ obj.goodsQty = $goods.attr("minOrdQty");
|
|
|
obj.afLinkCd = '';
|
|
|
- obj.ithrCd = $(this).attr("ithrCd");
|
|
|
- obj.contentsLoc = $(this).attr("contentsLoc");
|
|
|
+ obj.ithrCd = $goods.attr("ithrCd");
|
|
|
+ obj.contentsLoc = $goods.attr("contentsLoc");
|
|
|
obj.planDtlSq = ''
|
|
|
+ obj.multiGoodsGb = 'O' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
+ if (goodsIdx == goodsSize){
|
|
|
+ obj.multiGoodsGb = 'E' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
+ }
|
|
|
compsList.push(obj);
|
|
|
|
|
|
});
|