Page 128 of 280 FirstFirst ... 2878118126127128129130138178228 ... LastLast
Results 1,271 to 1,280 of 2792
  1. #1271
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: One-Page Checkout [Support Thread]

    I've just submitted v2.1.3 of OPC to the plugin moderators for review; I'll post back once it's available for download from Zen Cart. You can also download directly from the plugin's GitHub repository: https://github.com/lat9/one_page_che...ses/tag/v2.1.3

    This release contains changes associated with the following GitHub issues:

    #204: Add information sidebox link for the order_status page.
    #206: Correct session-handling when javascript is disabled in the customer's browser.
    #207: Remove unwanted guest-account address-book entries.

    Note: At a minimum, I highly suggest that stores running any previous version of OPC that included the guest-checkout feature update their copy of /includes/functions/extra_functions/one_page_checkout_functions.php to use the v2.1.3 version:
    Code:
    <?php
    // -----
    // Part of the One-Page Checkout plugin, provided under GPL 2.0 license by lat9 ([email protected]).
    // Copyright (C) 2013-2019, Vinos de Frutas Tropicales.  All rights reserved.
    //
    
    // -----
    // For versions of OPC prior to v2.1.0, it was possible that additional address-book entries were recorded
    // for the temporary (guest) account.  We'll clean those up, if present, on each page-load, recording any
    // addresses found for the store-owner's inspection.
    //
    if (defined('CHECKOUT_ONE_ENABLED') && defined('CHECKOUT_ONE_GUEST_CUSTOMER_ID')) {
        $check = $db->Execute(
            "SELECT COUNT(*) AS count
               FROM " . TABLE_ADDRESS_BOOK . "
              WHERE customers_id = " . (int)CHECKOUT_ONE_GUEST_CUSTOMER_ID,
              false,
              false,
              0,
              true
        );
        if ($check->fields['count'] > 2) {
            $entry_count = $check->fields['count'] - 2;
            $entries = $db->Execute(
                "SELECT *
                   FROM " . TABLE_ADDRESS_BOOK . "
                  WHERE customers_id = " . (int)CHECKOUT_ONE_GUEST_CUSTOMER_ID . "
                  ORDER BY address_book_id DESC
                  LIMIT $entry_count",
                  false,
                  false,
                  0,
                  true
            );
            $entries_to_remove = array();
            $log_file_name = DIR_FS_LOGS . '/opc_address_book_cleanup.log';
            error_log(date('Y-m-d H:i:s') . ": Removing $entry_count guest address-book entries." . PHP_EOL, 3, $log_file_name);
            while (!$entries->EOF) {
                error_log(str_replace(',"', ', "', json_encode($entries->fields)) . PHP_EOL, 3, $log_file_name);
                $entries_to_remove[] = $entries->fields['address_book_id'];
                $entries->MoveNext();
            }
            $db->Execute(
                "DELETE FROM " . TABLE_ADDRESS_BOOK . "
                  WHERE address_book_id IN (" . implode(', ', $entries_to_remove) . ")"
            );
        }
    }
    
    // -----
    // This function identifies whether (true) or not (false) the current customer session is
    // associated with a guest-checkout process.
    //
    if (!function_exists('zen_in_guest_checkout')) {
        function zen_in_guest_checkout()
        {
            $in_guest_checkout = false;
            $GLOBALS['zco_notifier']->notify('NOTIFY_ZEN_IN_GUEST_CHECKOUT', '', $in_guest_checkout);
            return (bool)$in_guest_checkout;
        }
    }
    
    // -----
    // This function identifies whether (true) or not (false) a customer is currently logged into the site.
    //
    if (!function_exists('zen_is_logged_in')) {
        function zen_is_logged_in()
        {
            $is_logged_in = (!empty($_SESSION['customer_id']));
            $GLOBALS['zco_notifier']->notify('NOTIFY_ZEN_IS_LOGGED_IN', '', $is_logged_in);
            return (bool)$is_logged_in;
        }
    }
    
    // -----
    // This function identifies whether (true) or not (false) the current page is being accessed
    // by a spider.
    //
    if (!function_exists('zen_is_spider_session')) {
        function zen_is_spider_session()
        {
            $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
            $spider_flag = false;
            if (zen_not_null($user_agent)) {
                $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
                for ($i=0, $n=count($spiders); $i<$n; $i++) {
                    if (zen_not_null($spiders[$i]) && strpos($spiders[$i], '$Id:') !== 0) {
                        if (strpos($user_agent, trim($spiders[$i])) !== false) {
                            $spider_flag = true;
                            break;
                        }
                    }
                }
            }
            return $spider_flag;
        }
    }

  2. #1272
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    I've just submitted v2.1.3 of OPC to the plugin moderators for review; I'll post back once it's available for download from Zen Cart. You can also download directly from the plugin's GitHub repository: https://github.com/lat9/one_page_che...ses/tag/v2.1.3

    This release contains changes associated with the following GitHub issues:

    #204: Add information sidebox link for the order_status page.
    #206: Correct session-handling when javascript is disabled in the customer's browser.
    #207: Remove unwanted guest-account address-book entries.

    Note: At a minimum, I highly suggest that stores running any previous version of OPC that included the guest-checkout feature update their copy of /includes/functions/extra_functions/one_page_checkout_functions.php to use the v2.1.3 version:
    Code:
    <?php
    // -----
    // Part of the One-Page Checkout plugin, provided under GPL 2.0 license by lat9 ([email protected]).
    // Copyright (C) 2013-2019, Vinos de Frutas Tropicales.  All rights reserved.
    //
    
    // -----
    // For versions of OPC prior to v2.1.0, it was possible that additional address-book entries were recorded
    // for the temporary (guest) account.  We'll clean those up, if present, on each page-load, recording any
    // addresses found for the store-owner's inspection.
    //
    if (defined('CHECKOUT_ONE_ENABLED') && defined('CHECKOUT_ONE_GUEST_CUSTOMER_ID')) {
        $check = $db->Execute(
            "SELECT COUNT(*) AS count
               FROM " . TABLE_ADDRESS_BOOK . "
              WHERE customers_id = " . (int)CHECKOUT_ONE_GUEST_CUSTOMER_ID,
              false,
              false,
              0,
              true
        );
        if ($check->fields['count'] > 2) {
            $entry_count = $check->fields['count'] - 2;
            $entries = $db->Execute(
                "SELECT *
                   FROM " . TABLE_ADDRESS_BOOK . "
                  WHERE customers_id = " . (int)CHECKOUT_ONE_GUEST_CUSTOMER_ID . "
                  ORDER BY address_book_id DESC
                  LIMIT $entry_count",
                  false,
                  false,
                  0,
                  true
            );
            $entries_to_remove = array();
            $log_file_name = DIR_FS_LOGS . '/opc_address_book_cleanup.log';
            error_log(date('Y-m-d H:i:s') . ": Removing $entry_count guest address-book entries." . PHP_EOL, 3, $log_file_name);
            while (!$entries->EOF) {
                error_log(str_replace(',"', ', "', json_encode($entries->fields)) . PHP_EOL, 3, $log_file_name);
                $entries_to_remove[] = $entries->fields['address_book_id'];
                $entries->MoveNext();
            }
            $db->Execute(
                "DELETE FROM " . TABLE_ADDRESS_BOOK . "
                  WHERE address_book_id IN (" . implode(', ', $entries_to_remove) . ")"
            );
        }
    }
    
    // -----
    // This function identifies whether (true) or not (false) the current customer session is
    // associated with a guest-checkout process.
    //
    if (!function_exists('zen_in_guest_checkout')) {
        function zen_in_guest_checkout()
        {
            $in_guest_checkout = false;
            $GLOBALS['zco_notifier']->notify('NOTIFY_ZEN_IN_GUEST_CHECKOUT', '', $in_guest_checkout);
            return (bool)$in_guest_checkout;
        }
    }
    
    // -----
    // This function identifies whether (true) or not (false) a customer is currently logged into the site.
    //
    if (!function_exists('zen_is_logged_in')) {
        function zen_is_logged_in()
        {
            $is_logged_in = (!empty($_SESSION['customer_id']));
            $GLOBALS['zco_notifier']->notify('NOTIFY_ZEN_IS_LOGGED_IN', '', $is_logged_in);
            return (bool)$is_logged_in;
        }
    }
    
    // -----
    // This function identifies whether (true) or not (false) the current page is being accessed
    // by a spider.
    //
    if (!function_exists('zen_is_spider_session')) {
        function zen_is_spider_session()
        {
            $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
            $spider_flag = false;
            if (zen_not_null($user_agent)) {
                $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
                for ($i=0, $n=count($spiders); $i<$n; $i++) {
                    if (zen_not_null($spiders[$i]) && strpos($spiders[$i], '$Id:') !== 0) {
                        if (strpos($user_agent, trim($spiders[$i])) !== false) {
                            $spider_flag = true;
                            break;
                        }
                    }
                }
            }
            return $spider_flag;
        }
    }
    Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095

  3. #1273
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    I am using version 2.1.2 now, I found a problem, using PayPal Express payment, when returning to the page is not a page payment.
    It takes 4 clicks to complete the payment

  4. #1274
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by jiji2018 View Post
    I am using version 2.1.2 now, I found a problem, using PayPal Express payment, when returning to the page is not a page payment.
    It takes 4 clicks to complete the payment
    If you are referring to a checkout that starts with the PayPal Express 'Checkout with PayPal' button, that's expected behavior. The PPEC-button process uses the traditional 3-page checkout.

  5. #1275
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    If you are referring to a checkout that starts with the PayPal Express 'Checkout with PayPal' button, that's expected behavior. The PPEC-button process uses the traditional 3-page checkout.
    Why don't you change to a one-page payment? Now customers like a one-page payment.

  6. #1276
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by jiji2018 View Post
    Why don't you change to a one-page payment? Now customers like a one-page payment.
    If it was easy, it would have been done already. Of course, it's open-source, so you're welcome to make that update.

  7. #1277
    Join Date
    May 2006
    Location
    Montana
    Posts
    291
    Plugin Contributions
    20

    Default Re: One-Page Checkout [Support Thread]

    Thanks! I had this same issue on a 1.5.6c site and running the code below through the Admin's Install My SQL patches worked great!

    [QUOTE=lankeeyankee;1347945]I think you're missing what I meant:
    PHP Code:
    PHP Fatal error:  1054:Unknown column 'is_guest_order' in 'field list' :: UPDATE orders.... 
    It looks like there is a missing column in the orders table. That is what this error message is telling you. "Unknown column 'is_guest_order'"

  8. #1278
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: One-Page Checkout [Support Thread]

    [QUOTE=stellarweb;1360513]Thanks! I had this same issue on a 1.5.6c site and running the code below through the Admin's Install My SQL patches worked great!

    Quote Originally Posted by lankeeyankee View Post
    I think you're missing what I meant:
    PHP Code:
    PHP Fatal error:  1054:Unknown column 'is_guest_order' in 'field list' :: UPDATE orders.... 
    It looks like there is a missing column in the orders table. That is what this error message is telling you. "Unknown column 'is_guest_order'"
    Hmm, that's weird. That field was added via admin initialization for OPC v2.0.0. What version are you running, @stellarweb?

  9. #1279
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by mprough View Post
    I did this by simply changing checkout button(s) to the guest checkout page (index.php?main_page=checkout_one)

    ~Melanie
    Hello, can you tell me which page you modified which code?
    I never found it

  10. #1280
    Join Date
    Apr 2018
    Posts
    121
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    How to remove the BR tag in the picture below, I want to use the DIV tag to beautify

    Click image for larger version. 

Name:	4.jpg 
Views:	29 
Size:	40.2 KB 
ID:	18604
    As in the screenshot below, add a DIV tag to each of the fields
    Click image for larger version. 

Name:	QQ截图20190811184914.jpg 
Views:	35 
Size:	15.4 KB 
ID:	18605

 

 

Similar Threads

  1. Set number of products displayed per page (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 146
    Last Post: 2 Nov 2023, 12:50 AM
  2. v151 Banners In Main Page - Support Thread
    By stevesh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2021, 03:36 PM
  3. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  4. v151 PayPal Express Checkout Using NVP 84.0 [Support Thread]
    By lat9 in forum Addon Payment Modules
    Replies: 32
    Last Post: 28 Dec 2015, 04:54 PM
  5. Checkout Amazon Style -- Support Thread
    By CJPinder in forum All Other Contributions/Addons
    Replies: 72
    Last Post: 13 Apr 2011, 08:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR