1<!DOCTYPE html> 2<html lang="th" class=""> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5<meta name="viewport" content="width=1200"> 6<title>à¸à¸°à¸à¸£à¹à¸²à¸ªà¸´à¸à¸à¹à¸² - หà¸à¸±à¸à¸ªà¸·à¸à¹à¸à¹à¸²à¸¥à¸¸à¸à¸à¸à¸ : Inspired by LnwShop.com (v2)</title> 7<link rel="canonical" href="https://www.lungthong.com/checkout" /> 8<meta http-equiv="content-language" content="th" /> 9<meta name="description" content="à¸à¸³à¸«à¸à¹à¸²à¸¢à¸«à¸à¸±à¸à¸ªà¸·à¸à¹à¸à¹à¸², หà¸à¸±à¸à¸ªà¸·à¸à¸¡à¸·à¸à¸ªà¸à¸, à¸à¸´à¸¢à¸²à¸¢à¸à¸µà¸, à¸à¸¥ à¸à¸´à¸à¸£ à¸à¸´à¸¡à¸«à¸à¸§à¸, หà¸à¸±à¸à¸ªà¸·à¸à¸à¸£à¸°, หà¸à¸±à¸à¸ªà¸·à¸à¸ªà¸°à¸ªà¸¡" /> 10<meta name="keywords" content="à¸à¸³à¸«à¸à¹à¸²à¸¢à¸«à¸à¸±à¸à¸ªà¸·à¸à¹à¸à¹à¸², หà¸à¸±à¸à¸ªà¸·à¸à¸¡à¸·à¸à¸ªà¸à¸, à¸à¸´à¸¢à¸²à¸¢à¸à¸µà¸, à¸à¸¥ à¸à¸´à¸à¸£ à¸à¸´à¸¡à¸«à¸à¸§à¸, หà¸à¸±à¸à¸ªà¸·à¸à¸à¸£à¸°, หà¸à¸±à¸à¸ªà¸·à¸à¸ªà¸°à¸ªà¸¡" /> 11<meta property="thumbnail" content="https://inwfile.com/s-gd/lrcz49.jpg" /> 12<meta property="og:title" content="à¸à¸°à¸à¸£à¹à¸²à¸ªà¸´à¸à¸à¹à¸²" /> 13<meta property="og:description" content="à¸à¸³à¸«à¸à¹à¸²à¸¢à¸«à¸à¸±à¸à¸ªà¸·à¸à¹à¸à¹à¸², หà¸à¸±à¸à¸ªà¸·à¸à¸¡à¸·à¸à¸ªà¸à¸, à¸à¸´à¸¢à¸²à¸¢à¸à¸µà¸, à¸à¸¥ à¸à¸´à¸à¸£ à¸à¸´à¸¡à¸«à¸à¸§à¸, หà¸à¸±à¸à¸ªà¸·à¸à¸à¸£à¸°, หà¸à¸±à¸à¸ªà¸·à¸à¸ªà¸°à¸ªà¸¡" /> 14<meta property="og:image" content="https://inwfile.com/s-gd/lrcz49.jpg" /> 15<meta property="og:type" content="website" /> 16<meta property="og:url" content="https://www.lungthong.com/checkout" /> 17<link rel="alternate" hreflang="th" href="https://www.lungthong.com/checkout" /> 18<link rel="image_src" href="https://gd.lnwfile.com/_/gd/_raw/lr/cz/49.jpg" /> 19<link rel="shortcut icon" href="https://gd.lnwfile.com/_/gd/_raw/7q/br/ny.png" /> 20<link rel="apple-touch-icon" href="https://gd.lnwfile.com/_/gd/_raw/7q/br/ny.png"> 21<link rel="icon" href="https://gd.lnwfile.com/_/gd/_raw/7q/br/ny.png" /> 22<link rel="stylesheet" type="text/css" id="lnw-basic-css-file" href="https://www.lungthong.com/system/application/templates/lnwshop/default/_css/basic1200.min.css?t=20260810000051" /> 23<link rel="stylesheet" type="text/css" href="https://www.lungthong.com/cache/lnwshop/651/862/css/20260708164854/style.css" /> 24<link rel="preload" type="text/css" href="https://www.lungthong.com/system/application/modules/lnwbar/_css/color_style.min.css?t=20260901144946" as="style" onload="this.onload=null;this.rel='stylesheet'" /> 25<link rel="preload" type="text/css" href="https://www.lungthong.com/system/application/modules/lnwbar/_css/lnw_icon.min.css?t=20220616" as="style" onload="this.onload=null;this.rel='stylesheet'" />
26<script type="text/javascript"> 27 window._lckd = window._lckd || []; 28 function _lck(){window._lckd.push(arguments);} 29 _lck('config',{"policy_url":null,"web_domain":"www.lungthong.com","web_avatar":"https:\/\/gd.lnwfile.com\/_\/gd\/_resize\/100\/100\/lr\/cz\/49.jpg","web_ukey":"651862","cpath":"\/","customize":{"color":"#007BFF","default_consents":{"functionality_storage":1,"analytics_storage":1,"ad_storage":1},"position":"bottom","title":"à¹à¸£à¸²à¹à¸à¹à¸à¸¸à¸à¸à¸µà¹ !","image":"https:\/\/gd.lnwfile.com\/3gwx1s.png","desc":"à¹à¸£à¸²à¹à¸à¹à¸à¸¸à¸à¸à¸µà¹à¹à¸à¸·à¹à¸à¹à¸à¸´à¹à¸¡à¸à¸£à¸°à¸ªà¸´à¸à¸à¸´à¸ าà¸à¹à¸¥à¸°à¸¡à¸à¸à¸à¸£à¸°à¸ªà¸à¸à¸²à¸£à¸à¹à¸à¸µà¹à¸à¸µà¸à¸µà¹à¸ªà¸¸à¸à¹à¸à¸à¸²à¸£à¹à¸à¹à¸à¸²à¸à¹à¸§à¹à¸à¹à¸à¸à¹à¸à¸à¸à¹à¸£à¸²","close_button":0},"html":[]}); 30</script>
vendor: 1 bytes, line 30
30
31<script async defer src="https://www.lnwshop.com/system/application/modules/lnwshopweb/_js/cookie_policy.js?t=20260925"></script>
31 32<meta name="robots" content="noindex"> 33<link rel="preconnect" href="https://gd-up.lnwfile.com"></head> 34<body> 35<!-- 6XeBHowuGjOv_5QA6sEu9sWET8AoNu4Zr__NwmS3AOGLHnb4XXQAClDj6LVF9kVi --> 36<!-- IzpANQtbTzPlmFSb0wLhRLz93PYLjB9hPnBDHSimqrcFgnowDFkaXvqqf6Fv-U3SjJIiew== --> 37<!-- BJjsz9K954AUSmGHfBdHgZWGvX-hPaF5qXbsitORy7g7Kblj-9B3Y9lPoZ8ShhsOLOajkw== --> 38 39<!-- P7JyAskzor4ojRoVEYmKu2xtd3JdS-IAzut3yd9cQwcvLOAoWSxkASYKNLvcYjIGmVW1sQ== - 0.2059 --> 40 41<div id="lnwbar-app"></div>
42<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/external/jquery/jquery-1.12.4.min.js"></script>
42 43<div id="ggHead"> 44</div> 45 46<div id="gadget-1" config_id="1" class="widgetPage layout-main" data-scene="checkout" data-svars="{"section_sub":"cart","section_args":[]}"><div class="pageWrapper rb-hot-000 rb-new-000 rb-recommend-000 rb-sale-000 pageShirt"> 47 48 49 50 51<div class="pageUnderwear page-checkout"> 52<div id="gadget-4" config_id="4" class="widgetZone z-article"><div class="zoneShirt"> 53<div id="gadget-29" config_id="29" class="widgetUnit u-section u-section-checkout u-section-checkout-cart"><a name="lnwcontent"></a><div class="unitShirt"> <div id="lnw_cartArea" class="checkoutBody"> 54 <div class="cart_loader" :style="{display:(cart_loader?'block':'none')}"></div> 55 <div class="shopHeader"> 56<div class="avatar"><a href="https://www.lungthong.com/"><img src="https://gd.lnwfile.com/_/gd/_resize/100/100/lr/cz/49.jpg"></a></div> 57<div class="name"> 58<a href="https://www.lungthong.com/">หà¸à¸±à¸à¸ªà¸·à¸à¹à¸à¹à¸²à¸¥à¸¸à¸à¸à¸à¸</a> 59<div class="desc">SHOP ID: 651862 <span class="status" status="">(รà¹à¸²à¸à¹à¸à¸´à¸à¸à¸à¸à¸´)</span></div> 60</div> 61 62<div class="order_step order_step1"><div class="buystep step1 currentStep"><div class="point"></div><div class="line before"></div><div class="line after"></div><div class="text">à¸à¸°à¸à¸£à¹à¸²à¸ªà¸´à¸à¸à¹à¸²</div></div><div class="buystep step2"><div class="point"></div><div class="line before"></div><div class="line after"></div><div class="text">à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸</div></div><div class="buystep step3"><div class="point"></div><div class="line before"></div><div class="line after"></div><div class="text">à¸à¸£à¸§à¸à¸ªà¸à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸</div></div><div class="buystep step4"><div class="point"></div><div class="line before"></div><div class="line after"></div><div class="text">สัà¹à¸à¸à¸·à¹à¸à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢ (รà¸à¸à¸³à¸£à¸°à¹à¸à¸´à¸)</div></div></div> 63</div> <div class="checkoutHeader"> 64 <div class="checkoutBack"> 65 <a class="cartBack" href="javascript:history.back()"><i 66 class="icon"></i><span class="text">à¸à¸¥à¸±à¸à¹à¸à¸«à¸à¹à¸²à¸à¸µà¹à¹à¸¥à¹à¸§</span></a> </div> 67 <h1>รายà¸à¸²à¸£à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸à¸°à¸à¸£à¹à¸²</h1> 68 </div> 69 <div class="defaultMessage"> 70 à¸à¸£à¸¸à¸à¸²à¸à¸£à¸§à¸à¸ªà¸à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸´à¸à¸à¹à¸²à¹à¸¥à¸°à¹à¸¥à¸·à¸à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸ à¸à¸²à¸à¸à¸±à¹à¸à¸à¸¥à¸´à¸à¸à¸¸à¹à¸¡ â<b>สัà¹à¸à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²</b>â à¹à¸à¸·à¹à¸à¹à¸à¸à¸±à¹à¸à¸à¸à¸à¸à¸±à¸à¹à¸ </div> 71 <div v-if="cart" class="cartBody" style="visibility: hidden;" :style="{visibility:(cart?'visibility':'hidden')}"> 72 <div class="cartZone"> 73 <div class="headArea"> 74 <div class="detail">สิà¸à¸à¹à¸²</div> 75 <div class="price">ราà¸à¸²/à¸à¸´à¹à¸</div> 76 <div class="quantity">à¸à¸³à¸à¸§à¸</div> 77 <div class="amount">ราà¸à¸²à¸£à¸§à¸¡</div> 78 </div> 79 <div class="productArea"> 80 <product-item v-for="item in cart.items" :key="item.iid" :item="item"></product-item> 81 </div> 82 <div class="productSummaryArea"> 83 <div class="title">สรุà¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸´à¸à¸à¹à¸²</div> 84 <div class="detail"><span>{{ cart.num }} รายà¸à¸²à¸£</span> 85 <span>{{ cart.quantity }} à¸à¸´à¹à¸</span> <span 86 v-if="checkweight"> à¸à¹à¸³à¸«à¸à¸±à¸à¸£à¸§à¸¡ {{ cart.weight }} à¸à¸£à¸±à¸¡</span> 87 </div> 88 <div class="text">ราà¸à¸²à¸ªà¸´à¸à¸à¹à¸²à¸à¸±à¹à¸à¸«à¸¡à¸</div> 89 <div class="amount" :realpricex="cart.price.product"> 90 <div class="real"><span 91 class="num">{{ amount_format(cart.price.product) }}</span> à¸à¸²à¸ </div> 92 <div class="estimate"></div> 93 </div> 94 </div> 95 <div class="hasDiscountArea salePromotion" v-if="cart.discounts"> 96 <div v-for="(discount, index) in cart.discounts" class="discountArea"> 97 <div class="title"> 98 <div v-if="index==0">สรุà¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¹à¸§à¸à¸¥à¸</div> 99 </div> 100 <div class="detail">สà¹à¸§à¸à¸¥à¸à¸à¸²à¸ {{ 101 show_lang('CART-DISCOUNT-TYPE-'+discount.type.toUpperCase()) }} {{discount.name}} 102 </div> 103 <div class="text">à¸à¸´à¸à¹à¸à¹à¸à¸ªà¹à¸§à¸à¸¥à¸</div> 104 <div class="amount" :realpricex="discount.price"> 105 <div class="real"><span 106 class="num">- {{ amount_format(discount.price) }}</span> à¸à¸²à¸ </div> 107 <div class="estimate"></div> 108 </div> 109 </div> 110 <div class="beforeshippingArea"> 111 <div class="text">ราà¸à¸²à¸«à¸¥à¸±à¸à¸«à¸±à¸à¸ªà¹à¸§à¸à¸¥à¸</div> 112 <div class="amount" :realpricex="cart.price.product - cart.price.discount"> 113 <div class="real"><span class="num">{{ amount_format(cart.price.product - cart.price.discount)}}</span> à¸à¸²à¸ </div> 114 <div class="estimate"></div> 115 </div> 116 </div> 117 </div> 118 <div v-if="!cart.is_no_shipping" class="deliveryArea"> 119 <div class="text"> 120 <b>ระยะà¹à¸§à¸¥à¸²à¸à¸±à¸à¹à¸à¸£à¸µà¸¢à¸¡à¸ªà¸´à¸à¸à¹à¸²</b> 121 {{cart_prepare_day}} วัà¸à¸à¸³à¸à¸²à¸£ หลัà¸à¸à¸£à¸§à¸à¸ªà¸à¸à¸¢à¸à¸à¹à¸à¸´à¸à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢à¹à¸¥à¹à¸§ à¹à¸¥à¸°à¹à¸¡à¹à¸à¸±à¸à¸£à¸§à¸¡à¸£à¸°à¸¢à¸°à¹à¸§à¸¥à¸²à¸à¸±à¸à¸ªà¹à¸ </div> 122 <div class="text weekday_text"> 123 * รà¹à¸²à¸à¸«à¸¢à¸¸à¸à¸§à¸±à¸à¸«à¸¢à¸¸à¸à¸ªà¸¸à¸à¸ªà¸±à¸à¸à¸²à¸«à¹ (วัà¸à¹à¸ªà¸²à¸£à¹-à¸à¸²à¸à¸´à¸à¸¢à¹ à¹à¸¥à¸°à¸§à¸±à¸à¸«à¸¢à¸¸à¸à¸à¸±à¸à¸à¸±à¸à¸¤à¸
123ษà¹) </div> 124 </div> 125 <template v-if="!cart.is_no_shipping"> 126 <div v-if="cart.is_product_no_shipping_type" class="shiptypeArea"> 127 <div class="shiptypeChoice"> 128 <div class="shiptype no_set"> 129 <div class="detail">à¸à¸±à¸à¸ªà¹à¸à¹à¸¢à¸à¸à¸±à¸ªà¸à¸¸</div> 130 <div class="text">à¸à¹à¸²à¸à¸±à¸à¸ªà¹à¸</div> 131 <div class="price" :realpricex="cart.price.shipping"> 132 <div class="real">+ <span class="num">{{ amount_format(cart.price.shipping) }}</span> à¸à¸²à¸</div> 133 <div class="estimate"></div> 134 </div> 135 </div> 136 </div> 137 </div> 138 <div v-else class="shiptypeArea" 139 :class="{chosen: (show_only_shiptype_chosen && (shipping_type_list.length > 1))}"> 140 <div class="checkoutHeader"> 141 <h2>à¹à¸¥à¸·à¸à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸²</h2> 142 </div> 143 <div class="shiptypeChoice"> 144 <label v-for="stype in shipping_type_list" :key="stype.id" class="shiptype" 145 :class="{checked:(cart.shipping_type_id==stype.id)}"> 146 <div class="detail"><input type="radio" name="shipping_type" 147 :value="stype.id" 148 v-model="choose_shipping_type_id"/> {{ stype.name?stype.name:type_txt[stype.type] }} 149 <div class="sub_detail"> 150 <div class="shipping_custom" v-if="stype.description">{{stype.description}}</div> 151 <div class="shipping_delivery" v-if="stype.delivery_area">{{stype.delivery_area}}</div> 152 <div v-if="stype.period" 153 class="receive_time"> {{ 154 stype.period }} 155 </div> 156 <div class="shipping_company" 157 v-if="stype.provider && stype.provider.length > 0"> 158 <span 159 v-for="provider in stype.provider"><span 160 :class="provider"></span></span> 161 <span class="info" v-if="stype.provider.length>1" 162 @mouseover="shiptype_over(stype)" 163 @mouseleave="shiptype_leave(stype)">?</span> 164 <div class="description" v-if="stype.provider.length>1" 165 :style="{display:(stype_info_hover==stype.id?'block':'none')}"> 166 à¸à¸²à¸à¸£à¹à¸²à¸à¸à¸°à¹à¸¥à¸·à¸à¸à¸à¹à¸à¸à¸à¸²à¸à¸à¸µà¹à¹à¸«à¸¡à¸²à¸°à¸ªà¸¡à¸à¸µà¹à¸ªà¸¸à¸ 167 </div> 168 </div> 169 <div v-if="stype.cod_flag" class="shipping_tag tag_cod">à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸à¸¥à¸²à¸¢à¸à¸²à¸ (COD)</div> 170 </div> 171 </div> 172 <div class="text">à¸à¹à¸²à¸à¸±à¸à¸ªà¹à¸</div> 173 <div v-if="stype.price===false" class="price" realpricex=""> 174 <div class="real">+ <span class="num">x</span> à¸à¸²à¸</div> 175 <div class="estimate"></div> 176 </div> 177 <div v-else class="price" :realpricex="stype.price"> 178 <div class="full" v-if="stype.full_price" 179 style="text-decoration:line-through;color: #aaa;">+ <span class="num">{{ amount_format(stype.full_price) }}</span> à¸à¸²à¸ </div> 180 <div class="real minor" v-if="stype.format=='custom'">-</div> 181 <div class="real" v-else>+ <span 182 class="num">{{ amount_format(stype.price) }}</span> à¸à¸²à¸ </div> 183 <div class="estimate"></div> 184 </div> 185 </label> 186 <div class="change-shiptypeChoice" v-show="show_only_shiptype_chosen" 187 @click="show_only_shiptype_chosen=0">à¹à¸à¸¥à¸µà¹à¸¢à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸</div> 188 </div> 189 <div v-if="(shipping_type_list.length==0) && (cart.shipping_types_rank.length==0)" class="noshipping_text">รà¹à¸²à¸à¸à¹à¸²à¸à¸µà¹à¸¢à¸±à¸à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸«à¸à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸² à¸à¸³à¹à¸«à¹à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¹à¸à¹ à¸à¸£à¸¸à¸à¸² <a href="https://www.lungthong.com/contactus">à¸à¸´à¸à¸à¹à¸à¸à¸±à¸à¸à¸²à¸à¸£à¹à¸²à¸</a></div> 190 <div v-else-if="(shipping_type_list.length==0)" class="noshipping_text">à¹à¸¡à¹à¸¡à¸µà¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸µà¹à¸à¸£à¸à¸à¸²à¸¡à¹à¸à¸·à¹à¸à¸à¹à¸ à¸à¸³à¹à¸«à¹à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¹à¸à¹ à¸à¸£à¸¸à¸à¸² <a href="https://www.lungthong.com/contactus">à¸à¸´à¸à¸à¹à¸à¸à¸±à¸à¸à¸²à¸à¸£à¹à¸²à¸</a></div> 191 </div> 192 </template> 193 <div class="detailArea"> 194 <div class="title"> 195 <div class="text">à¹à¸à¸´à¹à¸¡à¹à¸à¸´à¸¡à¸à¸¶à¸à¸£à¹à¸²à¸à¸à¹à¸²</div> 196 <div class="optional">(à¹à¸§à¹à¸à¸§à¹à¸²à¸à¹à¸à¹)</div> 197 </div> 198 <div class="body"><textarea class="input" name="detail" v-model="cart.detail" 199 @change="save_detail"></textarea></div> 200 </div> 201 <div class="netArea"> 202 <div class="text">รวมราà¸à¸²à¸à¸±à¹à¸à¸«à¸¡à¸</div> 203 <div class="amount" :realpricex="cart.shipping_type_id?cart.price.pay:'-'"> 204 <div class="real"><span v-if="cart.is_no_shipping || cart.is_product_no_shipping_type || cart.shipping_type_id" class="num">{{ amount_format(cart.price.pay) }}</span><span v-else class="name"><span class="shipping_type_0">*à¸à¸£à¸¸à¸à¸²à¹à¸¥à¸·à¸à¸à¸§à¸´à¸à¸µà¸à¸±à¸à¸ªà¹à¸</span></span> à¸à¸²à¸</div> 205 <div class="estimate"></div> 206 </div> 207 </div> 208 </div> 209 <div id="checkoutNextBar" class="cartButtons"> 210 <div class="alignLeft"> 211 <a class="cartBack" href="https://www.lungthong.com/category"><i 212 class="icon"></i><span class="text">à¹à¸¥à¸·à¸à¸à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸´à¹à¸¡</span></a> </div> 213 <div class="alignRight"> 214 <ul class="b-checkout LBUTTON" btype="button" @click="checkout"> 215 <li class="buttonLeft"></li> 216 <li class="buttonCenter buttonText">สัà¹à¸à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²</li> 217 <li class="buttonRight"></li> 218 </ul> 219 </div> 220 </div> 221 </div> 222 </div> 223
223<script type="text/javascript"> 224 var $cartZone; 225 var price_decimal = 2; 226 227 function amount_format(num) { 228 return number_format(num, price_decimal); 229 } 230 231 function lnw_number_format(num) { 232 var floor_num = Math.floor(num); 233 if ((num - floor_num) > 0) { 234 return number_format(num, 2); 235 } 236 return number_format(num, 0); 237 } 238 239 function error_message(err) { 240 if (err.key) { 241 switch (err.key) { 242 case 'NOPRODUCT': 243 case 'HIDDEN': 244 case 'NOSELL': 245 return 'à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¹à¸²à¸à¸à¸´à¸à¸à¸µà¹ หรืà¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸à¸´à¸à¸à¸µà¹à¹à¸¡à¹à¸à¸²à¸¢'; 246 case 'NOSTOCK': 247 var html = 'สิà¸à¸à¹à¸²à¸à¸µà¹à¹à¸«à¸¥à¸·à¸à¹à¸à¸µà¸¢à¸ %d à¸à¸´à¹à¸ à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¹à¸à¹'; 248 return html.replace(/%d/, err.remain); 249 case 'BUY-WEB_CORRUPTION': 250 return 'à¸à¸à¸à¸ ัย à¸à¸à¸°à¸à¸µà¹à¸£à¸°à¸à¸à¹à¸à¸à¸£à¸°à¸à¸±à¸ à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¹'; 251 case 'INVALID_POINT': 252 return 'à¸à¸£à¸¸à¸à¸²à¸à¸£à¸à¸à¸à¸±à¸§à¹à¸¥à¸à¹à¸à¸·à¹à¸à¹à¸à¹à¸à¸°à¹à¸à¸à¸ªà¸°à¸ªà¸¡ LnwPoints'; 253 case 'USE>POINT': 254 return 'à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¸à¸°à¹à¸à¸à¸ªà¸°à¸ªà¸¡ LnwPoints à¹à¸à¸´à¸à¸à¸§à¹à¸²à¸à¸°à¹à¸à¸à¸à¸µà¹à¸à¸¸à¸à¸¡à¸µà¹à¸à¹'; 255 case 'POINT>NET': 256 return 'à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¸à¸°à¹à¸à¸à¸ªà¸°à¸ªà¸¡ LnwPoints มาà¸à¸à¸§à¹à¸²à¸£à¸²à¸à¸²à¸£à¸§à¸¡à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¹'; 257 case 'BUY-LNWPAY_ANTI-MONEY_LAUNDERING': 258 return 'ระà¸à¸à¹à¸¡à¹à¸à¸à¸¸à¸à¸²à¸à¸´à¹à¸«à¹à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²à¸£à¸²à¸à¸²à¸£à¸§à¸¡à¹à¸à¸´à¸ 30,000 à¸à¸²à¸à¸à¹à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¹à¸à¹'; 259 case 'PERMISSION_DENIED': 260 return 'à¸à¸¸à¸à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¸´à¹à¸à¹à¸à¸²à¸à¸à¸¹à¸à¸à¸à¸à¸µà¹'; 261 case 'BELOW_QUANTITY': 262 return __lnw__.show_lang('CART-PRODUCT-BELOW_QUANTITY', err.limit, err.unit); 263 case 'OVER_QUANTITY': 264 return __lnw__.show_lang('CART-PRODUCT-OVER_QUANTITY', err.limit, err.unit); 265 case 'ACCOUNT_LIMIT_REQUIRED_LOGIN': 266 return __lnw__.show_lang('CART-PRODUCT-ACCOUNT_LIMIT_REQUIRED_LOGIN'); 267 case 'OVER_QUANTITY_ACCOUNT_ORDERED': 268 return __lnw__.show_lang('CART-PRODUCT-OVER_QUANTITY_ACCOUNT_ORDERED', err.limit, err.unit, err.ordered, err.unit); 269 case 'OVER_QUANTITY_ACCOUNT': 270 return __lnw__.show_lang('CART-PRODUCT-OVER_QUANTITY_ACCOUNT', err.limit, err.unit); 271 case 'OVER_QUANTITY_DAILY_ACCOUNT_ORDERED': 272 return __lnw__.show_lang('CART-PRODUCT-OVER_QUANTITY_DAILY_ACCOUNT_ORDERED', err.limit, err.unit, err.ordered, err.unit); 273 case 'OVER_QUANTITY_DAILY_ACCOUNT': 274 return __lnw__.show_lang('CART-PRODUCT-OVER_QUANTITY_DAILY_ACCOUNT', err.limit, err.unit); 275 default: 276 var xxx = __lnw__.show_lang(err.key); 277 return xxx; 278 } 279 } 280 return 'มีà¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸à¹à¸à¸´à¸à¸à¸¶à¹à¸'; 281 } 282 283 var cartvm = null; 284 var cart_components = {}; 285 cart_components['product-item'] = { 286 props: ['item'], 287 data: function() { 288 return { 289 new_quantity: null, 290 new_detail: null, 291 edit_detail: 0, 292 wait_save_quantity: false 293 } 294 }, 295 watch: { 296 cart_loader: function(newValue, oldValue) { 297 if(this.wait_save_quantity) { 298 this.save_quantity(); 299 } 300 }, 301 'item.quantity': function(newValue, oldValue) { 302 if(newValue == this.new_quantity) { 303 this.new_quantity = null; 304 } else { 305 this.save_quantity(); 306 } 307 }, 308 'item.detail': function(newValue, oldValue) { 309 if(newValue == this.new_detail) { 310 this.new_detail = null; 311 } else { 312 this.save_detail(); 313 } 314 } 315 }, 316 computed: { 317 cart: function() { 318 return this.$store.state.cart; 319 }, 320 quantity_value: { 321 get: function() { 322 if(this.new_quantity !== null) { 323 return this.new_quantity; 324 } 325 return this.item.quantity 326 }, 327 set: function(newValue) { 328 if(this.item.quantity == newValue) { 329 this.new_quantity = null; 330 } else { 331 this.new_quantity = newValue; 332 this.save_quantity(); 333 } 334 } 335 } 336 }, 337 methods: { 338 quantity_inc: function () { 339 this.quantity_value = this.quantity_value+1; 340 }, 341 quantity_dec: function () { 342 if(this.quantity_value <= 1) { 343 } else { 344 this.quantity_value = this.quantity_value - 1; 345 } 346 }, 347 save_quantity: function() { 348 var that = this; 349 if(this.wait_save_quantity) { 350 clearTimeout(this.wait_save_quantity); 351 } 352 this.wait_save_quantity = setTimeout(function() { 353 that.save_quantity_action(); 354 },1000); 355 }, 356 save_quantity_action: function () { 357 if(this.new_quantity === null) { 358 return; 359 } 360 var val = parseNumber(this.new_quantity); 361 val = parseNumber(val); 362 if(isNaN(val) || val < 1) { 363 return; 364 } 365 if(this.cart_loader) { 366 this.wait_save_quantity = true; 367 return; 368 } 369 var item = this.item; 370 var ajaxdata = {}; 371 372 ajaxdata.action = 'changeProductQuantity'; 373 ajaxdata.items = [ 374 { 375 iid: item.iid, 376 spec: item.spec, 377 quantity: val 378 } 379 ]; 380 381 var onSuccess = void (0); 382 383 if(item.spec.type == 'product') { 384 // Google Analytics Enhanced Ecommerce (event: add/remove cart | edit number of product item in carts) 385 if (typeof gtag !== "undefined" && typeof GA_send_to
385=== 'string' && GA_send_to.length > 0) { 386 if (typeof item.quantity !== 'undefined') { 387 var diff = val - item.quantity; 388 var event_name = null; 389 if (diff < 0) 390 event_name = 'remove_from_cart'; 391 else 392 event_name = 'add_to_cart'; 393 if (event_name) { 394 var qty = Math.abs(diff); 395 onSuccess = function () { 396 gtag('event', event_name, { 397 'send_to': GA_send_to, 398 "items": [ 399 { 400 "id": item.spec.product_id, 401 "name": item.name, 402 "category": typeof item.category !== 'undefined' ? item.category : null, 403 "quantity": qty, 404 "price": qty * item.unit_price 405 } 406 ] 407 }); 408 } 409 } 410 } 411 } 412 } 413 this.$store.dispatch('save_func', { 414 ajaxdata: ajaxdata, 415 item: item, 416 onSuccess: onSuccess 417 }); 418 }, 419 save_detail: function () { 420 var that = this; 421 var item = this.item; 422 var ajaxdata = {}; 423 424 ajaxdata.action = 'updateProductRemark'; 425 ajaxdata.items = [ 426 { 427 iid: item.iid, 428 spec: item.spec, 429 detail: this.new_detail 430 } 431 ]; 432 this.edit_detail = 0; 433 this.$store.dispatch('save_func', { 434 ajaxdata: ajaxdata 435 }); 436 }, 437 remove_detail: function () { 438 this.new_detail = ''; 439 this.save_detail(); 440 }, 441 start_edit_detail: function () { 442 this.new_detail = this.item.detail; 443 this.edit_detail = 2; 444 }, 445 start_add_detail: function (item) { 446 this.edit_detail = 1; 447 }, 448 remove_item: function () { 449 var that = this; 450 var item = this.item; 451 __lnw__.simpleConfirm('ยืà¸à¸¢à¸±à¸à¸à¸²à¸£à¸¥à¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸µà¹à¸à¸à¸à¸à¸²à¸à¸à¸°à¸à¸£à¹à¸²', 452 function() { 453 var ajaxdata = {}; 454 ajaxdata.action = 'changeProductQuantity'; 455 456 ajaxdata.items = [ 457 { 458 iid: item.iid, 459 spec: item.spec, 460 quantity: 0 461 } 462 ]; 463 464 var onSuccess = void (0); 465 466 if(item.spec.type == 'product') { 467 // Google Analytics Enhanced Ecommerce (event: remove_from_cart) 468 if (typeof gtag !== "undefined" && typeof GA_send_to === 'string' && GA_send_to.length > 0) { 469 onSuccess = function () { 470 gtag('event', 'remove_from_cart', { 471 'send_to': GA_send_to, 472 "items": [ 473 { 474 "id": item.spec.product_id, 475 "name": item.name, 476 "category": typeof item.category !== 'undefined' ? item.category : null, 477 "quantity": item.quantity, 478 "price": item.total_price 479 } 480 ] 481 }); 482 } 483 } 484 } 485 486 that.$store.dispatch('save_func', { 487 ajaxdata: ajaxdata, 488 onSuccess: onSuccess 489 }); 490 } 491 ); 492 }, 493 }, 494 template: `<div class="product"> 495 <div class="image"> 496 <img :src="item.thumbnail"/> 497 </div> 498 <div class="data"> 499 <div class="name" v-if="item.parent_id > 0"><a :href="item.url">{{ 500 item.parent_name }}<br/> ↳ {{ item.sku_name }}</a></div> 501 <div class="name" v-else><a :href="item.url">{{ item.name }}</a></div> 502 <div class="price" :realpricex="item.unit_price"> 503 <div class="mobileBeforeText">ราà¸à¸²à¸à¹à¸à¸à¸´à¹à¸</div> 504 <div class="real"><span 505 class="num">{{ amount_format(item.unit_price) }}</span> à¸à¸²à¸</div> 506 <div class="estimate"></div> 507 </div> 508 <div class="quantity"> 509 <div class="mobileBeforeText">à¸à¸³à¸à¸§à¸</div> 510 <div v-if="cart.lock" class="uneditable"><span class="num" v-text="amount_format(item.quantity)"></span></div> 511 <div v-else class="editable"> 512 <div class="increase" @click="quantity_inc">+</div> 513 <div class="decrease" @click="quantity_dec">-</div> 514 <div class="box"><input type="text" class="input" v-model="quantity_value" /></div> 515 </div> 516 </div> 517 <div class="amount" :realpricex="item.total_price"> 518 <div class="mobileBeforeText">ราà¸à¸²à¸£à¸§à¸¡</div> 519 <div class="real"><span 520 class="num">{{ amount_format(item.total_price) }}</span> à¸à¸²à¸ </div> 521 <div class="estimate"></div> 522 </div> 523 </div> 524 <div class="error"> 525 <div v-for="error in item.errors"> 526 {{ error_message(error) }} 527 </div> 528 </div> 529 <div class="other"> 530 <div v-if="item.promotions && (item.promotions.length > 0)" class="promotion">สิà¸à¸à¹à¸²à¹à¸à¹à¸²à¸£à¹à¸§à¸¡à¹à¸à¸£à¹à¸¡à¸à¸±à¹à¸ {{ 531 item.promotions.join(', ') }} 532 </div> 533 <div v-else-if="item.promotion" class="promotion">สิà¸à¸à¹à¸²à¹à¸à¹à¸²à¸£à¹à¸§à¸¡à¹à¸à¸£à¹à¸¡à¸à¸±à¹à¸ {{ 534 item.promotion.join(', ') }} 535 </div> 536 <div class="note"> 537 <div v-if="edit_detail"> 538 <input type="text" class="pdetail" v-model="new_detail"> 539 <button type="button" class="btn-submit" @click="save_detail">{{ 540 (edit_detail==2)?'à¸à¸£à¸±à¸à¸à¸£à¸¸à¸ ':'à¹à¸à¸´à¹à¸¡'}} 541 </button> 542 <button type="button" class="btn-reset" @click="remove_detail">{{ 543 (edit_detail==2)?'ลภ':'ยà¸à¹à¸¥à¸´à¸'}} 544 </button> 545 </div> 546 <div v-else-if="(new_detail == null) && item.detail"><strong>หมายà¹à¸«à¸à¸¸</strong> <span 547 class="body">{{ item.detail }}</span> <a class="edit" @click="start_edit_detail">✎ à¹à¸à¹à¹à¸</a> 548 </div> 549 <div v-else-if="new_detail"><strong>หมายà¹à¸«à¸à¸¸</strong> <span 550 class="body">{{ new_detail }}</span> <a class="edit" @click="start_edit_detail">✎ à¹à¸à¹à¹à¸</a> 551 </div> 552 <div v-else><a class="add" 553 @click="start_add_detail">à¹à¸à¸´à¹à¸¡à¸«à¸¡à¸²à¸¢à¹à¸«à¸à¸¸</a> 554 </div> 555 </div> 556 <div v-if="!cart.lock" class="control"><a class="remove" 557 @click="remove_item">ลà¸à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸µà¹</a> 558 </div> 559 </div> 560 </div>` 561 } 562 document.addEventListener("DOMContentLoaded", function () { 563 Vue.use(Vuex); 564 cart_store = new Vuex.Store({ 565 state: function() { 566 var ret = { 567 cart: null, 568 shop: null, 569 cart_loader: false, 570 }; 571 return ret; 572 }, 573 getters: { 574 }, 575 mutations: { 576 }, 577 actions: { 578 save_func: function(context, payload) { 579 var state = context.state; 580 if (state.cart_loader) { 581 //return false;
582 } 583 state.cart_loader = true; 584 var xhr = json_post({ 585 method: 'PUT', 586 url: front_url('api/lnwme/cart/cookie')+'?ddd=full', 587 data: payload.ajaxdata, 588 success: function(response) { 589 if(response.error) { 590 var msgs = []; 591 var x_msgs = {}; 592 var error_messages = response.error_messages; 593 if(typeof error_messages == 'string') { 594 error_messages = [{ 595 key: error_messages 596 }] 597 } 598 599 if (typeof payload.item !== 'undefined') { 600 Vue.set(payload.item,'errors', error_messages); 601 } else { 602 var error_txts = []; 603 error_messages.forEach(function(err_msg) { 604 error_txts.push(error_message(err_msg)); 605 }); 606 __lnw__.simpleAlert(error_txts); 607 } 608 } 609 if(response.cart) { 610 Vue.set(state,'cart', response.cart); 611 612 $('.cart_num').html(state.cart.num); 613 $('.cart_price').html(state.cart.price.product).attr('realprice', state.cart.price.product); 614 if (typeof __lnw__ == 'object' && __lnw__.gointer.is_enabled()) { 615 __lnw__.gointer.reload_convert_currency(); 616 } 617 $('.cart_quantity').html(state.cart.quantity); 618 } 619 // Google Analytics Enhanced Ecommerce 620 if (typeof payload.onSuccess == 'function') { 621 try { 622 payload.onSuccess.call(); 623 } catch (e) { 624 } 625 ; 626 } 627 }, 628 error: function(rkey, rdata) { 629 __lnw__.simpleAlert(rkey); 630 console.info(rdata); 631 }, 632 complete: function() { 633 state.cart_loader = false;
634 } 635 }); 636 }, 637 load_init: function(context) { 638 var state = context.state; 639 state.cart_loader = true; 640 var xhr = json_post({ 641 url: front_url('api/lnwme/cart/cookie')+'?ddd=init', 642 data: {}, 643 success: function(response) { 644 if(response.error) { 645 var msgs = []; 646 var x_msgs = {}; 647 var error_messages = response.error_messages; 648 if(typeof error_messages == 'string') { 649 error_messages = [{ 650 key: error_messages 651 }] 652 } 653 654 var error_txts = []; 655 error_messages.forEach(function(err_msg) { 656 error_txts.push(error_message(err_msg)); 657 }); 658 __lnw__.simpleAlert(error_txts); 659 } 660 Vue.set(state,'cart', response.cart); 661 Vue.set(state,'shop', response.shop); 662 win_resize(); 663 }, 664 error: function(rkey, rdata) { 665 __lnw__.simpleAlert(rkey); 666 console.info(rdata); 667 }, 668 complete: function() { 669 state.cart_loader = false;
670 } 671 }); 672 } 673 } 674 }); 675 cartvm = new Vue({ 676 el: '#lnw_cartArea', 677 store: cart_store, 678 components: cart_components, 679 data: function () { 680 return { 681 type_txt: { 682 normal: 'à¸à¸±à¸ªà¸à¸¸à¸à¸£à¸£à¸¡à¸à¸²', 683 register: 'à¸à¸±à¸ªà¸à¸¸à¸¥à¸à¸à¸°à¹à¸à¸µà¸¢à¸', 684 ems: 'à¸à¸±à¸ªà¸à¸¸à¸à¹à¸§à¸à¸à¸´à¹à¸¨à¸©', 685 custom: 'à¸à¸³à¸«à¸à¸à¹à¸à¸' 686 }, shipping_country_selected: 1, 687 show_only_shiptype_chosen: 0, 688 coupon_code_value: '', 689 view_mycoupons: 0, 690 choose_coupon_id: null, 691 choose_shipping_type_id: null, 692 lang_text_time: 0, 693 stype_info_hover: 0 694 } 695 }, 696 watch: { 697 choose_shipping_type_id: function (val) { 698 var ajaxdata = {}; 699 if (typeof this.cart.shipping_types[val] == 'undefined' || !this.shiptype_show(this.cart.shipping_types[val])) { 700 ajaxdata.action = 'cancelShippingMethod'; 701 this.$store.dispatch('save_func', { 702 ajaxdata: ajaxdata 703 }); 704 this.show_only_shiptype_chosen = 0; 705 } else { 706 var onSuccess = void(0); 707 // Google Analytics Enhanced Ecommerce (event: set_checkout_option) 708 if (typeof this.cart.shipping_types[val].name !== 'undefined') { 709 if (typeof gtag !== "undefined" && typeof GA_send_to === 'string' && GA_send_to.length > 0) { 710 var shipping_type_name = this.cart.shipping_types[val].name; 711 712 onSuccess = function () { 713 gtag('event', 'set_checkout_option', { 714 'send_to': GA_send_to, 715 'checkout_step': 1, 716 'checkout_option': 'shipping method', 717 'value': shipping_type_name 718 }); 719 }; 720 } 721 } 722 ajaxdata.action = 'saveShippingMethod'; 723 ajaxdata.shipping_type_id = val; 724 this.$store.dispatch('save_func', { 725 ajaxdata: ajaxdata, 726 onSuccess: onSuccess 727 }); 728 this.show_only_shiptype_chosen = 1; 729 } 730 } 731 }, 732 updated: function () { 733 if (typeof __lnw__ == 'object' && __lnw__.gointer.is_enabled()) { 734 __lnw__.gointer.reload_convert_currency(); 735 } 736 }, 737 computed: { 738 cart_loader: function() { 739 return (this.$store.state.cart_loader); 740 }, 741 cart: function() { 742 return this.$store.state.cart; 743 }, 744 shop: function() { 745 return this.$store.state.shop; 746 }, 747 shipping_type_list: function () { 748 var shipping_types = this.cart.shipping_types; 749 var stype_list = new Array(); 750 var that = this; 751 this.cart.shipping_types_rank.forEach(function (stype_id) { 752 var stype = shipping_types[stype_id]; 753 stype.info_hover = false; 754 if(!stype.is_lnwshop_ignore && that.shiptype_show(stype)) { 755 stype_list.push(stype); 756 } 757 }); 758 return stype_list; 759 }, 760 checkweight: function () { 761 return false;
762 var xxx = false; 763 $.each(this.cart.shipping_types, function (stype_id, stype) { 764 if (stype.format == 'weight') { 765 xxx = true; 766 } 767 }) 768 return xxx; 769 }, 770 cart_prepare_day: function () { 771 var max_prepare_day = 0; 772 this.cart.items.forEach(function(item) { 773 var day = item.prepare_duration; 774 if (day != '') { 775 day = parseInt(day); 776 if (day > max_prepare_day) { 777 max_prepare_day = day; 778 } 779 } 780 }); 781 return max_prepare_day; 782 }, 783gtag_cart_items: function () { 784var payload_items = []; 785this.cart.items.forEach(function(item) { 786if(item.spec.type != 'product') { 787return; 788} 789payload_item = {}; 790payload_item.id = item.spec.product_id; 791payload_item.name = item.name; 792if (typeof item.category !== 'undefined') 793payload_item.category = item.category; 794payload_item.quantity = item.quantity; 795payload_item.price = item.total_price; 796payload_items.push(payload_item); 797}) 798return payload_items; 799}, 800 gtag_cart_coupon: function () { 801 var coupon = ''; 802 803 if (typeof this.cart.coupons === 'object') { 804 for (var i in this.cart.coupons) { 805 if (typeof this.cart.coupons[i].config === 'object') { 806 if (typeof this.cart.coupons[i].config.name !== 'undefined') { 807 if (coupon.length > 0) 808 coupon += ', '; 809 coupon += this.cart.coupons[i].config.name; 810 } 811 } 812 } 813 } 814 815 return coupon; 816 }, 817 my_lnwpoints: function() { 818 var points = 0; 819 if ((typeof lnw_store != 'undefined') && (typeof lnw_store.state.user != 'undefined') && (lnw_store.state.user.point != null)) { 820 points = lnw_store.state.user.point.available_balance; 821 } 822 return points; 823 } 824 }, 825 methods: { 826 update_lang: function () { 827 this.lang_text_time = new Date().getTime(); 828 }, 829 show_lang: function () { 830 var xxx = this.lang_text_time; 831 return __lnw__.show_lang.apply(this, arguments); 832 }, 833 shiptype_show: function (stype) { 834 return (stype.price !== false); 835 }, 836 shiptype_over: function (stype) { 837 this.stype_info_hover = stype.id; 838 }, 839 shiptype_leave: function (stype) { 840 this.stype_info_hover = 0; 841 }, 842 error_message: function (err) { 843 return error_message(err); 844 }, 845 use_coupon_code: function () { 846 var ajaxdata = {}; 847 ajaxdata.action = 'setCouponCode'; 848 ajaxdata.coupon_code = this.coupon_code_value.trim(); 849 if (ajaxdata.coupon_code == '') { 850 return; 851 } 852 853 this.$store.dispatch('save_func', { 854 ajaxdata: ajaxdata, 855 }); 856 }, 857 use_coupon_id: function (id) { 858 var ajaxdata = {}; 859 ajaxdata.action = 'setCouponId'; 860 ajaxdata.coupon_id = id; 861 this.$store.dispatch('save_func', { 862 ajaxdata: ajaxdata, 863 }); 864 this.view_mycoupons = 0; 865 }, 866 cancel_use_coupon: function (coupon_id) { 867 var coupon_code = null; 868 if (typeof this.cart.coupons === 'object'){ 869 var coupon = this.cart.coupons.filter(obj => { 870 return obj.id === coupon_id 871 }); 872 if(coupon.length > 0) { 873 coupon_code = coupon[0].code; 874 }else { 875 return false;
876 } 877 }else if (typeof this.cart.coupons[coupon_id] == 'undefined') { 878 return false; 879 }else{ 880 coupon_code = this.cart.coupons[coupon_id].code; 881 } 882 if (coupon_code) { 883 var ajaxdata = {}; 884 ajaxdata.action = 'removeCouponCode'; 885 ajaxdata.coupon_code = coupon_code; 886 this.$store.dispatch('save_func', { 887 ajaxdata: ajaxdata, 888 }); 889 } else { 890 var ajaxdata = {}; 891 ajaxdata.action = 'removeCouponId'; 892 ajaxdata.coupon_id = coupon_id; 893 this.$store.dispatch('save_func', { 894 ajaxdata: ajaxdata, 895 }); 896 } 897 this.choose_coupon_id = null 898 }, 899 save_detail: function () { 900 var ajaxdata = {}; 901 ajaxdata.action = 'saveOrderMeta'; 902 ajaxdata.detail = this.cart.detail; 903 this.$store.dispatch('save_func', { 904 ajaxdata: ajaxdata 905 }); 906 }, 907 reset_cart: function () { 908 var ajaxdata = {}; 909 ajaxdata.action = 'resetCart'; 910 911 var onSuccess = void (0); 912 913 // Google Analytics Enhanced Ecommerce (event: remove_from_cart) 914 if (typeof gtag !== "undefined" && typeof GA_send_to === 'string' && GA_send_to.length > 0) { 915 var payload_items = this.gtag_cart_items; 916 onSuccess = function () { 917 gtag('event', 'remove_from_cart', { 918 'send_to': GA_send_to, 919 "items": payload_items 920 }); 921 } 922 } 923 924 this.$store.dispatch('save_func', { 925 ajaxdata: ajaxdata, 926 onSuccess: onSuccess 927 }); 928 }, 929 set_lnwpoint: function (point) { 930 var ajaxdata = {}; 931 ajaxdata.action = 'setRedeemLnwPoint'; 932 ajaxdata.lnwpoint = point; 933 this.$store.dispatch('save_func', { 934 ajaxdata: ajaxdata, 935 }); 936 }, 937 use_lnwpoint: function () { 938 var point = this.cart.lnwpoint; 939 if (((typeof lnw_store == 'undefined') || (typeof lnw_store.state.user == 'undefined') || (typeof lnw_store.state.user.point == null))) { 940 __lnw__.simpleAlert('à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸¶à¸à¸à¸°à¹à¸à¸à¸ªà¸°à¸ªà¸¡ LnwPoints à¹à¸à¹'); 941 this.cart.lnwpoint = 0; 942 } else { 943 var my_points = this.my_lnwpoints; 944 if (point > my_points) { 945 __lnw__.simpleAlert('à¸à¸¸à¸à¹à¸à¹à¸à¸°à¹à¸à¸à¸ªà¸°à¸ªà¸¡ LnwPoints มาà¸à¸à¸§à¹à¸²à¸à¸µà¹à¸¡à¸µ'); 946 this.cart.lnwpoint = 0; 947 } else { 948 this.set_lnwpoint(point); 949 } 950 } 951 }, 952 cancel_lnwpoint: function () { 953 this.set_lnwpoint(0); 954 }, 955 checkout: function (event) { 956 var that = this; 957 if(this.cart.is_no_shipping) { 958 959 } else if(this.cart.is_product_no_shipping_type) { 960 961 } else if (typeof this.cart.shipping_types[this.cart.shipping_type_id] == 'undefined' || !this.shiptype_show(this.cart.shipping_types[this.cart.shipping_type_id])) { 962 __lnw__.simpleAlert('à¸à¸£à¸¸à¸à¸²à¹à¸¥à¸·à¸à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸'); 963 return false;
964 } 965 var ele = $(event.target).closest('b-checkout'); 966 var ajaxdata = {}; 967 $.lnwajax.run('goto_checkout', true, { 968 type: 'POST', 969 url: 'https' + '://' + 'www.lungthong.com/checkout/start', 970 data: ajaxdata, 971 dataType: 'json', 972 start: function () { 973 button_wait(ele); 974 }, 975 success: function (response) { 976 lnwajax_response(response, function (rdata) { 977 var delay = 0; 978 if(window.lnwOpenai && rdata.openai_event && window.lnwOpenai.track(rdata.openai_event)) { 979 delay = 1000; 980 } 981 982 if (typeof rdata.fbq_params != 'undefined' && typeof fbq == 'function') { 983 fbq('track', 'InitiateCheckout', rdata.fbq_params); 984 delay = 1000; 985 } 986 987 // Google Analytics Enhanced Ecommerce (event: begin_checkout) 988 if (typeof gtag !== "undefined" && typeof GA_send_to === 'string' && GA_send_to.length > 0) { 989 var payload_gtag = {}; 990 payload_gtag.send_to = GA_send_to; 991 payload_gtag.items = that.gtag_cart_items; 992 993 var coupon = that.gtag_cart_coupon; 994 if (typeof coupon === 'string' && coupon.length > 0) 995 payload_gtag.coupon = coupon; 996 else { 997 console.log(coupon); 998 } 999 1000 payload_gtag.checkout_step = 1; 1001 1002 gtag('event', 'begin_checkout', payload_gtag); 1003 1004 delay = 1000; 1005 } 1006 1007 if (typeof rdata.url != 'undefined') { 1008 setTimeout(function () { 1009 window.location.href = rdata.url; 1010 }, delay); 1011 } 1012 1013 }
1013, function (rkey, rdata) { 1014 button_normal(ele); 1015 switch (rkey) { 1016 case 'BUY-ITEM_SOLDOUT': 1017 __lnw__.simpleAlert('à¸à¸à¸à¸ ัย สิà¸à¸à¹à¸²à¸à¸²à¸à¸à¸¢à¹à¸²à¸à¹à¸à¸à¸°à¸à¸£à¹à¸²à¹à¸«à¸¥à¸·à¸à¹à¸¡à¹à¹à¸à¸µà¸¢à¸à¸à¸'); 1018 //window.location.href='https://www.lungthong.com/cart'; 1019 break; 1020 case 'BUY-NO_ITEM': 1021 __lnw__.simpleAlert('à¸à¸à¸à¸ ัย à¸à¸à¸°à¸à¸µà¹à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸à¸°à¸à¸£à¹à¸²'); 1022 break; 1023 case 'BUY-EMPTY_SHIPPINGTYPE': 1024 __lnw__.simpleAlert('à¸à¸£à¸¸à¸à¸²à¹à¸¥à¸·à¸à¸à¸§à¸´à¸à¸µà¸à¸²à¸£à¸à¸±à¸à¸ªà¹à¸'); 1025 break; 1026 case 'BUY-ORDER_LIMIT': 1027 case 'BUY-ORDER_LIMIT_MIN_PRICE': 1028 case 'BUY-ORDER_LIMIT_MAX_PRICE': 1029 case 'BUY-OVER_TOTAL_QUANTITY': 1030 case 'BUY-OVER_ORDER_QUANTITY': 1031 __lnw__.simpleAlert(__lnw__.show_lang(rkey, rdata)); 1032 break; 1033 case 'BUY-MUST_LOGIN': 1034 case 'BUY-USER_NO_MOBILE': 1035 __lnw__.simpleAlert(__lnw__.show_lang(rkey, rdata)); 1036 break; 1037 case 'BUY-LNWPAY_ANTI-MONEY_LAUNDERING': 1038 __lnw__.simpleAlert('ระà¸à¸à¹à¸¡à¹à¸à¸à¸¸à¸à¸²à¸à¸´à¹à¸«à¹à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²à¸£à¸²à¸à¸²à¸£à¸§à¸¡à¹à¸à¸´à¸ 30,000 à¸à¸²à¸à¸à¹à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¹à¸à¹'); 1039 break; 1040 default: 1041 __lnw__.simpleAlert('à¸à¸à¸à¸ ัย à¸à¸à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸à¸à¸²à¸à¸à¸¢à¹à¸²à¸ à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£à¸à¹à¸à¹à¸à¹'); 1042 break; 1043 } 1044 }); 1045 } 1046 }); 1047 } 1048 }, 1049 mounted: function() { 1050 this.$store.dispatch('load_init'); 1051 } 1052 }); 1053 __lnw__.bind_lang_save(function () { 1054 cartvm.update_lang(); 1055 }); 1056 nextbar_init(); 1057 }); 1058 var win_height, nextbar_hover_flag = 0, topLine, barheight; 1059 1060 function nextbar_scroll_event(ele) { 1061 var scrollTop = $(ele).scrollTop(); 1062 if (scrollTop < topLine) { 1063 if (!nextbar_hover_flag) { 1064 $('.checkoutBody').addClass('showNextBar'); 1065 nextbar_hover_flag = true; 1066 $('.cartZone').css({marginBottom: barheight + 'px'}); 1067 } 1068 } else { 1069 if (nextbar_hover_flag) { 1070 $('.checkoutBody').removeClass('showNextBar'); 1071 nextbar_hover_flag = false; 1072 $('.cartZone').css({marginBottom: 0}); 1073 } 1074 } 1075 } 1076 1077 function win_resize() { 1078 var win_height = $(window).height(); 1079 var bottomOffset; 1080 var $self = $('.cartZone'); 1081 if($self.length > 0) { 1082 var zoneheight = $self.outerHeight(true); 1083 var zonetop = $self.offset().top; 1084 barheight = $('#checkoutNextBar').outerHeight(true); 1085 bottomOffset = zonetop + zoneheight + barheight; 1086 if ($self.closest('#lnwbox2Body').length > 0) { 1087 bottomOffset -= $('#lnwbox2Body').offset().top; 1088 } 1089 topLine = bottomOffset - win_height; 1090 } 1091 } 1092 1093 function nextbar_init() {
1094 var $nextbar_container = $(window); 1095 //$('#checkoutNextBar').after('<div class="cartButtons-clone"></div>'); 1096 win_resize(); 1097 nextbar_scroll_event($nextbar_container); 1098 $nextbar_container.scroll(function () { 1099 nextbar_scroll_event(this); 1100 }); 1101 $(window).resize(function () { 1102 win_resize(); 1103 nextbar_scroll_event($nextbar_container); 1104 }); 1105 } 1106 </script>
1106 1107 <div class="checkoutFooter"> 1108<div class="lnw_footer_area"> 1109</div> 1110<div class="copyright" align="center"> 1111<div class="copyrightText"><span style="padding-left: 10px;">Copyright © 2026</span> 1112<a href="https://www.lungthong.com/">www.lungthong.com</a> 1113<span>All rights reserved.</span></div> 1114<div class="footerText"><a href="https://www.lnwshop.com/" title="รà¹à¸²à¸à¸à¹à¸²à¸à¸à¸à¹à¸¥à¸à¹" target="_blank" rel="noopener">รà¹à¸²à¸à¸à¹à¸²à¸à¸à¸à¹à¸¥à¸à¹</a> 1115 Inspired by 1116<a href="https://www.lnwshop.com/" title="รà¹à¸²à¸à¸à¹à¸²à¸à¸à¸à¹à¸¥à¸à¹" target="_blank" rel="noopener">LnwShop.com (v2)</a> 1117</div><span id="lnwstat-container-ebi93"></span>
1118<script type="text/javascript"> 1119var _lnws = 'sgd.lnwstat.com'; 1120var _lnwp = '651862'; 1121var _lnwd = 'www.lungthong.com'; 1122var _lnwm = ''; 1123var _lnwk = ''; 1124 1125(function() { 1126var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.async = true; 1127sc.src = 'https://' + _lnws + '/lnwstat.js'; 1128var sp = document.createElement('span'); sp.id='lnwstat-container-ebi93-inner'; 1129var e = document.getElementById('lnwstat-container-ebi93'); e.appendChild(sc); e.appendChild(sp); 1130 1131})(); 1132</script>
1132 1133</div> 1134</div></div></div></div></div> 1135 1136</div> 1137 1138 1139</div><div id="cart22_container" style="visibility: hidden;" :style="{visibility:'visible'}"> 1140 <div id="cart22_alert" 1141 style="display: none;" 1142 v-show="alert_is_show" 1143 @click="cartShow" 1144 :class="(alert_is_show)?'show_alert':'hide_alert'"> 1145 <span>à¸à¸¸à¸à¸¡à¸µà¸ªà¸´à¸à¸à¹à¸² <span class="cart_quantity" v-text="total_quantity">0</span> à¸à¸´à¹à¸à¹à¸à¸à¸°à¸à¸£à¹à¸² <u>สัà¹à¸à¸à¸·à¹à¸à¸à¸±à¸à¸à¸µ</u></span> 1146 </div> 1147 <div id="cart22_overlay" 1148 style="display: none;" 1149 v-show="cart_is_show && !cart_is_hiding" 1150 @click="cartHide"></div> 1151 <div id="cart22" 1152 :class="{ show_cart : cart_is_show, hide_cart : cart_is_hiding }" 1153 v-if="cart_is_show"> 1154 <div class="cart22_container"> 1155 <div class="cart22_header_container"> 1156 <div v-if="is_loading" class="cart22-progress-linear-container"> 1157 <div class="cart22-progress-linear"> 1158 <div class="cart22-progress-linear__background" :style="{backgroundColor: cc_color}" ></div> 1159 <div class="cart22-progress-linear__indeterminate"> 1160 <div class="cart22-progress-linear__indeterminate long" :style="{backgroundColor: cc_color}" ></div> 1161 <div class="cart22-progress-linear__indeterminate short" :style="{backgroundColor: cc_color}" ></div> 1162 </div> 1163 </div> 1164 </div> 1165 <div class="cart22_header"> 1166 <div>สิà¸à¸à¹à¸²à¹à¸à¸à¸°à¸à¸£à¹à¸² ({{total_num}} รายà¸à¸²à¸£)</div> 1167 <div class="cart22_close" 1168 @click="cartHide()"><img src="https://www.lungthong.com/system/application/modules/lnwshop/_images/cart22/close.png"/> 1169 </div> 1170 </div> 1171 </div> 1172 <div class="cart22_content"> 1173 <!--if empty cart--> 1174 <div v-if="items.length <= 0" class="cart22_empty"> 1175 <span v-if="is_initing"><div class="boxload_16"></div></span> 1176 <span v-else>à¸à¸à¸à¸ ัย à¸à¸à¸°à¸à¸µà¹à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸à¸°à¸à¸£à¹à¸²</span> 1177 </div> 1178 <!--end if--> 1179 <!--if NOT empty cart--> 1180 <div v-else class="cart22_itemlist"> 1181 <cart-item v-for="item in items" :key="item.iid" :item="item"></cart-item> 1182 </div> 1183 <!--end if--> 1184 <div v-if="discounts.length > 0" class="cart22_discountlist"> 1185 <div class="cart22_discount_item"> 1186 <div class="cart22_discount_label">ราà¸à¸²à¸ªà¸´à¸à¸à¹à¸²à¸à¸±à¹à¸à¸«à¸¡à¸</div> 1187 <div class="cart22_discount_amount">฿ {{price_format(total_price)}}</div> 1188 </div> 1189 <div v-for="(discount,idx) in discounts" :key="idx" class="cart22_discount_item"> 1190 <div class="cart22_discount_label" v-text="discount.label"></div> 1191 <div class="cart22_discount_amount">- ฿ {{price_format(discount.price)}}</div> 1192 </div> 1193 </div> 1194 </div> 1195 <div class="cart22_tailer"> 1196 <div class="cart22_summary"> 1197 <div class="cart22_summary_label"> 1198 <div>ราà¸à¸²à¸ªà¸´à¸à¸à¹à¸²à¸à¸±à¹à¸à¸«à¸¡à¸</div> 1199 <div class="minor">{{total_quantity}} à¸à¸´à¹à¸</div> 1200 </div> 1201 <div class="cart22_summary_amount"> 1202 <div>฿ {{price_format(after_product_price)}}</div> 1203 <div class="minor">ราà¸à¸²à¹à¸¡à¹à¸£à¸§à¸¡à¸à¹à¸²à¸à¸±à¸à¸ªà¹à¸</div> 1204 </div> 1205 </div> 1206 <div class="cart22_action"> 1207 <a href="https://www.lungthong.com/cart" class="cart22_button cart22_cart" :class="is_loading?'cart22_button_loading':''" :style="{color: cc_color, outlineColor: cc_color}">à¸à¸¹à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸à¸°à¸à¸£à¹à¸²</a> 1208 <a href="https://www.lungthong.com/checkout" class="cart22_button cart22_checkout" :class="is_loading?'cart22_button_loading':''" :style="{backgroundColor: cc_color}">à¹à¸£à¸´à¹à¸¡à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸</a> 1209 </div> 1210 <div class="cart22_action"> 1211 <div class="cart22_continue" 1212 @click="cartHide"><span style="transform: rotate(180deg); display: inline-block;">➜</span> à¹à¸¥à¸·à¸à¸à¸à¸·à¹à¸à¸ªà¸´à¸à¸à¹à¸²à¹à¸à¸´à¹à¸¡ </div> 1213 </div> 1214 </div> 1215 </div> 1216 </div> 1217</div>
1218<script type="text/javascript"> 1219 var cart22_vm; 1220 document.addEventListener("DOMContentLoaded", function (event) { 1221 cart22_vm = new Vue({ 1222 store: lnw_store, 1223 components: { 1224 'cart-item' : { 1225 props: ['item'], 1226 data: function() { 1227 return { 1228 edit_quantity_value: null 1229 } 1230 }, 1231 computed: { 1232 can_increase: function() { 1233 if(this.quantity_value < this.item.remain) { 1234 return true; 1235 } 1236 return false; 1237 }, 1238 can_decrease: function() { 1239 if(this.quantity_value > 0) { 1240 return true; 1241 } 1242 return false; 1243 }, 1244 is_flash_sale: function() { 1245 if(this.item.sale_promotion_id) { 1246 return true; 1247 } 1248 if(this.item.promotions && this.item.promotions.find(function(p){ return (p && p.toLowerCase().indexOf('flash')>-1); })) { 1249 return true; 1250 } 1251 if(this.item.promotion_datas) { 1252 var ps = []; 1253 for(var k in this.item.promotion_datas){ 1254 ps.push(this.item.promotion_datas[k]); 1255 } 1256 return ps.some(function(p){ return p && p.type=='sale'; }); 1257 } 1258 return false; 1259 }, 1260 quantity_value: { 1261 get: function() { 1262 if(this.edit_quantity_value !== null) { 1263 return this.edit_quantity_value 1264 } 1265 return this.item.quantity; 1266 }, 1267 set: function(val) { 1268 var that = this; 1269 this.edit_quantity_value = val; 1270 this.$store.dispatch('cart/set_product_quantity', { 1271 iid: this.item.iid, 1272 spec: this.item.spec, 1273 quantity: val, 1274 success: function() { 1275 that.edit_quantity_value = null; 1276 } 1277 }) 1278 } 1279 } 1280 }, 1281 methods: { 1282 increase_quantity: function() { 1283 if(!this.can_increase) { 1284 return; 1285 } 1286 this.quantity_value ++; 1287 this.alert_limit(); 1288 }, 1289 decrease_quantity: function() { 1290 if(!this.can_decrease) { 1291 return; 1292 } 1293 this.quantity_value --; 1294 this.alert_limit(); 1295 }, 1296 alert_limit: function() { 1297 if(!this.item || !this.item.promotion_datas){ return; } 1298 var promo = null; 1299 Object.keys(this.item.promotion_datas).forEach(function(pid){ 1300 var p = this.item.promotion_datas[pid]; 1301 if(p && p.type === 'sale' && !promo){ 1302 promo = p; 1303 } 1304 }.bind(this)); 1305 if(!promo){ return; } 1306 var limit = promo.order_limit || promo.max_quantity; 1307 if(!limit){ return; } 1308 var unit = this.item.unit || ''; 1309 if(this.quantity_value > limit){ 1310 __lnw__.simpleAlert(__lnw__.show_lang('FLASHSALE-LIMIT-OVER', limit, unit)); 1311 }else if(this.quantity_value == limit){ 1312 __lnw__.simpleAlert(__lnw__.show_lang('FLASHSALE-LIMIT-REACH', limit, unit)); 1313 } 1314 } 1315 }, 1316 template: `<div class="cart22_item"> 1317 <div class="cart22_item_right"> 1318 <a :href="item.url"> 1319 <div class="cart22_item_img"> 1320 <img :src="item.thumbnail"> 1321 </div> 1322 </a> 1323 </div> 1324 <div class="cart22_item_left"> 1325 <div v-if="item.remain < item.quantity" class="cart22_tag_warning">สิà¸à¸à¹à¸²à¸à¸µà¹à¹à¸«à¸¥à¸·à¸à¹à¸¡à¹à¹à¸à¸µà¸¢à¸à¸à¸</div> 1326 <div class="cart22_item_name"> 1327 <template v-if="item.parent_name" > 1328 <a :href="item.url" v-text="item.parent_name"></a> 1329 <div class="cart22_subitem_name"><span class="icon-subitem">➜</span> {{item.sku_name}}</div> 1330 </template> 1331 <template v-else> 1332 <a :href="item.url" v-text="item.name"></a> 1333 </template> 1334 <div v-for="(promotion, index) in item.promotions" class="cart22_promotions" :key="index" title="à¹à¸à¹à¸²à¸£à¹à¸§à¸¡à¹à¸à¸£à¹à¸¡à¸à¸±à¹à¸">à¹à¸à¹à¸²à¸£à¹à¸§à¸¡à¹à¸à¸£à¹à¸¡à¸à¸±à¹à¸ {{ promotion }}</div> 1335 </div> 1336 <div class="cart22_item_price">฿ {{price_format(item.unit_price,2)}} <span v-if="is_flash_sale" class="cart22_flash_badge">â¡ Flash Sale</span></div> 1337 <div class="cart22_item_count"> 1338 <div class="cart22_item_countbutton cart22_item_increase" @click="increase_quantity" :class="{disabled:(!can_increase)}"> 1339 <img src="https://www.lungthong.com/system/application/modules/lnwshop/_images/cart22/add.png"/></div> 1340 <div class="cart22_item_countinput"><input type="number" v-model.number="quantity_value" min="0" max="item.remain" /></div> 1341 <div class="cart22_item_countbutton cart22_item_decrease" @click="decrease_quantity" :class="{disabled:(!can_decrease)}"> 1342 <img v-if="quantity_value == 1" class="delete_icon" src="https://www.lungthong.com/system/application/modules/lnwshop/_images/cart22/delete.png"/> 1343 <img v-else src="https://www.lungthong.com/system/application/modules/lnwshop/_images/cart22/remove.png"/> 1344 </div> 1345 </div> 1346 </div> 1347 </div>` 1348 } 1349 }, 1350 el: '#cart22_container', 1351 data: function () { 1352 var data = { 1353 cart_is_show: false, 1354 cart_is_hiding: false, 1355 mem_ycoord: 0, 1356 cc_color: '#007BFF' 1357 }; 1358 return data; 1359 }, 1360 computed: { 1361 items: function() { 1362 if(this.$store.state.cart && this.$store.state.cart.data && this.$store.state.cart.data.items) { 1363 return this.$store.state.cart.data.items 1364 } 1365 return []; 1366 }, 1367 discounts: function() { 1368 if(this.$store.state.cart && this.$store.state.cart.data && this.$store.state.cart.data.after_product_discounts) { 1369 return this.$store.state.cart.data.after_product_discounts; 1370 } 1371 return []; 1372 }, 1373 total_num: function() { 1374 return number_format(this.items.length); 1375 }, 1376 total_quantity: function() { 1377 return this.items.reduce(function(a, item) { 1378 return a+ item.quantity 1379 },0); 1380 }, 1381 total_price: function() { 1382 return this.items.reduce(function(a, item) { 1383 return a + item.total_price 1384 },0); 1385 }, 1386 after_product_price: function() { 1387 if(this.$store.state.cart && this.$store.state.cart.data && this.$store.state.cart.data.after_product_price) { 1388 return this.$store.state.cart.data.after_product_price; 1389 } 1390 return this.total_price; 1391 }, 1392 alert_is_show: function() { 1393 return false && (this.total_quantity > 0); 1394 }, 1395 is_loading: function() { 1396 if(this.$store.state.cart && this.$store.state.cart.data) { 1397 return this.$store.state.cart.is_loading; 1398 } 1399 return false;
1400 }, 1401 is_initing: function() { 1402 if(this.$store.state.cart && this.$store.state.cart.data){ 1403 return false; 1404 } 1405 return true; 1406 } 1407 }, 1408 watch: { 1409 alert_is_show: function(newval) { 1410 var elements = document.querySelectorAll(".register_badge, .adminBar .quickMenu .navigate .navi-container, .pageCapContainer"); 1411 if(newval) { 1412 elements.forEach(function(element) { 1413 element.classList.add('cart22_adjustOther'); 1414 element.classList.add('cart22_adjustOther_show'); 1415 }); 1416 setTimeout(function () { 1417 elements.forEach(function(element) { 1418 element.classList.remove('cart22_adjustOther_show'); 1419 }); 1420 }, 1000); 1421 } else { 1422 elements.forEach(function(element) { 1423 element.classList.remove('cart22_adjustOther'); 1424 element.classList.add('cart22_adjustOther_hide'); 1425 }); 1426 setTimeout(function () { 1427 elements.forEach(function(element) { 1428 element.classList.remove('cart22_adjustOther_hide'); 1429 }); 1430 }, 500); 1431 } 1432 } 1433 }, 1434 methods: { 1435 cartShow: function() { 1436 this.cart_is_show = true; 1437 document.body.classList.add('cart22_body_noscroll'); 1438 1439 this.mem_ycoord = window.scrollY; 1440 var style = document.body.style; 1441 style.position = 'fixed'; 1442 style.left = '0'; 1443 style.right = '0'; 1444 style.top = - this.mem_ycoord + 'px'; 1445 }, 1446 cartHide: function() { 1447 this.cart_is_hiding = true; 1448 let that = this; 1449 setTimeout(function () { 1450 that.cart_is_show = false; 1451 that.cart_is_hiding = false; 1452 document.body.classList.remove('cart22_body_noscroll'); 1453 var style = document.body.style; 1454 style.position = ''; 1455 style.left = ''; 1456 style.right = ''; 1457 style.top = ''; 1458 window.scroll({top: that.mem_ycoord}); 1459 1460 }, 250); 1461 }, 1462 } 1463 }); 1464 }); 1465</script>
1465<div id="lnw-gototop" class="" onclick="lnw_gototop();"><span class="text"></span></div><style class="lnw_custom_css_container" type="text/css"></style></div>
1465<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/external/vue.min.js"></script>
vendor: 1 bytes, line 1465
1465
1466<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/external/es6-promise.auto.min.js"></script>
vendor: 1 bytes, line 1466
1466
1467<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/external/vuex.min.js"></script>
vendor: 1 bytes, line 1467
1467
1468<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/system/application/modules/lnwshop/_js/many.min.js?t=20211123000000"></script>
vendor: 1 bytes, line 1468
1468
1469<script language="JavaScript" type="text/javascript">var LNWFILE_JSONP = 'lnwfile_jsonp'; 1470function file_upload_seller_url () {return "https://gd-up.lnwfile.com/lnwshop/v2/upload_seller/";} 1471function file_upload_buyer_url () {return "https://gd-up.lnwfile.com/lnwshop/v2/upload_buyer/";} 1472function file_upload_url () {return "https://gd-up.lnwfile.com/lnwshop/upload/";} 1473function file_upload_flash_url () {return "https://gd-up.lnwfile.com/lnwshop/upload_flash/";} 1474function file_upload_icon_url () {return "https://gd-up.lnwfile.com/lnwshop/upload_icon/";} 1475function file_upload_document_url () {return "https://gd-up.lnwfile.com/lnwshop/v2/upload_document/";} 1476function file_upload_accounting_url () {return "https://aca-up.lnwfile.com/lnwshop/v2/upload_document/";} 1477function file_upload_manage_url () {return "https://gd-up.lnwfile.com/lnwshop/upload_manage/";} 1478function file_flash_url () {return "https://gd-up.lnwfile.com/swf/swfupload.swf";} 1479function file_uploadify_url () {return "https://gd-up.lnwfile.com/swf/uploadify.swf";} 1480function file_jsonp_url (uri) {return "https://gd-up.lnwfile.com/lnwshop/jsonp/"+(uri===undefined?"":uri)+"?"+LNWFILE_JSONP+"=?";} 1481 function base_url (uri) {return "https://www.lungthong.com/"+(uri===undefined?"":uri.replace(/^\//,''));} 1482 function site_url (uri) {return "https://www.lungthong.com/"+(uri===undefined?"":uri.replace(/^\//,''));} 1483 function front_url (uri) {return "https://www.lungthong.com/"+(uri===undefined?"":uri.replace(/^\//,''));} 1484 function manage_url (uri) {return "https://a.lnwstore.com/lungthong/"+(uri===undefined?"":uri.replace(/^\//,''));} 1485 function handle_url_from_import (url) { 1486 if(typeof url !== 'string') { 1487 return url; 1488 } 1489 url = url.trim(); 1490 if(/^https?:\/\//.test(url)) { 1491 return url; 1492 }return url;} 1493var css_files = ['https://www.lungthong.com/system/application/templates/lnwshop/default/_css/basic1200.min.css?t=20260810000051','https://www.lungthong.com/cache/lnwshop/651/862/css/20260708164854/style.css']; 1494function css_url () {return css_files.join(',');} 1495const WEBID = 651862; 1496function deepFreeze(e){const t=Object.getOwnPropertyNames(e);for(const o of t){const t=e[o];t&&"object"==typeof t&&deepFreeze(t)}return Object.freeze(e)} 1497const WEBDATA = deepFreeze({"new_cart":{"icon_color":"black","bar_color":"whiteBar"},"id":"651862","webname":"lungthong","name":"หà¸à¸±à¸à¸ªà¸·à¸à¹à¸à¹à¸²à¸¥à¸¸à¸à¸à¸à¸","image":"https:\/\/gd.lnwfile.com\/lrcz49.jpg","avatar":"https:\/\/gd.lnwfile.com\/_\/gd\/_resize\/100\/100\/lr\/cz\/49.jpg","front_url":"https:\/\/www.lungthong.com\/","manage_url":"https:\/\/a.lnwstore.com\/lungthong\/","share_url":"https:\/\/www.lungthong.com\/checkout","join_num":850,"open_date_th":"17 ส.à¸. 2561","open_date_diff":"8 à¸à¸µà¸à¸µà¹à¸à¹à¸²à¸à¸¡à¸²","order_url":"https:\/\/lnw.me\/order\/lungthong","lnwbar":{"color":"default"},"price_round_config":null,"slideshow":{"is_enabled":0},"gointer":{"is_enabled":0},"mobileSiteEnabled":1}); 1498 function _add_settings_data(settings, name, value) { 1499 if(typeof settings.data == 'undefined' || settings.data == null || settings.data == '') { 1500 settings.data = name + '=' + value; 1501 } else if(typeof settings.data=='string') { 1502 settings.data += '&' + name + '=' + value; 1503 } else if($.isArray(settings.data)) { 1504 settings.data.push({name: name, value: value}); 1505 } else if(typeof FormData !== 'undefined') { 1506 settings.data.append(name, value); 1507 } 1508 } 1509 if(window.top != window) { 1510 var allowedFrame = false; 1511 try { 1512 } catch(error) {} 1513 if(!allowedFrame) {
1514 var alertFunc = function() { 1515 // Bootstrap also runs in <head>, before the body exists. 1516 if(!document.body) { 1517 return; 1518 } 1519 var heading = document.createElement('h1'); 1520 heading.style.margin = '200px'; 1521 var link = document.createElement('a'); 1522 link.href = window.location.href; 1523 link.target = '_top'; 1524 link.textContent = 'Click here to enter'; 1525 heading.appendChild(link); 1526 document.body.textContent = ''; 1527 document.body.appendChild(heading); 1528 }; 1529 alertFunc(); 1530 window.addEventListener('DOMContentLoaded', alertFunc); 1531 window.addEventListener('load', alertFunc); 1532 } 1533 } 1534 1535 $(document).ready(function() { 1536 $.ajaxSetup({ 1537 dataType: "html", 1538 cache: false 1539 }); 1540 $(this).ajaxSend(function(e, xhr, settings) { 1541 if(!settings.data){ 1542 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 1543 } 1544 _add_settings_data(settings, 'ajaxxxx', true); 1545 _add_settings_data(settings, 'ajaxxxx_dataType', settings.dataType); 1546 if((typeof lnw_store !== 'undefined') && lnw_store.state.user.data && lnw_store.state.user.data.csrf_token) { 1547 _add_settings_data(settings, 'csrf_token', lnw_store.state.user.data.csrf_token); 1548 } 1549 }); 1550 }); 1551 1552</script>
vendor: 1 bytes, line 1552
1552
1553<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/system/application/modules/lnwshop/_js/lang_th.js?t=20250110114600"></script>
1553 1554
1555<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/system/application/modules/lnwshop/_js/default.min.js?t=20260902170746"></script>
1555 1556 1557 1558 1559 <div class="shortcut-contact-container btn-chat-container"> 1560 <div class="btn btn-chat"> 1561 <div class="close-icon" onclick="goto_chat();"></div> 1562 <div class="icon"></div> 1563 <div class="text">à¸à¸¹à¸à¸à¸¸à¸¢-สà¸à¸à¸à¸²à¸¡</div> 1564 </div> 1565 <ul class="social-button"> 1566 <li class="btn btn-email"><a href="mailto:[email protected]?subject=%E0%B8%AA%E0%B8%AD%E0%B8%9A%E0%B8%96%E0%B8%B2%E0%B8%A1%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%B9%E0%B8%A5%20-%20lungthong&body=%E0%B8%AA%E0%B8%A7%E0%B8%B1%E0%B8%AA%E0%B8%94%E0%B8%B5%20%E0%B8%89%E0%B8%B1%E0%B8%99%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%AD%E0%B8%9A%E0%B8%96%E0%B8%B2%E0%B8%A1%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%B9%E0%B8%A5%E0%B9%80%E0%B8%9E%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B9%80%E0%B8%95%E0%B8%B4%E0%B8%A1" onclick="return lead_contactus_track();"> 1567 <div class="icon"></div> 1568 <div class="text">à¸à¸µà¹à¸¡à¸¥ [email protected]</div> 1569 </a></li> 1570 <li class="btn btn-contactus"> 1571 <a href="https://www.lungthong.com/contactus" onclick="return lead_contactus_track();"> 1572 <div class="icon"></div> 1573 <div class="text">à¸à¸£à¸à¸à¸à¸à¸£à¹à¸¡à¸à¸´à¸à¸à¹à¸</div> 1574 </a></li> 1575 <li class="btn btn-mobile"><a href="tel:0853201958" onclick="return lead_phone_track();"> 1576 <div class="icon"></div> 1577 <div class="text">à¹à¸à¸£ 0853201958</div> 1578 </a></li> 1579 <li class="btn btn-facebook"><a target="_blank" href="https://www.messenger.com/t/lungthongbook" onclick="return lead_facebook_track();"> 1580 <div class="icon"></div> 1581 <div class="text">lungthongbook</div> 1582 </a></li> 1583 <li class="btn btn-line"><a href="https://line.me/ti/p/~lungthongbook" target="_blank" onclick="return lead_line_track();"> 1584 <div class="icon"></div> 1585 <div class="text">Add lungthongbook</div> 1586 </a></li> 1587 </ul> 1588 </div> 1589 1590
1591<script language="JavaScript"> 1592 document.addEventListener("DOMContentLoaded", function () { 1593 var lead_datas = [ 1594 {selector:'a[href*="email:"], a[href*="contactus"]',onclick:'return lead_contactus_track()'}, 1595 {selector:'a[href*="tel:"]',onclick:'return lead_phone_track()'}, 1596 {selector:'a[href*="line.me/ti/p"], a[href*="nav.cx"]',onclick:'return lead_line_track()'}, 1597 {selector:'a[href*="messenger.com"], a[href*="facebook.com"]',onclick:'return lead_facebook_track()'}, 1598 ]; 1599 lead_datas.forEach(function(lead_data) { 1600 var nodeList = document.querySelectorAll(lead_data.selector); 1601 for(var i=0;i<nodeList.length;i++) { 1602 var node = nodeList[i]; 1603 if(node.getAttribute('onclick') == null) { 1604 node.setAttribute('onclick',lead_data.onclick); 1605 } 1606 } 1607 }); 1608 }); 1609 function lead_contactus_track() { 1610 console.log("Warning: lead type contactus is missing."); 1611 return true; 1612 } 1613 function lead_phone_track() { 1614 console.log("Warning: lead type phone is missing."); 1615 return true; 1616 } 1617 function lead_facebook_track() { 1618 console.log("Warning: lead type facebook is missing."); 1619 return true; 1620 } 1621 function lead_twitter_track() { 1622 console.log("Warning: lead type twitter is missing."); 1623 return true; 1624 } 1625 function lead_instagram_track() { 1626 console.log("Warning: lead type instagram is missing."); 1627 return true; 1628 } 1629 function lead_line_track() { 1630 console.log("Warning: lead type line is missing."); 1631 return true; 1632 } 1633 </script>
1633<script type="text/javascript"> var first_sync_accounts_time = true; 1634 function accounts_update__hook_after_check_account() { 1635 if(first_sync_accounts_time){ 1636 first_sync_accounts_time = false; 1637 } 1638 } var accountsTime = null; 1639function accounts_update() { 1640 var data = { 1641 data: 'ZMM54Sw1AWpVFl2KG6rAxQHjJ7fi1-o2V7CvLmzUgpb7TRiS8yj7JByCwSLuuZPxNaUoTKPy6-6YuJWv_XLvasNtl6ffUwTGYHu5Yi_7GSbEg22lD4pCUvp4Od0Rr1MUfM3w6rAlkXKgEaTxm8p5ColNTNNKujh9cRPNOI8YiQo9KQuLVP72pUAuDKO5-cn5fu7CPNgiHF57yqyizuX9nQAf9xjVJWDdhaG1qyhS0xeuZQe7JnQD5vcxraTNJF-kirntP4uQ1bjXkhx24ZdMBlpOh3xZ20sFNZ9Fx0f-9MOT8ggED4-8BNl2MQIUhWCk4vuxxUuzwuh3_zQNdSbQVwdqQvNeseriuaVPxTdp1xoiiLhiEyw1GgargSua6AKPjhZvli74Db0J0bwsivdVwQ==', 1642 revision_id: 3573 1643 }; 1644 $.getJSON("https://static.lnw.me/jsonp/heartbeat?lnwaccounts_jsonp=?", data, function(response) { 1645 if(response.success) { 1646 if(response.logged_in) { 1647 //$.cookie('_lnwacct_651862_www_lungthong_com___tk2', response._lnwacct, {path: '/'}); 1648 document.cookie = encodeURIComponent("_lnwacct_651862_www_lungthong_com___tk2") + "=" + encodeURIComponent(response._lnwacct) + "; path=/"; 1649 if(response.state_change != undefined && response.state_change) { 1650 //alert('reload'); 1651 window.location.href = window.location.href; 1652 return; 1653 } 1654 } 1655 if(typeof accounts_update__hook_after_check_account == 'function') { 1656 accounts_update__hook_after_check_account(); 1657 } 1658 } 1659 if(accountsTime != null) { 1660 clearTimeout(accountsTime); 1661 }
1662 accountsTime = setTimeout("accounts_update();", 15 * 60 * 1000); 1663 }); 1664 $.ajax({ 1665 type: 'GET', 1666 data: {}, 1667 url: 'https://www.lungthong.com/lnwbar/action/session' 1668 }); 1669} 1670$(document).ready(function() { 1671 if(window.top == window) { 1672 accounts_update(); 1673 } 1674}); 1675</script>
1675<script language="JavaScript" type="text/javascript" src="https://www.lungthong.com/system/application/modules/lnwshop/lnwbar/_js/vue.min.js?t=20260904205501"></script>
vendor: 1 bytes, line 1675
1675
1676<script type="text/javascript">document.addEventListener("DOMContentLoaded", function(event) { });</script>
1676</body> 1677</html>
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.