Просмотр исходного кода

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front.git into develop

eskim 5 лет назад
Родитель
Сommit
7712fc578f

+ 10 - 0
src/main/java/com/style24/front/biz/dao/TsfDisplayDao.java

@@ -16,6 +16,7 @@ import com.style24.persistence.domain.GnbTab;
 import com.style24.persistence.domain.MainLayout;
 import com.style24.persistence.domain.Popup;
 import com.style24.persistence.domain.GoodsSearch;
+import com.style24.persistence.domain.Goods;
 
 /**
  * 전시 Dao
@@ -171,4 +172,13 @@ public interface TsfDisplayDao {
 	 * @date 2021. 4. 7
 	 */
 	int getCategoryGoodsCount(GoodsSearch goodsSearch);
+
+	/**
+	 * 카테고리 별 상품 리스트
+	 * @param
+	 * @return
+	 * @author bin2107
+	 * @date 2021. 4. 8
+	 */
+	Collection<Goods> getCategoryGoodsList(GoodsSearch goodsSearch);
 }

+ 14 - 1
src/main/java/com/style24/front/biz/service/TsfDisplayService.java

@@ -23,6 +23,7 @@ import com.style24.persistence.domain.GnbTab;
 import com.style24.persistence.domain.MainLayout;
 import com.style24.persistence.domain.Popup;
 import com.style24.persistence.domain.GoodsSearch;
+import com.style24.persistence.domain.Goods;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -355,7 +356,19 @@ public class TsfDisplayService {
 	 * @date 2021. 4. 7
 	 */
 	public int getCategoryGoodsCount(GoodsSearch goodsSearch){
-	return displayDao.getCategoryGoodsCount(goodsSearch);
+		return displayDao.getCategoryGoodsCount(goodsSearch);
+	}
+
+	/**
+	 * 카테고리 별 상품 리스트
+	 * @param
+	 * @return
+	 * @author bin2107
+	 * @date 2021. 4. 8
+	 */
+	public Collection<Goods> getCategoryGoodsList(GoodsSearch goodsSearch){
+		Collection<Goods> goodsList = displayDao.getCategoryGoodsList(goodsSearch);
+		return goodsList;
 	}
 
 }

