Order by Mar 21 to receive parcel before festive holidays! Last pickup on Mar 28. Orders after this date will be processed on Apr 2. Thank you for choosing Onecare!
Your Cart
How it Works
Sign Up
Create an account and enjoy the first purchase reward
Shop & Earn
Accumulate your cashback as you shop and redeem exclusive products
Get Rewarded
Enjoy members-only privileges and receive special gifts on your birthday
Upgrade
Shop more and advance to the next tier for more gifts and benefits
The Wellness Club Tier Rewards
Questions about The Wellness Club
The Wellness Club is an upgraded loyalty program offering cashback, exclusive rewards, member-only gifts, and special promotions. Sign up for free and start enjoying the benefits today! Please refer to the Wellness Club Terms and Conditions here.
Your existing points will be converted into cashback. (100 points = USD 1)
If you return a product, the cashback earned from that purchase will be deducted from your account. For example, if you earned USD 50 cashback on a returned product, USD 50 will be subtracted from your cashback balance.
For more details, refer to our Return Policy.
For more details, refer to our Return Policy.
Only one promo code or voucher can be used per order.
' +
'{1} ' +
'{2}
' +
'' +
'' +
'
' +
'' +
''
});
}
}
/* Reload items in cart content
---------------------------------------------------------------------------- */
function reload_items_in_cart(pAction, pKey, pCode, pQty)
{
pQty = (pQty==null || pQty==undefined || pQty=='') ? 1 : pQty;
$.ajax({
type: 'GET',
url: 'https://www.onecare.store/home2024/ajax_get_cart_items.php?uRequestMode=ajax',
dataType: 'html',
success: function(html) {
if( html.trim()=='' )
{
var tl = new TimelineLite();
tl.to( $('.cart-control'),.5,{autoAlpha:0} );
tl.set( $('.cart-control.if-items'),{className:'+=hidden'} );
tl.set( $('.cart-control.if-empty'),{className:'-=hidden'} );
tl.to( $('.cart-control.if-empty'),.5,{autoAlpha:1,immediateRender:false} );
tl.to( $('html body'),.5,{scrollTop:0},'-=.5' );
}
else
{
// animation-start {
var tl = new TimelineLite();
tl.to($('.card-items-in-cart .card-body'),.5,{opacity:0});
tl.to($('.card-items-in-cart .card-body'),.5,{height:0});
$('.card-items-in-cart .card-body').html( html );
tl.set($('.card-items-in-cart .card-body'),{height:'auto'});
tl.from($('.card-items-in-cart .card-body'),.5,{height:0,immediateRender:false});
tl.to($('.card-items-in-cart .card-body'),.5,{opacity:1});
// } animation-end
// re-initialize event listener-start {
$('.selectpicker').selectpicker('mobile');
$('.prod-selector').bind('change',function(){
update_order( 'add', $(this).attr('data-key'), $(this).find('option:selected').val());
});
// } re-initialize event listener-end
}
update_order(pAction, pKey, pCode, pQty);
},
error: function(jqXHR) {
info_modal('Request failed',jqXHR.responseText);
}
});
}
/* Reload items in cart content
---------------------------------------------------------------------------- */
function reload_recommended_packages()
{
}
/* Pre-update order - before update_order is called
---------------------------------------------------------------------------- */
function pre_update_order(pAction, pKey, pCode, pQty)
{
var preOrderList = {};
pQty = (pQty==null || pQty==undefined || pQty=='') ? 1 : pQty;
if(orderList) for( i in orderList )
{
if( !orderList[i].qty )
{
orderList[i] = {"cod":orderList[i],"qty":1};
}
}
update_add_cart_button( pAction, pKey, pCode, pQty );
setCookie('orderList', JSON.stringify(orderList), 1);
update_cart_counter( orderList );
// if( JSON.stringify(preOrderList)!=JSON.stringify(orderList) )
update_estimate_discount_total( orderList );
}
/* convert voucher
---------------------------------------------------------------------------- */
var frmConvertVoucher = $('#frmConvertVoucher');
var frmConvertVoucherNotification = $('#frmConvertVoucher-notification');
function convert_voucher(action) {
content = '




- ';
if( json.error.length > 0 ) for( i=0;i
'+content+'
');
}, 1000);
}
else
{
info_modal('There were errors in your feedback submission:',content);
}
// frmFeedbackNotification.html(content);
}
else if( json.success )
{
clear_form_elements(frmFeedback);
if( section=='modal' )
{
var $infoModal = $('#info-modal');
$infoModal.find('.modal-header h4').html( json.success.title );
$infoModal.find('.modal-body').html( '' + json.success.content + '
' ); setTimeout(function(){ wdtFeedback.modal('hide'); $infoModal.modal('show'); }, 1000); } else { // frmFeedbackNotification.html(''); closeDialog( divNotificationDialog ); closeDialog( divLoadingDialog ); info_modal(json.success.title,json.success.content); } } }, error: function(jqXHR, textStatus, errorThrown) { alert(jqXHR.responseText) } }); } function change_country(country,language) { if(country != "") { var _url = "//www.onecare.store/ajax/ajax_set_country.php?uRedirect=0&uCountry=" + country; if( language.length > 0 ) _url += '&uLang=' + language; $.ajax({ url: _url, dataType: 'text', xhrFields: { withCredentials: true }, crossDomain: true, success: function(data) { if(data == "true") { var curUrl = document.location.href; var urldata, location; if( curUrl ) urldata = curUrl.split('?'); if( urldata ) { location = urldata[0]; //location += ( (urldata[1]) ? '?'+urldata[1]+'&' : '?' ) + 'uCountry=' + country; var params = new URLSearchParams(window.location.search); if( params.has('uCountry') ) params.set('uCountry',country); else params.append('uCountry',country); location += '?' + params.toString(); } else location = 'https://www.onecare.store'; if( language!=null && language!='' && language!='en' && !$.isNumeric(language) ) window.location = location + "#googtrans(en|"+ language +")"; else window.location = location; } else if(data == "false") { // SET country failed } } }); } } /* login ---------------------------------------------------------------------------- */ var wdtLogin = $('#wdtLogin-modal'); function login( frm ) { frm = (frm==undefined||frm=='') ? 'login-form' : frm; var frmLogin = $('#' + frm); var content = '

- ';
if( json.error.length > 0 ) for( i=0;i
'+content+'
');
}, 1000);
}
else
{
info_modal( 'There were errors in your request:', content );
// reset captcha
turnstile.reset();
}
}
else if( json.success )
{
if( frm=='frmLogin-modal' )
{
if( '' == '1' )
{
window.location = json.location;
}
else
{
window.location.reload();
}
}
else
{
closeDialog( divNotificationDialog );
closeDialog( divLoadingDialog );
if( frm == 'frmLoginDialog' )
{
var newURL = location.href;
var search = location.search.split('&');
newURL = '//' + location.host + location.pathname;
newURL += '?uCountry=' + json.response.country;
if( search.length > 0 ) for( i=0;i- ';
if( json.error.length > 0 ) for( i=0;i
Redeemed
');
}); //Updated on 20230619 - fong
$('#btn-bday-gift').on('click',function(){
var data={'hidProdPointId' :'birthday','hidProdName' :'Birthday Gift'}
reward_ctrl('frmRedeemBdayGift',data);
});
$('#btn-referral-gift').on('click',function(){
var data={'hidProdPointId' :'referral','hidProdName' :'Referral Gift'}
reward_ctrl('frmRedeemReferralGift',data);
});
$('.section-intro-class .btn-add-to-cart').on('click',function(){
var _qlimit=parseInt($(this).attr('data-qlimit-qty'));
key=$(this).data('key');
code=$(this).data('code');
qty=(orderList[key] && orderList[key].qty && orderList[key].cod==code) ? (parseInt(orderList[key].qty) + 1) :1;
var _content_ids=$(this).data('content_ids').split('.');
var _contents=[];
for(i=0;i<_content_ids.length;++i) {
_contents[_content_ids[i]]=1;
}
var _data={
content_ids:_content_ids,
content_name:$(this).data('content_name'),
content_category:'family',
content_type:'product',
num_items:_content_ids.length,
contents:_contents,
value:$(this).data('value'),
currency:'MYR'
};
// Fb Traking
if( fbq ) fbq('track', 'AddToCart', _data, {eventID:'1743042216'});
if( fbcapi ) fbcapi('AddToCart', _data);
// TT Tracking
if( typeof ttq=='object' && typeof ttq.track=='function' ) ttq.track('AddToCart');
// Google Tracking
if( typeof gtag==='function' ) {
// google analytic
gtag('event','button',{
'event_category':'click',
'event_label':'addtocart'
});
}
// check qlimit
if( qty > _qlimit ) {
qty=_qlimit;
info_modal('Purchase Limit','This item is limited to one quantity only and can only be purchased with non-trial items from Onecare store.');
}
else
{
setOrderList( key, code, qty );
setCookie('orderList', JSON.stringify(orderList), 1);
update_cart_counter( orderList );
update_estimate_discount_total( orderList );
}
reload_mini_cart_items( key, code, qty );
});
$('.calendar-wrapper > input').keydown(function(e){
if(e.keyCode==8 && !this.value.length){
$(this).prev('input').focus();
}
});
$('.btn-add-address').on('click',function(){
$('input[name=txtAddrFName]').val('');
$('input[name=txtAddrLName]').val('');
$('.dial-code').text('1');
$('input[name=hidAddrContactDialCode]').val('1');
$('input[name=txtAddrContact]').val('');
$('input[name=txtAddr]').val('');
$('input[name=txtAddrCity]').val('');
$('#optAddrState').val('');
$('input[name=txtAddrPostcode]').val('');
$('input[name=txtCountryTitle]').val('United States');
$('input[name=hidAddrCountry]').val('180');
$('input[name=chkAddrDefault]').prop('checked',false);
$('.btn-save').attr('href','javascript:config_address(\'frmConfigAddress\',\'\');');
$('#addressModal').modal('show');
});
//member tier table control
if(parseInt($('.section-your-journey').width()) < 425){
$('.table-size').css('width',parseInt($('.overflow-scroll').width()/2));
$('.table-title').css('width',parseInt($('.overflow-scroll').width()/2));
}
else if(parseInt($('.section-your-journey').width()) < 768){
$('.table-size').css('width',parseInt($('.overflow-scroll').width()/3));
$('.table-title').css('width',parseInt($('.overflow-scroll').width()/3));
}else{
$('.table-size').css('width',parseInt($('.overflow-scroll').width()/4));
$('.table-title').css('width',parseInt($('.overflow-scroll').width()/4));
}
$('a.go-right').click(function(event) {
var pos=$('div.overflow-scroll').scrollLeft() + parseInt($('.table-size').width()) ;
$('div.overflow-scroll').scrollLeft(pos);
});
$('a.go-left').click(function(event) {
var pos=$('div.overflow-scroll').scrollLeft() - parseInt($('.table-size').width());
$('div.overflow-scroll').scrollLeft(pos);
});
//points and vouchers tab btn
$('#nav-redeem > li > a').on('click',function(e){
if( $('#' + $(this).attr('aria-controls')).hasClass('in')===true ) return false
$('.section-my-points-voucher .tab-content .tab-body').removeClass('in');
$('.section-my-points-voucher .tab-content .tab-parent a[aria-controls='+ $(this).attr('aria-controls') +']').trigger('click');
$(this).parent().addClass('active');
});
$('.section-my-points-voucher .tab-content .tab-body').on('show.bs.collapse',function(e){
$('#nav-redeem > li').removeClass('active');
$('#nav-redeem > li > a[aria-controls='+ $(this).attr('id') +']').parent().addClass('active');
});
$('.section-my-points-voucher .tab-content .tab-body').on('hide.bs.collapse',function(e){
$('#nav-redeem > li').removeClass('active');
});
if( typeof(enquire)=='object' )
{
enquire.register('screen and (min-width:768px)', function() {
$('.section-my-points-voucher .tab-content .tab-body').removeClass('in');
$('#' + $('#nav-redeem > li.active a').attr('aria-controls') ).addClass('in')
});
}
//section-my-points-voucher tab control
$('.point-btn').on('click',function(){
if($(this).hasClass('active')){
return false;
}else{
$(this).addClass('active');
$('.voucher-btn, .reward-btn').removeClass('active');
$('.voucher-tab-wrapper, .reward-tab-wrapper').removeClass('in');
$('.point-tab-wrapper').collapse('show');
}
});
$('.voucher-btn').on('click',function(){
$(this).addClass('active');
$('.point-btn, .reward-btn').removeClass('active');
$('.point-tab-wrapper, .reward-tab-wrapper').removeClass('in');
$('.voucher-tab-wrapper').collapse('show');
});
$('.reward-btn').on('click',function(){
$(this).addClass('active');
$('.point-btn, .voucher-btn').removeClass('active');
$('.point-tab-wrapper, .voucher-tab-wrapper').removeClass('in');
$('.reward-tab-wrapper').collapse('show');
});
//copy to clipboard btn
$('#copy-to-clipboard').on('click',function(){
copyToClipboard();
});
//20210423
//modal section
$('#link').on('click',function(){
$('.field-link').fadeIn(1000);
});
$('#copy-link').on('click',function(){
copyToClipboard_link();
});
//profile card rotate to back
$('#edit-profile').on('click',function(){
$('.rotate-effect').css({
'transform':'rotateY(180deg)',
'perspective':'1000px',
'transition':'transform 1.5s',
'transform-style':'preserve-3d'
});
$('.bg-user.display-front').fadeOut(500,function(){
$('.bg-user.display-back').fadeIn(500);
$('.bg-user.display-back').css('transform','rotateY(180deg)');
});
});
$('#edit-profile-close').on('click',function(){
$('.rotate-effect').css({
'transform':'rotateY(0deg)',
'perspective':'1000px',
'transition':'transform 1.5s',
'transform-style':'preserve-3d'
});
$('.bg-user.display-back').fadeOut(500,function(){
$('.bg-user.display-front').fadeIn(500);
$('.bg-user.display-front').css('transform','rotateY(0deg)');
});
});
//voucher t&c rotate to back
$('.term-and-condition').on('click',function(){
$(this).parents('.voucher-bg').css({
'transform':'rotateX(180deg)',
'perspective':'1000px',
'transition':'transform 1.5s',
'transform-style':'preserve-3d'
});
$(this).parents('.voucher-front').fadeOut(500,function(){
$(this).siblings('.voucher-tnc').fadeIn(20,function(){
$(this).parents('.voucher-img-middle').siblings('.voucher-img-bottom').addClass('active');
$(this).find('.tnc-body').html('T&C
- E-Voucher code must be entered at the checkout page to be redeemed.
- E-Voucher is valid for a single transaction only.
- The validity of expired E-Vouchers cannot be extended.
- E-Voucher is non-refundable and cannot be exchanged for cash.
loading...
');
},
dataType: 'html',
success: function(html)
{
$('#mdlChooseLanguage .language-group-list').html( html );
},
error: function(jqXHR) {
$('#mdlChooseLanguage .language-group-list').html( '' );
}
});
});
// $(function() {
// $(this).bind("contextmenu", function(e) {
// e.preventDefault();
// });
// })
// Chrome
if( $.browser && $.browser.chrome )
{
$('.section-products *:not(span,p)').each(function(){
var bgimg = null;
if (this.currentStyle)
bgimg = this.currentStyle['backgroundImage'];
else if (window.getComputedStyle)
bgimg = document.defaultView.getComputedStyle(this,null).getPropertyValue('background-image');
bgimg = bgimg.replace(/^url\((.*?)\)$/, '$1');
if(bgimg!='none') $(this).css('background-image','none').attr('data-bg',bgimg);
});
}
$.lazyLoadXT.autoInit = false;
$("img.lazy,[data-bg],[data-src],[role=lazyloadxt]").lazyLoadXT();
if( $.browser && $.browser.chrome ) $(".section-products").lazyLoadXT();
if( $('[rel=popover]').length > 0 ) $('[rel=popover]').popover();
$('.popover-custom-content').each(function(){
var content = $(this).find('.popover-content').html();
$(this).popover({'placement':'bottom','content':content});
});
// remove padding-top for first section-title
$('.sidebar-container .section-title:first').addClass('padT0');
// scroll to contact form
$('.scroll-to-contact').bind('click',function(){
TweenLite.to( $('html, body'), 1, {scrollTop:$('#wdtContact').offset().top - $('#header').height(),ease:Cubic.easeOut} );
});
function hideAllTabContent(){
$(this).addClass('hidden')
}
function showThisTabContent(){
$(this).removeClass('hidden');
}
if( $("a[rel^='prettyPhoto']").length > 0 ) $("a[rel^='prettyPhoto']").prettyPhoto();
if( $("a[rel^='tooltip']").length > 0 ) $("*[rel^='tooltip']").tooltip();
if( $(".select2").length > 0 ) $(".select2").select2();
if( $('ads-notifier').length > 0 )
{
// ads-notifier {
$('#ads-notifier-agfactor').addClass('hidden');
$('#ads-notifier-praventac').addClass('hidden');
var strAdsNotId = null;
$(strAdsNotId).removeClass('hidden');
function maximize_ads_notifier() {
if( $(strAdsNotId + ' .ads-notifier').css('right') != '0px' )
{
TweenLite.to($(strAdsNotId + ' .ads-notifier'),.5,{scaleX:1, scaleY:1,autoAlpha:1,right:0,bottom:0});
$(strAdsNotId + ' .ads-notifier a').css('left','0px');
}
}
function minimize_ads_notifier() {
if( $(strAdsNotId + ' .ads-notifier').css('right') == '0px' )
{
TweenLite.to($(strAdsNotId + ' .ads-notifier'),.5,{scaleX:.5, scaleY:.5,autoAlpha:1,right:-235,bottom:-25});
$(strAdsNotId + ' .ads-notifier a').css('left','100px');
}
}
function popup_ads_notifier_desc() {
$(strAdsNotId + ' .ads-notifier').popover('destroy');
if( $(strAdsNotId + ' .ads-notifier').css('right') != '0px' )
{
var title = $(strAdsNotId + ' .ads-notifier .header').html(),
content = $(strAdsNotId + ' .ads-notifier .body').html().replace(' ','');
content = content.replace(' ');
$(strAdsNotId + ' .ads-notifier').popover({
'html': true,
'placement': 'left',
'trigger': 'hover',
'title': title,
'content': content + '[Click to Expand]' }); $(strAdsNotId + ' .ads-notifier').on('shown.bs.popover', function () { var top = $(strAdsNotId + '').parent().find('.popover').css('top'); top = top.replace('px'); top = parseInt(top) - 40; $(strAdsNotId + '').parent().find('.popover').css({'top':top}); $(strAdsNotId + '').parent().find('.popover-content').css({'white-space':'pre-wrap'}); }); $(strAdsNotId + ' .ads-notifier').popover('show'); } } $(strAdsNotId + ' .ads-notifier').bind('mouseover',function(){ popup_ads_notifier_desc(); }); $(strAdsNotId + ' .ads-notifier .overlay-image').bind('click',function(){ maximize_ads_notifier(); }); $(strAdsNotId + ' .ads-notifier .close').bind('click',function(){ minimize_ads_notifier(); }); minimize_ads_notifier(); setTimeout(function(){ maximize_ads_notifier(); setTimeout(function(){ minimize_ads_notifier(); },8000); },5000); } // } end // Cross-Browser HTML5 Placeholder Text if(!Modernizr.input.placeholder){ $('[placeholder]').focus(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $(this); if (input.val() == '' || input.val() == input.attr('placeholder')) { input.addClass('placeholder'); input.val(input.attr('placeholder')); } }).blur(); $('[placeholder]').parents('form').submit(function() { $(this).find('[placeholder]').each(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); } }) }); } $("#divAnnoBxslider").modernTicker({ effect: "scroll", scrollType: "discontinuous", scrollInterval: 20, transitionTime: 500, autoplay: true, marginLeft: '1120px' }); // Set datepiker setting $.datepicker.setDefaults( $.datepicker.regional[ "" ] ); // Cross-Browser CCS3 Seletor $('select').each(function() { if( !$(this).hasClass('nowrap') ) $(this).wrap(''); }); // READ cookie cookieOrderList = getCookie('orderList'); cookieRedeemList = getCookie('redeemList'); ///. Updated on 20241127 Jun Jie - Subscription // End on 20241127 Jun Jie - Subscription if( cookieOrderList!='' && cookieOrderList!=undefined && cookieOrderList!=null ) { cookieOrderList = JSON.parse( cookieOrderList ); for( i in cookieOrderList ) { if( !cookieOrderList[i].qty ) { cookieOrderList[i] = {"cod":cookieOrderList[i],"qty":1}; } } } else cookieOrderList = {}; if( cookieRedeemList!='' && cookieRedeemList!=undefined && cookieRedeemList!=null ) { cookieRedeemList = JSON.parse( cookieRedeemList ); for( i in cookieRedeemList ) { if( !cookieRedeemList[i].qty ) { cookieRedeemList[i] = {"cod":cookieRedeemList[i].cod,"qty":1,"mode":cookieRedeemList[i].mode}; } } } else cookieRedeemList = {}; // Updated on 20241128 Jun Jie - Subscription // UPDATE order list orderList = cookieOrderList; redeemList = cookieRedeemList; finalList = customMerge({},cookieOrderList,cookieRedeemList); update_cart_counter( finalList ); update_estimate_discount_total( cookieOrderList ); update_estimate_cashback_total( cookieRedeemList ); // LOGIN DROPDOWN { var loginToggle = $('#login-toggle'); var loginBox = $('#login-box'); var loginForm = $('#login-form'); loginToggle.bind('click',function() { loginBox.removeClass('hidden'); loginToggle.addClass('active'); }); $(this).mouseover(function(elem) { if(!($(elem.target).parents().hasClass('login-wrapper'))) { loginToggle.removeClass('active'); loginBox.addClass('hidden'); } }); // } LOGIN DROPDOWN // NOTIFICATION DIALOG // -- a workaround for a flaw in the demo system (//dev.jqueryui.com/ticket/4375), ignore! $( "#notification-dialog:ui-dialog" ).dialog( "destroy" ); divNotificationDialog.dialog({ autoOpen: false, // set this to false so we can manually open it modal: true, width: 450, buttons: { Close: function() { $( this ).dialog( "close" ); } }, open: function() { // scrollbar fix for IE $('body').css('overflow','hidden'); $( this ).removeClass('hidden'); }, close: function() { // reset overflow $('body').css('overflow','auto'); $( this ).addClass('hidden'); } }); // end of dialog // LOADING DIALOG // -- a workaround for a flaw in the demo system (//dev.jqueryui.com/ticket/4375), ignore! $( "#loading-dialog:ui-dialog" ).dialog( "destroy" ); // create the loading window and set autoOpen to false divLoadingDialog.dialog({ autoOpen: false, // set this to false so we can manually open it dialogClass: "loading-dialog", closeOnEscape: false, draggable: false, width: 460, minHeight: 50, modal: true, buttons: {}, resizable: false, open: function() { // scrollbar fix for IE $('body').css('overflow','hidden'); $( this ).removeClass('hidden'); }, close: function() { // reset overflow $('body').css('overflow','auto'); $( this ).addClass('hidden'); } }); // end of dialog // -- a workaround for a flaw in the demo system (//dev.jqueryui.com/ticket/4375), ignore! $( "#login-dialog:ui-dialog" ).dialog( "destroy" ); // create the loading window and set autoOpen to false divLoginDialog.dialog({ autoOpen: false, // set this to false so we can manually open it dialogClass: "login-dialog", closeOnEscape: false, draggable: false, width: 460, minHeight: 50, modal: true, buttons: { "Log In" : function(){ var bValid = true; allFields.removeClass( "ui-state-error" ); bValid = bValid && checkLength( email, "email", 6, 80 ); bValid = bValid && checkEmpty( password, "Password" ); // From jquery.validate.js (by joern), contributed by Scott Gonzalez: //projects.scottsplayground.com/email_address_validation/ bValid = bValid && checkRegexp( email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. ui@jquery.com" ); if ( bValid ) { $( this ).dialog( "close" ); login( 'frmLoginDialog' ); } }, Cancel: function() { $( this ).dialog( "close" ); } }, resizable: false, open: function() { // scrollbar fix for IE $('body').css('overflow','hidden'); $( this ).removeClass('hidden'); }, close: function() { // reset overflow $('body').css('overflow','auto'); $( this ).addClass('hidden'); allFields.val( "" ).removeClass( "ui-state-error" ); } }); // end of dialog $('div.ui-dialog button.ui-button').each(function() { $(this).children('.ui-button-text').html($(this).attr('text')); }); // READ cookie cookieOrderList = getCookie('orderList'); if( cookieOrderList!='' && cookieOrderList!=undefined && cookieOrderList!=null ) { cookieOrderList = JSON.parse( cookieOrderList ); for( i in cookieOrderList ) { if( !cookieOrderList[i].qty ) { cookieOrderList[i] = {"cod":cookieOrderList[i],"qty":1}; } } } else cookieOrderList = {}; ///. Updated on 20250218 Jun Jie - Subscription // READ cookie cookieSubList = getCookie('subList'); if( cookieSubList!='' && cookieSubList!=undefined && cookieSubList!=null ) { cookieSubList = JSON.parse( cookieSubList ); for( i in cookieSubList ) { if( !cookieSubList[i].qty ) { cookieSubList[i] = {"cod":cookieSubList[i],"qty":1}; } } } else cookieSubList = {} // End on 20250218 Jun Jie - Subscription // remove any inactive items if( false && false ) { if( ! $.isEmptyObject(cookieOrderList) ) for( orderKey in cookieOrderList) { if( orderKey==201 ) delete cookieOrderList[orderKey]; } } // if( console && console.log ) console.log(cookieOrderList); finalList = customMerge({},cookieRedeemList,cookieOrderList) update_cart_counter( finalList ); // header animation $('.animate-item1').fadeIn('slow',function(){ w = $('.animate-item2').width(); $('.animate-item2').width(0).show().delay(500).animate({width:w},'slow',function(){ $('.animate-item3').fadeIn('slow'); }); }); setInterval( function(){ $('body').removeAttr('style'); $('.goog-te-banner-frame.skiptranslate').hide(); $('.goog-te-gadget-simple').css({backgroundColor:'#F1F3F4',font:'700 13px CorisandeRegular',letterSpacing:'-1px'}); $('.goog-te-gadget-simple > img').hide(); },3000) TweenLite.to( $('.page-body'),.5,{autoAlpha:1} ); // $('.selectpicker [name!=optChangeCountry]').selectpicker('mobile'); // $('.selectpicker [name=optChangeCountry]').selectpicker(); $('.page-onload').removeClass('page-onload'); });// end of document ready //Add reward to cart - 20231122 - fong function reward_add_to_cart(id,name,type,cCode,code,val,btn) { $('.'+btn+'-wrapper').html('Redeemded'); var data = { 'hidProdId': id, 'hidProdName' : name, 'prod_cat_type' : type, 'prod_cat_code' : cCode, 'prod_code' : code, 'prod_value' : val } reward_ctrl('frmAddToCart',data); } ///. Updated on 20250218 Wong Jun Jie - Subscription // reset all subMode to normal when add item to cart function sub_mode_change_alert(action) { // clear uSubFromOrder and uCombineFromSub cookies setCookie('uSubFromOrder','', -1); setCookie('uCombineFromSub','', -1); // action if (action == 'delete') { actionStr = 'Deleted item from cart, '; titleStr = 'Remove item from Cart'; } else { actionStr = 'Added item to cart, '; titleStr = 'Add to Cart'; } if (subList) { var first = false; for (const [key, value] of Object.entries(subList)) { if (!first && subList[key]['sub_mode'] !== 'normal') { info_modal(titleStr + ' while Combine/Convert',actionStr + 'your other subscription items have also been converted to normal. Subscription item quantities have been set to 1.'); first = true; } subList[key]['sub_mode'] = 'normal'; if (true) { subList[key]['qty'] = 1; } } setCookie('subList', JSON.stringify(subList), 1); } } // End 20250218 Wong Jun Jie - Subscription -->