Viewing file: test.php (1.65 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function(){
var auth={
"Authorization": "Basic " + btoa("Mongo_API"+":"+"jiFFMongo@2023!@!@!@")
};
$.ajax({
type: 'GET',
url: 'https://api.businesscloud.xyz/carts?page_id=101115269135931&psid=4486210768174705',
dataType: 'json',
beforeSend: function(xhr) {
xhr.setRequestHeader('Authorization', 'Basic ' + btoa('Mongo_API:jiFFMongo@2023!@!@!@'));
},
success: function (data, status, xhr) {
console.log(data);
// cart_items=data;
// if (data.length>0) {
// for (let i = 0; i < data.length; i++) {
// variants.push(data[i].variant_id);
// }
// product_info(variants);
// }else{
// $("#th2").prop("disabled",true);
// $("#checkout_a").prop("disabled",true);
// swal("","Shopping cart is empty. Please add item and visit the page again", "info");
// }
},
error: function(xhr, textStatus, errorThrown) {
console.error('Error:', textStatus, errorThrown);
}
});
});
</script>
</body>
</html>
|