PageSourceSearch

https://www.larocheposay.co.kr/js/order/cart.js?v=05121010202606

js larocheposay.co.kr collected 2026-10-06 13:06:23 UTC 3,489 bytes, 109 lines download raw bytes

1/**
2 * cart by [email protected]
3 */
4var CART = {
5    /* 장바구니 수량 체크 */
6    cntChk : function($par, cnt) {
7        var $cnt = $par.find('input[name="ordCnt"]');
8        var val = parseInt(($cnt.val() == "" ? "1" : $cnt.val()));
9        var max = parseInt($cnt.data("prdt-cnt"));
10        // 판매 중인지 체크
11        if ($cnt.data("prdt-status") == "sale") {
12            if (val + cnt <= 0) {
13                $cnt.val(1);
14                return true;
15            } else if (val + cnt > max) {
16                if ($cnt.data("prdt-type") == "MT" && max == 3) {
17                    alert("마일리지 제품은 " + max + "개까지 장바구니에 담을 수 있습니다.");
18                } else {
19                    alert("재고가 부족하거나 구매 제한 수량이 있는 제품입니다.\n" + max + "개까지 장바구니에 담을 수 있습니다.");
20                    if (cnt == 0) {
21                        $cnt.val(max);
22                    }
23                }
24                return false;
25            } else {
26                $cnt.val(val + cnt);
27                return true;
28            }
29        }
30        return false;
31    }
32
33    /* 장바구니 담기 : 1개 */
34    ,
35    save : function($par, cb) {
36        var $cnt = $par.find('input[name="ordCnt"]');
37        CART.proc({
38            "mode" : "C",
39            "prdtType" : $cnt.data("prdt-type"),
40            "prdtSeq" : $cnt.data("prdt-seq"),
41            "ordCnt" : $cnt.val(),
42            "price" : $cnt.data("price"),
43            "lineNm" : $cnt.data("lineNm")
44        }, function(xhr) {
45            var cnt = parseInt(xhr.data);
46            if (xhr.result != "FAIL") {
47                $("a.btn-cart .count").text(cnt.show(99));
48                $(".flotcart .count").text(cnt.show(99));
49            }
50            if (typeof cb == "function") {
51                cb(xhr);
52            }
53        });
54    }
55
56    /* 장바구니 담기 : n개 */
57    ,
58    saveArr : function(prdtType, cb, selector) {
59    	
60    	
61        if (selector == undefined) {
62            selector = "input.prdtSeqs:checked";
63        }
64        var data = $(selector).serialize() + "&mode=C&ordCnt=1&prdtType=" + prdtType;
65        CART.proc(data, cb);
66    }
67
68    ,
69    proc : function(data, cb) {
70        $.ajax({
71            type : 'post',
72            url : '/cart/cartProc.do',
73            data : data,
74            dataType : 'json',
75            success : function(xhr) {
76            	
77                var cnt = parseInt(xhr.data);
78                if (xhr.result != "FAIL") {
79                    $("a.btn-cart .count").text(cnt.show(99));
80                    $(".flotcart .count").text(cnt.show(99));
81                }
82                if (typeof cb == "function") {
83                    cb(xhr);
84                }
85            }
86        });
87    }
88}
89
90/* 관심제품 */
91var PRDT = {
92    likeEvent : function(prdtSeq, cb) {
93        $.ajax({
94            url : "/product/ajaxLike.do",
95            data : {
96                prdtSeq : prdtSeq
97            },
98            dataType : "json",
99            type : "POST"
100        }).done(function(data) {
101            if ($(".flotheart").length == 1) {
102                $(".flotheart").find(".count").text(parseInt($(".flotheart").find(".count").text()) + 1);
103            }
104            if (typeof cb === "function") {
105                cb(data);
106            }
107        });
108    }
109}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.