File: /www/wwwroot//www.qoifhk.com/cc/index.html
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CRARA Apple Cider Ning (03) - Powered By xCommerce</title>
<meta>
<meta property="og:description" content="CRARA Apple Cider">
<meta property="og:title" content="CRARA Apple Cider Ning (03)">
<meta property="og:type" content="website">
<meta property="og:url" content="http://xcom38995.xstorepage.me/salepage/MTI5ODM0?s=1&update=1">
<meta property="og:image" content="https://app.xcommerce.co.th/uploads/38995/38995_1659503497_1.png">
<meta name="csrf-param" content="_csrf">
<meta name="csrf-token" content="C-6GXxWGmufXPrE_sedpYBYx--qLWIPKKgR6kvveraBq3f4NQO_Dn6RZ4k7eq1wqemDDk7w13KdCXDLIye3Jlg==">
<link type="image/png" href="https://xcom38995.craraofficial.com/favicon-16x16.png" size="16x16" rel="icon">
<link href="static/css/jquery.Thailand.min.css" rel="stylesheet">
<link href="static/css/datetimepicker-kv.min.css" rel="stylesheet">
<link href="static/css/sweetalert2.min.css" rel="stylesheet">
<link href="static/css/ladda-themeless.min.css" rel="stylesheet">
<link href="static/css/slick.css" rel="stylesheet">
<link href="static/css/slick-theme.css" rel="stylesheet">
<link href="static/css/css-stars.css" rel="stylesheet">
<link href="static/css/style.min.css" rel="stylesheet">
<link href="static/css/all.css" rel="stylesheet">
<link href="static/css/thbanklogos.css" rel="stylesheet">
<link href="static/css/thbanklogos.min.css" rel="stylesheet">
<link href="static/css/main.css" rel="stylesheet">
<link href="static/css/styleCountDown.css" rel="stylesheet">
<script>var salepagePixelEvent = [];
var salepageModel = {"id":129834,"product_id":12512884,"salepage_type":1,"name":"CRARA Apple Cider Ning (03)","link":null,"slug":"xcom38995","dummy_subdomain":"fqjas3","dummy_domain":"lazadaa.me","price_in_flashsale":"1490.00","price_out_flashsale":"1890.00","flashsale_time":1663157455,"flashsale_time_hr":1,"sold":82797,"payment_transfer":null,"require_slip":0,"payment_cod":1,"logistic_id":null,"shipping_charge":"0.00","cod_fee":"0.00","setting":"[{\u0022widget\u0022:\u0022image\u0022,\u0022src\u0022:\u002238995_1659503664_1.jpg\u0022,\u0022link\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022},{\u0022widget\u0022:\u0022video_link\u0022,\u0022link\u0022:\u0022https:\/\/youtu.be\/roMPakM0Wcs\u0022},{\u0022widget\u0022:\u0022image\u0022,\u0022src\u0022:\u002238995_1659502339_3.jpg\u0022,\u0022link\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022},{\u0022widget\u0022:\u0022image\u0022,\u0022src\u0022:\u002238995_1659502339_4.jpg\u0022,\u0022link\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022},{\u0022widget\u0022:\u0022image\u0022,\u0022src\u0022:\u002238995_1659502339_5.jpg\u0022,\u0022link\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022},{\u0022widget\u0022:\u0022image\u0022,\u0022src\u0022:\u002238995_1659502340_6.png\u0022,\u0022link\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022},{\u0022widget\u0022:\u0022image\u0022,\u0022src\u0022:\u002238995_1659502340_7.jpg\u0022,\u0022link\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022},{\u0022widget\u0022:\u0022progress\u0022,\u0022txt\u0022:\u0022ขายไปแล้ว 82754 ชิ้น\u0022,\u0022percent\u0022:\u002290\u0022},{\u0022widget\u0022:\u0022button\u0022,\u0022style\u0022:\u00221\u0022,\u0022val_line\u0022:\u0022https:\/\/lin.ee\/lrtOMqb\u0022,\u0022val_fb\u0022:\u0022 https:\/\/www.m.me\/Crara66\u0022,\u0022val_tel\u0022:\u00220987743893\u0022}]","image1":"38995_1659503497_1.png","image2":null,"image3":null,"image4":null,"image5":null,"image6":null,"created_at":1663124833,"updated_at":1663127098,"sku":null,"facebook_pixel":null,"google_tag_manager":"","logistic_normal_id":939584,"logistic_cod_id":376456,"bank_id":null,"tenant_id":38995,"admin_id":62970,"shipping_price_id":939584,"shipping_type_id":1,"status_contact_button":1,"fb_messenger_url":"https:\/\/www.m.me\/Crara1314","line_official_account_url":"https:\/\/lin.ee\/lrtOMqb","line_token":"lgU1LBmnphg2xGR4Q8NC8w9W35qJMOZSf1ZEXvV80FA","line_notify_status":1,"status_online":1,"status_customize_succcess":1,"image_customize_succcess":"38995_1663041725_1.jpg","image_customize_succcess2":"","image_customize_succcess3":"","image_customize_succcess4":"","url_customize_success1":"","url_customize_success2":"","url_customize_success3":"","url_customize_success4":"","message_customize_succcess":"\u003Cbr\u003E","show_customize_success":1,"google_form_embed":null,"is_leadpage":0,"is_content":0,"is_tiktok":0,"leadpage_title":"กรุณากรอกชื่อ และเบอร์โทรที่นี่","leadpage_is_email":0,"leadpage_is_line":0,"leadpage_is_custom1":0,"leadpage_is_custom2":0,"leadpage_is_address":0,"title_custom_field1":"Custom 1","title_custom_field2":"Custom 2","custom_price_url":1490,"status_step_price":1,"is_advance_setting":0,"language_id":"th","address_type":1,"is_static":1,"metatags":"","scripts":"","theme_color":"#ee4d2d","is_onepage":0,"conversion_api":0,"domain_id":1262};
var tiktokPixels = [];
var facebookPixels = [{"id":96935,"salepage_id":129834,"code":"5223147214481561","pixel_type":1,"token":null,"created_at":1663127101,"updated_at":null,"admin_id":62970,"status":1}];
var lineTags = [];
var gtmID = "";
var productModel = {"id":12512884,"name":"CRARA Apple Cider","name_en":null,"url":null,"url_key":null,"description":"","description_short":"","image1":"fV7VbYJDeC.jpg","image2":null,"image3":null,"image4":null,"image5":null,"image6":null,"is_quota":0,"is_stockable":null,"available_start":null,"available_stop":null,"is_promotion":0,"promotion_start":null,"promotion_stop":null,"quantity":0,"channel_id":null,"tenant_id":38995,"vendor_id":null,"product_type_id":2,"category_id":null,"ranking":null,"is_featured":0,"draft_from":null,"currency":"THB","price":"1890.00","original_price":"0.00","price_sale":"0.00","boost_auto":0,"boost_start":null,"boost_end":null,"cost":"0.00","condition":"new","visibility":1,"status":1,"status_external":0,"likes":0,"views":0,"rating":"0.00","point":"0.00","page_view":0,"tenant_product_unit_type_id":null,"color":null,"size":null,"brand":null,"model":null,"material":null,"compatible":null,"warranty":null,"warranty_type":null,"weight":"0.00","length":"0.00","width":"0.00","height":"0.00","sku":"38995-50572738496","barcode":"38995-50572738496","tenant_product_sku":null,"shipper_id":null,"created_at":1659503393,"updated_at":1659503393,"sync_order_id":null,"sync_order_detail_id":null,"sync_product_id":null,"minimum_quantity":null,"config_product_id":null,"product_has_variant":null,"unit_id":null,"pin_product":0,"shopee_id":null,"shopee_url":null,"shopee_name":null,"shopee_sku":null,"lazada_id":null,"lazada_url":null,"lazada_name":null,"lazada_shopsku":null,"elevenstreet_id":null,"woo_id":null,"magento_id":null,"opencart_id":null,"shopify_id":null,"tax_type":0,"price_type":0,"is_advance":0};
var txtHour = "ชั่วโมง";
var txtMinute = "นาที";
var txtSecond = "วินาที";
var FbPixelsalepage = "\n ! function(f, b, e, v, n, t, s) {\nif (f.fbq) return;\nn = f.fbq = function() {\nn.callMethod ?\nn.callMethod.apply(n, arguments) : n.queue.push(arguments)\n};\nif (!f._fbq) f._fbq = n;\nn.push = n;\nn.loaded = !0;\nn.version = \u00222.0\u0022;\nn.queue = [];\nt = b.createElement(e);\nt.async = !0;\nt.src = v;\ns = b.getElementsByTagName(e)[0];\ns.parentNode.insertBefore(t, s)\n}(window, document, \u0022script\u0022, \u0022https:\/\/connect.facebook.net\/en_US\/fbevents.js\u0022);fbq(\u0022init\u0022, \u00225223147214481561\u0022);\nfbq(\u0022track\u0022, \u0022PageView\u0022);\n\n";
if (tiktokPixels) {
!function (w, d, t) {
w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
for (let i = 0; i < tiktokPixels.length; i++) {
ttq.load(tiktokPixels[i].code);
}
ttq.page();
}(window, document, 'ttq');
// for (let i = 0; i < tiktokPixels.length; i++) {
// var ta = document.createElement('script'); ta.type = 'text/javascript'; ta.async = true;
// ta.src = 'https://analytics.tiktok.com/i18n/pixel/sdk.js?sdkid=' + tiktokPixels[i].code;
// var s = document.getElementsByTagName('script')[0];
// s.parentNode.insertBefore(ta, s);
// }
}
eval(FbPixelsalepage);
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return typeof sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
}
}
return false;
};</script>
<!-- <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=5223147214481561&ev=PageView&noscript=1" /></noscript> -->
<script>
</script>
</head>
<body>
<style>
body {
background-color: white;
}
.widget-text p {
overflow: auto;
}
.yii-debug-toolbar__bar {
display: none !important;
}
.card-description {
overflow: auto;
}
.card-description img {
width: 100%;
height: auto !important;
}
#flashSaleTime .badge-dark {
font-size: 18px !important;
}
#flashSaleTime2 .badge-dark {
font-size: 18px !important;
margin-left: 5px;
font-weight: normal;
}
.countDown_digit_new_rotated {
background: #ee4d2d;
}
.countDown_digit_last_placeholder {
background: #ee4d2d;
}
.countDown_digit_new_placeholder {
/* background: #d73211; */
background: #d73211;
}
.countDown_cont {
display: inline-flex;
color: white !important;
}
.countDown_digit_last_rotate {
background: #d73211;
}
.countDown_digit_new_rotate {
background: #ee4d2d;
}
.countDown_interval_basic_cont_description {
color: black;
display: block;
text-shadow: none;
text-align: center;
font-size: 14px;
}
.countDown_cont {
font-size: 8px;
}
.btn-contact {
width: 70px;
font-size: 18px !important;
/* border-radius: 50%; */
}
.btn-contact i {
font-size: 28px !important;
}
.btn-messenger {
background-color: #0076F8 !important;
}
.btn-line {
background-color: #39B90B !important;
background-image: none !important;
}
.btn-buy {
display: -webkit-inline-box !important;
font-size: 18px !important;
background-color: #ee4d2d !important;
font-weight: bold;
}
.nav-justified a {
padding: .75rem .5rem !important;
}
.progress-bar{
position: relative;
background: #ffe1d9;
border-radius: 15px;
}
.progress-bar canvas{
border-radius: 15px;
height: 30px;
}
.progress-bar span{
position: absolute;
left: 50px;
}
.progress-bar img{
position: absolute;
left: 15px;
top: -5px;
width: 28px;
}
.card-form {
-webkit-box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.1);
}
.facebook-responsive {
overflow:hidden;
padding-bottom:56.25%;
position:relative;
height:0;
}
.facebook-responsive iframe {
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}
.btn-to-top {
position: fixed;
bottom: 70px;
right: 20px;
border-radius: 50%;
width: 50px;
height: 50px;
padding: 0px;
/* box-shadow: 0px 2px 3px #444444; */
border: 1px solid white;
}
.card-slide .card-flash-sale::before {
background-image: linear-gradient(45deg, #bf3e24, #ee4d2d);
}
.card-slide .card-price-text .promotion {
color: #ee4d2d;
}
.theme-color, .card-slide .card-slide-img .slick-dots li.slick-active button::before {
color: #ee4d2d;
}
</style>
<div class="card card-slide">
<div class="card-slide-img" align="center">
<div><img src='static/picture/38995_1659503497_1.png' alt='slide'></div> </div>
<div class="card-price">
<div class="d-flex align-items-center">
<h3 class="card-price-text">
<small class="mr-1">
<del>1,890 ฿</del>
</small>
<span class="promotion">1,490 ฿</span>
</h3>
<span class="badge badge-danger ml-3">21% ส่วนลด</span>
</div>
<h6 class="theme-color mb-0">ขายแล้ว <span id="txt_sold">82,797</span></h6>
</div>
<div class="card-flash-sale py-3">
<h4 class="card-flash-sale-text">FLASH <i class="fas fa-bolt"></i> SALE</h4>
<div class="card-flash-sale-time">
<span class="mr-2">จบใน</span>
<input type="text" id="flashsale_time" class="d-none" name="" value="2022/09/14 19:10:55"> <div id="flashSaleTime"></div>
</div>
</div>
<div class="card-transport">
<div class="card-transport-tags">
<span class="badge">จัดส่งฟรี</span>
<span class="badge"></span>
<span class="badge">เก็บเงินปลายทาง</span>
</div>
<div class="card-transport-logo">
<img src="static/picture/wuang4.png" alt="" style="max-width:100px;max-height:100px;"> </div>
</div>
<!-- <div class="card-description">
<h6>CRARA Apple Cider</h6>
<p></p>
</div> -->
</div>
<div class="mb-5 mt-3">
<a href="#" target="_blank"><p align="center"><img alt="img" class="img-fluid w-100 lazy" data-src="https://app.xcommerce.co.th/uploads/38995/38995_1659503664_1.jpg" data-srcset="https://app.xcommerce.co.th/uploads/38995/38995_1659503664_1.jpg 400w, https://app.xcommerce.co.th/uploads/38995/38995_1659503664_1.jpg 800w" data-sizes="100w"></p></a><iframe width="100%" height="330" class="my-1 lazy" data-src="https://www.youtube.com/embed/roMPakM0Wcs?loop=1&playlist=roMPakM0Wcs" frameborder="0" allowfullscreen=""></iframe><a href="#" target="_blank"><p align="center"><img alt="img" class="img-fluid w-100 lazy" data-src="https://app.xcommerce.co.th/uploads/38995/38995_1659502339_3.jpg" data-srcset="https://app.xcommerce.co.th/uploads/38995/38995_1659502339_3.jpg 400w, https://app.xcommerce.co.th/uploads/38995/38995_1659502339_3.jpg 800w" data-sizes="100w"></p></a><a href="#" target="_blank"><p align="center"><img alt="img" class="img-fluid w-100 lazy" data-src="https://app.xcommerce.co.th/uploads/38995/38995_1659502339_4.jpg" data-srcset="https://app.xcommerce.co.th/uploads/38995/38995_1659502339_4.jpg 400w, https://app.xcommerce.co.th/uploads/38995/38995_1659502339_4.jpg 800w" data-sizes="100w"></p></a><a href="#" target="_blank"><p align="center"><img alt="img" class="img-fluid w-100 lazy" data-src="https://app.xcommerce.co.th/uploads/38995/38995_1659502339_5.jpg" data-srcset="https://app.xcommerce.co.th/uploads/38995/38995_1659502339_5.jpg 400w, https://app.xcommerce.co.th/uploads/38995/38995_1659502339_5.jpg 800w" data-sizes="100w"></p></a><a href="#" target="_blank"><p align="center"><img alt="img" class="img-fluid w-100 lazy" data-src="https://app.xcommerce.co.th/uploads/38995/38995_1659502340_6.png" data-srcset="https://app.xcommerce.co.th/uploads/38995/38995_1659502340_6.png 400w, https://app.xcommerce.co.th/uploads/38995/38995_1659502340_6.png 800w" data-sizes="100w"></p></a><a href="#" target="_blank"><p align="center"><img alt="img" class="img-fluid w-100 lazy" data-src="https://app.xcommerce.co.th/uploads/38995/38995_1659502340_7.jpg" data-srcset="https://app.xcommerce.co.th/uploads/38995/38995_1659502340_7.jpg 400w, https://app.xcommerce.co.th/uploads/38995/38995_1659502340_7.jpg 800w" data-sizes="100w"></p></a><div class="px-3 py-4"><div class="progress-bar"><span>ขายไปแล้ว 82754 ชิ้น</span><img src="static/picture/ic_fire.png"></div></div><input type="hidden" id="widget-percent" value="90"><div class="col pb-3" align="center"><a class="" href="#" target="_blank"><img src="static/picture/btn_line_contact.png" class="mt-3 btn-call-action-line" style="width:85%;"></a><a class="" href="#" target="_blank"><img src="static/picture/btn_fb_contact.png" class="mt-3 btn-call-action-facebook" style="width:85%;"></a><a class="btl-tel-contact" onclick="window.open("tel:0987743893");"><img src="static/picture/btn_tel_contact.png" class="mt-3 btn-call-action-tel" style="width:85%;"></a></div>
<div id="form_onepage"></div>
<div align="center" class="pt-0 pb-4" style="">
<!-- <a href="#" target="_blank"> -->
<table align="center" style="font-size: 10px; color: #444; opacity: 0.6; color: black;">
<div style="text-align:center">
น ทีม ทราเวล / VIN TEAM TRAVEL<br>
ที่อยู่ : 188 หมู่ 4 ซ.5 ถ.ประชาอุทิศ ต.พานพร้าว อ.ศรีเชียงใหม่ จ.หนองคาย 43130<br>
โทร : 042-451-512<br>
Email : vinteam.co.ltd@gmail.com
</div>
</table>
<!-- </a> -->
</div>
</div>
<button class="btn btn-primary btn-to-top" style="display: none;"><i class="fa fa-chevron-up"></i></button>
<section id="navBottom">
<nav class="nav nav-justified">
<a class="btn-contact btn-messenger nav-link " href="#" target="_blank"><i class="fab fa-facebook-messenger"></i> </a>
<a class="btn-contact btn-line nav-link btn-call-action-line " href="#" target="_blank"><i class="fab fa-line"></i> </a>
<a class="nav-item btn-buy btn-buy-static nav-link" href="#"><i class="fa fa-shopping-cart"></i> ซื้อทันที</a> </nav>
</section> <script src="static/js/jquery-3.3.1.min.js"></script>
<script src="static/js/gradient-progress-bar.js"></script>
<script src="static/js/bootstrap-datetimepicker.min.js"></script>
<script src="static/js/bootstrap-datetimepicker.th.js"></script>
<script src="static/js/JQL.min.js"></script>
<script src="static/js/typeahead.bundle.js"></script>
<script src="static/js/jquery.Thailand.min.js"></script>
<script src="static/js/sweetalert2.min.js"></script>
<script src="static/js/spin.min.js"></script>
<script src="static/js/ladda.min.js"></script>
<script src="static/js/ladda.jquery.min.js"></script>
<script src="static/js/jquery-2.1.1.js"></script>
<script src="static/js/jquery.countdown.min.js"></script>
<script src="static/js/bootstrap.bundle.min.js"></script>
<script src="static/js/slick.min.js"></script>
<script src="static/js/jquery.barrating.min.js"></script>
<script src="static/js/jquery.bootstrap-touchspin.min.js"></script>
<script src="static/js/countDown.min.js"></script>
<script src="static/js/jquery.validate.min.js"></script>
<script src="static/js/lazyload.min.js"></script>
<script src="static/js/gradient-progress-bar.js"></script>
<script> function logElementEvent(eventName, element) {
console.log(
Date.now(),
eventName,
element.getAttribute("data-src")
);
}
var callback_enter = function(element) {
// logElementEvent("🔑 ENTERED", element);
};
var callback_exit = function(element) {
// logElementEvent("🚪 EXITED", element);
};
var callback_reveal = function(element) {
// logElementEvent("👁️ REVEALED", element);
};
var callback_loaded = function(element) {
// logElementEvent("👍 LOADED", element);
};
var callback_error = function(element) {
// logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
};
var callback_finish = function() {
logElementEvent("✔️ FINISHED", document.documentElement);
};
var ll = new LazyLoad({
elements_selector: ".lazy",
// Assign the callbacks defined above
callback_enter: callback_enter,
callback_exit: callback_exit,
callback_reveal: callback_reveal,
callback_loaded: callback_loaded,
callback_error: callback_error,
callback_finish: callback_finish,
load_delay: 500,
threshold: 0
});
function setEventSocial(type, event) {
switch (type) {
case 'facebook':
if (facebookPixels.length > 0) {
if (parseInt(salepageModel['conversion_api']) == 1) {
$.post('/page/conversion-api', {
id: salepageModel['id'],
event: event,
purchase_value: 0,
order_id: 0
}).done(function(response) {
});
} else {
fbq('trackCustom', event);
}
}
break;
case 'tiktok':
tiktokPixels.forEach(element => {
ttq.instance(element.code).track(event);
});
break;
case 'line':
if (lineTags.length > 0) {
if (lineTags[0].code) {
_lt('send', 'cv', {
type: event
},[lineTags[0].code]);
}
}
break;
default:
break;
}
}
function formatNumber(num) {
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')
}</script>
<script>jQuery(function ($) {
var flashsale_time = $('#flashsale_time').val();
var currentDate = new Date().getTime();
var href_platform = '';
var platform = getUrlParameter('platform');
if (platform) {
href_platform = '?platform=' + platform;
}
$('.btn-buy-static').attr('href', window.location.origin + window.location.pathname + '/checkout' + href_platform);
if ((salepageModel['flashsale_time'] * 1000) < currentDate) {
var date = new Date();
date.setHours( date.getHours() + 3);
flashsale_time = date;
$.post('/page/update-flashsale', {
id: salepageModel['id']
}).done(function(response) {
console.log(response, 'response');
});
}
$.post('/page/get-salepage', {
id: salepageModel['id']
}).done(function(response) {
var data = JSON.parse(response);
// console.log(response, 'response');
if (data.status) {
$('#txt_sold').text(formatNumber(data.salepage.sold));
}
});
var trackEventScroll = false;
var trackEventScroll20 = false;
var trackEventScroll40 = false;
var trackEventScroll60 = false;
var trackEventScroll80 = false;
var trackEventScroll100 = false;
if (!flashsale_time) {
flashsale_time = currentDate;
}
if (facebookPixels.length > 0) {
// Facebook Pixel ID
setEventSocial('facebook', 'ViewContent');
setEventSocial('line', 'ViewContent');
setEventSocial('tiktok', 'ViewContent');
setTimeout(function(){
setEventSocial('facebook', 'PageView_3s');
setEventSocial('line', 'PageView_3s');
}, 3000);
setTimeout(function(){
setEventSocial('facebook', 'PageView_10s');
setEventSocial('line', 'PageView_10s');
}, 10000);
setTimeout(function(){
setEventSocial('facebook', 'PageView_30s');
setEventSocial('line', 'PageView_30s');
}, 30000);
// console.log(salepagePixelEvent, 'salepagePixelEvent');
salepagePixelEvent.forEach(element => {
console.log(element['pixel_event_trigger_id'], 'element');
switch (element['pixel_event_trigger_id']) {
case 1: // Click Element
// $('.'+element['value']).click(function() {
// fbq('trackCustom', element['name']);
// });
$('img[data-src="'+ element['value'] +'"]').click(function() {
// fbq('trackCustom', element['name']);
setEventSocial('facebook', element['name']);
setEventSocial('line', element['name']);
});
break;
case 2: // Onload
// fbq('trackCustom', element['name']);
setEventSocial('facebook', element['name']);
setEventSocial('line', element['name']);
break;
case 3: // Time
var sec = parseInt(element['value']);
sec = sec * 1000;
setTimeout(function(){
// fbq('trackCustom', element['name']);
setEventSocial('facebook', element['name']);
setEventSocial('line', element['name']);
}, sec);
break;
default:
break;
}
});
$(window).scroll(function() {
var scroll = $(window).scrollTop();
var scrollPercent = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
if (scroll >= 100) {
if (trackEventScroll == false) {
trackEventScroll = true;
setEventSocial('facebook', 'ScrollSlide');
setEventSocial('line', 'ScrollSlide');
// fbq('trackCustom', 'ScrollSlide');
}
}
if (scroll >= 500) {
$('.btn-to-top').fadeIn(200);
} else {
$('.btn-to-top').fadeOut(200);
}
if (scrollPercent >= 20 && scrollPercent <= 39) {
if (trackEventScroll20 == false) {
trackEventScroll20 = true;
// fbq('trackCustom', 'ScrollSlide_20%');
setEventSocial('facebook', 'ScrollSlide_20%');
setEventSocial('line', 'ScrollSlide_20pc');
}
} else if (scrollPercent >= 40 && scrollPercent <= 59) {
if (trackEventScroll40 == false) {
trackEventScroll40 = true;
// fbq('trackCustom', 'ScrollSlide_40%');
setEventSocial('facebook', 'ScrollSlide_40%');
setEventSocial('line', 'ScrollSlide_40pc');
}
} else if (scrollPercent >= 60 && scrollPercent <= 79) {
if (trackEventScroll60 == false) {
trackEventScroll60 = true;
// fbq('trackCustom', 'ScrollSlide_60%');
setEventSocial('facebook', 'ScrollSlide_60%');
setEventSocial('line', 'ScrollSlide_60pc');
}
} else if (scrollPercent >= 80 && scrollPercent <= 99) {
if (trackEventScroll80 == false) {
trackEventScroll80 = true;
// fbq('trackCustom', 'ScrollSlide_80%');
setEventSocial('facebook', 'ScrollSlide_80%');
setEventSocial('line', 'ScrollSlide_80pc');
}
} else if (scrollPercent >= 100) {
if (trackEventScroll100 == false) {
trackEventScroll100 = true;
// fbq('trackCustom', 'ScrollSlide_100%');
setEventSocial('facebook', 'ScrollSlide_100%');
setEventSocial('line', 'ScrollSlide_100pc');
}
}
});
$('.btn-call-action-line').click(function() {
// fbq('trackCustom', 'ClickLine');
setEventSocial('facebook', 'ClickLine');
setEventSocial('line', 'ClickLine');
setEventSocial('tiktok', 'ClickButton');
});
$('.btn-call-action-facebook').click(function() {
// fbq('trackCustom', 'ClickFacebook');
setEventSocial('facebook', 'ClickFacebook');
setEventSocial('line', 'ClickFacebook');
setEventSocial('tiktok', 'ClickButton');
});
$('.btn-call-action-tel').click(function() {
// fbq('trackCustom', 'ClickCall');
setEventSocial('facebook', 'ClickCall');
setEventSocial('line', 'ClickCall');
setEventSocial('tiktok', 'ClickButton');
});
$('.btn-event-pixel').click(function() {
var event = $(this).data('event');
if (event) {
// fbq('trackCustom', event);
setEventSocial('facebook', event);
setEventSocial('line', event);
$(this).data('event', '');
}
console.log(event, 'btn-event-pixel');
});
}
$('.card-slide-img').slick({
arrows: false,
dots: true,
autoplaySpeed: 3000,
adaptiveHeight: true
});
$('#flashSaleTime').countdown(flashsale_time, function (event) {
$(this).html(event.strftime(
"<span class='badge badge-dark'>%I</span><span class='badge badge-dark'>%M</span><span class='badge badge-dark'>%S</span>"
));
});
$('#flashSaleTime2').countdown(flashsale_time, function (event) {
$(this).html(event.strftime(
"<span class='badge badge-dark'>%I</span><span class='badge badge-dark'>%M</span><span class='badge badge-dark'>%S</span>"
));
});
//
// Add smooth scrolling on all links inside the navbar
$("#navabarProductDetails a").on('click', function (event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function () {
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
//
$('#satisfaction').barrating({
theme: 'css-stars',
showSelectedRating: false
});
$('.satisfactionShow').barrating({
theme: 'css-stars',
showSelectedRating: false,
readonly: true
});
$('.container_timer').each(function() {
if (this) {
var cd = new Countdown({
cont: this,
countdown: true,
date: Date.parse(flashsale_time),
outputTranslation: {
year: '',
week: '',
day: '',
hour: txtHour,
minute: txtMinute,
second: txtSecond,
},
endCallback: null,
outputFormat: '|hour|minute|second',
});
cd.start();
}
});
if ($('.progress-bar').length > 0) {
var percent = $('#widget-percent').val() * 0.01;
$('.progress-bar').gradientProgressBar({
value: percent, // percentage
size: 300, // width
fill: { // gradient fill
gradient: ["#ff0000", "#dc3545"]
}
});
}
$('.btn-to-top').click(function () {
$("html, body").animate({scrollTop: 0}, 200);
});
if (parseInt(salepageModel['salepage_type']) == 5) {
$.post('/page/generate-form-checkout', {
id: salepageModel['id']
}).done(function(response) {
var data = JSON.parse(response);
if (data.status) {
console.log(data.html, 'data.html');
$('#form_onepage').html(data.html);
}
});
}
});</script></body>
</html>