Panier

Panier




Clause de non-responsabilité: Tous les produits MyFitFuel fabriqués et vendus en Inde sont fabriqués dans des installations de fabrication approuvées par la FSSAI. Ces produits ne sont pas destinés à diagnostiquer, guérir, traiter ou prévenir une maladie quelconque. Avant d'acheter et d'utiliser, veuillez lire les détails du produit donnés sur l'emballage du produit. Toutes les informations fournies par MyFitFuel, y compris les FAQ, les articles, les vidéos sur son site Web ou son sous-domaine, sont uniquement fournies à des fins d'information. Ces informations ne constituent ni une alternative ni un substitut aux conseils fournis par un professionnel de la santé ou un médecin. Ces déclarations sont données à titre indicatif et n'ont pas été ratifiées par les gouvernements ou les agences embauchées par les gouvernements.

function isEmail(email) { const re = /^(((^()()\.,;:s@")+(.(^()()\.,;:s@")+)*)|(".+"))@((((0-9){1,3}.(0-9){1,3}.(0-9){1,3}.(0-9){1,3}))|(((a-zA-Z-0-9)+.)+(a-zA-Z){2,}))$/; return re.test(email); }; function isMobile(mobile) { const re = /^((0-9){10})$/; return re.test(mobile); };

function captureCustomer(name,email,mobile,step){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/captureCustomer/', { method: 'post', parameters: {'name':name,'email': email,'mobile':mobile,'step':step}, onSuccess: function(response){ } }); } function show_hide_otpforms(formid){ var i=0; if (formid == "0"){ var customer = $('otpemail').value; var contact; if(isEmail(customer) || isMobile(customer)){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/sendOtp/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response) { if (200 == response.status) { $('otpSuccess').hide(); var content = response.responseText.evalJSON(); var message; console.log(customer); if(content.mobile != 0){ if(isEmail(customer)){ contact= content.mobile; message = 'OTP Sent again checkout '+customer+' or '+contact; } if(isMobile(customer)){ contact= content.email; message = 'OTP Sent again checkout'+customer+' or '+contact; } }else{ message = customer+' not registered or the input is incorrect'; } setTimeout(function() { $('otpformSuccess').hide(); }, 10000); console.log(contact); $('otpformSuccess').show(); $('otpformSuccess').update(message); } }, onFailure: failureFunc });

$('login_block').hide(); if($('deliveryId') != undefined) { $('deliveryId').hide(); } $('otp_block').show(); $('otpemail').setValue(customer);

}else{ $('formSuccess').show(); $('formSuccess').update('Enter a valid email or phone number.'); } }else if (formid == "1"){ var customer = $('oemail').value; $('progress_image_otp').show(); if(isEmail(customer) || isMobile(customer)){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/verifyCustomer/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response){ $('progress_image_otp').hide(); var content = response.responseText.evalJSON(); if(content){ $('login_block').show(); $('form_login').show(); $('o_block').hide(); $('email2').setValue(customer); $('l_email').setValue(customer); if($('deliveryId') != undefined) { $('login-form').show(); $('deliveryId').hide(); $('buttons-set-1').toggle(); } }else{ $('o_block').hide(); $('register_block').show(); $('rotp').hide(); $('rblock').show(); if(isEmail(customer)){ $('email_register').setValue(customer); $('editREmail').show(); $('editRMobile').hide(); $('email_register').disable(); $('phone_register').enable(); if($('deliveryId') != undefined) { captureCustomer('null',customer,'null','3'); }else{ captureCustomer('null',customer,'null','1'); } } if(isMobile(customer)){ $('phone_register').setValue(customer); $('editRMobile').show(); $('editREmail').hide(); $('phone_register').disable(); $('email_register').enable(); if($('deliveryId') != undefined) { captureCustomer('null','null',customer,'3'); }else{ captureCustomer('null','null',customer,'1'); } }

} } }); }else{ $('oSuccess').show(); $('progress_image_otp').hide(); $('oSuccess').update('Enter a valid email or phone number.'); }

} else if (formid == "2"){ var customer = $('l_email').value; var contact; $('progress_image_login').show(); if(isEmail(customer) || isMobile(customer)){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/sendOtp/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response) { $('progress_image_login').hide(); if (200 == response.status) { var content = response.responseText.evalJSON(); var message; if(content.mobile != 0){ if(isEmail(customer)){ contact= content.mobile; message = 'OTP send to above registered email '+customer+' and mobile '+contact; } if(isMobile(customer)){ contact= content.email; message = 'OTP send to above registered mobile '+customer+' and email '+contact; } $("resendotp").addClassName('disable'); $('resendotp').disable(); if($('resendotp2') != undefined) { $("resendotp2").addClassName('disable'); $('resendotp2').disable(); } }else{ message = customer+' not registered or the input is incorrect'; } console.log(content); setTimeout(function() { $("resendotp").enable(); $("resendotp").removeClassName('disable'); if($('resendotp2') != undefined) { $("resendotp2").enable(); $("resendotp2").removeClassName('disable'); } $('otpformSuccess').hide(); }, 30000); $('otpformSuccess').show(); $('otpformSuccess').update(message); } }, onFailure: failureFunc });

