From 7679dad1e630da43912e3bc55eda3158b884bd4b Mon Sep 17 00:00:00 2001 From: raymart Date: Fri, 3 May 2024 16:31:55 +0800 Subject: [PATCH] minor bugs --- admin/left-main-sidebar.php | 23 ++++++-------- catalog-single-vendor.php | 25 ++++++++++----- footer.php | 31 +++++++++++++++++- header.php | 48 +++++++++++++++++++++++----- index.php | 34 ++++++++++---------- next_day_delivery.php | 23 +++++++++----- product-left-sidebar.php | 4 +-- register_customer.php | 22 +++++++++++-- register_vendor.php | 21 ++++++++++++- shop-list-left-sidebar.php | 12 ++++--- vendor-list.php | 9 +++--- vendor-settings.php | 63 ++++++++++++++++++++++++++++++++----- wishlist.php | 6 ++-- 13 files changed, 242 insertions(+), 79 deletions(-) diff --git a/admin/left-main-sidebar.php b/admin/left-main-sidebar.php index a3c14c7..ae933e5 100644 --- a/admin/left-main-sidebar.php +++ b/admin/left-main-sidebar.php @@ -1,10 +1,6 @@ @@ -21,18 +17,17 @@
-
- \ No newline at end of file + + + \ No newline at end of file diff --git a/catalog-single-vendor.php b/catalog-single-vendor.php index 88b4844..e5e3b09 100644 --- a/catalog-single-vendor.php +++ b/catalog-single-vendor.php @@ -350,7 +350,9 @@ function updateWishItemCount() {
Seller since
-

+ +

+
@@ -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 = `
-
+
${imageContainer.innerHTML}
- - + ${ + (product["sale_price"] && product["sale_price"] > 0) ? + ` + ` : + (product["regular_price"] && product["regular_price"] != "") ? + ` + ` : + `` + }
@@ -1166,7 +1175,7 @@ maxPriceInput.addEventListener('input', function() { -
+ diff --git a/footer.php b/footer.php index 8af24e6..27ddb86 100644 --- a/footer.php +++ b/footer.php @@ -1,3 +1,7 @@ + +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ - \ No newline at end of file + diff --git a/header.php b/header.php index 7a2418d..4249e27 100644 --- a/header.php +++ b/header.php @@ -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; + } + } @@ -288,13 +302,13 @@ if ($_SESSION["userId"] <> "") {
- 0 + 0
- 0 + 0
@@ -1130,23 +1144,41 @@ if ($_SESSION["userId"] <> "") { -->
  • Hot Offers
  • - + + +
  • Offers
  • Top Vendors
  • Services
  • New Arrivals
  • - - +
  • Client + Review
  • +
  • Instagram Feed
  • - + -->
    diff --git a/index.php b/index.php index 8b02804..4379ba6 100644 --- a/index.php +++ b/index.php @@ -224,9 +224,9 @@ if ($_SESSION["userId"] <> "") { $vendorOfProduct = getVendorbyId($forAll[$pid]['vendor_api_id']); ?>
    -
    +
    -
    +
    "> @@ -237,7 +237,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { $vendorOfProduct = getVendorbyId($electronics[$pid]['vendor_api_id']); ?>
    -
    +
    -
    +
    "> @@ -357,7 +357,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { $vendorOfProduct = getVendorbyId($smartHome[$pid]['vendor_api_id']); ?>
    -
    +
    -
    +
    "> @@ -479,7 +479,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { $vendorOfProduct = getVendorbyId($forVehicle[$pid]['vendor_api_id']); ?>
    -
    +
    -
    +
    "> @@ -599,7 +599,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { $vendorOfProduct = getVendorbyId($newArrival[$pid]['vendor_api_id']); ?>
    -
    +
    -
    +
    -
    + diff --git a/next_day_delivery.php b/next_day_delivery.php index fccdf26..3c748a5 100644 --- a/next_day_delivery.php +++ b/next_day_delivery.php @@ -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 =""; let 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 = `
    -
    +
    ${imageContainer.innerHTML}
    - - + ${ + (product["sale_price"] && product["sale_price"] > 0) ? + ` + ` : + (product["regular_price"] && product["regular_price"] != "") ? + ` + ` : + `` + }
    @@ -925,7 +932,7 @@ maxPriceInput.addEventListener('input', function() { -
    + diff --git a/product-left-sidebar.php b/product-left-sidebar.php index 5cd385a..4e4e6f5 100644 --- a/product-left-sidebar.php +++ b/product-left-sidebar.php @@ -2027,7 +2027,7 @@ if (isset($_GET['id'])) { -
    + diff --git a/register_customer.php b/register_customer.php index 194788f..16af521 100644 --- a/register_customer.php +++ b/register_customer.php @@ -129,8 +129,7 @@ $customerData = json_decode($customers, true); - " placeholder="Enter your phone number" - required /> + " oninput="preventEraseInPrefix(this)" required />
    + + diff --git a/register_vendor.php b/register_vendor.php index fcd8063..6347247 100644 --- a/register_vendor.php +++ b/register_vendor.php @@ -144,7 +144,7 @@ $vendorData = json_decode($vendors, true); - + diff --git a/shop-list-left-sidebar.php b/shop-list-left-sidebar.php index 22ef2f7..b8d58c0 100644 --- a/shop-list-left-sidebar.php +++ b/shop-list-left-sidebar.php @@ -1108,20 +1108,22 @@ maxPriceInput.addEventListener('input', function() { -
    + -
    + +
    + 0 +
    - +
    @@ -1129,7 +1131,7 @@ maxPriceInput.addEventListener('input', function() {
    -
    +
    --> diff --git a/vendor-list.php b/vendor-list.php index 5c78616..976e198 100644 --- a/vendor-list.php +++ b/vendor-list.php @@ -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();
    Seller since
    -

    + +

    @@ -417,7 +418,7 @@ $products = productList(); -
    + diff --git a/vendor-settings.php b/vendor-settings.php index e987313..1f3a2b3 100644 --- a/vendor-settings.php +++ b/vendor-settings.php @@ -419,7 +419,7 @@ if ($_SESSION["isCustomer"] == true) {
    - +
    @@ -449,7 +449,7 @@ if ($_SESSION["isCustomer"] == true) {
    - +
    @@ -486,7 +486,7 @@ if ($_SESSION["isCustomer"] == true) {
    - +
    @@ -1651,7 +1700,7 @@ if ($_SESSION["isCustomer"] == true) { -
    + diff --git a/wishlist.php b/wishlist.php index b089bb2..6b84754 100644 --- a/wishlist.php +++ b/wishlist.php @@ -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) { -
    +