Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2021
    Location
    New York
    Posts
    6
    Plugin Contributions
    0

    Default Order process stops at final step

    Upgraded to 1.5.7 c, PHP Ver 7.4 and everything good until the order process throws a 500 error at last step of order confirmation. Error log shows this among other PHP warnings that follow in log:

    PHP Warning: A non-numeric value encountered in *******/includes/classes/order.php on line 515.

    Here is code from order.php:

    Code:
        // Update the final total to include tax if not already tax-inc
       if (DISPLAY_PRICE_WITH_TAX == 'true') {
         $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
       } else {
        $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost']; //THIS IS LINE 515
        }
    I made other customizations to the cart so I am not sure where I went off the rails here. Tax and shipping are not part of price - they are calculated by site owner after order processing. I wonder where to look for problem. Any ideas?

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

    Default Re: Order process stops at final step

    Are there any shipping modules enabled?

    P.S. I'm betting that there are other, less severe, logs associated with that checkout. Could you post those (in their entirety) as well?
    Last edited by lat9; 4 May 2021 at 05:40 PM.

  3. #3
    Join Date
    May 2021
    Location
    New York
    Posts
    6
    Plugin Contributions
    0

    Default Re: Order process stops at final step

    Thanks for looking at this. Oh yeah - lots of issues - just thought this might be a jumping off point to a solution.

    The only shipping module enabled is flat rate.

    The log looks like this:

    Code:
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: *****
    #1  order->cart() called at [******/includes/classes/order.php:35]
    #2  order->__construct() called at [******/includes/modules/checkout_process.php:48]
    #3  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #4  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/classes/order.php on line 515.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  zen_calculate_tax() called at [******/includes/modules/order_total/ot_shipping.php:107]
    #2  ot_shipping->process() called at [******/includes/classes/order_total.php:178]
    #3  order_total->pre_confirmation_check() called at [******/includes/modules/checkout_process.php:76]
    #4  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #5  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/functions/functions_taxes.php on line 223.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  currencies->rateAdjusted() called at [******/includes/classes/currencies.php:64]
    #2  currencies->format() called at [******/includes/modules/order_total/ot_shipping.php:129]
    #3  ot_shipping->process() called at [******/includes/classes/order_total.php:178]
    #4  order_total->pre_confirmation_check() called at [******/includes/modules/checkout_process.php:76]
    #5  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #6  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/classes/currencies.php on line 97.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  ot_group_pricing->get_order_total() called at [******/includes/modules/order_total/ot_group_pricing.php:32]
    #2  ot_group_pricing->process() called at [******/includes/classes/order_total.php:178]
    #3  order_total->pre_confirmation_check() called at [******/includes/modules/checkout_process.php:76]
    #4  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #5  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/modules/order_total/ot_group_pricing.php on line 60.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  ot_group_pricing->get_order_total() called at [******/includes/modules/order_total/ot_group_pricing.php:85]
    #2  ot_group_pricing->calculate_deductions() called at [******/includes/modules/order_total/ot_group_pricing.php:33]
    #3  ot_group_pricing->process() called at [******/includes/classes/order_total.php:178]
    #4  order_total->pre_confirmation_check() called at [******/includes/modules/checkout_process.php:76]
    #5  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #6  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/modules/order_total/ot_group_pricing.php on line 60.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  zen_calculate_tax() called at [******/includes/modules/order_total/ot_shipping.php:107]
    #2  ot_shipping->process() called at [******/includes/classes/order_total.php:65]
    #3  order_total->process() called at [******/includes/modules/checkout_process.php:83]
    #4  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #5  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/functions/functions_taxes.php on line 223.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  currencies->rateAdjusted() called at [******/includes/classes/currencies.php:64]
    #2  currencies->format() called at [******/includes/modules/order_total/ot_shipping.php:129]
    #3  ot_shipping->process() called at [******/includes/classes/order_total.php:65]
    #4  order_total->process() called at [******/includes/modules/checkout_process.php:83]
    #5  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #6  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/classes/currencies.php on line 97.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  ot_group_pricing->get_order_total() called at [******/includes/modules/order_total/ot_group_pricing.php:32]
    #2  ot_group_pricing->process() called at [******/includes/classes/order_total.php:65]
    #3  order_total->process() called at [******/includes/modules/checkout_process.php:83]
    #4  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #5  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/modules/order_total/ot_group_pricing.php on line 60.
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: ******
    #1  ot_group_pricing->get_order_total() called at [******/includes/modules/order_total/ot_group_pricing.php:85]
    #2  ot_group_pricing->calculate_deductions() called at [******/includes/modules/order_total/ot_group_pricing.php:33]
    #3  ot_group_pricing->process() called at [******/includes/classes/order_total.php:65]
    #4  order_total->process() called at [******/includes/modules/checkout_process.php:83]
    #5  require(******/includes/modules/checkout_process.php) called at [******/includes/modules/pages/checkout_process/header_php.php:14]
    #6  require(******/includes/modules/pages/checkout_process/header_php.php) called at [******/index.php:36]
    --> PHP Warning: A non-numeric value encountered in ******/includes/modules/order_total/ot_group_pricing.php on line 60.

  4. #4
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Order process stops at final step

    Are you sure there aren't ANY other logs created during the attempted checkout? You're looking for one that would say "PHP Fatal Error" - warnings don't usually break anything. What payment method are you using when the error occurs? If you enable "moneyorder" payment method and use it during checkout, does it generate the same error? And lastly, if it's an upgraded 1.5.7, check your orders table to see if you're by any chance missing some columns, specifically order_weight and/or language_code - I've seen that go missing during upgrade quite a few times (although this *would* throw a fatal error in the logs).

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Order process stops at final step

    Quote Originally Posted by earthspark View Post
    Thanks for looking at this. Oh yeah - lots of issues - just thought this might be a jumping off point to a solution.

    The only shipping module enabled is flat rate.
    ...
    Would you post a screenshot of the flat-rate shipping's setup in the admin's Modules->Shipping?

    ... an what @balihr said!
    Last edited by lat9; 4 May 2021 at 07:31 PM.

  6. #6
    Join Date
    May 2021
    Location
    New York
    Posts
    6
    Plugin Contributions
    0

    Default Re: Order process stops at final step

    Quote Originally Posted by balihr View Post
    Are you sure there aren't ANY other logs created during the attempted checkout? You're looking for one that would say "PHP Fatal Error" - warnings don't usually break anything. What payment method are you using when the error occurs? If you enable "moneyorder" payment method and use it during checkout, does it generate the same error? And lastly, if it's an upgraded 1.5.7, check your orders table to see if you're by any chance missing some columns, specifically order_weight and/or language_code - I've seen that go missing during upgrade quite a few times (although this *would* throw a fatal error in the logs).
    Okay, now we may be getting to something. Forgive me for being slow to catch on.

    Another log does include the following:
    Code:
    [04-May-2021 11:44:00 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function PHPMailer\PHPMailer\ctype_alnum() in /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php:1791
    Stack trace:
    #0 /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php(1869): PHPMailer\PHPMailer\PHPMailer::isShellSafe(owner email....')
    #1 /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php(1633): PHPMailer\PHPMailer\PHPMailer->mailSend('Date: Tue, 4 Ma...', 'Order Confirmat...')
    #2 /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php(1464): PHPMailer\PHPMailer\PHPMailer->postSend()
    #3 /******/includes/functions/functions_email.php(359): PHPMailer\PHPMailer\PHPMailer->send()
    #4 /******/includes/classes/order.php(1185): zen_mail('my name', 'my email...', 'Order Confirmat...', 'Order Confirmat...', 'owner', 'owner email....', Array, 'checkout', Array)
    #5 /******/includes/modules/checkout_process.php(103): order->send_order_email(63, 2)
    #6 /******/includes/modules/pages/checkout_process/header_php.php(14): require('/hermes/bosnawe...')
    #7 /******/index.php(36): require('/hermes/bosnawe...')
    #8 {main}
      thrown in /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php on line 1791
    
    [04-May-2021 11:44:00 America/New_York] Request URI: /shop/index.php?main_page=checkout_process, IP address: https://www.tandamiti.com
    --> PHP Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\ctype_alnum() in /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php:1791
    Stack trace:
    #0 /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php(1869): PHPMailer\PHPMailer\PHPMailer::isShellSafe('owner email....')
    #1 /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php(1633): PHPMailer\PHPMailer\PHPMailer->mailSend('Date: Tue, 4 Ma...', 'Order Confirmat...')
    #2 /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php(1464): PHPMailer\PHPMailer\PHPMailer->postSend()
    #3 /******/includes/functions/functions_email.php(359): PHPMailer\PHPMailer\PHPMailer->send()
    #4 /******/includes/classes/order.php(1185): zen_mail('my name', 'my email...', 'Order Confirmat...', 'Order Confirmat...', 'owner', 'owner email....', Array, 'checkout', Array)
    #5 /******/includes/modules/checkout_process.php(103): order->send_order_email(63, 2)
    #6 /******/includes/modules/pages/checkout_process/header_php.php(14): require('/hermes/bosnawe...')
    #7 /******/index.php(36): require('/hermes/bosnawe...')
    #8 {main}
      thrown in /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php on line 1791.
    Could this just me an email issue??

  7. #7
    Join Date
    May 2021
    Location
    New York
    Posts
    6
    Plugin Contributions
    0

    Default Re: Order process stops at final step

    Here is the scree shot.

    Name:  Image1.jpg
Views: 549
Size:  40.3 KB

  8. #8
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Order process stops at final step

    Quote Originally Posted by earthspark View Post
    Code:
    [04-May-2021 11:44:00 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function PHPMailer\PHPMailer\ctype_alnum() in /******/includes/classes/vendors/PHPMailer/src/PHPMailer.php:1791
    This is the culprit. I suggest you check your php settings to see if ctype extension is enabled. You can go to admin->Tools->Server/Version Info and simply search that page for "ctype" to see if the extension if enabled. If it's not, contact your host to enable it for you. I don't recall seeing it in cPanel's PHP Extensions page, nor in Plesk.

    And if it enabled and you're having this problem, I'll just close the door on my way out and hope lat9 or Doc has better ideas. Maybe switching Email Delivery Method to SMTP would resolve the issue?

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Order process stops at final step

    Looking at the 'stock' zc157c /includes/classes/vendors/PHPMailer/src/PHPMailer.php, I've highlighted line 1791:
    Code:
            //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
            //A space after `-f` is optional, but there is a long history of its presence
            //causing problems, so we don't use one
            //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
            //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
            //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
            //Example problem: https://www.drupal.org/node/1057954
            // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
            if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) {
                $params = sprintf('-f%s', $this->Sender);
            }
            if (!empty($this->Sender) && static::validateAddress($this->Sender)) {
                $old_from = ini_get('sendmail_from');
                ini_set('sendmail_from', $this->Sender);
            }
            $result = false;
            if ($this->SingleTo && count($toArr) > 1) {
                foreach ($toArr as $toAddr) {
                    $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
                    $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
                }
            } else {
    Might I suggest that you review your installation and ensure that the entire /includes/classes/vendors/PHPMailer file-set has been properly installed?

    For those pesky PHP Warnings, those are due to your setting of TBA (a non-numeric value) for the Flat-rate shipping's cost.

  10. #10
    Join Date
    May 2021
    Location
    New York
    Posts
    6
    Plugin Contributions
    0

    Default Re: Order process stops at final step

    Quote Originally Posted by balihr View Post
    This is the culprit. I suggest you check your php settings to see if ctype extension is enabled. You can go to admin->Tools->Server/Version Info and simply search that page for "ctype" to see if the extension if enabled. If it's not, contact your host to enable it for you. I don't recall seeing it in cPanel's PHP Extensions page, nor in Plesk.

    And if it enabled and you're having this problem, I'll just close the door on my way out and hope lat9 or Doc has better ideas. Maybe switching Email Delivery Method to SMTP would resolve the issue?
    THANK YOU!

    Sure enough, no listing for ctype. Host enabled and issues resolved. Can't thank you enough.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Session randomly expiring on final step of checkout process
    By laurelsstitchery in forum General Questions
    Replies: 19
    Last Post: 23 Jan 2015, 08:08 PM
  2. Replies: 6
    Last Post: 24 Jan 2011, 04:29 AM
  3. Change classic step of order process
    By Jacket in forum Addon Shipping Modules
    Replies: 3
    Last Post: 28 Jun 2010, 04:13 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