Compare commits
No commits in common. "fd8016afd0104b9f788c4e05c4ad23a42c194d02" and "22a3a404aa8bb46dc385d8adbe1ce6b10f14f13e" have entirely different histories.
fd8016afd0
...
22a3a404aa
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$_SESSION["is_test"]=true;
|
||||
$_SESSION["test_email_rcpt"]="kramblooda@gmail.com";
|
||||
$_SESSION["test_email_rcpt"]="junjihadbarroga@gmail.com";
|
||||
$_SESSION["sales_email"]="sales@obanana.com";
|
||||
$_SESSION["data_endpoint"]="api.obanana.shop";
|
||||
$_SESSION["transfer_fee"]=0.02;
|
||||
|
|
|
@ -506,34 +506,9 @@ function popupAddToCart(
|
|||
} catch (error) {
|
||||
console.error("Error parsing customer JSON: ", error);
|
||||
}
|
||||
let vendorData = null;
|
||||
console.log(productVendor);
|
||||
if (
|
||||
productVendor === undefined ||
|
||||
productVendor === null ||
|
||||
productVendor === "undefined"
|
||||
) {
|
||||
console.log("here i am");
|
||||
var vendorCheckXhr = new XMLHttpRequest();
|
||||
vendorCheckXhr.open(
|
||||
"GET",
|
||||
"https://api.obanana.shop/api/v1/vendors/" + productData.vendor_api_id,
|
||||
true
|
||||
);
|
||||
vendorCheckXhr.onreadystatechange = function () {
|
||||
if (vendorCheckXhr.readyState === 4) {
|
||||
if (vendorCheckXhr.status === 200) {
|
||||
var vendorObj = JSON.parse(vendorCheckXhr.responseText);
|
||||
console.log(vendorObj);
|
||||
}
|
||||
}
|
||||
};
|
||||
vendorCheckXhr.send();
|
||||
} else {
|
||||
vendorData = decodeURIComponent(productVendor);
|
||||
console.log("vendorData");
|
||||
var vendorObj = JSON.parse(vendorData);
|
||||
}
|
||||
let vendorData = decodeURIComponent(productVendor);
|
||||
|
||||
var vendorObj = JSON.parse(vendorData);
|
||||
|
||||
var sessionToken = token;
|
||||
var productImage = productObj.images;
|
||||
|
@ -566,57 +541,52 @@ function popupAddToCart(
|
|||
console.log("Customer Names: " + customerName);
|
||||
|
||||
login(email, password, function (token) {
|
||||
var priceMatrix =
|
||||
productObj.price_matrix !== "" ? productObj.price_matrix : "[]";
|
||||
// var quantityValue = productData.quantity;
|
||||
var minimumOrder = productObj.minimum_order;
|
||||
var priceMatrix = productObj.price_matrix !=="" ? productObj.price_matrix : "[]";
|
||||
// var quantityValue = productData.quantity;
|
||||
var minimumOrder = productObj.minimum_order;
|
||||
|
||||
var quantityValue = productObj.minimum_order == "" ? productQuantity : "1";
|
||||
var quantityValue = productObj.minimum_order =="" ? productQuantity : '1';
|
||||
|
||||
// var minimumOrder = productObj.minimum_order !=="" ? productObj.minimum_order : '1';
|
||||
// var quantityValue = minimumOrder ;
|
||||
|
||||
|
||||
if (parseInt(quantityValue) < minimumOrder) {
|
||||
quantityValue = minimumOrder;
|
||||
alert("The minimum order quantity is " + minimumOrder);
|
||||
}
|
||||
// var minimumOrder = productObj.minimum_order !=="" ? productObj.minimum_order : '1';
|
||||
// var quantityValue = minimumOrder ;
|
||||
|
||||
//Apply Matrix
|
||||
var productPrice;
|
||||
var foundPrice = false;
|
||||
|
||||
if (priceMatrix.length > 0) {
|
||||
for (var i = 0; i < priceMatrix.length; i++) {
|
||||
for (var j = 0; j < priceMatrix[i].length; j++) {
|
||||
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
|
||||
var nextQuantity =
|
||||
j < priceMatrix[i].length - 1
|
||||
? parseFloat(priceMatrix[i][j + 1].quantity)
|
||||
: Infinity;
|
||||
|
||||
if (
|
||||
quantityValue >= currentQuantity &&
|
||||
quantityValue < nextQuantity
|
||||
) {
|
||||
productPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundPrice) {
|
||||
break;
|
||||
}
|
||||
if (parseInt(quantityValue) < minimumOrder) {
|
||||
quantityValue = minimumOrder;
|
||||
alert("The minimum order quantity is " + minimumOrder);
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundPrice) {
|
||||
productPrice = productObj.sale_price
|
||||
? productObj.sale_price
|
||||
: productObj.regular_price;
|
||||
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
|
||||
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
|
||||
// productPrice;
|
||||
}
|
||||
|
||||
|
||||
//Apply Matrix
|
||||
var productPrice;
|
||||
var foundPrice = false;
|
||||
|
||||
if (priceMatrix.length > 0) {
|
||||
for (var i = 0; i < priceMatrix.length; i++) {
|
||||
for (var j = 0; j < priceMatrix[i].length; j++) {
|
||||
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
|
||||
var nextQuantity = (j < priceMatrix[i].length - 1) ? parseFloat(priceMatrix[i][j + 1].quantity) : Infinity;
|
||||
|
||||
if (quantityValue >= currentQuantity && quantityValue < nextQuantity) {
|
||||
productPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundPrice) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundPrice) {
|
||||
productPrice = productObj.sale_price ? productObj.sale_price : productObj.regular_price;
|
||||
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
|
||||
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
|
||||
// productPrice;
|
||||
}
|
||||
|
||||
var productData = {
|
||||
product: {
|
||||
|
@ -726,7 +696,7 @@ function popupAddToCart(
|
|||
: "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png";
|
||||
console.log(response);
|
||||
|
||||
newOrder.innerHTML = `
|
||||
newOrder.innerHTML = `
|
||||
<input type="checkbox" class="rowcartCheckbox" name="cart-item[]" value="${response._id}"/>
|
||||
<a href="product-left-sidebar.php?id=${response.items[0]._id}" class="sidekka_pro_img">
|
||||
<img src="${imageUrl}" alt="product" />
|
||||
|
@ -766,7 +736,7 @@ function popupAddToCart(
|
|||
}
|
||||
|
||||
function getLatestOrders() {
|
||||
var customerId = "<?php echo $customer_data[0]['_id'] ?>";
|
||||
var customerId = '<?php echo $customer_data[0][\'_id\'] ?>'
|
||||
// Fetch the order data
|
||||
fetch(`https://api.obanana.shop/api/v1/orders/customer/${customerId}`)
|
||||
.then((response) => response.json())
|
||||
|
@ -861,38 +831,32 @@ function popupAddToCart(
|
|||
var updatedQuantity = existingQuantity + newQuantity;
|
||||
|
||||
// Check if the updated quantity exceeds the previous price matrix
|
||||
var newProductPrice = productPrice;
|
||||
var foundNewPrice = false;
|
||||
if (priceMatrix.length > 0) {
|
||||
for (var i = 0; i < priceMatrix.length; i++) {
|
||||
for (var j = 0; j < priceMatrix[i].length; j++) {
|
||||
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
|
||||
var nextQuantity =
|
||||
j < priceMatrix[i].length - 1
|
||||
? parseFloat(priceMatrix[i][j + 1].quantity)
|
||||
: Infinity;
|
||||
if (
|
||||
updatedQuantity >= currentQuantity &&
|
||||
updatedQuantity < nextQuantity
|
||||
) {
|
||||
newProductPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundNewPrice = true;
|
||||
break;
|
||||
}
|
||||
var newProductPrice = productPrice;
|
||||
var foundNewPrice = false;
|
||||
if (priceMatrix.length > 0) {
|
||||
for (var i = 0; i < priceMatrix.length; i++) {
|
||||
for (var j = 0; j < priceMatrix[i].length; j++) {
|
||||
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
|
||||
var nextQuantity = (j < priceMatrix[i].length - 1) ? parseFloat(priceMatrix[i][j + 1].quantity) : Infinity;
|
||||
if (updatedQuantity >= currentQuantity && updatedQuantity < nextQuantity) {
|
||||
newProductPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundNewPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundNewPrice) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (foundNewPrice) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (foundNewPrice) {
|
||||
productPrice = newProductPrice;
|
||||
}
|
||||
if (foundNewPrice) {
|
||||
productPrice = newProductPrice;
|
||||
}
|
||||
|
||||
var updateData = {
|
||||
quantity: updatedQuantity,
|
||||
price: productPrice,
|
||||
price: productPrice
|
||||
};
|
||||
|
||||
updateOrderXhr.send(JSON.stringify(updateData));
|
||||
|
|
72
cart.php
72
cart.php
|
@ -191,26 +191,11 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div class="ec-cart-content">
|
||||
<div class="ec-cart-inner">
|
||||
<div class="row">
|
||||
<style>
|
||||
.rowcart{
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
align-self: center;
|
||||
flex-direction:row;
|
||||
}
|
||||
.rowcartCheckbox{
|
||||
height:15px;
|
||||
width:15px;
|
||||
margin-right:5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<form action="#">
|
||||
<div class="table-content cart-table-content">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Product</th>
|
||||
<th>Price</th>
|
||||
<th style="text-align: center;">Quantity</th>
|
||||
|
@ -244,10 +229,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
?>
|
||||
|
||||
<tr id="cart_order_<?php echo $order['_id'] ?>">
|
||||
<td>
|
||||
<input type="checkbox" class="rowcartCheckbox" name="cart-item1[]" value="<?php echo $order['_id']?>"/>
|
||||
|
||||
</td>
|
||||
<td data-label="Product" class="ec-cart-pro-name"><a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>">
|
||||
<img loading="lazy" class="ec-cart-pro-img mr-4" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="" />
|
||||
<?php echo $order['items'][0]['product']['name']; ?></a>
|
||||
|
@ -289,34 +270,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
?>
|
||||
<script>
|
||||
// let myLatestOrders = [];
|
||||
var checkboxes = document.querySelectorAll('input[name="cart-item1[]"]');
|
||||
checkboxes.forEach(function(checkbox) {
|
||||
checkbox.addEventListener('change', function() {
|
||||
getCheckedCheckboxes();
|
||||
getLatestOrdersCart();
|
||||
// update_Total()
|
||||
});
|
||||
});
|
||||
function getCheckedCheckboxes() {
|
||||
var checkboxes = document.querySelectorAll('input[name="cart-item1[]"]');
|
||||
var checkedValues = [];
|
||||
var uncheckedValues = [];
|
||||
|
||||
checkboxes.forEach(function(checkbox) {
|
||||
if (checkbox.checked) {
|
||||
checkedValues.push(checkbox.value.toLowerCase().trim());
|
||||
} else {
|
||||
uncheckedValues.push(checkbox.value.toLowerCase().trim());
|
||||
}
|
||||
});
|
||||
|
||||
if (checkedValues.length === 0) {
|
||||
return uncheckedValues;
|
||||
} else {
|
||||
console.log(checkedValues);
|
||||
return checkedValues;
|
||||
}
|
||||
}
|
||||
|
||||
function handleQtyInputCart(input, orderId, itemId, prodId) {
|
||||
var newQuantity = parseInt(input.value);
|
||||
|
@ -611,18 +564,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
if (orderData && orderData !== "") {
|
||||
console.log(orderData)
|
||||
const filteredOrders = orderData.filter(order => order.status.toUpperCase() === 'CART');
|
||||
var checkedCategories = getCheckedCheckboxes();
|
||||
let orderInitial= null;
|
||||
if (filteredOrders && filteredOrders !== "") {
|
||||
// Calculate the new total amount based on the updated quantities
|
||||
if(checkedCategories?.length>0){
|
||||
orderInitial = filteredOrders?.filter(order => checkedCategories?.includes(order._id));
|
||||
|
||||
}else{
|
||||
orderInitial = filteredOrders
|
||||
}
|
||||
}
|
||||
const totalAmountSum = orderInitial.reduce((sum, order) => {
|
||||
const totalAmountSum = filteredOrders.reduce((sum, order) => {
|
||||
const totalAmount = parseFloat(order.total_amount);
|
||||
return sum + totalAmount;
|
||||
}, 0);
|
||||
|
@ -660,16 +602,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
})
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
function handleCheckoutButton(event) {
|
||||
event.preventDefault();
|
||||
var checkedCategories = getCheckedCheckboxes();
|
||||
|
||||
const selectedIdString = checkedCategories.join('-');
|
||||
login(email, password, function(token) {
|
||||
|
||||
window.location.href = `checkouttest.php?selected=${selectedIdString}`;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<!-- <tr>
|
||||
<td data-label="Product" class="ec-cart-pro-name"><a
|
||||
|
@ -738,7 +670,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div class="col-lg-12">
|
||||
<div class="ec-cart-update-bottom">
|
||||
<a href="index.php">Continue Shopping</a>
|
||||
<a style="text-decoration:none; color:white"onclick="handleCheckoutButton(event)" class="btn btn-primary">Check Out</a>
|
||||
<a style="text-decoration:none; color:white" href="checkout.php" class="btn btn-primary">Check Out</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -134,35 +134,33 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
<script>
|
||||
function updateCartItemCount() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
var data = xhr.responseText;
|
||||
if (data !== "") {
|
||||
console.log("Data: " + data);
|
||||
document.getElementById("cartItemCount").innerHTML = data;
|
||||
document.getElementById("cartNewItemCount").innerHTML = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
var data = xhr.responseText;
|
||||
if (data !== "") {
|
||||
console.log("Data: " + data);
|
||||
document.getElementById("cartItemCount").innerHTML = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
function updateWishItemCount() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
var data = xhr.responseText;
|
||||
if (data !== "") {
|
||||
document.getElementById("wishItemCount").innerHTML = data;
|
||||
document.getElementById("wishNewItemCount").innerHTML = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
function updateWishItemCount() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
var data = xhr.responseText;
|
||||
if (data !== "") {
|
||||
document.getElementById("wishItemCount").innerHTML = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- raymart added css feb 14 2024 -->
|
||||
|
|
|
@ -28,7 +28,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
$cartencode = json_encode($filteredCartItems);
|
||||
|
||||
}else{
|
||||
// $cartItems = $filteredCartItems;
|
||||
$cartItems = $filteredCartItems;
|
||||
|
||||
$cartencode = json_encode($cartItems);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ $_SESSION["email"] = $_POST["name"];
|
|||
// Check if the customer exists in the database
|
||||
$result = customerExists($_SESSION["email"]);
|
||||
|
||||
if ($result) {
|
||||
if ($result > 0) {
|
||||
$forgot = forgot_password($_SESSION["email"]);
|
||||
if($forgot){
|
||||
header("location: forget_otp.php");
|
||||
|
|
33
header.php
33
header.php
|
@ -147,8 +147,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
.fi-rr-user:active,
|
||||
.fi-rr-shopping-bag:hover,
|
||||
.fi-rr-shopping-bag:active,
|
||||
.fi-rr-shopping-basket:hover,
|
||||
.fi-rr-shopping-basket:active,
|
||||
.fi-rr-home:hover,
|
||||
.fi-rr-home:active {
|
||||
cursor: pointer !important;
|
||||
|
@ -304,13 +302,13 @@ if ($_SESSION["userId"] <> "") {
|
|||
<!-- Header Cart Start -->
|
||||
<a href="wishlist.php" class="ec-header-btn ec-header-wishlist">
|
||||
<div class="header-icon"><i class="fi-rr-heart"></i></div>
|
||||
<span id="wishNewItemCount" class="ec-header-count">0</span>
|
||||
<span id="wishItemCount" class="ec-header-count">0</span>
|
||||
</a>
|
||||
<!-- Header Cart End -->
|
||||
<!-- Header Cart Start -->
|
||||
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
|
||||
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
|
||||
<span id="cartNewItemCount" class="ec-header-count">0</span>
|
||||
<span id="cartItemCount" class="ec-header-count">0</span>
|
||||
</a>
|
||||
<!-- Header Cart End -->
|
||||
<a href="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle">
|
||||
|
@ -388,9 +386,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
</div>
|
||||
<!-- Header User End -->
|
||||
<!-- Header wishlist Start -->
|
||||
<?php
|
||||
if (($_SESSION["isCustomer"] == true) && ($_SESSION["isVendor"] == false) || ($_SESSION["isLoggedIn"] == false)) {
|
||||
?>
|
||||
<a href="wishlist.php" class="ec-header-btn ec-header-wishlist">
|
||||
<div class="header-icon"><i class="fi-rr-heart"></i></div>
|
||||
<span class="ec-header-count">
|
||||
|
@ -565,24 +560,13 @@ if ($_SESSION["userId"] <> "") {
|
|||
});
|
||||
});
|
||||
function getCheckedCheckboxes() {
|
||||
var checkboxes = document.querySelectorAll('input[name="cart-item[]"]');
|
||||
var checkedValues = [];
|
||||
var uncheckedValues = [];
|
||||
|
||||
var checkboxes = document.querySelectorAll('input[name="cart-item[]"]:checked');
|
||||
var values = [];
|
||||
checkboxes.forEach(function(checkbox) {
|
||||
if (checkbox.checked) {
|
||||
checkedValues.push(checkbox.value.toLowerCase().trim());
|
||||
} else {
|
||||
uncheckedValues.push(checkbox.value.toLowerCase().trim());
|
||||
}
|
||||
values.push(checkbox.value.toLowerCase().trim());
|
||||
});
|
||||
|
||||
if (checkedValues.length === 0) {
|
||||
return uncheckedValues;
|
||||
} else {
|
||||
console.log(checkedValues);
|
||||
return checkedValues;
|
||||
}
|
||||
console.log(values);
|
||||
return values;
|
||||
}
|
||||
function update_Total(){
|
||||
|
||||
|
@ -880,9 +864,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- Header Cart End -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -76,13 +76,11 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
function updateCartItemCount() {
|
||||
function updateCartItemCount() {
|
||||
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
|
||||
if (data != "") {
|
||||
console.log("Data: " + data + "\nStatus: " + status);
|
||||
document.getElementById("cartItemCount").innerHTML = data;
|
||||
document.getElementById("cartNewItemCount").innerHTML = data;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -91,8 +89,6 @@ if ($_SESSION["userId"] <> "") {
|
|||
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
|
||||
if (data != "") {
|
||||
document.getElementById("wishItemCount").innerHTML = data;
|
||||
document.getElementById("wishNewItemCount").innerHTML = data;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -90,8 +90,6 @@ if (isset($_GET['id'])) {
|
|||
if (data != "") {
|
||||
console.log("Data: " + data + "\nStatus: " + status);
|
||||
document.getElementById("cartItemCount").innerHTML = data;
|
||||
document.getElementById("cartNewItemCount").innerHTML = data;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -99,9 +97,8 @@ if (isset($_GET['id'])) {
|
|||
function updateWishItemCount() {
|
||||
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
|
||||
if (data != "") {
|
||||
console.log("Data: " + data + "\nStatus: " + status);
|
||||
document.getElementById("wishItemCount").innerHTML = data;
|
||||
document.getElementById("wishNewItemCount").innerHTML = data;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -541,7 +538,7 @@ if (isset($_GET['id'])) {
|
|||
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
|
||||
<?php
|
||||
$product_price = (!empty($product_details['sale_price'])) ? $product_details['sale_price'] : $product_details['regular_price'] ;
|
||||
if ($_SESSION["isCustomer"]) {
|
||||
if ($_SESSION["isLoggedIn"]) {
|
||||
if ($product_details['product_type'] === "variable") {
|
||||
echo '<div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()"
|
||||
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">-</div>';
|
||||
|
@ -551,7 +548,6 @@ if (isset($_GET['id'])) {
|
|||
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()"
|
||||
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">+</div>';
|
||||
echo '<div style="display:flex; margin-left:45px;"><button type="button" class="btn btn-primary" id="contactSellerButton" style="background:#ffaa00; width:190px;"
|
||||
onmouseover="this.style.background=\'#df9000\'" onmouseout="this.style.background=\'#ffaa00\'"
|
||||
data-bs-toggle="modal" data-bs-target="#priceModal"><i class="fi-rr-envelope" style="font-size:20px; margin-bottom:-3px; margin-right:10px;"></i>Contact Seller</button>';
|
||||
echo '<button class="btn btn-primary" id="addToCartButton" style="display:none">Add To Cart</button>';
|
||||
echo '<div class="ec-single-wishlist">
|
||||
|
@ -576,11 +572,10 @@ if (isset($_GET['id'])) {
|
|||
echo '<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#priceModal" style="text-wrap:nowrap;" >Contact seller</button>';
|
||||
}
|
||||
}
|
||||
} else if (($_SESSION["isCustomer"] == false) && ($_SESSION["isVendor"] == false)) {
|
||||
} else {
|
||||
echo '<div class="login-button" style=""><p style="color:red; text-wrap:nowrap;">Please log in to your account.</p>';
|
||||
echo '<a href="login.php" style="margin-left:-2px;"><button type="button" class="btn btn-primary" style="margin-left:-2px; margin-top:-20px; background:#ffaa00;
|
||||
border-radius:10px; letter-spacing:1px;" onmouseover="this.style.background=\'#df9000\'" onmouseout="this.style.background=\'#ffaa00\'"
|
||||
data-bs-toggle="modal">LOGIN</button></a></div>';
|
||||
border-radius:10px; letter-spacing:1px;" data-bs-toggle="modal">LOGIN</button></a></div>';
|
||||
}
|
||||
?>
|
||||
<!-- <div class="ec-single-wishlist" style="border: 1px solid yellow;">
|
||||
|
|
|
@ -150,7 +150,6 @@ $filteredProducts = [];
|
|||
if (data !== "") {
|
||||
console.log("Data: " + data);
|
||||
document.getElementById("cartItemCount").innerHTML = data;
|
||||
document.getElementById("cartNewItemCount").innerHTML = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -165,7 +164,6 @@ function updateWishItemCount() {
|
|||
var data = xhr.responseText;
|
||||
if (data !== "") {
|
||||
document.getElementById("wishItemCount").innerHTML = data;
|
||||
document.getElementById("wishNewItemCount").innerHTML = data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -304,7 +302,7 @@ function updateWishItemCount() {
|
|||
var filteredProducts = [];
|
||||
// Filter by category
|
||||
if (checkedCategories.length > 0) {
|
||||
let filteredProduct= products?.filter((product) => {
|
||||
let filteredProduct= products?.results?.filter((product) => {
|
||||
let categoryF = product?.product?.product_category?.toLowerCase();
|
||||
// console.log('Category (lowercase):', categoryF);
|
||||
let result =checkedCategories.includes(categoryF)
|
||||
|
@ -316,7 +314,7 @@ console.log(filteredProducts);
|
|||
|
||||
} else {
|
||||
// If no categories are selected, keep all products
|
||||
filteredProducts = products;
|
||||
filteredProducts = products?.results;
|
||||
}
|
||||
|
||||
// If minPrice or maxPrice is not provided, set them to default values
|
||||
|
@ -349,7 +347,7 @@ console.log({results:filteredProducts});
|
|||
|
||||
// Final filtered products
|
||||
// console.log({results:filteredProducts});
|
||||
let final = filteredProducts
|
||||
let final = {results:filteredProducts}
|
||||
return final;
|
||||
}
|
||||
function loadVendors(page,isFilter) {
|
||||
|
@ -479,9 +477,8 @@ function loadProducts(page,isFilter) {
|
|||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
// Parse JSON response
|
||||
let products1 = JSON.parse(xhr.responseText);
|
||||
let products = products1.results.filter(product => product.product.product_type !== 'variation');
|
||||
console.log(products);
|
||||
let products = JSON.parse(xhr.responseText);
|
||||
|
||||
// if(isFilter===true){
|
||||
var checkedCategories = getCheckedCheckboxes();
|
||||
var prices = getMinMaxPrices();
|
||||
|
@ -495,8 +492,8 @@ function loadProducts(page,isFilter) {
|
|||
let startIndex = (page - 1) * productsPerPage;
|
||||
let endIndex = startIndex + productsPerPage - 1;
|
||||
// Filter products for current page
|
||||
if(products.length>0){
|
||||
let productsForPage = products.slice(startIndex, endIndex + 1);
|
||||
if(products.results.length>0){
|
||||
let productsForPage = products.results.slice(startIndex, endIndex + 1);
|
||||
|
||||
|
||||
productsForPage.forEach(function(prod) {
|
||||
|
@ -575,7 +572,7 @@ function loadProducts(page,isFilter) {
|
|||
</div>
|
||||
</div>`;
|
||||
productContainer.appendChild(card);
|
||||
updatePaginationUI(page, products.length);
|
||||
updatePaginationUI(page, products.results.length);
|
||||
});
|
||||
gridList()
|
||||
}else{
|
||||
|
|
|
@ -50,15 +50,12 @@ if ($_SESSION["userId"] <> "") {
|
|||
|
||||
<!-- Background css -->
|
||||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
|
||||
<script>
|
||||
function updateCartItemCount() {
|
||||
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
|
||||
if (data != "") {
|
||||
console.log("Data: " + data + "\nStatus: " + status);
|
||||
document.getElementById("cartItemCount").innerHTML = data;
|
||||
document.getElementById("cartNewItemCount").innerHTML = data;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -67,13 +64,10 @@ if ($_SESSION["userId"] <> "") {
|
|||
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
|
||||
if (data != "") {
|
||||
document.getElementById("wishItemCount").innerHTML = data;
|
||||
document.getElementById("wishNewItemCount").innerHTML = data;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- raymart added css feb 14 2024 -->
|
||||
<style>
|
||||
.ec-product-inner .ec-pro-image .ec-pro-actions .add-to-cart {
|
||||
|
|
185
user-history.php
185
user-history.php
|
@ -42,7 +42,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<link rel="stylesheet" href="assets/css/plugins/countdownTimer.css" />
|
||||
<link rel="stylesheet" href="assets/css/plugins/slick.min.css" />
|
||||
<link rel="stylesheet" href="assets/css/plugins/bootstrap.css" />
|
||||
|
||||
|
||||
<!-- FLATICON -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet">
|
||||
|
||||
|
@ -50,13 +50,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<link rel="stylesheet" href="assets/css/style.css" />
|
||||
<link rel="stylesheet" href="assets/css/style2.css" />
|
||||
<link rel="stylesheet" href="assets/css/responsive.css" />
|
||||
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Background css -->
|
||||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<style>
|
||||
.tab.active {
|
||||
|
@ -153,7 +149,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
function updateCartItemCount() {
|
||||
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
|
||||
|
@ -329,9 +325,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<div class="ec-vendor-card-table">
|
||||
|
||||
<!-- 03-15-2024 Stacy added tab for all orders -->
|
||||
<div id="allOrders" class=" tab-content mt-1 active">
|
||||
<div id="allOrders" class=" tab-content active">
|
||||
<!-- Content for "all Orders" tab -->
|
||||
<table id="allOrdersTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="allOrdersTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -364,8 +360,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($order['items'][0]['product']['product_image']))
|
||||
|
@ -382,10 +377,10 @@ if ($_SESSION["isVendor"] == true) {
|
|||
}
|
||||
?>
|
||||
</td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['status']; ?></span></td>
|
||||
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
|
||||
|
||||
|
@ -420,9 +415,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toPay" class="tab-content mt-1">
|
||||
<div id="toPay" class="tab-content">
|
||||
<!-- Content for "To Pay" tab -->
|
||||
<table id="toPayTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toPayTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -455,8 +450,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($order['items'][0]['product']['product_image']))
|
||||
|
@ -473,10 +467,10 @@ if ($_SESSION["isVendor"] == true) {
|
|||
}
|
||||
?>
|
||||
</td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['status']; ?></span></td>
|
||||
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
|
||||
|
||||
|
@ -505,9 +499,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toShip" class="tab-content mt-1">
|
||||
<div id="toShip" class="tab-content">
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<table id="toShipTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toShipTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -542,8 +536,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($order['items'][0]['product']['product_image']))
|
||||
|
@ -560,10 +553,10 @@ if ($_SESSION["isVendor"] == true) {
|
|||
}
|
||||
?>
|
||||
</td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['status']; ?></span></td>
|
||||
<!-- <td><span><?php echo $order['tracking_number']; ?></span></td>
|
||||
<td><span><?php echo $order['courier_name']; ?></span></td> -->
|
||||
|
@ -592,9 +585,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toReceive" class="tab-content mt-1">
|
||||
<div id="toReceive" class="tab-content">
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<table id="toReceiveTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toReceiveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -628,8 +621,8 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'" id="to-receive-<?php echo $order['_id']?>" data-value=' <?php echo $jsonorder; ?>'>
|
||||
<td data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView">
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<?php
|
||||
if(!empty($order['items'][0]['product']['product_image']))
|
||||
{
|
||||
|
@ -645,10 +638,10 @@ if ($_SESSION["isVendor"] == true) {
|
|||
}
|
||||
?>
|
||||
</td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['tracking_number']; ?></span></td>
|
||||
<td><span><?php # echo $order['courier_name']; ?></span></td> -->
|
||||
|
@ -683,9 +676,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="completed" class="tab-content mt-1">
|
||||
<div id="completed" class="tab-content">
|
||||
<!-- Content for "Completed" tab -->
|
||||
<table id="completedTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="completedTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -720,8 +713,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($order['items'][0]['product']['product_image']))
|
||||
|
@ -739,10 +731,10 @@ if ($_SESSION["isVendor"] == true) {
|
|||
?>
|
||||
|
||||
</td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?> </span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?> </span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['status']; ?></span></td>
|
||||
<!-- <td><span><?php echo $order['tracking_number']; ?></span></td>
|
||||
<td><span><?php echo $order['courier_name']; ?></span></td> -->
|
||||
|
@ -1069,20 +1061,20 @@ if ($_SESSION["isVendor"] == true) {
|
|||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
const orderResponse = await fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`);
|
||||
const orderData = await orderResponse.json();
|
||||
// const updatedDetails = orderData.payment.details.map(detail => ({
|
||||
// ...detail,
|
||||
// attributes: {
|
||||
// ...detail.attributes,
|
||||
// data: {
|
||||
// ...detail.attributes.data,
|
||||
// attributes: {
|
||||
// ...detail.attributes.data.attributes,
|
||||
// status: 'paid'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// status: 'paid'
|
||||
// }));
|
||||
const updatedDetails = orderData.payment.details.map(detail => ({
|
||||
...detail,
|
||||
attributes: {
|
||||
...detail.attributes,
|
||||
data: {
|
||||
...detail.attributes.data,
|
||||
attributes: {
|
||||
...detail.attributes.data.attributes,
|
||||
status: 'paid'
|
||||
}
|
||||
}
|
||||
},
|
||||
status: 'paid'
|
||||
}));
|
||||
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
|
@ -1091,11 +1083,11 @@ if ($_SESSION["isVendor"] == true) {
|
|||
},
|
||||
body: JSON.stringify({
|
||||
status: 'COMPLETED',
|
||||
// payment: {
|
||||
// status: 'PAID',
|
||||
// reference_number: orderData.payment.reference_number,
|
||||
// // details: updatedDetails,
|
||||
// }
|
||||
payment: {
|
||||
status: 'PAID',
|
||||
reference_number: orderData.payment.reference_number,
|
||||
details: updatedDetails,
|
||||
}
|
||||
}),
|
||||
})
|
||||
.then(response => response.json())
|
||||
|
@ -1105,39 +1097,6 @@ if ($_SESSION["isVendor"] == true) {
|
|||
// Update the status in the table without reloading the page
|
||||
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
|
||||
// location.reload();
|
||||
var rowToMove = document.querySelector(`#to-receive-${orderId}`);
|
||||
if (rowToMove) {
|
||||
// Get the values of the order
|
||||
var image = rowToMove.querySelector('td:nth-child(1)').innerHTML;
|
||||
var name = rowToMove.querySelector('td:nth-child(2)').innerHTML;
|
||||
var quantity = rowToMove.querySelector('td:nth-child(3)').innerHTML;
|
||||
var unitPrice = rowToMove.querySelector('td:nth-child(4)').innerHTML;
|
||||
var price = rowToMove.querySelector('td:nth-child(5)').innerHTML;
|
||||
var status = rowToMove.querySelector('td:nth-child(6)').innerHTML;
|
||||
var date = rowToMove.querySelector('td:nth-child(7)').innerHTML;
|
||||
|
||||
// Construct the HTML for the new row in the "Completed" table
|
||||
var newRowHTML = '<tr>' +
|
||||
'<td>' + image + '</td>' +
|
||||
'<td>' + name + '</td>' +
|
||||
'<td>' + quantity + '</td>' +
|
||||
'<td>' + unitPrice + '</td>' +
|
||||
'<td>' + price + '</td>' +
|
||||
'<td><span> COMPLETED </span></td>' +
|
||||
'<td>' + date + '</td>' +
|
||||
'<td>' +
|
||||
|
||||
'</td>' +
|
||||
'</tr>';
|
||||
// var newRowHTML = 'HERE!!!!!!!!!!!!!!!!!'
|
||||
// Remove the row from the "To Receive" table
|
||||
rowToMove.parentNode.removeChild(rowToMove);
|
||||
|
||||
// Append the HTML for the new row to the "Completed" table
|
||||
document.querySelector('#completed tbody').innerHTML += newRowHTML;
|
||||
}
|
||||
|
||||
// rowToMove.parentNode.removeChild(rowToMove);
|
||||
|
||||
} else {
|
||||
alert('Failed to update order status');
|
||||
|
@ -1331,7 +1290,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
|
||||
|
||||
<!-- Footer navigation panel for responsive display -->
|
||||
<!-- <div class="ec-nav-toolbar">
|
||||
<div class="ec-nav-toolbar">
|
||||
<div class="container">
|
||||
<div class="ec-nav-panel">
|
||||
<div class="ec-nav-panel-icons">
|
||||
|
@ -1352,7 +1311,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- raymart remove popup feb 20 2024 -->
|
||||
|
@ -1561,29 +1520,6 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
<!-- Feature tools end -->
|
||||
|
||||
<!-- DataTables -->
|
||||
<script>
|
||||
$(document).ready( function () {
|
||||
$('#allOrdersTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toPayTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toShipTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toReceiveTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#completedTbl').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<!-- Vendor JS -->
|
||||
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
|
||||
<script src="assets/js/vendor/popper.min.js"></script>
|
||||
|
@ -1601,8 +1537,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
|
||||
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
|
||||
<script src="assets/js/plugins/nouislider.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
|
||||
|
||||
|
||||
<!-- Main Js -->
|
||||
<script src="assets/js/vendor/index.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
|
|
|
@ -261,16 +261,14 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<div class="card-body">
|
||||
<div class="selectCon">
|
||||
<div class="selectWrap" style="display: flex; justify-content: center; align-items: center; width: 50%;">
|
||||
<!-- <input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedBillingAddress[<?php # echo $customer_index; ?>]" id="billing_address_<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" value="<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" class="form-check-input" onchange="updateAddressBilling('<?php # echo $customer['_id']; ?>', <?php # echo $address_index; ?>, true)" <?php # echo $address["billing"] ? 'checked' : ''; ?>> -->
|
||||
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedBillingAddress[<?php echo $customer_index; ?>]" id="billing_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" <?php echo $address["billing"] ? 'checked' : ''; ?>>
|
||||
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedBillingAddress[<?php echo $customer_index; ?>]" id="billing_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" onchange="updateAddressBilling('<?php echo $customer['_id']; ?>', <?php echo $address_index; ?>, true)" <?php echo $address["billing"] ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" style="margin: 0px 10px !important;" for="billing_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>">
|
||||
Billing Address
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="selectWrap" style="display: flex; justify-content: center; align-items: center; width: 50%; margin-left:-20px;">
|
||||
<!-- <input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedShippingAddress[<?php # echo $customer_index; ?>]" id="shipping_address_<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" value="<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" class="form-check-input" onchange="updateAddressShipping('<?php # echo $customer['_id']; ?>', <?php # echo $address_index; ?>, true)" <?php # echo $address["shipping"] ? 'checked' : ''; ?>> -->
|
||||
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedShippingAddress[<?php echo $customer_index; ?>]" id="shipping_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" <?php echo $address["billing"] ? 'checked' : ''; ?>>
|
||||
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedShippingAddress[<?php echo $customer_index; ?>]" id="shipping_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" onchange="updateAddressShipping('<?php echo $customer['_id']; ?>', <?php echo $address_index; ?>, true)" <?php echo $address["shipping"] ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" style="margin: 0px 10px !important;" for="shipping_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>">
|
||||
Shipping Address
|
||||
</label>
|
||||
|
@ -310,7 +308,6 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<button type="button" onclick="updateAddressBilling('<?php echo $customer['_id']; ?>', <?php echo $address_index; ?>, true)">Use Selected Address</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -894,7 +891,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
const city = $('#citySelect :selected').text();
|
||||
const barangay = $('#barangaySelect :selected').text();
|
||||
const country = $('#addressCountry').val();
|
||||
|
||||
|
||||
|
||||
// Create a new address object
|
||||
const newAddress = {
|
||||
|
@ -1159,8 +1156,8 @@ if ($_SESSION["isVendor"] == true) {
|
|||
sCountryElement.textContent = customerData.address[addressIndex].country;
|
||||
}
|
||||
console.log(`Address updated successfully for customer ${customerId}`);
|
||||
location.reload();
|
||||
header("location: user-profile.php");
|
||||
// location.reload();
|
||||
// header("location: user-profile.php");
|
||||
} catch (error) {
|
||||
console.error('Error updating address:', error.message);
|
||||
}
|
||||
|
@ -1308,7 +1305,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<!-- Modal end -->
|
||||
|
||||
<!-- Footer navigation panel for responsive display -->
|
||||
<!-- <div class="ec-nav-toolbar">
|
||||
<div class="ec-nav-toolbar">
|
||||
<div class="container">
|
||||
<div class="ec-nav-panel">
|
||||
<div class="ec-nav-panel-icons">
|
||||
|
@ -1329,7 +1326,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- raymart remove popup feb 20 2024 -->
|
||||
|
|
|
@ -54,14 +54,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<link rel="stylesheet" href="assets/css/style.css" />
|
||||
<link rel="stylesheet" href="assets/css/style2.css" />
|
||||
<link rel="stylesheet" href="assets/css/responsive.css" />
|
||||
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Background css -->
|
||||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<style>
|
||||
.tab.active {
|
||||
background-color: #ffffff;
|
||||
|
@ -347,9 +342,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div> -->
|
||||
|
||||
<!-- 03-15-2024 Stacy added tab for all orders -->
|
||||
<div id="allRefunds" class="tab-content mt-1 active">
|
||||
<div id="allRefunds" class="tab-content active">
|
||||
<!-- Content for "all Orders" tab -->
|
||||
<table id="allRefundsTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="allRefundsTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -386,13 +381,12 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -423,9 +417,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toApprove" class="tab-content mt-1">
|
||||
<div id="toApprove" class="tab-content">
|
||||
<!-- Content for "To Approve" tab -->
|
||||
<table id="toApproveTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toApproveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -460,13 +454,12 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -497,9 +490,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toShip" class="tab-content mt-1">
|
||||
<div id="toShip" class="tab-content">
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<table id="toShipTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toShipTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -534,13 +527,12 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -571,9 +563,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toReceive" class="tab-content mt-1">
|
||||
<div id="toReceive" class="tab-content">
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<table id="toReceiveTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toReceiveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -608,13 +600,12 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -648,9 +639,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="toRefund" class="tab-content mt-1">
|
||||
<div id="toRefund" class="tab-content">
|
||||
<!-- Content for "To Refund" tab -->
|
||||
<table id="toRefundTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="toRefundTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -685,13 +676,12 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -725,9 +715,9 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
|
||||
|
||||
<div id="returnComplete" class="tab-content mt-1">
|
||||
<div id="returnComplete" class="tab-content">
|
||||
<!-- Content for "Return Complete" tab -->
|
||||
<table id="returnCompleteTbl" class="table ec-table">
|
||||
<table class="table ec-table">
|
||||
<thead id="returnCompleteTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -761,13 +751,12 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -1214,7 +1203,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
|
||||
|
||||
<!-- Footer navigation panel for responsive display -->
|
||||
<!-- <div class="ec-nav-toolbar">
|
||||
<div class="ec-nav-toolbar">
|
||||
<div class="container">
|
||||
<div class="ec-nav-panel">
|
||||
<div class="ec-nav-panel-icons">
|
||||
|
@ -1235,7 +1224,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- raymart remove popup feb 20 2024 -->
|
||||
|
@ -1444,33 +1433,6 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
<!-- Feature tools end -->
|
||||
|
||||
<!-- DataTables -->
|
||||
<script>
|
||||
$(document).ready( function () {
|
||||
$('#allRefundsTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toApproveTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toShipTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toReceiveTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toRefundTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#returnCompleteTbl').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<!-- Vendor JS -->
|
||||
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
|
||||
<script src="assets/js/vendor/popper.min.js"></script>
|
||||
|
@ -1488,7 +1450,6 @@ if ($_SESSION["isVendor"] == true) {
|
|||
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
|
||||
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
|
||||
<script src="assets/js/plugins/nouislider.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
|
||||
|
||||
<!-- Main Js -->
|
||||
<script src="assets/js/vendor/index.js"></script>
|
||||
|
|
|
@ -111,10 +111,6 @@ $products = productList();
|
|||
|
||||
<!-- ekka Cart End -->
|
||||
|
||||
<!-- Category Sidebar start -->
|
||||
<?php include "category-slider.php" ?>
|
||||
|
||||
|
||||
<!-- Ec breadcrumb start -->
|
||||
<div class="sticky-header-next-sec ec-breadcrumb section-space-mb">
|
||||
<div class="container">
|
||||
|
|
|
@ -254,7 +254,7 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
$order = $vendorOrders[$i];
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
if ($orderItems['status'] !== 'TO CHECKOUT' ) {
|
||||
|
||||
foreach ($orderItems['items'] as $item) {
|
||||
?>
|
||||
<tr>
|
||||
|
@ -333,7 +333,6 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
|
|||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -69,14 +69,9 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<link rel="stylesheet" href="assets/css/style.css" />
|
||||
<link rel="stylesheet" href="assets/css/style2.css" />
|
||||
<link rel="stylesheet" href="assets/css/responsive.css" />
|
||||
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Background css -->
|
||||
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<style>
|
||||
.tab.active {
|
||||
background-color: #ffffff;
|
||||
|
@ -265,7 +260,7 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
|
||||
</div>
|
||||
<!-- <div class="ec-vendor-block-items">
|
||||
<ul>
|
||||
<!-- <ul>
|
||||
<li><a href="vendor-dashboard.php">Dashboard</a></li>
|
||||
<li><a href="vendor-uploads.php">Upload Product</a></li>
|
||||
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
|
||||
|
@ -324,8 +319,8 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
<!-- 03-26-2024 Stacy added tab for all orders -->
|
||||
<!-- Content for "All Refunds" tab -->
|
||||
<div id="allRefunds" class="tab-content mt-1 active">
|
||||
<table id="allRefundsTbl" class="table ec-table">
|
||||
<div id="allRefunds" class="tab-content active">
|
||||
<table class="table ec-table">
|
||||
<thead id="allRefundTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -358,13 +353,12 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -394,8 +388,8 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
|
||||
<!-- Content for "To Approve" tab -->
|
||||
<div id="toApprove" class="tab-content mt-1">
|
||||
<table id="toApproveTbl" class="table ec-table">
|
||||
<div id="toApprove" class="tab-content">
|
||||
<table class="table ec-table">
|
||||
<thead id="toApproveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -426,12 +420,12 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'">
|
||||
<tr class="tableView">
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -465,8 +459,8 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<div id="toShip" class="tab-content mt-1">
|
||||
<table id="toShipTbl" class="table ec-table">
|
||||
<div id="toShip" class="tab-content">
|
||||
<table class="table ec-table">
|
||||
<thead id="toShipTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -497,13 +491,12 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -533,8 +526,8 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<div id="toReceive" class="tab-content mt-1">
|
||||
<table id="toReceiveTbl" class="table ec-table">
|
||||
<div id="toReceive" class="tab-content">
|
||||
<table class="table ec-table">
|
||||
<thead id="toReceiveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -564,12 +557,12 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'">
|
||||
<tr class="tableView">
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -602,8 +595,8 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
|
||||
<!-- Content for "To Refund" tab -->
|
||||
<div id="toRefund" class="tab-content mt-1">
|
||||
<table id="toRefundTbl" class="table ec-table">
|
||||
<div id="toRefund" class="tab-content">
|
||||
<table class="table ec-table">
|
||||
<thead id="toRefundTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -633,13 +626,12 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -672,8 +664,8 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
|
||||
<!-- Content for "Return Complete" tab -->
|
||||
<div id="returnComplete" class="tab-content mt-1">
|
||||
<table id="returnCompleteTbl" class="table ec-table">
|
||||
<div id="returnComplete" class="tab-content">
|
||||
<table class="table ec-table">
|
||||
<thead id="returnCompleteTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
|
@ -703,13 +695,12 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
|
||||
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
|
||||
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
|
||||
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td><span><?php echo $order['total_amount'] ?></span></td>
|
||||
<td><span><?php echo $order['return_order']['status']; ?></span></td>
|
||||
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
|
||||
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
|
||||
|
@ -1085,7 +1076,7 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
if (jsonObject.return_order.status === 'To Approve') {
|
||||
modal.innerHTML = `
|
||||
<div class="modal-header" style="height:5px; padding:10px;">
|
||||
<div class="modal-header" style="height:5px;">
|
||||
<h5 class="modal-title fs-5 font-weight-bold">${jsonObject.items[0].product.name}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
@ -1255,7 +1246,7 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
|
||||
<!-- Footer navigation panel for responsive display -->
|
||||
<!-- <div class="ec-nav-toolbar">
|
||||
<div class="ec-nav-toolbar">
|
||||
<div class="container">
|
||||
<div class="ec-nav-panel">
|
||||
<div class="ec-nav-panel-icons">
|
||||
|
@ -1276,7 +1267,7 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- raymart remove popup feb 20 2024 -->
|
||||
|
@ -1485,33 +1476,6 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
</div>
|
||||
<!-- Feature tools end -->
|
||||
|
||||
<!-- DataTables -->
|
||||
<script>
|
||||
$(document).ready( function () {
|
||||
$('#allRefundsTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toApproveTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toShipTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toReceiveTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#toRefundTbl').DataTable();
|
||||
} );
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#returnCompleteTbl').DataTable();
|
||||
} );
|
||||
</script>
|
||||
|
||||
<!-- Vendor JS -->
|
||||
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
|
||||
<script src="assets/js/vendor/popper.min.js"></script>
|
||||
|
@ -1529,7 +1493,6 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
|
||||
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
|
||||
<script src="assets/js/plugins/nouislider.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
|
||||
|
||||
<!-- Main Js -->
|
||||
<script src="assets/js/vendor/index.js"></script>
|
||||
|
|
Loading…
Reference in New Issue