minor bugs #76

Merged
MarkHipe merged 1 commits from raymart_branch into main 2024-05-03 16:34:13 +08:00
13 changed files with 242 additions and 79 deletions

View File

@ -1,10 +1,6 @@
<style>
.sidenav-item.active {
background-color: #f0f0f0; /* Change background color */
}
.sidenav-item.active .nav-text {
color: #333; /* Change text color */
.nav-link:hover{
border-left: 5px solid #87CEFA;
}
</style>
@ -21,18 +17,17 @@
<!-- begin sidebar scrollbar -->
<div class="ec-navigation" data-simplebar>
<!-- sidebar menu -->
<ul class="nav sidebar-inner" id="sidebar-menu">
<ul class="nav sidebar-inner">
<!-- Dashboard -->
<li class="active">
<li class="nav-link">
<a class="sidenav-item-link" href="index.php">
<i class="mdi mdi-view-dashboard-outline"></i>
<span class="nav-text">Dashboard</span>
</a>
<hr>
</li>
<!-- Vendors -->
<li>
<li class="nav-link">
<a class="sidenav-item-link" href="vendor-card.php">
<i class="mdi mdi-account-group-outline"></i>
<span class="nav-text">Vendors</span>
@ -60,7 +55,7 @@
</li>
<!-- Users -->
<li >
<li class="nav-link">
<a class="sidenav-item-link" href="user-card.php">
<i class="mdi mdi-account-group"></i>
<span class="nav-text">Users</span>
@ -143,7 +138,7 @@
</li> -->
<!-- Orders -->
<li >
<li class="nav-link">
<a class="sidenav-item-link" href="order-history.php">
<i class="mdi mdi-cart"></i>
<span class="nav-text">Orders</span>
@ -257,4 +252,6 @@
</ul>
</div>
</div>
</div>
</div>

View File

@ -350,7 +350,9 @@ function updateWishItemCount() {
<div class="col-lg-3 col-md-6 ec-catalog-since pad-15">
<h6>Seller since</h6>
<p><?php echo $vendor["date_registered"] ?></p>
<!-- <p><?php echo $vendor["date_registered"] ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
</div>
</div>
@ -526,7 +528,7 @@ xhrVendors1.onreadystatechange = function() {
let imageUrls = product.images.split(',');
let firstImageUrl = imageUrls[0].trim();
let img = document.createElement("img");
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("class", "main-image");
img.setAttribute("src", firstImageUrl);
img.setAttribute("alt", "Product");
@ -537,7 +539,7 @@ xhrVendors1.onreadystatechange = function() {
} else {
let img = document.createElement("img");
img.className = "main-image";
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("loading", "lazy");
img.setAttribute("class", "main-image");
img.setAttribute("src", "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png");
@ -550,14 +552,21 @@ xhrVendors1.onreadystatechange = function() {
card.classList.add("col-lg-4", "col-md-6", "col-sm-6", "col-xs-6", "mb-6", "pro-gl-content", "width-100");
card.innerHTML = `
<div class="ec-product-inner">
<div class="ec-pro-image-outer" style="width: 290px; height: 200px;">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=${product._id}">
${imageContainer.innerHTML} <!-- Include the dynamically loaded image here -->
</a>
<div class="ec-pro-actions" style="bottom: -36px;">
<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" 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('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>
${
(product["sale_price"] && product["sale_price"] > 0) ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" 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('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
(product["regular_price"] && product["regular_price"] != "") ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" 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('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
`<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>`
}
</div>
</div>
</div>
@ -1166,7 +1175,7 @@ maxPriceInput.addEventListener('input', function() {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1187,7 +1196,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -1,3 +1,7 @@
<style>
</style>
<!-- Footer Start -->
<footer class="ec-footer section-space-mt">
<div class="footer-container">
@ -165,5 +169,30 @@
</div>
</div>
</div>
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<!-- <div class="ec-nav-panel-icons">
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i class="fi-rr-menu-burger"></i></a>
</div> -->
<div class="ec-nav-panel-icons">
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
</a>
</div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="wishlist.php" class="ec-header-btn"><i class="fi-rr-heart"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="#" class="ec-header-btn"><i class="fi-rr-user"></i></a>
</div>
</div>
</div>
</div>
<!-- Footer navigation panel for responsive display -->
</footer>
<!-- Footer Area End -->
<!-- Footer Area End -->

View File

@ -139,6 +139,20 @@ if ($_SESSION["userId"] <> "") {
font-size: 16px;
line-height: 1;
}
@media (hover: hover), (hover: none) {
.fi-rr-heart:hover,
.fi-rr-heart:active,
.fi-rr-user:hover,
.fi-rr-user:active,
.fi-rr-shopping-bag:hover,
.fi-rr-shopping-bag:active,
.fi-rr-home:hover,
.fi-rr-home:active {
cursor: pointer !important;
color: #005eff !important;
}
}
</style>
@ -288,13 +302,13 @@ if ($_SESSION["userId"] <> "") {
<!-- Header Cart Start -->
<a href="wishlist.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-heart"></i></div>
<span class="ec-header-count">0</span>
<span id="wishItemCount" class="ec-header-count">0</span>
</a>
<!-- Header Cart End -->
<!-- Header Cart Start -->
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
<span class="ec-header-count cart-count-lable">0</span>
<span id="cartItemCount" class="ec-header-count">0</span>
</a>
<!-- Header Cart End -->
<a href="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle">
@ -1130,23 +1144,41 @@ if ($_SESSION["userId"] <> "") {
</ul>
</li> -->
<li><a href="offer.php">Hot Offers</a></li>
<li class="dropdown scroll-to"><a href="javascript:void(0)"><i class="fi fi-rr-sort-amount-down-alt"></i></a>
<?php
// Check if the current page is the index page
if(basename($_SERVER['PHP_SELF']) === 'index.php') {
//include the scroll menu
?>
<li class="dropdown scroll-to"><a href="javascript:void(0)"><i class="fi fi-rr-sort-amount-down-alt"></i></a>
<ul class="sub-menu">
<li class="menu_title">Scroll To Section</li>
<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="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>
</ul>
</li>
<?php
}
?>
<!-- <li class="dropdown scroll-to"><a href="javascript:void(0)"><i class="fi fi-rr-sort-amount-down-alt"></i></a>
<ul class="sub-menu">
<li class="menu_title">Scroll To Section</li>
<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>
</li> -->
</ul>
</div>
</div>

View File

@ -224,9 +224,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($forAll[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $forAll[$pid]["_id"]; ?>">
@ -237,7 +237,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -344,9 +344,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($electronics[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $electronics[$pid]["_id"]; ?>">
@ -357,7 +357,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -466,9 +466,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($smartHome[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $smartHome[$pid]["_id"]; ?>">
@ -479,7 +479,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -586,9 +586,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($forVehicle[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024-->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $forVehicle[$pid]["_id"]; ?>">
@ -599,7 +599,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -1229,9 +1229,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($newArrival[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="flipInY">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $newArrival[$pid]["_id"]; ?>">
@ -1242,7 +1242,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -1671,7 +1671,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Newsletter Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1692,7 +1692,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -321,7 +321,7 @@ function loadProducts(page,isFilter) {
let product = prod;
// let vendor = prod.vendor;
let vendorOfProduct = prod.vendor;
let vendorOfProduct = prod;
// let card = document.createElement("div");
let token ="<?php echo $_SESSION['token'] ?>";
let email ="<?php echo $_SESSION['email'] ?>";
@ -334,7 +334,7 @@ function loadProducts(page,isFilter) {
let imageUrls = product.images.split(',');
let firstImageUrl = imageUrls[0].trim();
let img = document.createElement("img");
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("class", "main-image");
img.setAttribute("loading", "lazy");
@ -345,7 +345,7 @@ function loadProducts(page,isFilter) {
} else {
let img = document.createElement("img");
img.className = "main-image";
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("loading", "lazy");
img.setAttribute("class", "main-image");
img.setAttribute("src", "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png");
@ -358,14 +358,21 @@ function loadProducts(page,isFilter) {
card.classList.add("col-lg-3", "col-md-6", "col-sm-6", "col-xs-6", "mb-6", "pro-gl-content", "width-100");
card.innerHTML = `
<div class="ec-product-inner">
<div class="ec-pro-image-outer" style="width: 290px; height: 200px;">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=${product._id}">
${imageContainer.innerHTML} <!-- Include the dynamically loaded image here -->
</a>
<div class="ec-pro-actions" style="bottom: -36px;">
<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" 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('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>
${
(product["sale_price"] && product["sale_price"] > 0) ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" 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('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
(product["regular_price"] && product["regular_price"] != "") ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" 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('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
`<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>`
}
</div>
</div>
</div>
@ -925,7 +932,7 @@ maxPriceInput.addEventListener('input', function() {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -950,7 +957,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -2027,7 +2027,7 @@ if (isset($_GET['id'])) {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -2048,7 +2048,7 @@ if (isset($_GET['id'])) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -129,8 +129,7 @@ $customerData = json_decode($customers, true);
</span>
<span class="ec-register-wrap ec-register-half">
<label>Phone Number*</label>
<input type="text" name="phonenumber" value="<?php echo $_SESSION["phone"] ?>" placeholder="Enter your phone number"
required />
<input type="text" name="phonenumber" value="+63 <?php echo $_SESSION["phone"] ?>" oninput="preventEraseInPrefix(this)" required />
</span>
<span class="ec-register-wrap ec-register-btn">
<?php
@ -153,6 +152,25 @@ $customerData = json_decode($customers, true);
</div>
</div>
</section>
<script>
function preventEraseInPrefix(input) { /* edit details */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
</script>
<!-- End Register -->
<!-- Footer Start -->

View File

@ -144,7 +144,7 @@ $vendorData = json_decode($vendors, true);
</span>
<span class="ec-register-wrap ec-register-half">
<label>Phone Number*</label>
<input type="text" name="phonenumber" value="<?php echo $vendorData['phone'] ?>" placeholder="Enter your phone number" required />
<input type="text" name="phonenumber" value="+63 <?php echo $vendorData['phone'] ?>" oninput="preventEraseInPrefix(this)" required />
</span>
<!-- <span class="ec-register-wrap">
@ -224,6 +224,25 @@ $vendorData = json_decode($vendors, true);
</div>
</div>
</section>
<script>
function preventEraseInPrefix(input) { /* edit details */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
</script>
<!-- End Register -->
<!-- Footer Start -->

View File

@ -1108,20 +1108,22 @@ maxPriceInput.addEventListener('input', function() {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
<a href="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle"><i class="fi fi-rr-apps"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="cart.php" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><!-- <span class="ec-cart-noti ec-header-count cart-count-lable"></span> --></a>
</div>
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
<span class="ec-header-count cart-count-lable">0</span>
</a> </div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="wishlist.php" class="ec-header-btn"><i class="fi-rr-heart"></i><!-- <span class="ec-cart-noti"></span> --></a>
<a href="wishlist.php" class="ec-header-btn"><i class="fi-rr-heart"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
@ -1129,7 +1131,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -74,7 +74,7 @@ $products = productList();
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
/* margin: 0 5px; */
margin: 0 5px;
border-radius: 4px;
}
@ -262,7 +262,8 @@ $products = productList();
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>">
<h6>Seller since</h6>
</a>
<p><?php echo $vendor['date_registered']; ?></p>
<!-- <p><?php echo $vendor['date_registered']; ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
</div>
</div>
</div>
@ -417,7 +418,7 @@ $products = productList();
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -438,7 +439,7 @@ $products = productList();
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->

View File

@ -419,7 +419,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="number" class="form-control" id="addressContact">
<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>
@ -449,7 +449,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressCountry" class="text-dark font-weight-medium pt-3 mb-2">Country</label>
<input type="text" class="form-control" id="addressCountry">
<input type="text" class="form-control" id="addressCountry" value="Philippines">
</div>
<button type="button" class="btn btn-primary mt-4" id="submitBtn">Submit</button>
@ -486,7 +486,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="form-group">
<label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="text" class="form-control" id="addressContact2" value="<?php echo $address['phone']; ?>">
<input type="text" class="form-control" id="addressContact2" value="<?php echo $address['phone']; ?>" oninput="preventEraseThePrefix(this)">
<!-- <label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
@ -597,7 +597,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="bankAccountNumber" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Number</label>
<input type="text" class="form-control" id="bankAccountNumber">
<input type="number" class="form-control" id="bankAccountNumber">
</div>
<div class="form-group">
<label for="bankAccountName" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Name</label>
@ -612,6 +612,55 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
<script>
function preventErasePrefix(input) { /* secondmodal */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
function preventEraseThePrefix(input) { /* thirdmodal */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
function preventEraseInPrefix(input) { /* edit details */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
</script>
<script>
function editUser() {
// var fileInput = document.getElementById('fileInput' + vendorId);
@ -1625,7 +1674,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="cphone-" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="text" class="form-control" id="cphone-" value="<?php echo $vendorData['phone'] ?>">
<input type="text" class="form-control" id="cphone-" value="<?php echo $vendorData['phone'] ?>" oninput="preventEraseInPrefix(this)">
</div>
<!-- 02-23-2023 Jun Jihad Vendor Description Field-->
<div class="form-group">
@ -1651,7 +1700,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1672,7 +1721,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->

View File

@ -379,7 +379,7 @@ if ($_SESSION["isVendor"] == true) {
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 0) {
if (xhr.status === 200) {
console.log('Products removed successfully');
location.reload();
} else {
@ -527,7 +527,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -549,7 +549,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->