Page 1 of 2 12 LastLast
Results 1 to 10 of 3052

Hybrid View

  1. #1
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    zc 1.58a. php 8.1. opc 2.5.2.

    I received the following warning.

    Code:
    Request URI: /ajax.php?act=ajaxOnePageCheckout&method=updateShippingSelection, IP address: xxxx, Language id 1
    #0 /includes/classes/ajax/zcAjaxOnePageCheckout.php(115): zen_debug_error_handler()
    #1 /includes/classes/ajax/zcAjaxOnePageCheckout.php(104): zcAjaxOnePageCheckout->formatOrderTotal()
    #2 /ajax.php(85): zcAjaxOnePageCheckout->updateShippingSelection()
    --> PHP Warning: Undefined array key "opc_saved_order_total" in /includes/classes/ajax/zcAjaxOnePageCheckout.php on line 115.
    Line 115 is the following section:

    Code:
        protected function formatOrderTotal()
        {
            return $_SESSION['opc_saved_order_total'];//line 115
        }
    Does the following change work? $_SESSION['opc_saved_order_total'] should not be zero or null?

    Code:
    return $_SESSION['opc_saved_order_total'] ?? '';
    Last edited by njcyx; 27 Jun 2024 at 02:25 PM.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by njcyx View Post
    zc 1.58a. php 8.1. opc 2.5.2.

    I received the following warning.

    Code:
    Request URI: /ajax.php?act=ajaxOnePageCheckout&method=updateShippingSelection, IP address: xxxx, Language id 1
    #0 /includes/classes/ajax/zcAjaxOnePageCheckout.php(115): zen_debug_error_handler()
    #1 /includes/classes/ajax/zcAjaxOnePageCheckout.php(104): zcAjaxOnePageCheckout->formatOrderTotal()
    #2 /ajax.php(85): zcAjaxOnePageCheckout->updateShippingSelection()
    --> PHP Warning: Undefined array key "opc_saved_order_total" in /includes/classes/ajax/zcAjaxOnePageCheckout.php on line 115.
    Line 115 is the following section:

    Code:
        protected function formatOrderTotal()
        {
            return $_SESSION['opc_saved_order_total'];//line 115
        }
    Does the following change work? $_SESSION['opc_saved_order_total'] should not be zero or null?

    Code:
    return $_SESSION['opc_saved_order_total'] ?? '';
    Hmm, that shouldn't happen. Does the associated site, by any chance, have something like the "Remember Me" plugin installed?

  3. #3
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Hi @lat9,

    No plug-in, but I added a php file to extend the session/shopping cart expiry time. Not sure if it is related.

    Code:
    <?php define('SESSION_TIMEOUT_CATALOG', 7200);
    This file is under /includes/extra_configures/my_ultra_long_session_timeout.php file

    Reference link:

    https://www.zen-cart.com/showthread....29#post1321729

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Looks like that could happen if an error occurred in either initializeResponseStatus or there was an issue with the shipping selection.

    I'll be changing that method to read
    Code:
        // -----
        // Called to format methods' return of the order's current total,
        // rounding to the number of decimal digits in the session's active
        // currency.
        //
        protected function formatOrderTotal()
        {
            global $currencies;
    
            return $_SESSION['opc_saved_order_total'] ?? $currencies->format(0);
        }

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    GitHub issue created to track the above change: https://github.com/lat9/one_page_checkout/issues/417

  6. #6
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    GitHub issue created to track the above change: https://github.com/lat9/one_page_checkout/issues/417
    Thanks!

  7. #7
    Join Date
    Jun 2005
    Posts
    356
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    After upgrading to the new Square_webPay 1.2.1 I found a bug in (I think) OPC. While checking out and paying with Square_webPay, OR check/money order but NOT Paypal Restfull, If I change what's in the special Instructions or Comments field (or whatever 'TABLE_HEADING_COMMENTS' was defined to originally) I get the error "Your orders details have changed. Please review the current values and re-submit. I had had trouble with this previously with paypal, but not connected it to the comments field.
    ZenCart - 1.5.8a
    Bootstrap - 3.6.0
    OPC - 2.5.1
    Square_webPay (paid version) - 1.2.1
    PayPal Checkout (RESTful) - 1.0.2

    Hoping to upgrade OCP to 2.5.2 today, will post if it still happens in that version.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

  8. #8
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by njcyx View Post
    Hi @lat9,

    No plug-in, but I added a php file to extend the session/shopping cart expiry time. Not sure if it is related.

    Code:
    <?php define('SESSION_TIMEOUT_CATALOG', 7200);
    This file is under /includes/extra_configures/my_ultra_long_session_timeout.php file

    Reference link:

    https://www.zen-cart.com/showthread....29#post1321729
    Hmm, I searched the keyword "SESSION_TIMEOUT_CATALOG" and I found my same post back in 2024...

    The modules I installed now are: OPC, some shipping modules, local sales tax, sales report II, monthly sales and tax summary and google recapchar.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by njcyx View Post
    Hmm, I searched the keyword "SESSION_TIMEOUT_CATALOG" and I found my same post back in 2024...

    The modules I installed now are: OPC, some shipping modules, local sales tax, sales report II, monthly sales and tax summary and google recapchar.
    The log you posted indicates that the issue is that data types in the saved session's OPC variable aren't compatible with those now 'required' by the v2.6.0 update.

    While I'll keep my eye out for other reports of this issue, I've got no "good" solution for you other than running the following SQL queries after you've made a full backup of your database:
    Code:
    TRUNCATE TABLE sessions;
    TRUNCATE TABLE whos_online;

  10. #10
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    The log you posted indicates that the issue is that data types in the saved session's OPC variable aren't compatible with those now 'required' by the v2.6.0 update.

    While I'll keep my eye out for other reports of this issue, I've got no "good" solution for you other than running the following SQL queries after you've made a full backup of your database:
    Code:
    TRUNCATE TABLE sessions;
    TRUNCATE TABLE whos_online;
    Hi @lat9, thanks. I just tried your suggestion in the testing server and it worked! After I cleaned both tables, The white screen tab can display as normal.

    Regarding my database, I used zc database conversion tool (v2.0.1) to convert my database to utf8mb4_unicode_520_c from (I suspected) utf8, when I upgraded my site to zc210.

 

 
Page 1 of 2 12 LastLast

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

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