Merge branch 'ticket-13564-giftOnShoppingCart' into develop

This commit is contained in:
Marion Muszynski 2017-08-17 16:04:09 +02:00
commit 2e80416957
2 changed files with 10 additions and 6 deletions

View File

@ -479,6 +479,9 @@ function updateCartSummary(json)
function giftMessage(add, next, all){
var async = true;
var got_next = false;
if(next==true){
got_next = true;
}
var action = "add_message";
if(add == false){
if(all == true || !$('input#gift').is(':checked')) {
@ -520,6 +523,7 @@ function giftMessage(add, next, all){
}
}
alert(errors);
got_next = false;
}
else
{
@ -541,12 +545,10 @@ function giftMessage(add, next, all){
$('#my_gift').hide();
$('#gift_message').val('');
}
if(next==true){
got_next = true;
}
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
got_next = false;
console.log("ERROR\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus + "\n" + 'errorThrown: ' + errorThrown);
}
});

View File

@ -467,6 +467,9 @@ function updateCartSummary(json)
function giftMessage(add, next, all){
var async = true;
var got_next = false;
if(next==true){
got_next = true;
}
var action = "add_message";
if(add == false){
if(all == true || !$('input#gift').is(':checked')) {
@ -506,6 +509,7 @@ function giftMessage(add, next, all){
if(error != 'indexOf')
errors += jsonData.errors[error] + "\n";
alert(errors);
got_next = false;
}
else
{
@ -516,12 +520,10 @@ function giftMessage(add, next, all){
$('#gift_div').hide();
$('#gift').removeAttr('checked');
}
if(next==true){
got_next = true;
}
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
got_next = false;
//alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});