stacy_branch #57
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue