added invidual purchase

This commit is contained in:
franknstayn
2022-01-29 18:54:54 +08:00
parent 8a9b1209a3
commit 3ffe60b851
10 changed files with 1165 additions and 873 deletions

View File

@@ -1723,6 +1723,36 @@
return false;
});
$(document).on('button click', '.btn-purchase', function() {
// console.log()
var designCode = $(this).data('design-code');
// var images_thumb = $('#images_thumb').val();
$.ajax({
type: 'POST',
url: "{{ url('/user/store-items/personal-design') }}",
data: {
designCode: designCode
},
beforeSend: function(xhr) {
var token = $('meta[name="csrf_token"]').attr('content');
if (token) {
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
}
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
},
success: function(response) {
if (response.success) {
window.location = response.link;
} else {
alert("Something went wrong. Please try again.");
location.reload();
}
}
});
return false;
});
// fetchUSA()
// fetchCanada()
getSelectedCountry()