qguar Posted June 14, 2018 Share Posted June 14, 2018 In module mailalert, how to add email verification - check if the value entered into the textbox has @ Link to comment Share on other sites More sharing options...
qguar Posted June 18, 2018 Author Share Posted June 18, 2018 But it doesn't work in my site... Link to comment Share on other sites More sharing options...
qguar Posted June 18, 2018 Author Share Posted June 18, 2018 In my form always is Request notification registered: function addNotification() { $.ajax({ type: 'POST', url: "{/literal}{$link->getModuleLink('mailalerts', 'actions', ['process' => 'add'])}{literal}", data: 'id_product={/literal}{$id_product}{literal}&id_product_attribute='+$('#idCombination').val()+'&customer_email='+$('#oos_customer_email').val()+'', success: function (msg) { if ($.trim(msg) == '1') { $('#mailalert_link').hide(); $('#oos_customer_email').hide(); $('#oosHook').find('#gdpr_consent').hide(); $('#oos_customer_email_result').html("{/literal}{l s='Request notification registered' mod='mailalerts'}{literal}"); $('#oos_customer_email_result').css('color', 'green').show(); } else if ($.trim(msg) == '2' ) { $('#oos_customer_email_result').html("{/literal}{l s='You already have an alert for this product' mod='mailalerts'}{literal}"); $('#oos_customer_email_result').css('color', 'red').show(); } else { $('#oos_customer_email_result').html("{/literal}{l s='Your e-mail address is invalid' mod='mailalerts'}{literal}"); $('#oos_customer_email_result').css('color', 'red').show(); } } }); return false; } Link to comment Share on other sites More sharing options...
qguar Posted June 20, 2018 Author Share Posted June 20, 2018 So, can anybody help me to add this function? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now