From 1572bac6dec435bf89a3ce338b9dcc9b3da91add Mon Sep 17 00:00:00 2001 From: Jun Barroga Date: Tue, 27 Feb 2024 09:11:14 +0800 Subject: [PATCH] Vendor Page Updates --- catalog-single-vendor.php | 64 +++++++++++------ checkouttest.php | 2 + functions.php | 20 +++--- header.php | 8 +-- index.php | 43 +++++++----- product-left-sidebar.php | 143 ++++++++++++++++++++++---------------- vendor-dashboard.php | 12 ++-- vendor-list.php | 17 +++-- vendor-settings.php | 7 +- wishlist.php | 10 +-- 10 files changed, 201 insertions(+), 125 deletions(-) diff --git a/catalog-single-vendor.php b/catalog-single-vendor.php index 6923744..1d8b0ce 100644 --- a/catalog-single-vendor.php +++ b/catalog-single-vendor.php @@ -217,14 +217,15 @@ if ($_SESSION["userId"] <> "") {
- + " alt="vendor img">vendor img - + ?>" alt="vendor img">vendor img +
@@ -234,20 +235,25 @@ if ($_SESSION["userId"] <> "") {

( Retail Business )

-
@@ -311,17 +317,18 @@ if ($_SESSION["userId"] <> "") {
">
-
+ +
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.
+ 0) : ?> @@ -362,9 +371,22 @@ if ($_SESSION["userId"] <> "") { Inquire + +
-
+ + +
@@ -864,7 +886,7 @@ if ($_SESSION["userId"] <> "") { -
+ diff --git a/checkouttest.php b/checkouttest.php index 46c0ad0..f0ad9e4 100644 --- a/checkouttest.php +++ b/checkouttest.php @@ -605,6 +605,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"] Subtotal: + +
diff --git a/functions.php b/functions.php index ae5ff93..23f6d72 100644 --- a/functions.php +++ b/functions.php @@ -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 = "

Greetings from Obanana!

    @@ -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 = "

    Greetings from Obanana!

      @@ -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 = "

      Greetings from Obanana!

        @@ -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" ] diff --git a/header.php b/header.php index 71d2a17..3477429 100644 --- a/header.php +++ b/header.php @@ -977,15 +977,15 @@
      • Top Collection
      • Categories
      • -
      • Offers
      • +
      • Top Vendors
      • Services
      • New Arrivals
      • -
      • Client - Review
      • -
      • Instagram Feed
      • + +
    diff --git a/index.php b/index.php index 3a27575..4b4dd0e 100644 --- a/index.php +++ b/index.php @@ -568,6 +568,7 @@ if ($_SESSION["userId"] <> "") {
    + "> "") { + - - edit + + edit + + edit - edit - + "") { + "") { + + +
    @@ -1476,6 +1485,7 @@ if ($_SESSION["userId"] <> "") {
    -
    + +
    -
    + + +
    As low as @@ -397,32 +402,32 @@ if (isset($_GET['id'])) {
      - -
    • - product - -

      - -
    • -
      + $main_product_image = isset($product_details["product_image"]) ? $product_details["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg'; + ?> + +
    • + product + +

      + +
    • +
      - $variation) { - $variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg'; -?> - -
    • - product - -

      - -
    • -
      - + $variation) { + $variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg'; + ?> + +
    • + product + +

      + +
    • +
      +
    @@ -462,35 +467,57 @@ foreach ($variation_details as $index => $variation) { - + +
    -
    -
    -
    - " id="qty-input" /> -
    +
    -
    - -
    +
    + + +
    Add To Cart'; - echo ''; - } else { - if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) { - echo '
    '; - echo ''; - } else { - echo ''; - } - } - } else { - echo '

    Please log in to add to cart.

    '; - } -?> + if ($_SESSION["isLoggedIn"]) { + if ($product_details['product_type'] === "variable") { + echo '
    -
    '; + echo ''; + echo '
    +
    '; + echo '
    '; + echo '
    + +
    '; + + } else { + if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) { + echo '
    -
    '; + echo ''; + echo '
    +
    '; + echo '
    '; + echo ''; + echo '
    + +
    '; + } else { + echo ''; + } + } + } else { + echo ''; + } + ?> + + + @@ -509,10 +536,9 @@ foreach ($variation_details as $index => $variation) { // echo '

    Please log in to add to cart.

    '; // } ?> --> +
    - - diff --git a/vendor-list.php b/vendor-list.php index fb6a8bc..3897c62 100644 --- a/vendor-list.php +++ b/vendor-list.php @@ -179,6 +179,7 @@ $products = productList();
    + vendor img( Retail Business )

    -
    +
    -
    Seller Products
    + +
    Seller Products
    +
    -
    Seller since
    + +
    Seller since
    +

    diff --git a/vendor-settings.php b/vendor-settings.php index 8e1f553..cc4246c 100644 --- a/vendor-settings.php +++ b/vendor-settings.php @@ -155,10 +155,11 @@ if ($_SESSION["userId"] <> "") {
    - + - alt="vendor image"> + alt="vendor image">
    diff --git a/wishlist.php b/wishlist.php index b3005f0..a1e189d 100644 --- a/wishlist.php +++ b/wishlist.php @@ -182,7 +182,8 @@ if ($_SESSION["userId"] <> "") { ">
    - + " class="image"> + " alt="Product" /> @@ -403,7 +404,8 @@ if ($_SESSION["userId"] <> "") {
    -
    + + -
    +