Compare commits

..

4 Commits

Author SHA1 Message Date
MarkHipe 142418da3c Merge pull request 'stacy_branch' (#57) from stacy_branch into main
Reviewed-on: #57
2024-04-16 10:53:14 +08:00
Stacy 47a7083a31 FAQ page and Contact us page cleanup 2024-04-16 10:48:59 +08:00
Stacy a475ceecba Minor Changes 2024-04-16 10:47:29 +08:00
Stacy 181b602087 Placeholder for Empty List 2024-04-16 10:44:22 +08:00
10 changed files with 307 additions and 70 deletions

View File

@ -291,7 +291,7 @@
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->
<div class="recent-purchase">
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
@ -299,7 +299,7 @@
<p>10 Minutes ago</p>
</div>
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
</div>
</div> -->
<!-- Recent Purchase Popup end -->
<!-- Cart Floating Button -->

32
faq.php
View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
@ -168,23 +168,23 @@
<div class="col-md-12 ec-cms-block ec-abcms-block text-center">
<div class="ec-cms-block-inner">
<h3 class="ec-cms-block-title">What is Obanana Corporation's B2B eCommerce platform?</h3>
<p>Obanana Corporation's B2B eCommerce platform is an online marketplace designed to connect businesses worldwide, facilitating trade between buyers and sellers.</p>
<p>Obanana Corporation's B2B eCommerce platform is an online marketplace designed to connect businesses worldwide, facilitating trade between buyers and sellers.</p><br>
<h3 class="ec-cms-block-title">What kind of products can be found on the Obanana Corporation platform?</h3>
<p>Our platform offers a diverse range of products across various industries, including but not limited to electronics, clothing, machinery, raw materials, and more, catering to the needs of businesses across different sectors.</p>
<p>Our platform offers a diverse range of products across various industries, including but not limited to electronics, clothing, machinery, raw materials, and more, catering to the needs of businesses across different sectors.</p><br>
<h3 class="ec-cms-block-title">How does the platform ensure the quality of products listed?</h3>
<p>To ensure quality standards, we implement rigorous verification processes for both sellers and products. We encourage buyers to provide feedback and ratings based on their experience, fostering transparency and trust within our marketplace.</p>
<p>To ensure quality standards, we implement rigorous verification processes for both sellers and products. We encourage buyers to provide feedback and ratings based on their experience, fostering transparency and trust within our marketplace.</p><br>
<h3 class="ec-cms-block-title">What are the payment options available on the Obanana Corporation platform?</h3>
<p>We offer a variety of secure payment options to accommodate the needs of our users, including bank transfers, credit/debit cards, and third-party payment gateways, ensuring smooth and secure transactions.</p>
<p>We offer a variety of secure payment options to accommodate the needs of our users, including bank transfers, credit/debit cards, and third-party payment gateways, ensuring smooth and secure transactions.</p><br>
<h3 class="ec-cms-block-title">Can buyers and sellers communicate directly on the platform?</h3>
<p>Yes, our platform facilitates direct communication between buyers and sellers through messaging features and inquiry forms, allowing for seamless negotiation and collaboration.</p>
<p>Yes, our platform facilitates direct communication between buyers and sellers through messaging features and inquiry forms, allowing for seamless negotiation and collaboration.</p><br>
<h3 class="ec-cms-block-title">How does shipping and logistics work on the Obanana Corporation platform?</h3>
<p>We provide comprehensive shipping and logistics solutions, including freight forwarding services and shipping partners, to ensure efficient and timely delivery of goods to buyers worldwide.</p>
<p>We provide comprehensive shipping and logistics solutions, including freight forwarding services and shipping partners, to ensure efficient and timely delivery of goods to buyers worldwide.</p><br>
<h3 class="ec-cms-block-title">Are there any minimum order requirements for purchasing on the platform?</h3>
<p>Minimum order requirements may vary depending on the seller and product category. Buyers can find detailed information regarding minimum order quantities on product listings.</p>
<p>Minimum order requirements may vary depending on the seller and product category. Buyers can find detailed information regarding minimum order quantities on product listings.</p><br>
<h3 class="ec-cms-block-title">Does Obanana Corporation offer any trade assurance or buyer protection services?</h3>
<p>Yes, we provide trade assurance services to protect buyers' interests, offering refunds or replacements for orders that do not meet agreed-upon quality standards or fail to arrive within specified delivery times.</p>
<p>Yes, we provide trade assurance services to protect buyers' interests, offering refunds or replacements for orders that do not meet agreed-upon quality standards or fail to arrive within specified delivery times.</p><br>
<h3 class="ec-cms-block-title">How does Obanana Corporation handle disputes between buyers and sellers?</h3>
<p>In the event of disputes, our dedicated support team mediates and facilitates resolution through our dispute resolution process, ensuring fair outcomes for all parties involved.</p>
<p>In the event of disputes, our dedicated support team mediates and facilitates resolution through our dispute resolution process, ensuring fair outcomes for all parties involved.</p><br>
<h3 class="ec-cms-block-title">How can businesses join the Obanana Corporation platform as sellers?</h3>
<p>Businesses interested in becoming sellers on our platform can apply for membership through our website, where they will undergo a verification process to ensure compliance with our standards and policies.</p>
</div>
@ -196,7 +196,7 @@
</section>
<!-- ec testmonial Start -->
<section class="section ec-test-section section-space-ptb-100 section-space-m" id="reviews">
<!-- <section class="section ec-test-section section-space-ptb-100 section-space-m" id="reviews">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
@ -283,11 +283,11 @@
</div>
</div>
</div>
</section>
</section> -->
<!-- ec testmonial end -->
<!-- services Section Start -->
<section class="section ec-services-section section-space-p" id="services">
<!-- <section class="section ec-services-section section-space-p" id="services">
<h2 class="d-none">Services</h2>
<div class="container">
<div class="row">
@ -337,7 +337,7 @@
</div>
</div>
</div>
</section>
</section> -->
<!--services Section End -->
<!-- Ec Instagram Start -->
@ -450,7 +450,7 @@
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->
<div class="recent-purchase">
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
@ -458,7 +458,7 @@
<p>10 Minutes ago</p>
</div>
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
</div>
</div> -->
<!-- Recent Purchase Popup end -->
<!-- Cart Floating Button -->

View File

@ -7,6 +7,7 @@ if ($_SESSION["userId"] <> "") {
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
} else {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
?>
<!DOCTYPE html>
@ -323,7 +324,7 @@ if ($_SESSION["userId"] <> "") {
<div id="allOrders" class=" tab-content active">
<!-- Content for "all Orders" tab -->
<table class="table ec-table">
<thead>
<thead id="allOrdersTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -342,29 +343,23 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['status']) && isset($order['items'][0]['product'])) {
if (isset($order['status']) && (strtoupper($order['status']) === 'TO PAY') || (strtoupper($order['status']) === 'TO SHIP')
|| (strtoupper($order['status']) === 'TO RECEIVE') || (strtoupper($order['status']) === 'COMPLETED')
&& isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td>
<?php
// if (isset($order['items'][0]['product']['product_image'])) {
// echo '<img class="prod-img" src="' . $order['items'][0]['product']['product_image'] . '" alt="product"> ';
// } else {
// echo '<img class="prod-img" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="product">';
// }
?>
<img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
</td>
<!-- <img class="prod-img" src="<?php # echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td> -->
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></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>
@ -374,16 +369,31 @@ if ($_SESSION["userId"] <> "") {
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
</tr>
<?php } else { ?>
<td> <img class="prod-img" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="product"> </td>
<?php
}
}
if (empty($order['status'])) {
echo '<tr><p style="padding-top:30px; padding-left:20px;">No Purchased Order/s Yet.</p></tr>';
}
}
}
// } else if (empty($order['status'])) {
// echo '<p style="padding-top:30px; padding-left:20px;">No Purchased Order/s Yet.</p>';
// }
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No Order/s Yet.</p>';
?>
<script>
allOrdersTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -391,7 +401,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toPay" class="tab-content">
<!-- Content for "To Pay" tab -->
<table class="table ec-table">
<thead>
<thead id="toPayTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -410,12 +420,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['status']) && (strtoupper($order['status']) === 'TO PAY') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -439,6 +451,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Pay Order/s Yet.</p>';
?>
<script>
toPayTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -446,7 +470,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toShip" class="tab-content">
<!-- Content for "To Ship" tab -->
<table class="table ec-table">
<thead>
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -467,12 +491,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['status']) && (strtoupper($order['status']) === 'TO SHIP') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -496,6 +522,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Ship Order/s Yet.</p>';
?>
<script>
toShipTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -503,7 +541,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toReceive" class="tab-content">
<!-- Content for "To Receive" tab -->
<table class="table ec-table">
<thead>
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -523,12 +561,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['status']) && (strtoupper($order['status']) === 'TO RECEIVE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -560,6 +600,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Receive Order/s Yet.</p>';
?>
<script>
toReceiveTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -567,7 +619,7 @@ if ($_SESSION["userId"] <> "") {
<div id="completed" class="tab-content">
<!-- Content for "Completed" tab -->
<table class="table ec-table">
<thead>
<thead id="completedTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -587,12 +639,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['status']) && (strtoupper($order['status']) === 'COMPLETED') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
@ -831,6 +885,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No Completed Order/s Yet.</p>';
?>
<script>
completedTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>

View File

@ -9,6 +9,7 @@ if ($_SESSION["userId"] <> "") {
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
} else {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
?>
<!DOCTYPE html>
@ -513,7 +514,7 @@ if ($_SESSION["userId"] <> "") {
})
.then(response => {
if (response.ok) {
location.reload();
// location.reload();
// filter the delete action
document.getElementById('form-check-' + addressIndex).remove();
} else {

View File

@ -9,6 +9,7 @@ if ($_SESSION["userId"] <> "") {
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
} else {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
?>
<!DOCTYPE html>
@ -338,7 +339,7 @@ if ($_SESSION["userId"] <> "") {
<div id="allRefunds" class="tab-content active">
<!-- Content for "all Orders" tab -->
<table class="table ec-table">
<thead>
<thead id="allRefundsTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -359,6 +360,7 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
@ -367,6 +369,7 @@ if ($_SESSION["userId"] <> "") {
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') || (strtoupper($order['return_order']['status']) === 'TO SHIP')
|| (strtoupper($order['return_order']['status']) === 'TO RECEIVE') || (strtoupper($order['return_order']['status']) === 'TO REFUND')
|| (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -392,6 +395,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No Refund/s Yet.</p>';
?>
<script>
allRefundsTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -399,7 +414,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toApprove" class="tab-content">
<!-- Content for "To Approve" tab -->
<table class="table ec-table">
<thead>
<thead id="toApproveTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -420,12 +435,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -451,6 +468,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Approve Refund/s Yet.</p>';
?>
<script>
toApproveTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -458,7 +487,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toShip" class="tab-content">
<!-- Content for "To Ship" tab -->
<table class="table ec-table">
<thead>
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -479,12 +508,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO SHIP') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -510,6 +541,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Ship Refund/s Yet.</p>';
?>
<script>
toShipTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -517,7 +560,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toReceive" class="tab-content">
<!-- Content for "To Receive" tab -->
<table class="table ec-table">
<thead>
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -538,12 +581,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO RECEIVE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -572,6 +617,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Receive Refund/s Yet.</p>';
?>
<script>
toReceiveTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -579,7 +636,7 @@ if ($_SESSION["userId"] <> "") {
<div id="toRefund" class="tab-content">
<!-- Content for "To Refund" tab -->
<table class="table ec-table">
<thead>
<thead id="toRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -600,12 +657,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO REFUND') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -634,6 +693,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Refund/s Yet.</p>';
?>
<script>
toRefundTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
@ -641,7 +712,7 @@ if ($_SESSION["userId"] <> "") {
<div id="returnComplete" class="tab-content">
<!-- Content for "Return Complete" tab -->
<table class="table ec-table">
<thead>
<thead id="returnCompleteTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -661,12 +732,14 @@ if ($_SESSION["userId"] <> "") {
$customer = $customer_data[0];
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -831,6 +904,18 @@ if ($_SESSION["userId"] <> "") {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No Completed Refund/s Yet.</p>';
?>
<script>
returnCompleteTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>

View File

@ -265,7 +265,7 @@ if (is_array($vendorOrderss)) {
}
?> -->
</td>
<td><span><?php echo $item['product']['name']; ?></span></td>
<td style="max-width:300px;"><span class="text-truncate"><?php echo $item['product']['name']; ?></span></td>
<td><span><?php echo $orderItems['status']; ?></span></td>
<td><span><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
<td><span><?php echo $orderItems['total_amount']; ?></span></td>
@ -463,7 +463,7 @@ if (is_array($vendorOrderss)) {
}
?> -->
</td>
<td><span><?php echo $product['product_name']; ?></span></td>
<td style="max-width:300px;"><span class="text-truncate"><?php echo $product['product_name']; ?></span></td>
<td><span><?php echo $product['regular_price']; ?></span></td>
<td><span><?php echo $product['sale_price']; ?></span></td>
<td><span><?php echo $product['minimum_order']; ?></span></td>

View File

@ -311,11 +311,12 @@ if (is_array($vendorOrderss)) {
<div class="tab" data-tab-name="returnComplete" onclick="showTab('returnComplete')">Return Complete</div>
</div> -->
<!-- 03-26-2024 Stacy added tab for all orders -->
<!-- Content for "All Refunds" tab -->
<div id="allRefunds" class="tab-content active">
<!-- Content for "All Refunds" tab -->
<table class="table ec-table">
<thead>
<thead id="allRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -335,11 +336,13 @@ if (is_array($vendorOrderss)) {
$order = $vendorOrders;
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
$orderExist = false; //for checking if order exist
foreach ($orderItems as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') || (strtoupper($order['return_order']['status']) === 'TO SHIP')
|| (strtoupper($order['return_order']['status']) === 'TO RECEIVE') || (strtoupper($order['return_order']['status']) === 'TO REFUND')
|| (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
$orderExist = true; //if there's an order, orderExist will be set to true
$totalAmount += $order['total_amount'];
?>
<?php
@ -361,16 +364,28 @@ if (is_array($vendorOrderss)) {
<?php
}
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No Refund/s Yet.</p>';
?>
<script>
allRefundTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
<div id="toApprove" class="tab-content active">
<!-- Content for "To Approve" tab -->
<!-- Content for "To Approve" tab -->
<div id="toApprove" class="tab-content">
<table class="table ec-table">
<thead>
<thead id="toApproveTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -390,9 +405,11 @@ if (is_array($vendorOrderss)) {
$order = $vendorOrders;
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
$orderExist = false;
foreach ($orderItems as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -418,16 +435,28 @@ if (is_array($vendorOrderss)) {
<?php
}
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Approve Refund/s Yet.</p>';
?>
<script>
toApproveTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
<!-- Content for "To Ship" tab -->
<div id="toShip" class="tab-content">
<!-- Content for "To Ship" tab -->
<table class="table ec-table">
<thead>
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -447,9 +476,11 @@ if (is_array($vendorOrderss)) {
$order = $vendorOrders;
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
$orderExist = false;
foreach ($orderItems as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO SHIP') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -471,16 +502,28 @@ if (is_array($vendorOrderss)) {
<?php
}
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Ship Refund/s Yet.</p>';
?>
<script>
toShipTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
<!-- Content for "To Receive" tab -->
<div id="toReceive" class="tab-content">
<!-- Content for "To Receive" tab -->
<table class="table ec-table">
<thead>
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -499,9 +542,11 @@ if (is_array($vendorOrderss)) {
$order = $vendorOrders;
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
$orderExist = false;
foreach ($orderItems as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO RECEIVE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -528,13 +573,26 @@ if (is_array($vendorOrderss)) {
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Receive Refund/s Yet.</p>';
?>
<script>
toReceiveTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
<!-- Content for "To Refund" tab -->
<div id="toRefund" class="tab-content">
<!-- Content for "To Refund" tab -->
<table class="table ec-table">
<thead>
<thead id="toRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -553,9 +611,11 @@ if (is_array($vendorOrderss)) {
$order = $vendorOrders;
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
$orderExist = false;
foreach ($orderItems as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO REFUND') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -580,16 +640,28 @@ if (is_array($vendorOrderss)) {
<?php
}
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No To Refund/s Yet.</p>';
?>
<script>
toRefundTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>
<!-- Content for "Return Complete" tab -->
<div id="returnComplete" class="tab-content">
<!-- Content for "Return Complete" tab -->
<table class="table ec-table">
<thead>
<thead id="returnCompleteTHead">
<tr class="Title">
<th scope="col">Image</th>
<th scope="col">Name</th>
@ -608,9 +680,11 @@ if (is_array($vendorOrderss)) {
$order = $vendorOrders;
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
$orderExist = false;
foreach ($orderItems as $order) {
// Ensure that the required data is available before accessing it
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
$orderExist = true;
$totalAmount += $order['total_amount'];
?>
<?php
@ -771,9 +845,20 @@ if (is_array($vendorOrderss)) {
<?php
}
}
?>
</tbody>
<?php
if (!$orderExist) {
echo '<p style="padding-top:30px; padding-left:20px;">No Refund/s Complete Yet.</p>';
?>
<script>
returnCompleteTHead.style.display = 'none';
</script>
<?php
}
?>
</table>
</div>

View File

@ -629,7 +629,7 @@ if ($_SESSION["userId"] <> "") {
<script>
// function for deleting address
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
// const vendorid = `<?php # echo $_SESSION["LoggedInVendorId"]; ?>`;
function deleteAddress(vendorid, addressIndex) {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
.then(response => response.json())
@ -648,7 +648,7 @@ if ($_SESSION["userId"] <> "") {
})
.then(response => {
if (response.ok) {
location.reload();
// location.reload();
// filter the delete action
document.getElementById('form-check-' + addressIndex).remove();
} else {

View File

@ -419,7 +419,7 @@ $array = json_decode($result, true);
</div>
<!-- 03-15-2024 Jun Jihad price_matrix field Product Upload Vendor Page -->
<!-- 02-19-2024 Jun Jihad Promo Field Product Upload Vendor Page -->
<div class="col-md-12" style="margin: 0 0 20px 0;">
<div class="col-md-12 pt-3" style="margin: 0 0 20px 0; white-space: nowrap;">
<label class="form-label">Promo</label>
<div class="row" justify-content-between>
<div class="col-md-6">

View File

@ -331,7 +331,7 @@ if ($_SESSION["userId"] <> "") {
if (xhr.status === 200) {
// Product removed successfully, you can handle the UI update here if needed
console.log('Product removed successfully');
location.reload(); // Refresh the page after removing the product
// location.reload(); // Refresh the page after removing the product
} else {
// Handle error response
console.error('Error removing product:', xhr.responseText);
@ -366,7 +366,7 @@ if ($_SESSION["userId"] <> "") {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
console.log('Products removed successfully');
location.reload();
// location.reload();
} else {
console.error('Error removing products:', xhr.responseText);
}