+ 11 - 4
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.style24.core.biz.service.TscEnvsetService;
@@ -475,8 +476,7 @@ public class TsfDisplayController extends TsfBaseController {
 		mav.addObject("filterAgeList", displayService.getCategoryFilter(cate4Srch, "AGE"));
 		mav.addObject("filterSeasonList", displayService.getCategoryFilter(cate4Srch, "SEASON"));
 		mav.addObject("filterColorList", displayService.getCategoryFilter(cate4Srch, "COLOR"));
-		mav.addObject("filterBenefitList", displayService.getCategoryFilter(cate4Srch, "BENEFIT"));
-		//mav.addObject("filterBenefitList", displayService.getCategoryFilterBenefit(cate4Srch));
+		mav.addObject("filterBenefitList", displayService.getCategoryFilterBenefit(cate4Srch));
 		mav.addObject("cateInfo", cate4Srch);
 
 		return mav;
@@ -491,17 +491,20 @@ public class TsfDisplayController extends TsfBaseController {
 	 */
 	@PostMapping("/category/goods/list")
 	@ResponseBody
-	public GagaMap getGoodsList(GoodsSearch goodsSearch){
+	public GagaMap getGoodsList(@RequestBody GoodsSearch goodsSearch){
 		GagaMap result = new GagaMap();
+		log.info("getGoodsListgetGoodsListgetGoodsList::::{}",goodsSearch);
 		TscPageRequest pageable = new TscPageRequest((goodsSearch.getPageNo() > 0 ? goodsSearch.getPageNo() - 1 : 0), goodsSearch.getPageSize(), goodsSearch.getPageUnit());
 
 		goodsSearch.setSiteCd(TscConstants.Site.STYLE24.value());
 		goodsSearch.setFormalGb("G009_10");
 		goodsSearch.setFrontGb(TsfSession.getFrontGb());
 		goodsSearch.setCustGb(TsfSession.getCustGb());
+
 		if(goodsSearch.getBrandGroupNo()==null || goodsSearch.getBrandGroupNo().equals("")){
 			goodsSearch.setBrandGroupNo(0);
 		}
+
 		if(goodsSearch.getCate4No()!=null && !goodsSearch.getCate4No().equals("")){
 			goodsSearch.setCateNo(goodsSearch.getCate4No());
 		} else if(goodsSearch.getCate3No()!=null && !goodsSearch.getCate3No().equals("")){
@@ -514,7 +517,11 @@ public class TsfDisplayController extends TsfBaseController {
 
 		int totalCnt = displayService.getCategoryGoodsCount(goodsSearch);
 		log.info("totalCnt::::::::::{}",totalCnt);
-		pageable.setTotalCount(0);
+		pageable.setTotalCount(totalCnt);
+		goodsSearch.setPageable(pageable);
+		result.set("paging", goodsSearch);
+		result.set("totalCnt", totalCnt);
+		result.set("dataList", displayService.getCategoryGoodsList(goodsSearch));
 		return result;
 	}
 }

+ 2 - 2
src/main/java/com/style24/persistence/domain/GoodsSearch.java

@@ -59,8 +59,8 @@ public class GoodsSearch extends TscBaseDomain {
     private String  filterNm;
 
     private TscPageRequest pageable;				// 페이징
-    private int pageNo;
-    private int pageSize;
+    private int pageNo = 1;
+    private int pageSize = 50;
     private int pageUnit = 10;
     private String sortGb;
 

+ 226 - 33
src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml

@@ -593,12 +593,12 @@
 		/* TsfDisplay.getCategoryFilter */
 		SELECT
 		<choose>
-			<when test="filterGb != null and filterGb =='SIZE'">
+		     <when test="filterGb != null and filterGb =='SIZE'">
 		SUBSTRING_INDEX(FILTER_CD,'|',1) AS FILTER_CD
-			</when>
-			<otherwise>
+		     </when>
+		     <otherwise>
 		FILTER_CD
-			</otherwise>
+		     </otherwise>
 		</choose>
 		, FILTER_NM
 		FROM TB_CATE_FILTER
@@ -612,37 +612,230 @@
 		ORDER BY DISP_ORD
 	</select>
 
-	<!-- 카테고리별 상품 총 수 -->
-	<select id="getCategoryGoodsCount" parameterType="GoodsSearch" resultType="int">
-		/* TsfDisplay.getCategoryGoodsCount */
-		SELECT COUNT(1) AS TOTCNT
-		FROM (SELECT A.GOODS_CD
-		           , A.CATE_NO
-		           , A.DISP_ORD
-		           , A.REG_NO
-		           , A.REG_DT
-		      FROM TB_CATE_GOODS A
-		      WHERE 1 = 1
-		        AND EXISTS(SELECT 1
-		                    FROM TB_CATE_4SRCH
-		                    WHERE 1 = 1
-		                      AND LEAF_CATE_NO = A.CATE_NO
-		                      AND CATE1_NO = #{cate1No}
-		                    <if test="cate2No != null and cate2No != ''">
-		                     AND CATE2_NO = #{cate2No}
-							</if>
-		                    <if test="cate3No != null and cate3No != ''">
+	<!-- 상품 카테고리 필터 중 혜택 -->
+	<select id="getCategoryFilterBenefit" parameterType="Cate4srch" resultType="GoodsSearch">
+		/* TsfDisplay.getCategoryFilterBenefit */
+		SELECT	GB.BENEFIT_GB AS FILTER_CD
+		      , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
+		             WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
+		             WHEN GB.BENEFIT_GB = '30' THEN '사은품'
+		             WHEN GB.BENEFIT_GB = '40' THEN '신상' ELSE '' END AS FILTER_NM
+		FROM	TB_GOODS_BENEFIT GB
+		INNER JOIN TB_CATE_GOODS CG ON GB.GOODS_CD = CG.GOODS_CD
+		WHERE	1=1
+		  AND	EXISTS (
+		                  SELECT 1
+		                  FROM	 TB_CATE_4SRCH
+		                  WHERE	 1=1
+		                    AND	 LEAF_CATE_NO = CG.CATE_NO
+		                    AND	 CATE1_NO = #{cate1No}
+		                  <if test="cate2No != null and cate2No != ''">
+		                    AND CATE2_NO = #{cate2No}
+		                  </if>
+		                  <if test="cate3No != null and cate3No != ''">
 		                    AND CATE3_NO = #{cate3No}
-							</if>
-		                    <if test="cate4No != null and cate4No != ''">
+		                  </if>
+		                  <if test="cate4No != null and cate4No != ''">
 		                    AND CATE4_NO = #{cate4No}
-							</if>
-		                    <if test="cate5No != null and cate5No != ''">
+		                  </if>
+		                  <if test="cate5No != null and cate5No != ''">
 		                    AND CATE5_NO = #{cate5No}
-		                    </if>
-				  )
-		) A
-		   , TB_GOODS C
-		WHERE A.GOODS_CD = C.GOODS_CD
+		                  </if>
+		                )
+		GROUP BY GB.BENEFIT_GB
+	</select>
+
+	<!-- 카테고리별 상품 총 수 -->
+	<select id="getCategoryGoodsCount" parameterType="GoodsSearch" resultType="int">
+		/* TsfDisplay.getCategoryGoodsCount */
+		SELECT COUNT(1) AS CNT
+		  FROM TB_GOODS G
+		  JOIN TB_CATE_GOODS CG ON G.GOODS_CD = CG.GOODS_CD
+		  JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD AND B.USE_YN = 'Y'
+		  JOIN TB_SITE_BRAND SB ON G.BRAND_CD = SB.BRAND_CD AND SB.USE_YN = 'Y'
+		  JOIN TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO AND BG.USE_YN = 'Y'
+		  JOIN TB_GOODS_STOCK S ON G.GOODS_CD = S.GOODS_CD
+		  LEFT OUTER JOIN TB_GOODS_SUMMARY SU ON G.GOODS_CD = SU.GOODS_CD
+		WHERE 1=1
+		  AND CG.GOODS_CD = G.GOODS_CD
+		  AND CG.GOODS_CD = S.GOODS_CD
+		  AND G.BRAND_CD = B.BRAND_CD
+		  AND B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+		  AND CG.GOODS_CD = S.GOODS_CD
+		  AND EXISTS (
+		               SELECT 1
+		               FROM TB_CATE_4SRCH
+		               WHERE 1 = 1
+		                 AND LEAF_CATE_NO = CG.CATE_NO
+		                 AND SITE_CD = #{siteCd}
+		                 AND CATE_GB = 'G032_101' /*BY ITEM*/
+		                 AND CATE_TYPE = 'G031_10'
+		                 AND CATE1_NO = #{cate1No}
+		                 <if test="cate2No != null and cate2No != ''">
+		                 AND CATE2_NO = #{cate2No}
+		                 </if>
+		                 <if test="cate3No != null and cate3No != ''">
+		                 AND CATE3_NO = #{cate3No}
+		                 </if>
+		                 <if test="cate4No != null and cate4No != ''">
+		                 AND CATE4_NO = #{cate4No}
+		                 </if>
+		                 <if test="cate5No != null and cate5No != ''">
+		                 AND CATE5_NO = #{cate5No}
+		                 </if>
+		                 )
+		  AND G.GOODS_STAT = 'G008_90' /*승인완료상품*/
+		  AND G.SELF_MALL_YN = 'Y' /*몰노출상품*/
+		  AND NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*판매기간*/
+		  AND S.STOCK_QTY > 0 /*재고있는상품*/
+	</select>
+
+	<select id="getCategoryGoodsList" parameterType="GoodsSearch" resultType="Goods">
+		/* TsfDisplay.getCategoryGoodsList */
+		WITH TAB_GOODS AS (
+		     SELECT G.BRAND_GROUP_NM     /*브랜드그룹명*/
+		          , G.GOODS_CD           /*상품코드*/
+		          , G.GOODS_NM           /*상품명*/
+		          , G.GOODS_GB           /*상품구분*/
+		          , G.FOREIGN_BUY_YN     /*해외구매대행여부*/
+		          , G.PARALLEL_IMPORT_YN /*병행수입여부*/
+		          , G.ORDER_MADE_YN      /*주문제작여부*/
+		          , G.GOODS_TNM          /*상품타이틀명*/
+		          , G.MAIN_COLOR_CD      /*대표색상코드*/
+		          , G.LIST_PRICE         /*정상가(최초판매가)*/
+		          , G.CURR_PRICE         /*현재판매가*/
+		          , G.REG_DT             /*등록일시*/
+		          , G.NUMB
+		     FROM   (
+		          SELECT CASE WHEN BG.DISP_NM_LANG = 'EN' THEN BG.BRAND_GROUP_ENM
+		               ELSE BG.BRAND_GROUP_KNM
+		               END                                    AS BRAND_GROUP_NM /*브랜드그룹명*/
+		               , G.GOODS_CD                                               /*상품코드*/
+		               , G.GOODS_NM                                               /*상품명*/
+		               , G.GOODS_GB                                               /*상품구분*/
+		               , G.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
+		               , G.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
+		               , G.ORDER_MADE_YN                                          /*주문제작여부*/
+		               , G.GOODS_TNM                                              /*상품타이틀명*/
+		               , G.MAIN_COLOR_CD                                          /*대표색상코드*/
+		               , G.LIST_PRICE                                             /*정상가(최초판매가)*/
+		               , G.CURR_PRICE                                             /*현재판매가*/
+		               , G.REG_DT                                                 /*등록일시*/
+		               , ROW_NUMBER() OVER(ORDER BY CG.DISP_ORD
+		                                          , G.REG_DT DESC
+		                                          , G.GOODS_CD) AS NUMB
+		          FROM	TB_GOODS G
+		          JOIN	TB_CATE_GOODS CG ON G.GOODS_CD = CG.GOODS_CD
+		          JOIN	TB_BRAND B ON G.BRAND_CD = B.BRAND_CD AND B.USE_YN = 'Y'
+		          JOIN	TB_SITE_BRAND SB ON G.BRAND_CD = SB.BRAND_CD AND SB.USE_YN = 'Y'
+		          JOIN	TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO AND BG.USE_YN = 'Y'
+		          JOIN	TB_GOODS_STOCK S ON G.GOODS_CD = S.GOODS_CD
+		          LEFT OUTER JOIN TB_GOODS_SUMMARY SU ON G.GOODS_CD = SU.GOODS_CD
+		          WHERE 1=1
+		          AND CG.GOODS_CD = G.GOODS_CD
+		          AND CG.GOODS_CD = S.GOODS_CD
+		          AND G.BRAND_CD = B.BRAND_CD
+		          AND B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+		          AND CG.GOODS_CD = S.GOODS_CD
+		          AND EXISTS (
+		                        SELECT 1
+		                        FROM TB_CATE_4SRCH
+		                        WHERE 1 = 1
+		                        AND LEAF_CATE_NO = CG.CATE_NO
+		                        AND SITE_CD = #{siteCd}
+		                        AND CATE_GB = 'G032_101' /*BY ITEM*/
+		                        AND CATE_TYPE = 'G031_10'
+		                        AND CATE1_NO = #{cate1No}
+		                        <if test="cate2No != null and cate2No != ''">
+		                        AND CATE2_NO = #{cate2No}
+		                        </if>
+		                        <if test="cate3No != null and cate3No != ''">
+		                        AND CATE3_NO = #{cate3No}
+		                        </if>
+		                        <if test="cate4No != null and cate4No != ''">
+		                        AND CATE4_NO = #{cate4No}
+		                        </if>
+		                        <if test="cate5No != null and cate5No != ''">
+		                        AND CATE5_NO = #{cate5No}
+		                        </if>
+		              )
+		          AND G.GOODS_STAT = 'G008_90' /*승인완료상품*/
+		          AND G.SELF_MALL_YN = 'Y' /*몰노출상품*/
+		          AND NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*판매기간*/
+		          AND S.STOCK_QTY > 0 /*재고있는상품*/
+		          ) G
+		     WHERE  1=1
+		     <if test="pageable != null and pageable.endRow != null and pageable.endRow > 0">
+		     AND  G.NUMB BETWEEN #{pageable.startRow} AND #{pageable.endRow}
+		     </if>
+		)
+		, TAB_GOODS_IMG AS (
+		/* 상품의 이미지 */
+		SELECT GOODS_CD
+		,MAX(SYS_IMG_NM) AS SYS_IMG_NM
+		,MAX(SYS_IMG_NM2) AS SYS_IMG_NM2
+		FROM (
+		SELECT G.GOODS_CD
+		, CASE WHEN GI.DEFAULT_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END   AS SYS_IMG_NM
+		, CASE WHEN GI.MOUSEOVER_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END AS SYS_IMG_NM2
+		FROM   TAB_GOODS G
+		, TB_GOODS_IMG GI
+		WHERE  G.GOODS_CD = GI.GOODS_CD
+		AND    G.MAIN_COLOR_CD = GI.COLOR_CD
+		) Z
+		GROUP BY GOODS_CD
+		)
+		, TAB_GOODS_VIDEO AS (
+		/* 상품의 동영상 목록 */
+		SELECT GOODS_CD
+		, MAX(CASE WHEN RNUM = 1 THEN VIDEO_GB END)  AS VIDEO_GB_M
+		, MAX(CASE WHEN RNUM = 1 THEN VIDEO_VAL END) AS VIDEO_VAL_M
+		, MAX(CASE WHEN RNUM = 2 THEN VIDEO_GB END)  AS VIDEO_GB_S
+		, MAX(CASE WHEN RNUM = 2 THEN VIDEO_VAL END) AS VIDEO_VAL_S
+		FROM   (
+		SELECT G.GOODS_CD
+		, V.VIDEO_GB
+		, V.VIDEO_VAL
+		, VD.REG_DT
+		, RANK() OVER(PARTITION BY G.GOODS_CD ORDER BY VD.REG_DT) AS RNUM
+		FROM   TAB_GOODS G
+		, TB_VIDEO_DISPLOC VD
+		, TB_VIDEO V
+		WHERE  G.GOODS_CD = VD.DISPLOC_VAL
+		AND    VD.VIDEO_SQ = V.VIDEO_SQ
+		AND    VD.DISPLOC_GB = 'G' /*상품*/
+		AND    VD.DISP_YN = 'Y'
+		AND    V.DISP_YN ='Y'
+		) Z
+		GROUP  BY GOODS_CD
+		)
+		SELECT	G.BRAND_GROUP_NM
+		      , G.GOODS_CD
+		      , FN_GET_GOODS_NM(G.GOODS_NM,G.GOODS_GB,G.FOREIGN_BUY_YN,G.PARALLEL_IMPORT_YN,G.ORDER_MADE_YN) AS GOODS_FULL_NM /*상품FULL명*/
+		      , G.GOODS_TNM
+		      , G.MAIN_COLOR_CD
+		      , G.LIST_PRICE
+		      , FN_GET_BENEFIT_PRICE(#{frontGb},G.GOODS_CD,G.CURR_PRICE,#{custGb})                           AS CURR_PRICE    /*현재판매가*/
+		      , GI.SYS_IMG_NM
+		      , GI.SYS_IMG_NM2
+		      , GV.VIDEO_GB_M
+		      , GV.VIDEO_VAL_M
+		      , GV.VIDEO_GB_S
+		      , GV.VIDEO_VAL_S
+		      <choose>
+		      	<when test="custNo != null and custNo > 0"> <!-- 로그인 했으면 -->
+		      		, IF(W.GOODS_CD IS NULL,'','likeit')                                                           AS LIKE_IT       /*위시리스트담긴상품*/
+		      	</when>
+		      	<otherwise>
+		      		, ''                                                                                           AS LIKE_IT       /*위시리스트담긴상품*/
+		      	</otherwise>
+		      </choose>
+		FROM	TAB_GOODS G
+		LEFT OUTER JOIN TAB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
+		LEFT OUTER JOIN TAB_GOODS_VIDEO GV ON G.GOODS_CD = GV.GOODS_CD
+		<if test="custNo != null and custNo > 0"> <!-- 로그인 했으면 -->
+		LEFT OUTER JOIN TB_WISHLIST W ON G.GOODS_CD = W.GOODS_CD
+		AND W.CUST_NO = #{custNo}
+		</if>
 	</select>
 </mapper>

+ 32 - 7
src/main/webapp/WEB-INF/views/web/display/CategoryGoodsListFormWeb.html

@@ -243,7 +243,7 @@
 							</div>
 							<div class="count_wrap">
 								<div>
-									<p><span>9999</span>개의 상품</p>
+									<p><span id="totCntId">9999</span>개의 상품</p>
 								</div>
 								<div>
 									<ul>
@@ -259,6 +259,16 @@
 									</ul>
 								</div>
 							</div>
+
+							<div id="infiniteContainer">
+								<div id="listBoxOuter">
+									<!-- 상품진열 -->
+									<ul class="productlist quarter" id="listBox"><!-- max 30개 정렬-->
+									</ul>
+									<!-- //상품진열 -->
+								</div>
+							</div>
+
 							<div class="itemsGrp"> <!-- itemsGrp rank hot deal -->
 								<div class="item_prod">
 									<div class="item_state">
@@ -441,9 +451,9 @@
 		<input type="hidden" name="sortGb"/>
 	</form>
 
-	<script type="text/javascript" src="/ux/plugins/jquery.history.min.js"></script>
-	<script type="text/javascript" src="/ux/plugins/gaga.infinite.scroll.js"></script>
-
+	<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
+	<script src="/ux/plugins/jquery/jquery.history.min.js"></script>
+	<script th:src="@{'/biz/goodsSession.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/biz/goodsSession.js"></script>
 	<script th:inline="javascript">
 		/*<![CDATA[*/
 		var filterPriceList = [[${filterPriceList}]];
@@ -505,12 +515,27 @@
 
 		// 상품 검색
 		var fnGetInfiniteScrollDataList = function (pageNum){
-			$("#searchForm input[name=pageNo]").val(pageNum+1);
-			gagajf.ajaxFormSubmit("/display/category/goods/list", document.searchForm,  gagaInfiniteScroll.jsonToHtml);
+			$("#searchGoodsForm input[name=pageNo]").val(pageNum+1);
+			gagajf.ajaxFormSubmit("/display/category/goods/list", document.searchGoodsForm,  gagaInfiniteScroll.jsonToHtml);
 		}
 
 		var fnDrawInfiniteScrollData = function (result){
-			console.log('nn');
+			console.log('fnDrawInfiniteScrollData');
+			let totalCnt = result.totalCnt;
+			$("#totCntId").text(totalCnt.addComma());
+			gagaInfiniteScroll.pageStatus.totalCount = result.totalCnt;
+
+			var ithrCd = '';
+			var contentLoc = 'CATE1100';
+			if (result.dataList != null && result.dataList.length > 0) {
+				var htm = fnCreateGoodsList(result, ithrCd, contentLoc);
+				gagaInfiniteScroll.draw(htm);
+			}else {
+				if($("#searchForm input[name=pageNo]").val()==1){
+					$('#listBox').html('<li class="none">상품정보가 존재하지 않습니다.</li>');
+				}
+				gagaInfiniteScroll.draw('not');
+			}
 		}
 
 		var fnCreateCategoryList = function (){

+ 324 - 1
src/main/webapp/WEB-INF/views/web/display/MallMainFormWeb.html

@@ -211,7 +211,7 @@
 															</div>
 															<p class="itemBrand" th:text="${goodsData.brandEnm}">BRAND NAME</p>
 															<div class="itemName" th:text="${goodsData.goodsNm}">여성 체인 프린트 큐롯 스커트 프린트 큐롯 스커트</div>
-															<p class="itemPrice" th:text="${#numbers.formatInteger(goodsData.currPrice,1,'COMMA')}">80,100
+															<p class="itemPrice" th:text="${#numbers.formatInteger(goodsData.currAprice,1,'COMMA')}">80,100
 																<span class="itemPrice_original" th:text="${#numbers.formatInteger(planningGoods.listPrice,1,'COMMA')}">89,000</span>
 																<span class="itemPercent" th:if="${planningGoods.currPrice != planningGoods.listPrice}" th:text="${(planningGoods.listPrice == 0 ? 0 : #numbers.formatDecimal((planningGoods.listPrice - planningGoods.currPrice) / (planningGoods.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
 															</p>
@@ -398,6 +398,329 @@
 			</th:block>
 		</th:block>
 
+		<!-- 10. 당신을위한제안 -->
+		<div class="content main_foryou">
+			<div class="cont_head">
+				<p class="displayH">당신을 위한 제안</p>
+				<span>스타일24에서 가장 주목받는 상품을 살펴보세요</span>
+			</div>
+			<div class="cont_body">
+				<div class="post-sug fy_nav">
+					<div class="swiper-container">
+						<div class="swiper-wrapper">
+							<div class="swiper-slide">
+								<ul>
+									<li><button class="btn btn_shape active" data-tab="fy1"><div><span class="number">1</span><span>BUCKAROO</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy2"><div><span class="number">2</span><span>기모청바지</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy3"><div><span class="number">3</span><span>겨울 팬츠</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy4"><div><span class="number">4</span><span>컨버스 주니어</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy5"><div><span class="number">5</span><span>모이몰른</span></div></button><a href="#none">자세히 보기</a></li>
+								</ul>
+							</div>
+							<div class="swiper-slide">
+								<ul>
+									<li><button class="btn btn_shape" data-tab="fy6"><div><span class="number">6</span><span>컨버스 주니어</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy7"><div><span class="number">7</span><span>겨울 팬츠</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy8"><div><span class="number">8</span><span>BUCKAROO</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy9"><div><span class="number">9</span><span>모이몰른</span></div></button><a href="#none">자세히 보기</a></li>
+									<li><button class="btn btn_shape" data-tab="fy10"><div><span class="number">10</span><span>기모청바지</span></div></button><a href="#none">자세히 보기</a></li>
+								</ul>
+							</div>
+						</div>
+					</div>
+					<div class="swiper-controls">
+						<div class="swiper-pagination"></div>
+					</div>
+				</div>
+				<div class="fy_item active" id="fy1">
+					<div class="part">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug01.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">자카드 방풍 패딩 스웨터 가디건 자카드 </div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug02.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+					<div class="part lg">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug03.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+					<div class="part">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug04.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug05.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+					<div class="part">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug06.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug07.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+				</div>
+
+				<div class="fy_item" id="fy2">
+					<div class="part">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug04.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug05.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+					<div class="part">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug01.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">자카드 방풍 패딩 스웨터 가디건 자카드 </div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug02.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+					<div class="part">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug06.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug07.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+					<div class="part lg">
+						<div class="item_prod">
+							<div class="item_state">
+								<button type="button" class="itemLike" tabindex="0">관심상품 추가</button>
+								<a href="#none" class="itemLink" tabindex="0">
+									<div class="itemPic">
+										<img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/main_sug03.jpg">
+									</div>
+									<div class="itemInfo">
+										<p class="itemBrand">BRAND NAME</p>
+										<div class=" itemName">남성 로고 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건 자카드 방풍 패딩 스웨터 가디건</div>
+										<p class="itemPrice">80,100</p>
+									</div>
+								</a>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="fy_item" id="fy3"></div>
+				<div class="fy_item" id="fy4"></div>
+				<div class="fy_item" id="fy5"></div>
+				<div class="fy_item" id="fy6"></div>
+				<div class="fy_item" id="fy7"></div>
+				<div class="fy_item" id="fy8"></div>
+				<div class="fy_item" id="fy9"></div>
+				<div class="fy_item" id="fy10"></div>
+			</div>
+		</div>
+
+		<!-- 11. TV 슬라이드 -->
+		<div class="content wide main_tv">
+			<div class="cont_head">
+				<p class="displayH t_c">STYLE24 TV</p>
+			</div>
+			<div class="cont_body">
+				<div class="swiper-container post-tv">
+					<div class="swiper-wrapper">
+						<div class="swiper-slide">
+							<div class="movbox">
+								<iframe width="100%" height="100%" src="https://www.youtube.com/embed/hqryeW6scd0?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+							</div>
+						</div>
+						<div class="swiper-slide">
+							<div class="movbox">
+								<iframe width="100%" height="100%" src="https://www.youtube.com/embed/J7nowE2iTIM?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+							</div>
+						</div>
+						<div class="swiper-slide">
+							<div class="movbox">
+								<iframe width="100%" height="100%" src="https://www.youtube.com/embed/cRiKrFk7FTM?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+							</div>
+						</div>
+						<div class="swiper-slide">
+							<div class="movbox">
+								<iframe width="100%" height="100%" src="https://www.youtube.com/embed/hqryeW6scd0?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+							</div>
+						</div>
+						<div class="swiper-slide">
+							<div class="movbox">
+								<iframe width="100%" height="100%" src="https://www.youtube.com/embed/J7nowE2iTIM?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+							</div>
+						</div>
+						<div class="swiper-slide">
+							<div class="movbox">
+								<iframe width="100%" height="100%" src="https://www.youtube.com/embed/cRiKrFk7FTM?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+							</div>
+						</div>
+					</div>
+					<div class="swiper-button-prev white"></div> <!-- 클래스명 white 추가 -->
+					<div class="swiper-button-next white"></div>
+				</div>
+				<div class="swiper-controls">
+					<div class="swiper-pagination"></div>
+				</div>
+			</div>
+		</div>
 
 
 	<!-- End Of Main Contents -->

+ 431 - 0
src/main/webapp/biz/goodsSession.js

@@ -0,0 +1,431 @@
+//****************상품목록  start **********************************
+var categoryGoodsList = [];
+var cnt = 1;
+var fnCreateGoodsList = function(result, ithrCd, contentLoc, searchGb) {
+	console.log('fnCreateGoodsList');
+	var specialPriceRate = result.specialPriceRate;
+	var tag = '';
+	$.each(result.dataList, function(idx, item) {
+		if (idx < 3) {
+			categoryGoodsList.push(item.goodsCd);
+		}
+
+		tag += '<li class="item">';
+		tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\''+item.goodsCd+'\', \''+ithrCd+'\', \''+contentLoc+'\');" class="link">';
+		//--베스트 상품 start--//
+		if (typeof(bestPageNo) != 'undefined' && bestPageNo != ""){
+			var cnt = ((idx+1)+((bestPageNo-1)*30));
+			if(cnt<10){
+				cnt = "0"+cnt;
+			}
+			tag += '<span class="rank">'+cnt+'</span>';
+		}
+		//--베스트 상품 end--//
+		var imgPath = '';
+		var imgSize = '1000';
+		if(item.imgType=='A'){
+			imgPath = _uploadGoodsUrl;
+			imgSize = '300';
+		}
+
+		if(_frontGb != "P"){
+			tag += '<img class="dummy" src=\''+_uximgUrl+'/image/mob/global/dummy.gif\' alt="" />';
+		}
+		tag += '<span class="img">';
+		if(item.imgPath6!=null && item.imgPath6!=''){
+			tag += '<img class="lazy active" data-src="'+imgPath+item.imgPath6.replace('1000', imgSize)+'" onerror="this.src=\''+_uximgUrl+'/image/web/common/no.gif\';">';
+			if(item.imgPath1 && _frontGb == "P"){
+				tag += '<img class="lazy" data-src="'+imgPath+item.imgPath1.replace('1000', imgSize)+'" onerror="this.src=\''+_uximgUrl+'/image/web/common/no.gif\';">';
+			}
+		}else{
+			tag += '<img class="lazy active" data-src="'+imgPath+item.imgPath1.replace('1000', imgSize)+'" onerror="this.src=\''+_uximgUrl+'/image/web/common/no.gif\';">';
+			if(item.imgPath2 && _frontGb == "P"){
+				tag += '<img class="lazy" data-src="'+imgPath+item.imgPath2.replace('1000', imgSize)+'" onerror="this.src=\''+_uximgUrl+'/image/web/common/no.gif\';">';
+			}
+		}
+
+		tag += '</span>';
+
+		if(_frontGb != "P"){
+			/*tag += '<div class="colors">';
+			if(item.colorGrpFile=='#FFFFFF'){
+				tag += '<span class="colorchip active" style="background-color:#FF0000"></span>';
+			}else{
+				tag += '<span class="colorchip active" style="background-color:'+item.colorGrpFile+'"></span>';
+			}
+			tag += '</div>';*/
+			tag += '<div class="info">';
+		}else{
+			tag += '<span class="info">';
+		}
+		tag += '<span class="brand">'+ item.brandGrpNm+'</span>';
+		tag += '<span class="title">'+item.goodsTnmFull+'</span>';
+		tag += '<span class="price">';
+		if(item.goodsType=='N'){
+			if(item.tagPrice>item.currPrice){
+				tag += '<span>'+item.dcRate+'%&nbsp;</span>';
+				tag += '<strong>'+item.currPrice.addComma()+'</strong>원';
+				tag += '<em>'+item.tagPrice.addComma()+'</em>';
+			}else{
+				tag += '<strong>'+item.currPrice.addComma()+'</strong>원';
+			}
+		}else{
+			tag += '<strong>'+item.currPrice.addComma()+'</strong>원 ~';
+		}
+		tag += '</span>';
+
+		if(_frontGb != "P"){
+			tag += '</div>';
+			tag += '<div class="icons">';
+
+		}else{
+			tag += '<span class="icons">';
+		}
+		if(item.spriceIcon > 0){
+			tag += '<img src="'+_uximgUrl+'/image/web/global/icon_sample3.gif" alt="특가" />';
+		}
+		if(item.bestIcon > 0){
+			tag += '<img src="'+_uximgUrl+'/image/web/global/icon_sample5.gif" alt="BEST" />';
+		}
+		if(item.newIcon < 5){
+			tag += '<img src="'+_uximgUrl+'/image/web/global/icon_sample2.gif" alt="NEW" />';
+		}
+		if(item.GoodsIconList!=null && typeof item.GoodsIconList!='undefined'){
+			$.each(item.GoodsIconList, function(idx2, icon) {
+				tag += '<img src="'+_imgUrl+ '/display/icon/' + icon.goodsIconImgPath + '" alt="" />';
+			});
+		}
+		tag += '</span>';
+
+		if(_frontGb != "P"){
+			tag += '</div>';
+		}else{
+			tag += '</span>';
+		}
+		tag += '</a>';
+		var wishActive = '';
+		if(item.wishYn=='Y'){
+			wishActive = 'active';
+		}
+		tag += '<button type="button" class="wish '+wishActive+'" goodsCd="'+item.goodsCd+'" onclick="cfnPutWishList(this)"  planDtlSq="">찜</button>';
+		tag += '</li>';
+	});
+
+	if (cnt == 1) {
+		// <!-- Criteo 카테고리/리스팅 태그 -->
+		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";
+		window.criteo_q.push(
+			{event: "setAccount", account: 26073}, // 이 라인은 업데이트하면 안됩니다
+			{event: "setEmail", email: email}, // 유저가 로그인이 안되 있는 경우 빈 문자열을 전달
+			{event: "setSiteType", type: deviceType},
+			{event: "viewList", item: categoryGoodsList} // 가장 위에있는 3개의 상품 ID를 전달
+		);
+		// <!-- END 카테고리/리스팅 태그 -->
+		cnt++;
+	}
+
+	return tag;
+}
+
+
+// 인피니트 스크롤 초기화
+var fnCategoryGoodsInfiniteScrollInit = function(){
+	sessionStorage.removeItem(document.location.href);
+	//History 초기화
+	$("#listBox").html("");
+}
+
+//****************상품목록  end **********************************
+
+//****************상품상세  start **********************************
+// 브랜드 인기상품 (모바일)
+var jfGoodsCustRecommendSearch = function(params) {
+	gagajf.ajaxSubmit("/goods/detail/goodsOther/frame", "html", "goodsCustRecommendArea", params);
+}
+
+//상품베너, 다른컬러, 함께본(카테고리 ) 상품
+var jfGoodsOtherSearch = function(params) {
+	gagajf.ajaxSubmit("/goods/detail/goodsOther/frame", "html", "goodsOtherArea", params);
+}
+
+//상품평
+var jfGoodsReviewSearch = function(params) {
+	gagajf.ajaxSubmit("/goods/detail/goodsReview/frame", "html", "goodsReviewArea", params);
+}
+
+//상품문의
+var jfGoodsQnaSearch = function(params) {
+	gagajf.ajaxSubmit("/goods/detail/goodsQna/frame", "html", "goodsQnaArea", params);
+}
+
+//재고수정시
+var jfStockChange = function(gb){
+
+	var obj = $("#goodsQty");
+	var objQty = parseInt($("#goodsQty").val());
+	if(gb == 'minus'){
+		if(gagajf.isNull($("#cartForm  input[name=sizeCd]").val())){
+			mcxDialog.alert("사이즈를 선택하세요.");
+		} else if(objQty <= parseInt($("#cartForm  input[name=minOrdQty]").val()) && !gagajf.isNull($("#cartForm  input[name=sizeCd]").val())){
+			mcxDialog.alert("구매하실 수 있는 최소 수량입니다.");
+		} else {
+			obj.val(objQty-1);
+		}
+	} else {
+		if(gagajf.isNull($("#cartForm  input[name=sizeCd]").val())){
+			mcxDialog.alert("사이즈를 선택하세요.");
+		}else if(objQty < parseInt($("#cartForm  input[name=maxOrdQty]").val())){
+			obj.val(objQty+1);
+		}else{
+			mcxDialog.alert("구매하실 수 있는 최대 수량입니다.");
+		}
+	}
+
+	$("#cartForm  input[name=ordQty]").val(obj.val());
+}
+
+//장바구니담기(단품)
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 바로구매, 장바구니 담기
+ * <pre>
+ *		addCart(btnType,goodsType);
+ * </pre>
+ * @param  : btnType - 장바구니. '' , 바로구매 : 'DIRECT'. 필수
+ * @param  : layer - 레이어 여부. 딜상품일 경우 . '' : 본창, 'layer':레이어창
+ * @since  : 2020/07/23
+ * @author : eskim
+ */
+var addCart = function(btnType, layer){
+	var params = [];
+	var goodsType = $("#cartForm  input[name=goodsType]").val();
+
+	if (goodsType == 'N'){
+		if (gagajf.isNull($("#cartForm  input[name=sizeCd]").val())) {
+			mcxDialog.alertC('사이즈를 선택해 주십시오.');
+			return;
+		}
+		var obj = new Object();
+
+		obj.btnType = btnType;
+		obj.goodsType = $("#cartForm  input[name=goodsType]").val();
+		obj.goodsCd = $("#cartForm  input[name=goodsCd]").val();
+		obj.itemCd = $("#cartForm  input[name=goodsCd]").val();
+		obj.sizeCd = $("#cartForm  input[name=sizeCd]").val();
+		obj.goodsQty = $("#cartForm  input[name=ordQty]").val();
+		obj.itemQty = 1;
+		obj.planDtlSq =$("#cartForm  input[name=planDtlSq]").val();
+		params.push(obj);
+
+	}else if (goodsType == 'S'){
+		var target=$('.sizelistCart');
+		var targetSize=target.length;
+		var itemSize = target.find('.item').find('input[type=radio]:checked').length;
+		if (targetSize != itemSize){
+			mcxDialog.alert("구성상품들의 사이즈를 선택하세요.");
+			return false;
+		}
+
+		target.find('.item').find('input[type=radio]:checked').each(function() {
+
+			var arrInfo = $(this).val().split('|');	// 상품코드|사이즈|구성수량
+
+			var obj = new Object();
+			obj.btnType = btnType;
+			obj.goodsType = $("#cartForm  input[name=goodsType]").val();
+			obj.goodsCd = $("#cartForm  input[name=goodsCd]").val();
+			obj.itemCd = arrInfo[0];
+			obj.sizeCd = arrInfo[1];
+			obj.goodsQty = $("#cartForm  input[name=ordQty]").val();
+			obj.itemQty = Number(arrInfo[2]);
+			obj.planDtlSq =$("#cartForm  input[name=planDtlSq]").val();
+			params.push(obj);
+
+		});
+
+	}else{
+		if (layer == 'layer'){
+
+			var goodsSize = $("#optionListLayer").children('ul').length
+			if (goodsSize <= 0){
+				mcxDialog.alert("구성상품들의 사이즈를 선택하세요.");
+				return false;
+			}
+			$('#optionListLayer > ul').each(function() {
+
+				var arrInfo = $(this).find('input[name="coption"]').val().split(':');
+
+				var obj = new Object();
+				obj.btnType = btnType;
+				obj.goodsType = $("#cartForm  input[name=goodsType]").val();
+				obj.goodsCd =  $("#cartForm  input[name=goodsCd]").val();
+				obj.itemCd = arrInfo[0];
+				obj.sizeCd = arrInfo[1];
+				obj.goodsQty = $(this).find('input[name="cea"]').val();
+				obj.itemQty = 1;
+				obj.planDtlSq = $("#cartForm  input[name=planDtlSq]").val();
+				params.push(obj);
+
+			});
+		}else{
+			if (_frontGb == "P"){
+				var goodsSize = $("#optionListDiv").children('ul').length
+				if (goodsSize <= 0){
+					mcxDialog.alert("구성상품들의 사이즈를 선택하세요.");
+					return false;
+				}
+				$('#optionListDiv > ul').each(function() {
+
+					var arrInfo = $(this).find('input[name="coption"]').val().split(':');
+					$(this).find('input[name="coption"]').attr('goodsCd')
+
+					var obj = new Object();
+					obj.btnType = btnType;
+					obj.goodsType = $("#cartForm  input[name=goodsType]").val();
+					obj.goodsCd =  $("#cartForm  input[name=goodsCd]").val();
+					obj.itemCd = arrInfo[0];
+					obj.sizeCd = arrInfo[1];
+					obj.goodsQty = $(this).find('input[name="cea"]').val();
+					obj.itemQty = 1;
+					obj.planDtlSq = $("#cartForm  input[name=planDtlSq]").val();
+					params.push(obj);
+				});
+			}else{
+				var goodsSize = $("#optionListDiv").children('dl').length
+				if (goodsSize <= 0){
+					mcxDialog.alert("구성상품들의 사이즈를 선택하세요.");
+					return false;
+				}
+				$('#optionListDiv > dl').each(function() {
+
+					var arrInfo = $(this).find('input[name="coption"]').val().split(':');
+					$(this).find('input[name="coption"]').attr('goodsCd')
+
+					var obj = new Object();
+					obj.btnType = btnType;
+					obj.goodsType = $("#cartForm  input[name=goodsType]").val();
+					obj.goodsCd =  $("#cartForm  input[name=goodsCd]").val();
+					obj.itemCd = arrInfo[0];
+					obj.sizeCd = arrInfo[1];
+					obj.goodsQty = $(this).find('input[name="cea"]').val();
+					obj.itemQty = 1;
+					obj.planDtlSq = $("#cartForm  input[name=planDtlSq]").val();
+					params.push(obj);
+				});
+			}
+		}
+	}
+
+	//DIRECT : 바로 구매. '' : 장바구니
+	cfnPutCartList(params);
+
+}
+
+
+//url 복사
+var jfCopyLinkUrl = function(goodsCd){
+	cfnCopyLinkUrl(location.protocol + _PAGE_GOODS_DETAIL + goodsCd);
+}
+
+//SNS 연동
+var jfSendToSns = function(goodsCd, goodsNm, goodsImg, snsGb) {
+	var linkUrl = location.protocol + _PAGE_GOODS_DETAIL + goodsCd;
+
+	if (goodsImg.indexOf("http") <= -1 || goodsImg.indexOf("https") <= -1){
+		var _goodsImgUrl = _uploadGoodsUrl;
+		goodsImg = "https:"+goodsImg;
+	}
+
+	if (snsGb == "FB"){
+		cfnSendToFaceBook(linkUrl,goodsNm ,goodsImg);
+	}else if (snsGb == "KK"){
+		if (_frontGb == "P"){
+			cfnSendToKakao(linkUrl,goodsNm ,goodsImg);
+		}else{
+			cfnSendToKakaoMob(linkUrl,goodsNm ,goodsImg);
+		}
+	}
+}
+
+//****************상품상세  end **********************************
+
+//****************상품검색  start **********************************
+// 상품 정렬
+var fnSortChange = function(sortGb) {
+	if($("#searchForm input:hidden[name=sortGb]").val()==sortGb){
+		return;
+	}
+	if (_frontGb == "P"){
+		$('.productsection .filterbutton').html('필터 열기<span>현재 상태 : 닫힘</span>').removeClass('active');
+		$('.filterlist').css({'height':'0'});
+	}else{
+		areaClose();
+	}
+	$("#searchForm input[name=sortGb]").val(sortGb);
+	fnCategoryGoodsInfiniteScrollInit();
+	fnGoodsListSearch();
+}
+
+
+var filterHtml = '';
+var filterStatHtml = '';
+// 필터 적용
+var fnFilterSearch = function() {
+	$(".filterstate .filter_div").empty();
+	fnCategoryGoodsInfiniteScrollInit();
+	filterHtml = '';
+	filterStatHtml = '';
+	gagaInfiniteScroll.pageStatus.filterHtml = filterHtml;
+	gagaInfiniteScroll.pageStatus.filterStatHtml = filterStatHtml;
+	fnFilterSet('brand');
+	fnFilterSet('size');
+	fnFilterSet('color');
+	fnFilterSet('price');
+	if (_frontGb == "P"){
+		$('.productsection .filterbutton').html('필터 열기<span>현재 상태 : 닫힘</span>').removeClass('active');
+		$('.filterlist').css({'height':'0'});
+	}else{
+		areaClose();
+	}
+	fnGoodsListSearch();
+}
+
+var fnFilterSet = function(searchId) {
+
+	$("#searchForm input:hidden[name="+searchId+"Search]").remove();
+	$(".filterstate li[name="+searchId+"Stat]").remove();
+	var tag = '';
+	$('#filterForm input[name='+searchId+']:checked').each(function(){
+		tag = '<input type="hidden" name="'+searchId+'Search" value="'+$(this).val()+'"/>\n';
+		$("#searchForm").append(tag);
+		filterHtml += tag;
+		if(_frontGb != "P"){
+			tag = '<button type="button" class="removefilter" onclick="fnFilterStatRemove(\''+searchId+'\', \''+$(this).val()+'\');">'+$(this).closest('li').children('label').text()+'</button>';
+			$(".filterstate .filter_div").append(tag);
+		}else{
+			tag = '<li name="'+searchId+'Stat">'+$(this).closest('li').children('label').text()+'<button type="button" onclick="fnFilterStatRemove(\''+searchId+'\', \''+$(this).val()+'\');">DELETE</button></li>';
+			$(".filterstate").append(tag);
+		}
+		filterStatHtml += tag;
+	});
+	gagaInfiniteScroll.pageStatus.filterHtml = filterHtml;
+	gagaInfiniteScroll.pageStatus.filterStatHtml = filterStatHtml;
+}
+
+var fnFilterStatRemove = function(searchId, val){
+	$('#filterForm input[name='+searchId+']:checked').each(function(){
+		if($(this).val()==val){
+			$(this).attr("checked", false);
+			$(this).parent().removeClass("active");
+		}
+	});
+	fnFilterSearch();
+}
+
+// 필터 초기화
+var fnFilterReset = function() {
+	filterReset();
+}
+//****************상품검색  end **********************************