added invidual purchase
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user