stacy_branch #74
File diff suppressed because it is too large
Load Diff
28
cart.php
28
cart.php
|
@ -229,19 +229,35 @@ if ($_SESSION["userId"] <> "") {
|
|||
?>
|
||||
|
||||
<tr id="cart_order_<?php echo $order['_id'] ?>">
|
||||
<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></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>
|
||||
</td>
|
||||
<td data-label="Price" class="ec-cart-pro-price"><span class="amount"><?php echo $order['items'][0]['price']; ?></span></td>
|
||||
<td data-label="Quantity" class="ec-cart-pro-qty" style="text-align: center;">
|
||||
<div class="cart-qty-plus-minus2" style="width:100px; margin:auto;">
|
||||
<div class="qty-btn" onclick="qtyDecrementCart('<?php echo $order['_id']; ?>' , '<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')">-</div>
|
||||
<input id="cart_qty-input-<?php echo $order['items'][0]['_id']; ?>" class="qty-input" type="number" name="ec_qtybtn" value="<?php echo $order['items'][0]['quantity']; ?>" oninput="handleQtyInputCart(this, '<?php echo $order['_id']; ?>', '<?php echo $order['items'][0]['_id']; ?>','<?php echo $order['items'][0]['product']['product_id']; ?>')" />
|
||||
<div class="qty-btn" onclick="qtyIncrementCart('<?php echo $order['_id']; ?>' , '<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')">+</div>
|
||||
<!-- CART UI -->
|
||||
<div class="cart-qty-plus-minus2 d-flex justify-content-center mt-1">
|
||||
<div class="qty-btn" style="color:#ffaa00; font-size:35px; margin-right:5px; cursor: pointer;" onclick="qtyDecrementCart('<?php echo $order['_id']; ?>' ,
|
||||
'<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')"
|
||||
onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">-
|
||||
</div>
|
||||
<input style="width:100px; height:40px mt-3" id="cart_qty-input-<?php echo $order['items'][0]['_id']; ?>" class="qty-input" type="number" name="ec_qtybtn"
|
||||
value="<?php echo $order['items'][0]['quantity']; ?>" oninput="handleQtyInputCart(this, '<?php echo $order['_id']; ?>',
|
||||
'<?php echo $order['items'][0]['_id']; ?>','<?php echo $order['items'][0]['product']['product_id']; ?>')" />
|
||||
<div class="qty-btn" style="color:#ffaa00; font-size:30px; margin-left:5px; cursor: pointer;" onclick="qtyIncrementCart('<?php echo $order['_id']; ?>' ,
|
||||
'<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')"
|
||||
onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">+</div>
|
||||
</div>
|
||||
<span id="cart_qty_<?php echo $order['_id'] ?>"></span>
|
||||
</td>
|
||||
<td data-label="Total" class="cart_subtotal-<?php echo $order['_id']; ?>" style="font-weight:bold"> <?php echo $order['total_amount'] ?></td>
|
||||
<td data-label="Remove" class="ec-cart-pro-remove">
|
||||
<a onclick="deleteOrderCart('<?php echo $order['_id']; ?>')"><i class="ecicon eci-trash-o"></i></a>
|
||||
<!-- <a onclick="deleteOrderCart('<?php # echo $order['_id']; ?>')"><i class="ecicon eci-trash-o"></i></a> -->
|
||||
<a href="#" class="removeCart" onclick="deleteOrderCart('<?php echo $order['_id']; ?>')">
|
||||
<i class="ecicon eci-trash" style="color:#7e7e7e;" onmouseover="this.style.color='#aaaaaa'"
|
||||
onmouseout="this.style.color='#7e7e7e'">
|
||||
</i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
@ -532,11 +532,11 @@ if ($_SESSION["isVendor"] == true) {
|
|||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log('Email update successful');
|
||||
console.log('Profile updated Successful');
|
||||
location.reload();
|
||||
// Handle any other actions after the successful email update
|
||||
} else {
|
||||
console.error('Email update failed');
|
||||
console.error('Profile Failed to Upload');
|
||||
// Handle errors or display a message to the user
|
||||
}
|
||||
})
|
||||
|
@ -1253,10 +1253,10 @@ if ($_SESSION["isVendor"] == true) {
|
|||
})
|
||||
.then(secondResponse => {
|
||||
if (secondResponse.ok) {
|
||||
console.log('Second request successful');
|
||||
location.reload();
|
||||
console.log('Image Uploaded Successful');
|
||||
// location.reload();
|
||||
} else {
|
||||
console.error('Second request failed');
|
||||
console.error('Image Failed to Upload');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -1294,7 +1294,7 @@ if ($_SESSION["isVendor"] == true) {
|
|||
aria-label="Close">Close</a>
|
||||
</div> -->
|
||||
</form>
|
||||
<button type="button" class="btn btn-primary btn-pill my-3" onclick="editUser()">Upload</button>
|
||||
<button type="button" class="btn btn-primary btn-pill mt-3" onclick="editUser()">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -257,11 +257,19 @@ $array = json_decode($result, true);
|
|||
<?php
|
||||
if ($array['status'] === 'TO PAY' || $array['status'] === 'To Pay') {
|
||||
echo '<button type="submit" class="btn btn-primary">To Ship</button>';
|
||||
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary mt-3">Back</button>';
|
||||
} elseif ($array['status'] === 'TO SHIP' || $array['status'] === 'To Ship') {
|
||||
echo '<button type="submit" class="btn btn-primary">To Receive</button>';
|
||||
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary mt-3">Back</button>';
|
||||
} elseif ($array['status'] === 'TO RECEIVE' || $array['status'] === 'To Receive') {
|
||||
echo '<button type="submit" class="btn btn-primary">Completed</button>';
|
||||
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary mt-3">Back</button>';
|
||||
} elseif ($array['status'] === 'COMPLETED' || $array['status'] === 'Completed') {
|
||||
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary">Back</button>';
|
||||
} elseif ($array['status'] === 'RETURNED' || $array['status'] === 'Returned') {
|
||||
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary">Back</button>';
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -640,11 +640,11 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log('Email update successful');
|
||||
console.log('Profile updated successful');
|
||||
location.reload();
|
||||
// Handle any other actions after the successful email update
|
||||
} else {
|
||||
console.error('Email update failed');
|
||||
console.error('Profile failed to update');
|
||||
// Handle errors or display a message to the user
|
||||
}
|
||||
})
|
||||
|
@ -1492,10 +1492,10 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
})
|
||||
.then(secondResponse => {
|
||||
if (secondResponse.ok) {
|
||||
console.log('Second request successful');
|
||||
location.reload();
|
||||
console.log('Profile Image Uploaded Successful');
|
||||
// location.reload();
|
||||
} else {
|
||||
console.error('Second request failed');
|
||||
console.error('Profile Image Failed to Upload');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -1585,10 +1585,10 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
})
|
||||
.then(secondResponse => {
|
||||
if (secondResponse.ok) {
|
||||
console.log('Second request successful');
|
||||
location.reload();
|
||||
console.log('Profile Banner Uploaded Successful');
|
||||
// location.reload();
|
||||
} else {
|
||||
console.error('Second request failed');
|
||||
console.error('Profile Banner Failed to Upload');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
Loading…
Reference in New Issue