Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Quick question regarding third party and zencart 1.5.8

    zencart: 1.5.8
    php 8.1.1.2


    I use a program called shipworks to sync my orders for shipping purposes.

    I am getting a strange error. Anyone have any suggestions


    [06-Dec-2022 14:32:40 America/New_York] Request URI: /xxx/shipworks3.php, IP address: 66.176.65.97
    --> PHP Fatal error: Uncaught Error: Call to undefined function zen_get_orders_status() in /home/inverter/public_html/xxxr/shipworks3.php:740
    Stack trace:
    #0 /home/inverter/public_html/xxx/shipworks3.php(169): Action_GetStatusCodes()
    #1 {main}
    thrown in /home/inverter/public_html/xxx/shipworks3.php on line 740.


    line 740
    Code:
    $codes = zen_get_orders_status();
    below is just some more of the code not sure if needed

    Code:
    function Action_GetStatusCodes()
            {
                    writeStartTag("StatusCodes");
    
                    $codes = zen_get_orders_status();
                    
    			   // reset($codes);
                   // while (list($key, $val) = each($codes))
    				
    			foreach($codes as $key => $value) {
    					
                     
                            writeStartTag("StatusCode");
                            writeElement("Code", $val['id']);
                            writeElement("Name", $val['text']);
                            writeCloseTag("StatusCode");
                    }

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Quick question regarding third party and zencart 1.5.8

    This is a bug. We'll fix it ASAP.

    Tracking: https://github.com/zencart/zencart/issues/5447
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Quick question regarding third party and zencart 1.5.8

    If you need a temporary work around, just put the code for this function in admin/includes/functions/extra_functions/temporary_get_order_status.php until a permanent fix for this issue is posted.

    <?php
    function zen_get_orders_status() {
    global $db;

    $orders_status_array = array();
    $orders_status = $db->Execute("SELECT orders_status_id, orders_status_name
    FROM " . TABLE_ORDERS_STATUS . "
    WHERE language_id = " . (int)$_SESSION['languages_id'] . "
    ORDER BY orders_status_id");

    while (!$orders_status->EOF) {
    $orders_status_array[] = array('id' => $orders_status->fields['orders_status_id'],
    'text' => $orders_status->fields['orders_status_name']);
    $orders_status->MoveNext();
    }

    return $orders_status_array;
    }
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: Quick question regarding third party and zencart 1.5.8

    Quote Originally Posted by chadlly2003 View Post
    zencart: 1.5.8
    php 8.1.1.2


    I use a program called shipworks to sync my orders for shipping purposes.

    I am getting a strange error. Anyone have any suggestions


    [06-Dec-2022 14:32:40 America/New_York] Request URI: /xxx/shipworks3.php, IP address: 66.176.65.97
    --> PHP Fatal error: Uncaught Error: Call to undefined function zen_get_orders_status() in /home/inverter/public_html/xxxr/shipworks3.php:740
    Stack trace:
    #0 /home/inverter/public_html/xxx/shipworks3.php(169): Action_GetStatusCodes()
    #1 {main}
    thrown in /home/inverter/public_html/xxx/shipworks3.php on line 740.


    line 740
    Code:
    $codes = zen_get_orders_status();
    below is just some more of the code not sure if needed

    Code:
    function Action_GetStatusCodes()
            {
                    writeStartTag("StatusCodes");
    
                    $codes = zen_get_orders_status();
                    
    			   // reset($codes);
                   // while (list($key, $val) = each($codes))
    				
    			foreach($codes as $key => $value) {
    					
                     
                            writeStartTag("StatusCode");
                            writeElement("Code", $val['id']);
                            writeElement("Name", $val['text']);
                            writeCloseTag("StatusCode");
                    }
    chad,
    what happens if you replace as so:

    PHP Code:
    // from
    $codes zen_get_orders_status();
    //to
    $codes zen_get_orders_status_pulldown_array(); 
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Quick question regarding third party and zencart 1.5.8

    Quote Originally Posted by carlwhat View Post
    chad,
    what happens if you replace as so:

    PHP Code:
    // from
    $codes zen_get_orders_status();
    //to
    $codes zen_get_orders_status_pulldown_array(); 

    this is the error what i made with the changes you suggested

    HTML Code:
    06-Dec-2022 20:10:07 America/New_York] Request URI: /xxx/shipworks3.php, IP address: 66.176.65.97
    --> PHP Fatal error: Uncaught Error: Call to undefined function Â##zen_get_orders_status_pulldown_array() in /home/inverter/public_html/xxx/shipworks3.php:740
    Stack trace:
    #0 /home/inverter/public_html/xxx/shipworks3.php(169): Action_GetStatusCodes()
    #1 {main}
      thrown in /home/inverter/public_html/xxx/shipworks3.php on line 740.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Quick question regarding third party and zencart 1.5.8

    Check your edit - it looks like a couple of stray characters snuck in.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Quick question regarding third party and zencart 1.5.8

    sw guy.

    I tried your recommendations but it just gave me another error
    HTML Code:
    [06-Dec-2022 20:24:00 America/New_York] Request URI: /power/shipworks3.php, IP address: 66.176.65.97
    --> PHP Fatal error: Uncaught Error: Call to undefined function each() in /home/inverter/public_html/xxx/shipworks3.php:742
    Stack trace:
    #0 /home/inverter/public_html/xxx/shipworks3.php(169): Action_GetStatusCodes()
    #1 {main}
      thrown in /home/inverter/public_html/xxx/shipworks3.php on line 742.

  8. #8
    Join Date
    Jan 2015
    Posts
    423
    Plugin Contributions
    0

    Default Re: Quick question regarding third party and zencart 1.5.8

    [06-Dec-2022 20:28:04 America/New_York] Request URI: /xxx/shipworks3.php, IP address: 66.176.65.97
    --> PHP Fatal error: Uncaught Error: Call to undefined function Â##zen_get_orders_status_pulldown_array() in /home/inverter/public_html/power/shipworks3.php:740
    Stack trace:
    #0 /home/inverter/public_html/xxx/shipworks3.php(169): Action_GetStatusCodes()
    #1 {main}
    thrown in /home/inverter/public_html/xxx/shipworks3.php on line 740.

  9. #9
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,685
    Plugin Contributions
    9

    Default Re: Quick question regarding third party and zencart 1.5.8

    Quote Originally Posted by chadlly2003 View Post
    sw guy.

    I tried your recommendations but it just gave me another error
    HTML Code:
    [06-Dec-2022 20:24:00 America/New_York] Request URI: /power/shipworks3.php, IP address: 66.176.65.97
    --> PHP Fatal error: Uncaught Error: Call to undefined function each() in /home/inverter/public_html/xxx/shipworks3.php:742
    Stack trace:
    #0 /home/inverter/public_html/xxx/shipworks3.php(169): Action_GetStatusCodes()
    #1 {main}
      thrown in /home/inverter/public_html/xxx/shipworks3.php on line 742.
    @swguy is correct.

    now shipworks3 needs to be updated.

    each was deprecated in php 8.0.

    the vendor needs to update the code to work with php8.x see:

    https://www.php.net/manual/en/function.each

    and you need to fix your editor!

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Quick question regarding third party and zencart 1.5.8

    @carlwhat is correct - here's how to fix the `each` issue:

    https://docs.zen-cart.com/user/upgra...ach-deprecated
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v154 Quick question regarding SSL and Mixed Content
    By chadlly2003 in forum General Questions
    Replies: 8
    Last Post: 31 Mar 2016, 06:45 AM
  2. Quick Question! regarding template
    By gamenet in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Sep 2010, 12:52 AM
  3. Quick Question regarding Sales Tax
    By yl715 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 28 Jul 2010, 09:31 PM
  4. SSL Certificates and Processing Using Third Party
    By RtX in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 29 Nov 2009, 02:02 PM
  5. Question on using Third Party CSS
    By wtashby in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 29 May 2006, 07:42 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