Vendor Page Updates

This commit is contained in:
Jun Barroga 2024-02-27 09:11:14 +08:00
parent 3e8e62a131
commit 1572bac6de
10 changed files with 201 additions and 125 deletions

View File

@ -217,14 +217,15 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-page-description ec-page-description-info">
<div class="ec-page-block">
<div class="ec-catalog-vendor">
<?php
<a href="vendor-profile.html">
<?php
if (isset($vendor["vendor_image"])) {
?><img src="<?php echo $vendor["vendor_image"] ?>" alt="vendor img"><?php
} else {
?><img src="assets/images/vendor/5.jpg" alt="vendor img"><?php
}
?>
?><img src="<?php echo $vendor["vendor_image"] ?>" alt="vendor img"><?php
} else {
?><img src="assets/images/vendor/5.jpg" alt="vendor img"><?php
}
?>
</a>
</div>
<div class="ec-catalog-vendor-info row">
@ -234,20 +235,25 @@ if ($_SESSION["userId"] <> "") {
</a>
<p>( Retail Business )</p>
</div>
<div class="col-lg-3 col-md-6 ec-catalog-ratings pad-15">
<!-- raymart remove level feb 22 2024 -->
<!-- <div class="col-lg-3 col-md-6 ec-catalog-ratings pad-15">
<h6>Level</h6>
<p>Level : 9 out of 10</p>
</div>
</div> -->
<div class="col-lg-3 col-md-6 ec-catalog-pro-count pad-15">
<a href="vendor-profile.html">
<h6>Seller Products</h6>
<?php
$products = productListVendor($_GET["id"]);
?>
</a>
<p><?php echo count($products) ?> Products</p>
</div>
<div class="col-lg-3 col-md-6 ec-catalog-since pad-15">
<a href="vendor-profile.html">
<h6>Seller since</h6>
<p><?php echo $vendor["date_registered"] ?></p>
</a>
</div>
</div>
</div>
@ -311,17 +317,18 @@ if ($_SESSION["userId"] <> "") {
<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">
<?php
<!-- raymart added for link for product feb 22 2024 -->
<a class="image" href="product-left-sidebar.php?id=<?php echo $product["_id"] ?>"<?php echo $product["product_image"] ?>>
<?php
if (isset($product["product_image"]) && $product["product_image"] <> "") {
?>
<img class="main-image" src="<?php echo $product["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $product["product_image"] ?>" alt="Product" />
<!-- <img class="hover-image" src="<?php echo $product["product_image"] ?>" alt="Product" /> -->
<?php
} else {
?>
<img class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
<!-- <img class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" /> -->
<?php
}
?>
@ -342,15 +349,17 @@ if ($_SESSION["userId"] <> "") {
</div>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $product["_id"] ?>"><?php echo $product["product_name"] ?></a></h5>
<div class="ec-pro-rating">
<!-- raymart remove ratings feb 22 2024 -->
<!-- <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> -->
<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">
<!-- raymart added $ to pesos function feb 22 2024 -->
<?php if (isset($product["sale_price"]) && $product["sale_price"] > 0) : ?>
<span class="old-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<span class="new-price">&#8369;<?php echo number_format($product["sale_price"], 2, ".", ",") ?></span>
@ -362,9 +371,22 @@ if ($_SESSION["userId"] <> "") {
<?php else : ?>
<span class="inquire-text">Inquire</span>
<?php endif; ?>
<!-- <?php if (isset($product["sale_price"]) && $product["sale_price"] > 0) : ?>
<span class="old-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<span class="new-price">&#8369;<?php echo number_format($product["sale_price"], 2, ".", ",") ?></span>
<?php elseif (isset($product["regular_price"]) && $product["regular_price"] != "") : ?>
<span class="new-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<?php elseif ($product["regular_price"] == "" || $product["regular_price"] == null) : ?>
<span class="inquire-text">Inquire</span>
<?php else : ?>
<span class="inquire-text">Inquire</span>
<?php endif; ?> -->
</span>
<div class="ec-pro-option">
<div class="ec-pro-color">
<!-- raymart remove color and size function feb 22 2024 -->
<!-- <div class="ec-pro-color">
<span class="ec-pro-opt-label">Color</span>
<ul class="ec-opt-swatch ec-change-img">
<?php
@ -381,8 +403,8 @@ if ($_SESSION["userId"] <> "") {
}
?>
</ul>
</div>
<div class="ec-pro-size">
</div> -->
<!-- <div class="ec-pro-size">
<span class="ec-pro-opt-label">Size</span>
<ul class="ec-opt-size">
<li class="active"><a href="#" class="ec-opt-sz" data-old="$25.00" data-new="$20.00" data-tooltip="Small">S</a></li>
@ -390,7 +412,7 @@ if ($_SESSION["userId"] <> "") {
<li><a href="#" class="ec-opt-sz" data-old="$30.00" data-new="$25.00" data-tooltip="Large">X</a></li>
<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>
</div>
</div>
@ -864,7 +886,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->
<div class="recent-purchase">
<!-- <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>
@ -872,7 +894,7 @@ if ($_SESSION["userId"] <> "") {
<p>10 Minutes ago</p>
</div>
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
</div>
</div> -->
<!-- Recent Purchase Popup end -->
<!-- Cart Floating Button -->

View File

@ -605,6 +605,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<span class="ec-price">
<span class="new-price">Subtotal: <?php echo $checkout['shipping_fee'] + $checkout['total_amount']; ?></span>
</span>
<!-- 02-22-2024 Stacy hide variation -->
<!-- <div class="ec-pro-option">
<div class="ec-pro-color">
<span class="ec-pro-opt-label">Color</span>
@ -630,6 +631,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
</ul>
</div>
</div> -->
<!-- 02-22-2024 Stacy hide variation -->
</div>
</div>
<?php } ?>

View File

@ -521,8 +521,9 @@ function vendorExists($email)
function sendEmail_obanana($fName, $lName, $email, $phone, $message)
{
if($_SESSION["is_test"]==true && $_SESSION["test_email_rcpt"]!=""){
$testEmail = $_SESSION["test_email_rcpt"];
$email = $_SESSION["test_email_rcpt"];
}
$salesEmail = $_SESSION["sales_email"];
$msgto_obanana = "
<h4>Greetings from Obanana!</h4>
<ul>
@ -541,7 +542,7 @@ function sendEmail_obanana($fName, $lName, $email, $phone, $message)
],
"To" => [
[
"Email" => $testEmail,
"Email" => $salesEmail,
"Name" => "Subscriber"
]
],
@ -639,8 +640,9 @@ function sendEmail_customer($fName, $lName, $email)
function contact_Seller($cstm_email, $prd_name, $prd_qnty, $message)
{
if($_SESSION["is_test"]==true && $_SESSION["test_email_rcpt"]!=""){
$testEmail = $_SESSION["test_email_rcpt"];
$cstm_email = $_SESSION["test_email_rcpt"];
}
$salesEmail = $_SESSION["sales_email"];
$msgto_seller = "
<h4>Greetings from Obanana!</h4>
<ul>
@ -659,7 +661,7 @@ function contact_Seller($cstm_email, $prd_name, $prd_qnty, $message)
],
"To" => [
[
"Email" => $testEmail,
"Email" => $salesEmail,
"Name" => "Subscriber"
]
],
@ -697,9 +699,9 @@ function contact_Seller($cstm_email, $prd_name, $prd_qnty, $message)
function contact_Inquirer($cstm_email)
{
// if($_SESSION["is_test"]==true && $_SESSION["test_email_rcpt"]!=""){
// $testEmail = $_SESSION["test_email_rcpt"];
// }
if($_SESSION["is_test"]==true && $_SESSION["test_email_rcpt"]!=""){
$cstm_email = $_SESSION["test_email_rcpt"];
}
$msgto_inquirer = "
<h4>Greetings from Obanana!</h4>
<ul>
@ -717,8 +719,8 @@ function contact_Inquirer($cstm_email)
],
"To" => [
[
// "Email" => $cstm_email,
"Email" => "stacyjoycemapano@gmail.com",
"Email" => $cstm_email,
//"Email" => "stacyjoycemapano@gmail.com",
"Name" => "Subscriber"
]

View File

@ -977,15 +977,15 @@
<li><a href="javascript:void(0)" data-scroll="collection" class="nav-scroll">Top
Collection</a></li>
<li><a href="javascript:void(0)" data-scroll="categories" class="nav-scroll">Categories</a></li>
<li><a href="javascript:void(0)" data-scroll="offers" class="nav-scroll">Offers</a></li>
<!-- <li><a href="javascript:void(0)" data-scroll="offers" class="nav-scroll">Offers</a></li> -->
<li><a href="javascript:void(0)" data-scroll="vendors" class="nav-scroll">Top
Vendors</a></li>
<li><a href="javascript:void(0)" data-scroll="services" class="nav-scroll">Services</a></li>
<li><a href="javascript:void(0)" data-scroll="arrivals" class="nav-scroll">New
Arrivals</a></li>
<li><a href="javascript:void(0)" data-scroll="reviews" class="nav-scroll">Client
Review</a></li>
<li><a href="javascript:void(0)" data-scroll="insta" class="nav-scroll">Instagram Feed</a></li>
<!-- <li><a href="javascript:void(0)" data-scroll="reviews" class="nav-scroll">Client
Review</a></li> -->
<!-- <li><a href="javascript:void(0)" data-scroll="insta" class="nav-scroll">Instagram Feed</a></li> -->
</ul>
</li>
</ul>

View File

@ -568,6 +568,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-product-inner">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $forAll[$pid]["_id"]; ?>">
<!-- raymart added function for images feb 21 2024-->
<?php
if (isset($forAll[$pid]['images'])) {
@ -584,6 +585,7 @@ if ($_SESSION["userId"] <> "") {
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $forAll[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $forAll[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $forAll[$pid]["product_image"] ?>" alt="Product" />
@ -669,22 +671,24 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-product-inner">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $electronics[$pid]["_id"]; ?>">
<!-- raymart added function for images feb 21 2024-->
<?php
if (isset($electronics[$pid]['images'])) {
$image_urls = explode(',', $electronics[$pid]['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
if (isset($electronics[$pid]['images'])) {
$image_urls = explode(',', $electronics[$pid]['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
}
} else {
?>
<img class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $electronics[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $electronics[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $electronics[$pid]["product_image"] ?>" alt="Product" />
@ -772,6 +776,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-product-inner">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $smartHome[$pid]["_id"]; ?>">
<!-- raymart added function for images feb 21 2024-->
<?php
if (isset($smartHome[$pid]['images'])) {
@ -788,6 +793,7 @@ if ($_SESSION["userId"] <> "") {
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $smartHome[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $smartHome[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $smartHome[$pid]["product_image"] ?>" alt="Product" />
@ -873,6 +879,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-product-inner">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $forVehicle[$pid]["_id"]; ?>">
<!-- raymart added function for images feb 21 2024-->
<?php
if (isset($forVehicle[$pid]['images'])) {
@ -889,6 +896,7 @@ if ($_SESSION["userId"] <> "") {
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $forVehicle[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $forVehicle[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $forVehicle[$pid]["product_image"] ?>" alt="Product" />
@ -1324,16 +1332,17 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-vendor-info">
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>" class="name"><?php echo $vendor['user_login'] ?></a>
<p class="prod-count"><?php echo count($vendorProducts) ?> Products</p>
<div class="ec-pro-rating">
<!-- raymart remove ratings and sales feb 22 2024 -->
<!-- <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 class="ec-sale">
</div> -->
<!-- <div class="ec-sale">
<p title="Weekly sales">Sales 954</p>
</div>
</div> -->
</div>
</div>
<div class="ec-vendor-prod">
@ -1476,6 +1485,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-product-inner">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $newArrival[$pid]["_id"]; ?>">
<!-- raymart added function for images feb 21 2024-->
<?php
if (isset($newArrival[$pid]['images'])) {
@ -1492,6 +1502,7 @@ if ($_SESSION["userId"] <> "") {
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $newArrival[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $newArrival[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $newArrival[$pid]["product_image"] ?>" alt="Product" />

View File

@ -320,7 +320,9 @@ if (isset($_GET['id'])) {
$productImage = $i;
}
?>
<img class="img-responsive" src="<?php echo $productImage; ?>" alt="" style="width: 100%; height: 100%; object-fit: cover; object-position: center center;">
<!-- <img class="img-responsive" src="<?php #echo $productImage; ?>" alt="" style="width: 100%; height: 100%; object-fit: cover; object-position: center center;"> -->
<!-- 02-26-2024 Stacy updated img width & height -->
<img class="img-responsive" src="<?php echo $productImage; ?>" alt="" style="max/width: 90px; height: 120px; object-fit: cover; object-position: center center;">
</div>
<?php
}
@ -336,7 +338,8 @@ if (isset($_GET['id'])) {
<h5 class="ec-single-title" id="productTitle"><?php echo $product_details['product_name']; ?></h5>
<!-- <h5 class="ec-single-title" id="productTitlemodal"><?php echo $product_details['product_name']; ?></h5> -->
<div class="ec-single-rating-wrap">
<!-- 02-22-2024 Stacy hide -->
<!-- <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>
@ -346,10 +349,11 @@ if (isset($_GET['id'])) {
</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 $product_details['product_description']; ?></div>
<div class="ec-single-sales">
<!-- 02-22-2024 Stacy hide -->
<!-- <div class="ec-single-sales">
<div class="ec-single-sales-inner">
<div class="ec-single-sales-title">sales accelerators</div>
<div class="ec-single-sales-visitor">real time <span>24</span> visitor
@ -364,7 +368,8 @@ if (isset($_GET['id'])) {
<div class="ec-single-count-desc">Time is Running Out!</div>
</div>
</div>
</div>
</div> -->
<div class="ec-single-price-stoke">
<div class="ec-single-price">
<span class="ec-single-ps-title">As low as</span>
@ -397,32 +402,32 @@ if (isset($_GET['id'])) {
<div class="ec-pro-variation-content">
<ul class="eccart-pro-items">
<?php
$main_product_image = isset($product_details["product_image"]) ? $product_details["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($product_details), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
<img src="<?php echo $main_product_image; ?>" alt="product">
<?php foreach ($product_details['variables'] as $variable) { ?>
<p><?php echo $variable['name'] . ': ' . $variable['value']; ?></p>
<?php } ?>
</li>
</a>
$main_product_image = isset($product_details["product_image"]) ? $product_details["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($product_details), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
<img src="<?php echo $main_product_image; ?>" alt="product">
<?php foreach ($product_details['variables'] as $variable) { ?>
<p><?php echo $variable['name'] . ': ' . $variable['value']; ?></p>
<?php } ?>
</li>
</a>
<?php
foreach ($variation_details as $index => $variation) {
$variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($variation), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
<img src="<?php echo $variationImage; ?>" alt="product">
<?php foreach ($variation['variables'] as $variable) { ?>
<p><?php echo $variable['name'] . ': ' . $variable['value']; ?></p>
<?php } ?>
</li>
</a>
<?php
}
?>
<?php
foreach ($variation_details as $index => $variation) {
$variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($variation), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
<img src="<?php echo $variationImage; ?>" alt="product">
<?php foreach ($variation['variables'] as $variable) { ?>
<p><?php echo $variable['name'] . ': ' . $variable['value']; ?></p>
<?php } ?>
</li>
</a>
<?php
}
?>
</ul>
</div>
@ -462,35 +467,57 @@ foreach ($variation_details as $index => $variation) {
<?php
}
?>
<!-- 20240212 Jun Jihad Include Parent Product in the Variation Selection -->
<!-- 20240212 Jun Jihad Include Parent Product in the Variation Selection -->
<!-- 02-22-2024 Stacy modified this block of code -->
<div class="ec-single-qty">
<div class="qty-plus-minuses">
<div class="qty-btn" onclick="decrement()">-</div>
<input class="qty-inputs" type="number" name="ec_qtybtn" value="<?php echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1"; ?>" id="qty-input" />
<div class="qty-btn" onclick="increment()">+</div>
</div>
<div class="ec-single-cart">
<div class="qty-plus-minuses" style="display:flex; overflow:visible;">
<!-- <div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()">-</div>
<input class="qty-inputs" style="width:100px; height:40px" type="number" name="ec_qtybtn" value="<?php #echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1"; ?>" id="qty-input" />
<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()">+</div> -->
<div class="ec-single-cart" style="display:flex; flex-direction:row; width:80%; overflow:visible; text-align:center; align-items:center; ">
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
<?php
if ($_SESSION["isLoggedIn"]) {
if ($product_details['product_type'] === "variable") {
echo '<button class="btn btn-primary" id="addToCartButton" style="display:none">Add To Cart</button>';
echo '<button type="button" class="btn btn-primary" id="contactSellerButton" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
} else {
if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) {
echo '<div id="addToCartMessage"></div>';
echo '<button class="btn btn-primary" id="addToCartButton">Add To Cart</button>';
} else {
echo '<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
}
}
} else {
echo '<p>Please log in to add to cart.</p>';
}
?>
if ($_SESSION["isLoggedIn"]) {
if ($product_details['product_type'] === "variable") {
echo '<div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()">-</div>';
echo '<input class="qty-inputs" style="width:110px; height:40px" type="number" name="ec_qtybtn" value="';
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
echo '" id="qty-input" />';
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()">+</div>';
echo '<div style="display:flex; margin-left:45px;"><button type="button" class="btn btn-primary" id="contactSellerButton" style="background:#ffaa00; width:190px;" 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 '<div class="ec-single-wishlist">
<a class="ec-btn-group wishlist" title="Wishlist" onclick="wishlist()"><i class="fi fi-rr-heart" style="color:#B80F0A; font-size:20px;"></i></a>
</div></div>';
} else {
if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) {
echo '<div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()">-</div>';
echo '<input class="qty-inputs" style="width:100px; height:40px" type="number" name="ec_qtybtn" value="';
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
echo '" id="qty-input" />';
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()">+</div>';
echo '<div id="addToCartMessage"></div>';
echo '<button class="btn btn-primary" id="addToCartButton" style="background:#ffaa00; margin-left:55px;"><i class="fi-rr-shopping-bag" style="font-size:20px; margin-bottom:-3px; margin-right:10px;"></i>Add To Cart</button>';
echo '<div class="ec-single-wishlist">
<a class="ec-btn-group wishlist" title="Wishlist" onclick="wishlist()"><i class="fi fi-rr-heart" style="color:#B80F0A; font-size:20px;"></i></a>
</div>';
} else {
echo '<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
}
}
} else {
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>';
}
?>
<!-- <div class="ec-single-wishlist" style="border: 1px solid yellow;">
<a class="ec-btn-group wishlist" style="padding-left:40px;" title="Wishlist" onclick="wishlist()"><i class="fi fi-rr-heart"></i></a>
</div> -->
<!-- 02-22-2024 Stacy modified this block of code -->
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
@ -509,10 +536,9 @@ foreach ($variation_details as $index => $variation) {
// echo '<p>Please log in to add to cart.</p>';
// }
?> -->
</div>
</div>
<div class="modal fade" id="priceModal" tabindex="-1" role="dialog" aria-labelledby="priceModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -584,9 +610,10 @@ foreach ($variation_details as $index => $variation) {
</div>
</div>
<div class="ec-single-wishlist">
<!-- <div class="ec-single-wishlist">
<a class="ec-btn-group wishlist" title="Wishlist" onclick="wishlist()"><i class="fi fi-rr-heart"></i></a>
</div>
</div> -->
<!-- <div class="ec-single-quickview">
<a href="#" class="ec-btn-group 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> -->

View File

@ -122,7 +122,7 @@ if (is_array($vendorOrderss)) {
<!-- Sidebar Category Block -->
<div class="ec-sidebar-block">
<div class="ec-vendor-block">
<div class="ec-vendor-block-bg" style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<div class="ec-vendor-block-bg" style="background-color:orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<div class="ec-vendor-block-detail">
<img class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
@ -160,7 +160,8 @@ if (is_array($vendorOrderss)) {
<h3> <?php echo count($vendorOrders); ?></h3>
</div>
</div>
<div class="col-lg-3 col-md-6">
<!-- 02-26-2024 Stacy commented out -->
<!-- <div class="col-lg-3 col-md-6">
<div class="ec-vendor-dashboard-sort-card color-green">
<h5>Earnings</h5>
<h3>$56<span>/ Day</span></h3>
@ -171,7 +172,7 @@ if (is_array($vendorOrderss)) {
<h5>Sales</h5>
<h3>550<span>/ Mo</span></h3>
</div>
</div>
</div> -->
</div>
<div class="ec-vendor-dashboard-card space-bottom-30">
<div class="ec-vendor-card-header">
@ -426,7 +427,8 @@ if (is_array($vendorOrderss)) {
</div>
</div>
</div>
<div class="ec-vendor-dashboard-card">
<!-- 02-26-2024 Stacy commented out -->
<!-- <div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5>Growth statastics</h5>
<div class="ec-header-btn">
@ -436,7 +438,7 @@ if (is_array($vendorOrderss)) {
<div class="ec-vendor-card-body">
<canvas id="growthChart"></canvas>
</div>
</div>
</div> -->
</div>
</div>
</div>

View File

@ -179,6 +179,7 @@ $products = productList();
<div class="ec-multi-vendor-detail">
<div class="ec-page-description ec-page-description-info description-info-list">
<div class="ec-catalog-vendor">
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>"></a>
<?php
if(!isset($vendor['vendor_image'])){
?><img src="assets/images/vendor/1.jpg" alt="vendor img"><?php
@ -198,15 +199,19 @@ $products = productList();
<p>( Retail Business )</p>
</div>
</div>
<div class="col-lg-3 col-md-6 detail-card-space">
<!-- <div class="col-lg-3 col-md-6 detail-card-space">
<div class="ec-catalog-ratings catalog-detail-card">
<h6>Level</h6>
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>">
<h6>Level</h6>
</a>
<p>( Level : 9 out of 10 )</p>
</div>
</div>
</div> -->
<div class="col-lg-3 col-md-6 detail-card-space">
<div class="ec-catalog-pro-count catalog-detail-card">
<h6>Seller Products</h6>
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>">
<h6>Seller Products</h6>
</a>
<?php
$vendorId = $vendor['_id'];
$product = array_filter($products, function ($var) use ($vendorId) {
@ -217,7 +222,9 @@ $products = productList();
</div>
<div class="col-lg-3 col-md-6 detail-card-space">
<div class="ec-catalog-since catalog-detail-card">
<h6>Seller since</h6>
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>">
<h6>Seller since</h6>
</a>
<p><?php echo $vendor['date_registered']; ?></p>
</div>
</div>

View File

@ -155,10 +155,11 @@ if ($_SESSION["userId"] <> "") {
</div>
<div class="ec-vendor-block-detail">
<?php
$vendor_image_modal = isset($vendorData['vendor_image']) ?$vendorData['vendor_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg';
<!-- 02-26-2024 Stacy added placeholder-->
<?php
$vendor_image = isset($vendorData[0]['vendor_image']) ? $vendorData[0]['vendor_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg';
?>
<img class="v-img" src=<?php echo $vendor_image_modal ?> alt="vendor image">
<img class="v-img" src=<?php echo $vendor_image ?> alt="vendor image">
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
</div>

View File

@ -182,7 +182,8 @@ if ($_SESSION["userId"] <> "") {
<input type="checkbox" class="product-checkbox" style="width: 20px; height: 20px; "value="<?php echo $product["_id"]; ?>">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>" class="image">
<!-- <a href="shop-left-sidebar-col-4.php" class="image"> -->
<img class="main-image" src="<?php echo $product["product_image"]; ?>" alt="Product" />
<!-- <img class="hover-image" src="<?php echo $product["product_image"]; ?>" alt="Product" /> -->
</a>
@ -403,7 +404,8 @@ if ($_SESSION["userId"] <> "") {
</div>
<section>
<!-- Start Offer section -->
<section class="labels section-space-p">
<!-- raymart remove start offer section from style feb 22 2024-->
<!-- <section class="labels section-space-p">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
@ -537,7 +539,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Recent Purchase Popup -->
<div class="recent-purchase">
<!-- <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>
@ -545,7 +547,7 @@ if ($_SESSION["userId"] <> "") {
<p>10 Minutes ago</p>
</div>
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
</div>
</div> -->
<!-- Recent Purchase Popup end -->