$('login_block').hide(); if($('deliveryId') != undefined) { $('deliveryId').hide(); } $('otp_block').show(); $('otpemail2').setValue(customer); $('otpemail').setValue(customer);

}else{ $('formSuccess').show(); $('formSuccess').update('Enter a valid email or phone number.'); } }else if (formid == "3"){ var name = $('name_register').value; var email = $('email_register').value; var mobile = $('phone_register').value; $('progress_image_forgot').show(); if(isEmail(email) && isMobile(mobile) && name != ''){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/registerCustomer/', { method: 'post', parameters: {'email': email,'mobile':mobile,'name':name}, onSuccess: function(response) { $('progress_image_forgot').hide(); if (200 == response.status) { var str1 = response.responseText; var str2 = 'alr'; if(str1.indexOf(str2) == -1){ $('register_otp').show(); $('register_otp_button').show(); $('register_button').hide(); $('rformMobile').hide(); $('rformEmail').hide(); $('rformSuccess').update("Enter OTP sent to above email and phone number"); $('rformSuccess').show(); $('resendotp').show(); setTimeout(function() { $('rformSuccess').hide(); $("resendotp").enable(); $("resendotp").removeClassName('disable'); }, 30000); }else{ //$("rformSuccess").show(); if(str1.indexOf("phone") == 9){ //$("rformSuccess").update("Mobile already exists. Please try login by clicking on Change button"); $('rformMobile').show(); $('rformMobile').update("Mobile number already exists. Please Click back button below and login using this Mobile Number").addClassName('info_errors'); } else { //$("rformSuccess").update("Email id already exists. Please try login by clicking on Change button "); $('rformEmail').show(); $('rformEmail').update("Email id already exists. Please Click back button below and login using this email").addClassName('info_errors'); } } } }, onFailure: failureFunc });

$('login_block').hide(); if($('deliveryId') != undefined) { $('deliveryId').hide(); }

}else{ $('progress_image_forgot').hide(); if(name == ''){ $('rformName').show(); $('rformName').update('Enter your name').addClassName('info_errors'); } if(!isMobile(mobile)){ $('rformMobile').show(); $('rformMobile').update('Enter your mobile').addClassName('info_errors'); } if(!isEmail(email)){ $('rformEmail').show(); $('rformEmail').update('Enter your valid email').addClassName('info_errors'); } //$('rformSuccess').show(); //$('rformSuccess').update('Enter valid values in the above given fields.'); } }else if (formid == "4"){ var customer = $('phone_register').value; var contact; $('progress_image_forgot').show(); if(isEmail(customer) || isMobile(customer)){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/sendOtp/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response) { $('progress_image_forgot').hide(); if (200 == response.status) { $('rformOTP').hide(); var content = response.responseText.evalJSON(); var message; console.log(customer); if(content.mobile != 0){ if(isEmail(customer)){ contact= content.mobile; message = 'OTP send to above registered email '+customer+' and mobile '+contact; } if(isMobile(customer)){ contact= content.email; message = 'OTP send to above registered mobile '+customer+' and email '+contact; } }else{ message = customer+' not registered or the input is incorrect'; } setTimeout(function() { $('rformSuccess').hide(); }, 30000); if(i>0){ message = 'OTP resend checkout mobile '+customer+' and email '+contact; } $('rformSuccess').show(); $('rformSuccess').update(message); } }, onFailure: failureFunc });

}else{ $('formSuccess').show(); $('formSuccess').update('Enter a valid email or phone number.'); } }else if (formid == "5"){ $('login_block').hide(); $('otp_block').hide(); $('register_block').hide(); $('o_block').show(); }else if (formid == "6"){ if($('deliveryId') != undefined) { $('login-form').hide(); $('deliveryId').hide(); $('forget_password_capture').show(); } $('login_block').show(); $('form_login').hide() $('otp_block').hide(); $('register_block').hide(); $('o_block').hide(); $('forget_password_div').show(); $('forget_password_capture').show(); $('forget_password').setValue($('l_email').value); }else if (formid == "7"){ if(isMobile($('phone_register').value) && isEmail($('email_register').value) && $('first_name').value != '' && $('last_name').value != '' && $('password_register').value != '' ){ $('rotp').show(); $('rblock').hide(); $("rresendotp").addClassName('disable'); var mobile = $('phone_register').value; var password = $('password_register').value; var email = $('email_register').value; var message; $('progress_image_forgot1').show(); $('rmobile').setValue(mobile); $('confirmation').setValue(password); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/sendRegistrationOtp/', { method: 'post', parameters: {'mobile': mobile, 'email' :email}, onSuccess: function(response) { $('progress_image_forgot1').hide(); if (200 == response.status) { var content = response.responseText.evalJSON(); console.log(content); setTimeout(function() { $('roformOTPLogin').hide(); $("rresendotp").enable(); $("rresendotp").removeClassName('disable'); $('roformSuccess').hide(); }, 30000); if(i == 0 ){ message = 'Enter the otp sent on the mobile '+content.mobile+' and email '+content.email; }else{ message = 'OTP resent on mobile '+content.mobile+' and email '+content.email; }

$('roformSuccess').show(); $('roformSuccess').update(message); } }, onFailure: failureFunc }); }else{ if(!isMobile($('phone_register').value)){ $('progress_image_register').hide(); $('roformError').show(); $('roformError').update("Mobile number should be 10 digits only"); } else{ $('roformError').hide(); }

$('sregister').click(); }

}else if (formid == "8"){ var mobile = $('rmobile').value; var otp = $('r_otp').value; $('progress_image_forgot1').show(); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/verifyRegistrationOtp/', { method: 'post', parameters: {'mobile': mobile,'otp': otp}, onSuccess: function(response) { $('progress_image_forgot1').hide(); if (200 == response.status) { var content = response.responseText.evalJSON(); console.log(content); if(content){ $('phone_register').enable(); $('email_register').enable(); $('verified').setValue(1); $('sregister').click(); }else{ $('roformSuccess').hide(); $('roformOTPLogin').show(); $('roformOTPLogin').update('Please enter a valid OTP').addClassName('info_errors');; }

} }, onFailure: failureFunc }); }else if (formid == "9"){ var mobile = $('phone_register').value; var otp = $('otp_register').value; $('progress_image_forgot').show(); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/verifyPassOtp/', { method: 'post', parameters: {'mobile': mobile,'otp': otp}, onSuccess: function(response) { $('progress_image_forgot').hide(); if (200 == response.status) { $('rformSuccess').hide(); var content = response.responseText.evalJSON(); console.log(content); if(content){ if( $('editREmail').visible() ){ $('email_register').enable(); $('email_register').addClassName('disable'); $('resendotp').addClassName('disable'); } if( $('editRMobile').visible() ){ $('phone_register').enable(); $('phone_register').addClassName('disable'); } $('login_button').click(); }else{ $('rformOTP').show(); $('rformOTP').update('Please enter a valid OTP').addClassName('info_errors'); } setTimeout(function() { $('resendotp').removeClassName('disable'); }, 30000); $('passwordSuccess').update(message); // }

} }, onFailure: failureFunc }); }else if (formid == "10"){ var email = $('l_email').value; var password = $('login-password').value; $('progress_image_login').show(); if($('login-password').value != '' ){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/customerloginpost/', { method: 'post', parameters: {'email': email,'password': password}, onSuccess: function(response) { $('progress_image_login').hide(); if (200 == response.status) { var content = response.responseText; if(content == 'Invalid Email Address or Password'){ $('login-error').update("Enter correct password or use Login via OTP below"); } else{ $('progress_image_login').show(); $('login-error').update("We are rediecting you to checkout process."); //$('deliveryId').click(); window.location.replace("https://www.myfitfuel.in/checkout/cart/"); } console.log(content); } }, onFailure: failureFunc }); }else{ $('progress_image_login').hide(); $('login-error').update("Enter correct password or use Login via OTP below"); } }else if (formid == "11"){ var customer = $('forget_password').value; $('registered_number').setValue(customer); var contact; if(isEmail(customer) || isMobile(customer)){ $('progress_image_forgot').show(); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/verifyCustomer/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response){ var content = response.responseText.evalJSON(); if(content){ new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/sendOtp/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response) { console.log(response); $('progress_image_forgot').hide(); if (200 == response.status) { var content = response.responseText.evalJSON(); var message; console.log(customer); if(content.mobile != 0){ if(isEmail(customer)){ contact= content.mobile; message = 'OTP Sent to the '+customer+' and '+contact; } if(isMobile(customer)){ contact= content.email; message = 'OTP Sent to the '+customer+' and '+contact; } $('otp_resend').addClassName('disable'); }else{ message = customer+' not registered or the input is incorrect'; } setTimeout(function() { $('passwordSuccess').hide(); $('otpresend').hide(); $('otp_resend').enable(); $('otp_resend').removeClassName('disable'); }, 30000); $('forget_password_capture').hide(); $('forget_password_otp').show(); $('passwordSuccess').show(); $('passwordSuccess').update(message); } }, onFailure: failureFunc }); }else{ $('passwordSuccess').show(); $('passwordSuccess').update('Not registered with myfitfuel'); } } }); }else{ $('passwordSuccess').show(); $('passwordSuccess').update('Enter a valid email or phone number.'); } }else if (formid == "12"){ var mobile = $('forget_password').value; var otp = $('password_otp').value; $('progress_image_forgot').show(); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/verifyPassOtp/', { method: 'post', parameters: {'mobile': mobile,'otp': otp}, onSuccess: function(response) { $('progress_image_forgot').hide(); if (200 == response.status) { var content = response.responseText.evalJSON(); if(content){ $('forget_password_otp').hide(); $('forget_password_reset').show(); $('passwordSuccess').hide(); }else{ $('passwordSuccess').show(); $('passwordSuccess').update('Enter correct OTP'); } } }, onFailure: failureFunc }); }else if (formid == "13"){ var mobile = $('forget_password').value; var otp = $('password_otp').value; var pass1 = $('new_password').value; var pass2 = $('confirm_password').value; if(pass1 == pass2 ){ $('progress_image_forgot').show(); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/resetPassword/', { method: 'post', parameters: {'mobile': mobile,'otp': otp,'password':pass1}, onSuccess: function(response) { $('progress_image_forgot').hide(); if (200 == response.status) { $('forget_password_reset').hide(); $('form_login').show(); if($('deliveryId') != undefined) { $('login-form').show(); } $('email2').setValue(mobile); $('l_email').setValue(mobile); $('passwordSuccess').show(); $('passwordSuccess').update('Login with your new password'); //window.location.reload(); }else{ $('passwordSuccess').show(); $('passwordSuccess').update('Something went wrong try again'); } }, onFailure: failureFunc }); }else{ $('passwordSuccess').update("Password don't match"); } } else if (formid == "14"){ var customer = $('forget_password').value; $('progress_image_forgot').show(); new Ajax.Request('https://www.myfitfuel.in/sociallogin/index/sendOtp/', { method: 'post', parameters: {'customer': customer}, onSuccess: function(response) { $('progress_image_forgot').hide(); if (200 == response.status) { var content = response.responseText.evalJSON(); var message; if(content.mobile != 0){ if(isEmail(customer)){ contact= content.mobile; message = 'OTP Sent again checkout '+customer+' or '+contact; } if(isMobile(customer)){ contact= content.email; message = 'OTP Sent again checkout '+customer+' or '+contact; } $('otp_resend').addClassName('disable'); }else{ message = customer+' not registered or the input is incorrect'; } setTimeout(function() { $('passwordSuccess').hide(); }, 10000);

$('passwordSuccess').show(); $('otp_resend').removeClassName('disable'); $('passwordSuccess').update(message); } }, onFailure: failureFunc }); }else if (formid == "15"){ $('forget_password_div').hide(); $('o_block').show(); } else if (formid == "16"){ $('forget_password_otp').hide(); $('passwordSuccess').hide(); $('forget_password_capture').show(); $('forget_password_div').show(); } }

