Product Page Related Products & Shop All Collection Page
This commit is contained in:
parent
7ad338d66d
commit
3f0687f636
|
@ -196,6 +196,26 @@ if (isset($_GET['id'])) {
|
|||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 02-21-2024 Stacy added css for addtocart & wishlist */
|
||||
.ec-product-inner .ec-pro-image .ec-pro-actions .add-to-cart {
|
||||
width: 35px;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
bottom: 36px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 0;
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.ec-product-inner .ec-pro-image .ec-pro-actions .wishlist {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
/* 02-21-2024 Stacy added css for addtocart & wishlist */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -1434,6 +1454,8 @@ foreach ($variation_details as $index => $variation) {
|
|||
$similar_products = array_values($array);
|
||||
for ($x = 0; $x < 4 && $x < count($similar_products); $x++) {
|
||||
$pid = rand(0, count($similar_products) - 1);
|
||||
#02-21-2024 Stacy added
|
||||
$vendorOfProduct = getVendorbyId($similar_products[$pid]['vendor_api_id']);
|
||||
|
||||
|
||||
?>
|
||||
|
@ -1441,34 +1463,65 @@ foreach ($variation_details as $index => $variation) {
|
|||
<div class="ec-product-inner">
|
||||
<div class="ec-pro-image-outer">
|
||||
<div class="ec-pro-image">
|
||||
<a href="shop-left-sidebar-col-4.php" class="image">
|
||||
<!-- <a href="shop-left-sidebar-col-4.php" class="image"> -->
|
||||
<!-- 02-21-2024 Stacy changed link for image -->
|
||||
<a class="image" href="product-left-sidebar.php?id=<?php echo $similar_products[$pid]["_id"] ?>">
|
||||
<img class="main-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
|
||||
<img class="hover-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
|
||||
</a>
|
||||
<span class="percentage">20%</span>
|
||||
<a href="#" class="quickview" data-link-action="quickview" title="Quick view" data-bs-toggle="modal" data-bs-target="#ec_quickview_modal"><i class="fi-rr-eye"></i></a>
|
||||
<div class="ec-pro-actions">
|
||||
<!-- 02-21-2024 Stacy commented out -->
|
||||
<!-- <span class="percentage">20%</span> -->
|
||||
<!-- <a href="#" class="quickview" data-link-action="quickview" title="Quick view" data-bs-toggle="modal" data-bs-target="#ec_quickview_modal"><i class="fi-rr-eye"></i></a> -->
|
||||
|
||||
<!-- <div class="ec-pro-actions">
|
||||
<a href="compare.html" class="ec-btn-group compare" title="Compare"><i class="fi fi-rr-arrows-repeat"></i></a>
|
||||
<button title="Add To Cart" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist"><i class="fi fi-rr-heart"></i>
|
||||
</div> -->
|
||||
<!-- 02-21-2024 Stacy commented out -->
|
||||
<!-- 02-21-2024 Stacy added -->
|
||||
<div class="ec-pro-actions">
|
||||
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
|
||||
</div>
|
||||
<!-- 02-21-2024 Stacy added -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ec-pro-content">
|
||||
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php?id=<?php echo $similar_products[$pid]["_id"] ?>"><?php echo $similar_products[$pid]["product_name"] ?></a></h5>
|
||||
<div class="ec-pro-rating">
|
||||
<!-- 02-21-2024 Stacy updated link for product name -->
|
||||
<!-- <h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php?id=<?php #echo $similar_products[$pid]["_id"] ?>"><?php #echo $similar_products[$pid]["product_name"] ?></a></h5> -->
|
||||
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $similar_products[$pid]["_id"]; ?>"><?php echo $similar_products[$pid]["product_name"] ?></a></h5>
|
||||
<!-- 02-21-2024 Stacy updated link for product name -->
|
||||
|
||||
<!-- 02-20-2024 Stacy commented ratings -->
|
||||
<!-- <div class="ec-pro-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"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 02-20-2024 Stacy commented ratings -->
|
||||
<div class="ec-pro-list-desc">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dutmmy text ever since the 1500s, when an unknown printer took a galley.</div>
|
||||
<span class="ec-price">
|
||||
<span class="old-price">$27.00</span>
|
||||
<span class="new-price">$22.00</span>
|
||||
<!-- 02-20-2024 Stacy added product price in peso -->
|
||||
<?php if (isset($similar_products[$pid]["sale_price"]) && $similar_products[$pid]["sale_price"] > 0) : ?>
|
||||
<span class="old-price">₱<?php echo number_format($similar_products[$pid]["regular_price"], 2, ".", ",") ?></span>
|
||||
<span class="new-price">₱<?php echo number_format($similar_products[$pid]["sale_price"], 2, ".", ",") ?></span>
|
||||
<?php elseif (isset($similar_products[$pid]["regular_price"]) && $similar_products[$pid]["regular_price"] != "") : ?>
|
||||
<span class="new-price">₱<?php echo number_format($similar_products[$pid]["regular_price"], 2, ".", ",") ?></span>
|
||||
<?php elseif ($similar_products[$pid]["regular_price"] == "" || $similar_products[$pid]["regular_price"] == null) : ?>
|
||||
<span class="inquire-text">Inquire</span>
|
||||
<?php else : ?>
|
||||
<span class="inquire-text">Inquire</span>
|
||||
<?php endif; ?>
|
||||
<!-- 02-20-2024 Stacy added product price in peso -->
|
||||
|
||||
<!-- <span class="old-price">$27.00</span>
|
||||
<span class="new-price">$22.00</span> -->
|
||||
</span>
|
||||
<div class="ec-pro-option">
|
||||
<!-- 02-20-2024 Stacy commented out variations -->
|
||||
<!-- <div class="ec-pro-option">
|
||||
<div class="ec-pro-color">
|
||||
<span class="ec-pro-opt-label">Color</span>
|
||||
<ul class="ec-opt-swatch ec-change-img">
|
||||
|
@ -1484,7 +1537,8 @@ foreach ($variation_details as $index => $variation) {
|
|||
<li><a href="#" class="ec-opt-sz" data-old="$35.00" data-new="$30.00" data-tooltip="Extra Large">XL</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 02-20-2024 Stacy commented out variations -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1633,15 +1687,17 @@ foreach ($variation_details as $index => $variation) {
|
|||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- Recent Purchase Popup -->
|
||||
<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>
|
||||
<h6>stylish baby shoes</h6>
|
||||
<p>10 Minutes ago</p>
|
||||
</div>
|
||||
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
|
||||
</div>
|
||||
<!-- 02-20-2024 Stacy commented out -->
|
||||
<!-- <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>
|
||||
<h6>stylish baby shoes</h6>
|
||||
<p>10 Minutes ago</p>
|
||||
</div>
|
||||
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
|
||||
</div> -->
|
||||
<!-- 02-20-2024 Stacy commented out -->
|
||||
<!-- Recent Purchase Popup end -->
|
||||
|
||||
<!-- Cart Floating Button -->
|
||||
|
@ -1858,6 +1914,16 @@ foreach ($variation_details as $index => $variation) {
|
|||
<script src="assets/js/vendor/index.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
<script src="assets/js/newjs.js"></script>
|
||||
|
||||
<!-- 02-21-2024 Stacy added js link -->
|
||||
<?php
|
||||
if ($_SESSION["is_test"]==true) {
|
||||
echo '<script src="assets/js/tester5.js"></script>';
|
||||
} else {
|
||||
echo '<script src="assets/js/produc3.js"></script>';
|
||||
}
|
||||
?>
|
||||
<!-- 02-21-2024 Stacy added js link -->
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -200,26 +200,51 @@ if ($_SESSION["userId"] <> "") {
|
|||
</div>
|
||||
<div class="ec-pro-content">
|
||||
<!-- <h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php?id=<?php echo $simpleProducts["_id"]; ?>"> -->
|
||||
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $simpleProducts[$pid]["_id"]; ?>">
|
||||
<h5 class="ec-pro-title"><a style="font-weight:bold;" href="product-left-sidebar.php?id=<?php echo $simpleProducts[$pid]["_id"]; ?>">
|
||||
<?php echo $simpleProducts[$pid]["product_name"] ?></a></h5>
|
||||
<div class="ec-pro-rating">
|
||||
<!-- 02-20-2024 Stacy commented out rating -->
|
||||
<!-- <div class="ec-pro-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"></i>
|
||||
</div> -->
|
||||
<!-- 02-20-2024 Stacy commented out rating -->
|
||||
<!-- <div class="ec-pro-list-desc">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dutmmy text ever since the 1500s, when an unknown printer took a galley.</div> -->
|
||||
|
||||
<!-- 02-21-2024 Stacy added php -->
|
||||
<div class="ec-pro-list-desc">
|
||||
<?php echo $simpleProducts[$pid]["product_description"] ?>
|
||||
<!-- Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dutmmy text ever since the 1500s, when an unknown printer took a galley. -->
|
||||
</div>
|
||||
<div class="ec-pro-list-desc">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dutmmy text ever since the 1500s, when an unknown printer took a galley.</div>
|
||||
|
||||
<?php if (isset($similarProducts[$pid]["sale_price"]) && $simpleProducts[$pid]["sale_price"] > 0) : ?>
|
||||
<span class="old-price">₱<?php echo number_format($simpleProducts[$pid]["regular_price"], 2, ".", ",") ?></span>
|
||||
<span class="new-price">₱<?php echo number_format($simpleProducts[$pid]["sale_price"], 2, ".", ",") ?></span>
|
||||
<?php elseif (isset($simpleProducts[$pid]["regular_price"]) && $simpleProducts[$pid]["regular_price"] != "") : ?>
|
||||
<span class="new-price">₱<?php echo number_format($simpleProducts[$pid]["regular_price"], 2, ".", ",") ?></span>
|
||||
<?php elseif ($simpleProducts[$pid]["regular_price"] == "" || $simpleProducts[$pid]["regular_price"] == null) : ?>
|
||||
<span class="inquire-text">Inquire</span>
|
||||
<?php else : ?>
|
||||
<span class="inquire-text">Inquire</span>
|
||||
<?php endif; ?>
|
||||
<!-- 02-21-2024 Stacy added php -->
|
||||
|
||||
<!-- <div><?php #echo $product_details['product_description'];?></div> -->
|
||||
<!-- <span class="ec-price">
|
||||
|
||||
|
||||
<span class="old-price"></span>
|
||||
<span class="new-price"><?php /*echo $product["regular_price"] */ ?></span>
|
||||
<span class="new-price"><?php #echo $product["regular_price"] ?></span>
|
||||
</span> -->
|
||||
<div class="ec-pro-option">
|
||||
<!-- 02-20-2024 Stacy commented out option -->
|
||||
<!-- <div class="ec-pro-option">
|
||||
<div class="ec-pro-color">
|
||||
<span class="ec-pro-opt-label">Color</span>
|
||||
<ul class="ec-opt-swatch ec-change-img">
|
||||
<li class="active"><a href="#" class="ec-opt-clr-img" data-src="<?php echo $simpleProducts[$pid]["product_image"] ?>" data-src-hover="<?php echo $simpleProducts[$pid]["product_image"] ?>" data-tooltip="Gray"><span style="background-color:#e8c2ff;"></span></a></li>
|
||||
<li><a href="#" class="ec-opt-clr-img" data-src="<?php echo $simpleProducts[$pid]["product_image"] ?>" data-src-hover="<?php echo $simpleProducts[$pid]["product_image"] ?>" data-tooltip="Orange"><span style="background-color:#9cfdd5;"></span></a></li>
|
||||
<li class="active"><a href="#" class="ec-opt-clr-img" data-src="<?php #echo $simpleProducts[$pid]["product_image"] ?>" data-src-hover="<?php #echo $simpleProducts[$pid]["product_image"] ?>" data-tooltip="Gray"><span style="background-color:#e8c2ff;"></span></a></li>
|
||||
<li><a href="#" class="ec-opt-clr-img" data-src="<?php #echo $simpleProducts[$pid]["product_image"] ?>" data-src-hover="<?php #echo $simpleProducts[$pid]["product_image"] ?>" data-tooltip="Orange"><span style="background-color:#9cfdd5;"></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ec-pro-size">
|
||||
|
@ -231,7 +256,8 @@ if ($_SESSION["userId"] <> "") {
|
|||
<li><a href="#" class="ec-opt-sz" data-old="$35.00" data-new="$30.00" data-tooltip="Extra Large">XL</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 02-20-2024 Stacy commented out option -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue