stacy_branch #79

Merged
MarkHipe merged 5 commits from stacy_branch into main 2024-05-03 18:15:57 +08:00
1 changed files with 9 additions and 4 deletions
Showing only changes of commit 02b2f799db - Show all commits

View File

@ -90,6 +90,8 @@ if (isset($_GET['id'])) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
});
}
@ -97,8 +99,9 @@ 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;
}
});
}
@ -538,7 +541,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["isLoggedIn"]) {
if ($_SESSION["isCustomer"]) {
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>';
@ -548,6 +551,7 @@ 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">
@ -572,10 +576,11 @@ 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 {
} else if (($_SESSION["isCustomer"] == false) && ($_SESSION["isVendor"] == false)) {
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;" data-bs-toggle="modal">LOGIN</button></a></div>';
border-radius:10px; letter-spacing:1px;" onmouseover="this.style.background=\'#df9000\'" onmouseout="this.style.background=\'#ffaa00\'"
data-bs-toggle="modal">LOGIN</button></a></div>';
}
?>
<!-- <div class="ec-single-wishlist" style="border: 1px solid yellow;">