function failureFunc(response) { alert("Call is failed" ); }

function fblogin() { FB.login(function(response) { FB.getLoginStatus(function(response) { if (response.status === 'connected') { document.getElementById('progress_image_facebooklogin').style.display = "block"; login(); } }); }, {scope: 'email'}); return false; }

window.fbAsyncInit = function() { FB.init({appId: '757006401026308', status: true, cookie: true, xfbml: true}); /* All the events registered */ FB.Event.subscribe('auth.login', function(response) { /* do something with response */ login(); }); }; (function() {

var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); function login() { FB.api('/me', {fields: 'email,first_name,last_name'}, function(response) { if(response.email != 'undefined') { window.location.href = 'https://www.myfitfuel.in/sociallogin/index/fblogin?fb=1&email='+response.email+'&fname='+response.first_name+'&lname='+response.last_name; } }); }

function isNumber(mobile) { const re = /^d+$/; return re.test(mobile); };

$$('.mobile-prefix').invoke('observe','keypress', numberprefix); function numberprefix(event){ var mobile = $(this).value; if(isNumber(mobile)){ $(this).setAttribute("maxlength", 10); $$('.number-prefix').each( function (e) { e.setStyle({display:'flex'}).addClassName('move-left'); } ) }else{ $(this).setAttribute("maxlength", 80); $$('.number-prefix').each( function (e) { e.setStyle({display:'none'}).removeClassName('move-left'); } ) } }

//$$('#phone_register').invoke('observe','keypress', emailChange); // $('#phone_register').focusout(function() { // console.log('focus out'); // }); var phone = document.getElementById("phone_register"); phone.addEventListener("focusout", function( event ) { registerChange(); }, true);

var email = document.getElementById("email_register"); email.addEventListener("focusout", function( event ) { registerChange(); }, true);

function registerChange(){ var mobile = $('phone_register').value; var email = $('email_register').value; if(mobile && email){ if($('deliveryId') != undefined) { captureCustomer($('name_register').value,email,mobile,'3'); }else{ console.log('here'); captureCustomer($('first_name').value,email,mobile,'2'); }

} }

/* Submit form while clicking enter key */ $('social_popup_main').observe('keypress', socialsignupkeypressHandler); function socialsignupkeypressHandler(event) { var key = event.which || event.keyCode; switch (key) { default: break; case Event.KEY_RETURN: if ($('login_block').visible() && !$('forget_password_div').visible()) { $('slogin').click(); } if ($('rotp').visible()) { $('submit_register').click(); } if ($('forget_password_capture').visible()) { $('sforget').click(); } if ($('forget_password_otp').visible()) { $('otppassword').click(); } if ($('forget_password_reset').visible()) { $('passwordsubmit').click(); } if ($('rblock').visible()) { $('rbutton').click(); } if($('o_login').visible()){ $('onext').click(); event.preventDefault(); return false; } if ($('o_block').visible()) { $('onext').click(); event.preventDefault(); return false; } break; } }

//show/hide password social login form document.getElementById("eye").addEventListener("click", function(e){ var pwd = document.getElementById("password"); if(pwd.getAttribute("type")=="password"){ pwd.setAttribute("type","text"); document.getElementById("pwtext").innerHTML = "Hide"; //console.log(dd); } else { pwd.setAttribute("type","password"); document.getElementById("pwtext").innerHTML = "Show"; } });

//show/hide password social register form document.getElementById("eye2").addEventListener("click", function(e){ var pwd = document.getElementById("password_register"); if(pwd.getAttribute("type")=="password"){ pwd.setAttribute("type","text"); document.getElementById("pwtext2").innerHTML = "Hide"; } else { pwd.setAttribute("type","password"); document.getElementById("pwtext2").innerHTML = "Show"; } });

//show/hide password checkout login form var el = document.getElementById("eye3"); if(el){ el.addEventListener("click", function(e){ var pwd = document.getElementById("login-password"); if(pwd.getAttribute("type")=="password"){ pwd.setAttribute("type","text"); document.getElementById("pwtext").innerHTML = "Hide"; //console.log(dd); } else { pwd.setAttribute("type","password"); document.getElementById("pwtext").innerHTML = "Show"; } }); }



Rate this post

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *