2020-08-27 09:31:14 CLIENT -> SERVER: EHLO www.stellaquint.com 2020-08-27 09:31:14 CLIENT -> SERVER: STARTTLS 2020-08-27 09:31:15 CLIENT -> SERVER: EHLO www.stellaquint.com 2020-08-27 09:31:15 CLIENT -> SERVER: AUTH LOGIN 2020-08-27 09:31:15 CLIENT -> SERVER: Z2JyZWFkbWFuMTNjb2RlQGdtYWlsLmNvbQ== 2020-08-27 09:31:15 CLIENT -> SERVER: Y2hhcGFvY2hrNQ== 2020-08-27 09:31:15 SMTP ERROR: Password command failed: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials w29sm380687lfq.65 - gsmtp 2020-08-27 09:31:15 SMTP Error: Could not authenticate. 2020-08-27 09:31:15 CLIENT -> SERVER: QUIT 2020-08-27 09:31:15 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Error
function validate(form_id,email) {
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var address = document.forms[form_id].elements[email].value;
if(reg.test(address) == false) {
alert('Please enter a correct e-mail: example@ex.com');
return false;
}
}
function checkField() {
if(document.getElementById("question").value === '') {
event.preventDefault();
alert("Enter your question");
return false;
}
}
function modalToggle(){
event.preventDefault();
var modal = document.querySelector('.modal-wrap');
var modal_bg = document.querySelector('.modal-bg');
modal.classList.toggle("d-none");
modal_bg.classList.toggle("d-none");
}
<div class="form-group" id="product">
<input type="hidden" name="product_id" value="{{ product_id }}" />
<button type="button" id="button-cart1" data-loading-text="{{ text_loading }}" class="add_to_bag">{{ button_cart }}</button>
</div>
<script type="text/javascript">
$('#button-cart1').on('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'),
dataType: 'json',
// beforeSend: function() {
// $('#button-cart').button('loading');
// },
// complete: function() {
// $('#button-cart').button('reset');
// },
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json['error']) {
if (json['error']['option']) {
for (i in json['error']['option']) {
var element = $('#input-option' + i.replace('_', '-'));
if (element.parent().hasClass('input-group')) {
element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
} else {
element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>');
}
}
}
if (json['error']['recurring']) {
$('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
}
// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
}
if (json['success']) {
$('.breadcrumb').after('<div class="alert alert-success alert-dismissible">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>');
$('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>');
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});