購買任何LUX Botanicals沐浴露,可於指定時間內作$10使用。
現金券使用細則及條款:
tags, as close as possible to the opening tag.
Creation Date: 03/05/2019
-->
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/ }
if(store_id == 2){
fbq('track', 'Watsons');
/*
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/ }
if(store_id == 3){
fbq('track', 'Wellcome');
/*
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/ }
if(store_id == 4){
fbq('track', 'ParknShop');
/*
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/
$("body").append(''); }
if(store_id == 7){
fbq('track', 'HKTVmall');
/*
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/ }
if(store_id == 5){
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('
'); }
}
//store popup
var trackCustomEventForPopup = function(store_id){
}
// console.log(online_id, retail_id);
if( online_id != "" && retail_id == ""){
selectedStoreId = online_id;
selectedCouponType = "online";
trackE(currentPageName, "Select Channel", currentCouponName + " + " + storeProps[online_id]["store_brand"]);
trackCustomEventForStore(online_id);
proceedToConfirm();
}else if(online_id=="" && retail_id != ""){
selectedStoreId = retail_id;
selectedCouponType = "retail";
trackE(currentPageName, "Select Channel", currentCouponName + " + " + storeProps[retail_id]["store_brand"]);
trackCustomEventForStore(retail_id);
proceedToConfirm();
}else{
$("#selected_store_logo_image").attr("src", brand_image);
$("#select_store_popup .retail_button").unbind( "click" );
$("#select_store_popup .retail_button").click(function(){
selectedStoreId = retail_id;
selectedCouponType = "retail";
$("#select_store_popup .retail_button, #select_store_popup .online_button").unbind("click");
trackE(currentPageName + " - " + storeProps[retail_id]["store_brand"],
"Select Channel",
currentCouponName + " + " + storeProps[retail_id]["store_brand"] + " + Retail" );
trackCustomEventForStore(retail_id);
proceedToConfirm();
});
$("#select_store_popup .online_button").unbind( "click" );
$("#select_store_popup .online_button").click(function(){
selectedStoreId = online_id;
selectedCouponType = "online";
$("#select_store_popup .retail_button, #select_store_popup .online_button").unbind("click");
trackE(currentPageName + " - " + storeProps[online_id]["store_brand"],
"Select Channel",
currentCouponName + " + " + storeProps[online_id]["store_brand"] + " + eStore" );
trackCustomEventForStore(online_id);
proceedToConfirm();
});
$.fancybox.open({
src : "#select_store_popup",
type : 'inline',
opts : {
margin:0,
touch : false
}
});
trackCustomEventForPopup(retail_id);
trackE(currentPageName + " - " + storeProps[retail_id]["store_brand"],
"Page View",
currentCouponName + " + " + storeProps[retail_id]["store_brand"]);
}
});
/*step 2 to step 3*/
/*cancel*/
$("#cancel_redeem_confirmation").click(function(){
$(".store_confirm").hide();
$(".store_option").fadeIn(300);
$(".retailcode_container").removeClass("digitalsign");
$(".redeem_coupon_container").css("background-color", "");
trackE(currentPageName + " - Retail Countdown Alert", "Cancel Activate", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
});
/*confirm*/
$("#confirm_redeem_btn").click(function(){
$.post(ROOT_PATH + "apir/redeem_coupon", {
cid: $("input[name='cid']").val(),
sid: selectedStoreId,
}, function(data){
if(data.s){
toast("已成功換領優惠券");
is_redeem = true;
$("#step_2").hide();
$("#step_3").fadeIn(300);
$(".step_circle").removeClass("active");
$(".step_circle:eq(2)").addClass("active");
customTrackActivation();
if(data.coupon_type == "retail"){
//countdown
trackE(currentPageName + " - Retail Countdown Alert", "Activate", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
trackE(currentPageName + " - Retail", "Page View", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
var endTime = new Date();
endTime.setMinutes( endTime.getMinutes() + coupon_redemption_time_limit );
endTimeStr = endTime.getFullYear() + "/" + (parseInt(endTime.getMonth())+1) + "/" + endTime.getDate() + " " + endTime.getHours() + ":" + endTime.getMinutes() + ":" + endTime.getSeconds() ;
$("#coupon_countdown").countdown(endTimeStr, function(event) {
$(this).text(
event.strftime('%N:%S')
);
}).on("finish.countdown", function(){
$(".countdown_item").remove();
display_popup("優惠券換領期已過", "優惠券的有效換領時間已過期,此頁面將於10秒後更新");
setTimeout( function(){
window.location.reload();
}, 10000);
});
$("#coupon_countdown").fadeTo(300,1);
$("#retail_redemption_code_container").fadeIn(300);
$("#barcode_image").attr("src", ROOT_PATH + "_ul/" + data.r_code_image);
if( typeof(data.r_qrcode_image) != "undefined" && data.r_qrcode_image != null ){
if(data.r_qrcode_image.length>0){
$("#qrcode_image").attr("src", ROOT_PATH + "_ul/" + data.r_qrcode_image).show();
$("#retail_code").addClass("large");
}
}else{
$("#qrcode_image").hide();
}
if( typeof(data.r_vcode) != "undefined" && data.r_vcode != null ){
if(data.r_vcode.length>0){
$("#vcode_container").show();
$("#vcode_container span").html(data.r_vcode);
}
}else{
$("#vcode_container").hide();
}
if( typeof(data.r_address) != "undefined" && data.r_address != null ){
if(data.r_address.length>0){
$("#address_container").show();
}
}else{
$("#address_container").hide();
}
if(data.r_dsign=="Y"){
$(".retailcode_container").addClass("digitalsign");
}else{
$(".retailcode_container").removeClass("digitalsign");
}
if(coupon_redemption_time_limit != 0){
$(".marqueetext").show();
}else{
$(".marqueetext").hide();
}
}else if(data.coupon_type == "online") {
trackE(currentPageName + " - eStore", "Page View", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
var s = storeProps[selectedStoreId]["store_brand"];
trackA37(currentCouponName, s);
$("#online_coupon_code").html(data.o_code);
$("#online_coupon_code_value").val(data.o_code);
$("#copy_online_coupon_code_btn").attr("data-clipboard-text", data.o_code);
$("#online_store_url_btn").attr("href", data.o_url);
$("#online_redemption_code_container").fadeIn(300);
if( typeof(data.color_code_unlimited) != "undefined" && data.color_code_unlimited != ""){
container_color_code = data.color_code_unlimited;
}
if( typeof(data.color_code_limited) != "undefined" && data.color_code_limited != ""){
container_color_code = data.color_code_limited;
}
if(typeof(container_color_code) != "undefined"){
$(".redeem_coupon_container, .howtouse_coupon_container, .howtouse_coupon_container").css("background-color", container_color_code);
$(".howtouse_coupon_title, .howtouse_coupon_title ").css("color", "#333");
}
if( typeof(data.button_color_code_unlimited) != "undefined" && data.button_color_code_unlimited != null){
button_color_code = data.button_color_code_unlimited;
}
if( typeof(data.button_color_code_limited) != "undefined" && data.button_color_code_limited != null){
button_color_code = data.button_color_code_limited;
}
if(typeof(button_color_code) != "undefined"){
$("body").append(
' '
);
}
}
$("#step_3").find(".store_list_item").hide();
$("#step_3").find(".store_list_item[data-id='"+selectedStoreId+"']").fadeIn(300);
}else{
// toast(data.d);
if(data.d == "OUT_OF_STOCK"){
trackA32(currentPageName + ": Out of stock");
display_popup("未能換領優惠券","抱歉,優惠券已換罄,請選擇其他優惠券", "查看最新優惠", function(){
window.location = ROOT_PATH + "latest-coupon/";
});
}else if(data.d == "DISABLED"){
trackA32(currentPageName + ": Coupon Disabled");
display_popup("未能換領優惠券","抱歉,優惠券已換罄,請選擇其他優惠券", "查看最新優惠", function(){
window.location = ROOT_PATH + "latest-coupon/";
});
}else if(data.d == "TIME_INVALID"){
trackA32(currentPageName + ": Time Invalid");
display_popup("未能換領優惠券","抱歉,優惠券換領期已過,請選擇其他優惠券", "查看最新優惠", function(){
window.location = ROOT_PATH + "latest-coupon/";
});
}else if(data.d == "DUPLICATE"){
trackA32(currentPageName + ": Duplicate");
display_popup("未能換領優惠券","抱歉,您已換領過此優惠券,請選擇其他優惠券", "查看最新優惠", function(){
window.location = ROOT_PATH + "latest-coupon/";
});
}else{
trackA32(currentPageName + ": Unknown error");
display_popup("未能換領優惠券","抱歉,請稍後再試", "查看其他優惠", function(){
window.location = ROOT_PATH + "latest-coupon/";
});
}
}
});
});
var clipboard = new ClipboardJS('.copy_code_container');
clipboard.on('success', function(e) {
if($(window).width() <= 768){
display_popup(null, "已複製優惠代碼");
}else{
toast("已複製優惠代碼");
}
trackE(currentPageName + " - eStore", "Copy Code", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
});
//finish
$(".finish_redemption_btn").click(function(){
$.post(ROOT_PATH + "apir/finish_redemption", {cid: $("input[name='cid']").val(), sid: selectedStoreId}, function(data){
if(data.s){
if(storeProps[selectedStoreId]["type"] == "retail"){
trackE(currentPageName + " - Retail", "Redeem", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
}else{
trackE(currentPageName + " - eStore", "Redeem", currentCouponName + " + " + storeProps[selectedStoreId]["store_brand"]);
}
trackA43(currentCouponName);
window.location = data.url;
}else{
display_popup("未能完成紀錄更新","抱歉,請稍後再試");
}
});
});
$(".store_location_btn").click(function(){
var cid = $("input[name='cid']").val();
openStoreList(selectedStoreId, cid);
});
customTrackPageView();
function customTrackRegistrationFb(){
fbq('track', 'CouponPageCouponRegistration');
/*
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/
}
function customTrackRegistrationGoogle(){
}
function customTrackPageView(){
/*
*/
var axel = Math.random() + "";
var a = axel * 10000000000000;
$("body").append('');
/*
*/
}
//activation
function customTrackActivation(){
}
});
function shareCoupon(stage){
if(is_redeem){
trackE(currentPageName + " - " + stage, "Share after redeem", currentCouponName);
}else{
trackE(currentPageName + " - " + stage, "Share before redeem", currentCouponName);
}
trackA47("Facebook");
sharePage("https://promotion.unilever.hk/coupon/lux/botanicals-201903");
}