minor fixes in label in user-profile/vendor-settings and minor ui changes in header.php #89
150
header.php
150
header.php
|
@ -2063,88 +2063,100 @@ if ($_SESSION["userId"] <> "") {
|
|||
</style>
|
||||
<ul class="eccart-pro-items">
|
||||
<?php
|
||||
$cartEmpty = true;
|
||||
//var_dump($order_data[0]['items'][0]['product']);
|
||||
|
||||
foreach ($order_data as $order) {
|
||||
if (isset($order['status']) && $order['status'] === 'CART' && isset($order['items'][0]['product'])) {
|
||||
$cartEmpty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($cartEmpty) {
|
||||
echo "<p>No items in the cart</p>";
|
||||
} else {
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['status']) && $order['status'] === 'CART' && isset($order['items'][0]['product'])) {
|
||||
$cartEmpty = false;
|
||||
$totalAmount += $order['total_amount'];
|
||||
$product = getProduct($order['items'][0]['product']['product_id']);
|
||||
$product_data = json_decode($product, true);
|
||||
?>
|
||||
<li class="rowcart" id="order_<?php echo $order['_id'] ?>">
|
||||
<input type="checkbox" class="rowcartCheckbox" name="cart-item[]"
|
||||
value="<?php echo $order['_id']?>" />
|
||||
<a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>"
|
||||
class="sidekka_pro_img">
|
||||
<?php
|
||||
if (isset($order['items'][0]['product']['product_image'])) {
|
||||
$image_urls = explode(',', $order['items'][0]['product']['product_image']);
|
||||
if (!empty($image_urls)) {
|
||||
$first_image_url = trim($image_urls[0]);
|
||||
?>
|
||||
<img loading="lazy" src="<?php echo $first_image_url; ?>"
|
||||
alt="product" />
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<img loading="lazy" class="hover-image"
|
||||
src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"
|
||||
alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
<div class="ec-pro-content">
|
||||
|
||||
?>
|
||||
<li class="rowcart" id="order_<?php echo $order['_id'] ?>">
|
||||
<input type="checkbox" class="rowcartCheckbox" name="cart-item[]"
|
||||
value="<?php echo $order['_id']?>" />
|
||||
<a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>"
|
||||
class="cart_pro_title">
|
||||
<?php echo $order['items'][0]['product']['name']; ?>
|
||||
class="sidekka_pro_img">
|
||||
<?php
|
||||
if (isset($order['items'][0]['product']['product_image'])) {
|
||||
$image_urls = explode(',', $order['items'][0]['product']['product_image']);
|
||||
if (!empty($image_urls)) {
|
||||
$first_image_url = trim($image_urls[0]);
|
||||
?>
|
||||
<img loading="lazy" src="<?php echo $first_image_url; ?>"
|
||||
alt="product" />
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<img loading="lazy" class="hover-image"
|
||||
src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"
|
||||
alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
<span class="cart-price">Unit Price:
|
||||
<span><?php echo $order['items'][0]['price']; ?></span></span>
|
||||
<div class="cart-price">
|
||||
<span class="subtotal-<?php echo $order['_id']; ?>">Subtotal:
|
||||
<?php echo $order['total_amount'] ?></span>
|
||||
</div>
|
||||
<!-- 02-16-2024 Stacy added style -->
|
||||
<div class="qty-plus-minuses"
|
||||
style="display:flex; overflow:visible; align-items:center; margin-top:5px;">
|
||||
<div class="qty-btn"
|
||||
style="color:#ffaa00; font-size:35px; margin-right:5px; cursor: pointer;"
|
||||
onclick="qtyDecrement('<?php echo $order['_id']; ?>' ,
|
||||
'<?php echo $order['items'][0]['_id']; ?>')"
|
||||
onmouseover="this.style.color='#a15d00'"
|
||||
onmouseout="this.style.color='#ffaa00'">-
|
||||
</div>
|
||||
<input style="width:80px; height:40px"
|
||||
id="qty-input-<?php echo $order['items'][0]['_id']; ?>"
|
||||
class="qty-input" type="number" name="ec_qtybtn"
|
||||
value="<?php echo $order['items'][0]['quantity']; ?>"
|
||||
oninput="handleQtyInput(this, '<?php echo $order['_id']; ?>',
|
||||
'<?php echo $order['items'][0]['_id']; ?>')" />
|
||||
<div class="qty-btn"
|
||||
style="color:#ffaa00; font-size:30px; margin-left:5px; cursor: pointer;"
|
||||
onclick="qtyIncrement('<?php echo $order['_id']; ?>' ,
|
||||
'<?php echo $order['items'][0]['_id']; ?>', false)"
|
||||
onmouseover="this.style.color='#a15d00'"
|
||||
onmouseout="this.style.color='#ffaa00'">+
|
||||
</div>
|
||||
<!-- <a class="remove">x</a> -->
|
||||
<!-- <a href="#" class="removeCart" onclick="deleteOrder('<?php #echo $order['_id']; ?>')">x</a> -->
|
||||
<a href="#" class="removeCart" style="margin-left:10px;"
|
||||
onclick="deleteOrder('<?php echo $order['_id']; ?>')">
|
||||
<i class="ecicon eci-trash" style="color:#7e7e7e;"
|
||||
onmouseover="this.style.color='#aaaaaa'"
|
||||
onmouseout="this.style.color='#7e7e7e'"></i>
|
||||
<div class="ec-pro-content">
|
||||
|
||||
<a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>"
|
||||
class="cart_pro_title">
|
||||
<?php echo $order['items'][0]['product']['name']; ?>
|
||||
</a>
|
||||
<span class="cart-price">Unit Price:
|
||||
<span><?php echo $order['items'][0]['price']; ?></span></span>
|
||||
<div class="cart-price">
|
||||
<span class="subtotal-<?php echo $order['_id']; ?>">Subtotal:
|
||||
<?php echo $order['total_amount'] ?></span>
|
||||
</div>
|
||||
<!-- 02-16-2024 Stacy added style -->
|
||||
<div class="qty-plus-minuses"
|
||||
style="display:flex; overflow:visible; align-items:center; margin-top:5px;">
|
||||
<div class="qty-btn"
|
||||
style="color:#ffaa00; font-size:35px; margin-right:5px; cursor: pointer;"
|
||||
onclick="qtyDecrement('<?php echo $order['_id']; ?>' ,
|
||||
'<?php echo $order['items'][0]['_id']; ?>')"
|
||||
onmouseover="this.style.color='#a15d00'"
|
||||
onmouseout="this.style.color='#ffaa00'">-
|
||||
</div>
|
||||
<input style="width:80px; height:40px"
|
||||
id="qty-input-<?php echo $order['items'][0]['_id']; ?>"
|
||||
class="qty-input" type="number" name="ec_qtybtn"
|
||||
value="<?php echo $order['items'][0]['quantity']; ?>"
|
||||
oninput="handleQtyInput(this, '<?php echo $order['_id']; ?>',
|
||||
'<?php echo $order['items'][0]['_id']; ?>')" />
|
||||
<div class="qty-btn"
|
||||
style="color:#ffaa00; font-size:30px; margin-left:5px; cursor: pointer;"
|
||||
onclick="qtyIncrement('<?php echo $order['_id']; ?>' ,
|
||||
'<?php echo $order['items'][0]['_id']; ?>', false)"
|
||||
onmouseover="this.style.color='#a15d00'"
|
||||
onmouseout="this.style.color='#ffaa00'">+
|
||||
</div>
|
||||
<!-- <a class="remove">x</a> -->
|
||||
<!-- <a href="#" class="removeCart" onclick="deleteOrder('<?php #echo $order['_id']; ?>')">x</a> -->
|
||||
<a href="#" class="removeCart" style="margin-left:10px;"
|
||||
onclick="deleteOrder('<?php echo $order['_id']; ?>')">
|
||||
<i class="ecicon eci-trash" style="color:#7e7e7e;"
|
||||
onmouseover="this.style.color='#aaaaaa'"
|
||||
onmouseout="this.style.color='#7e7e7e'"></i>
|
||||
</a>
|
||||
</div>
|
||||
<!-- 02-16-2024 Stacy added style -->
|
||||
</div>
|
||||
<!-- 02-16-2024 Stacy added style -->
|
||||
</div>
|
||||
</li>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '<li>No items in the cart</li>';
|
||||
|
|
|
@ -384,17 +384,50 @@ if (isset($_GET['id'])) {
|
|||
<!-- <h5 class="ec-single-title" id="productTitlemodal"><?php echo $product_details['product_name']; ?></h5> -->
|
||||
|
||||
<!-- 02-22-2024 Stacy hide -->
|
||||
<!-- <div class="ec-single-rating-wrap">
|
||||
|
||||
<?php
|
||||
if (isset($product_details['ratings']) && is_array($product_details['ratings'])) {
|
||||
// Get the total number of reviews
|
||||
$total_reviews = count($product_details['ratings']);
|
||||
}
|
||||
|
||||
$total_ratings = 0;
|
||||
|
||||
foreach ($product_details['ratings'] as $rating) {
|
||||
$total_ratings += $rating['rating'];
|
||||
}
|
||||
|
||||
$average_rating = $total_ratings / $total_reviews;
|
||||
|
||||
$total_stars = 5;
|
||||
|
||||
// Calculate the number of full, half, and empty stars
|
||||
$full_stars = floor($average_rating);
|
||||
$half_star = ($average_rating - $full_stars) >= 0.5 ? 1 : 0;
|
||||
$empty_stars = $total_stars - $full_stars - $half_star;
|
||||
?>
|
||||
<div class="ec-single-rating-wrap">
|
||||
<div class="ec-single-rating">
|
||||
<i class="ecicon eci-star fill"></i>
|
||||
<i class="ecicon eci-star fill"></i>
|
||||
<i class="ecicon eci-star fill"></i>
|
||||
<i class="ecicon eci-star fill"></i>
|
||||
<i class="ecicon eci-star-o"></i>
|
||||
<?php
|
||||
// Output full stars
|
||||
for ($i = 0; $i < $full_stars; $i++) {
|
||||
echo '<i class="ecicon eci-star fill"></i>';
|
||||
}
|
||||
|
||||
// Output half star if necessary
|
||||
if ($half_star) {
|
||||
echo '<i class="ecicon eci-star-half-o "></i>';
|
||||
}
|
||||
|
||||
// Output empty stars
|
||||
for ($i = 0; $i < $empty_stars; $i++) {
|
||||
echo '<i class="ecicon eci-star-o"></i>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<span class="ec-read-review"><a href="#ec-spt-nav-review">Be the first to
|
||||
review this product</a></span>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="ec-single-desc" id="shortDescription">
|
||||
<?php echo isset($product_details['product_description'])?$product_details['product_description']:null; ?>
|
||||
</div>
|
||||
|
@ -1593,9 +1626,9 @@ if (isset($_GET['id'])) {
|
|||
<!-- <img loading="lazy"
|
||||
src="https://api.obanana.com/images/storage/web_images/1705042187464-viber_image_2023-12-12_16-04-25-151.png"
|
||||
alt="" /> -->
|
||||
<!-- <div id="ec-spt-nav-review" class="tab-pane fade"> -->
|
||||
<div id="ec-spt-nav-review" class="tab-pane fade">
|
||||
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.rating_con {
|
||||
|
|
|
@ -544,10 +544,8 @@ if ($_SESSION["isVendor"] == true) {
|
|||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label for="addressBuilding"
|
||||
class="text-dark font-weight-medium pt-3 mb-2">Building,Number</label>
|
||||
<input type="text" class="form-control" id="addressBuilding2"
|
||||
value="<?php echo $address['address_1']; ?>">
|
||||
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2">House/Unit/Flr #, Bldg Name, Blk or Lot #</label>
|
||||
<input type="text" class="form-control" id="addressBuilding2" value="<?php echo $address['address_1']; ?>">
|
||||
|
||||
<!-- <label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> Building,Number </label>
|
||||
<input type="text" class="form-control" id="addressBuilding"> -->
|
||||
|
|
|
@ -449,7 +449,7 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
<input type="text" class="form-control" id="addressContact" value="+63 " oninput="preventErasePrefix(this)">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> Building,Number </label>
|
||||
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> House/Unit/Flr #, Bldg Name, Blk or Lot # </label>
|
||||
<input type="text" class="form-control" id="addressBuilding">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
Loading…
Reference in New Issue