Results 1 to 10 of 1920

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,948
    Plugin Contributions
    96

    Default Re: Edit Orders v4.0 Support Thread

    This one, on the other hand, just cropped up recently on a client's site when he was editing an order with a restricted coupon:
    Code:
    PHP Fatal error:  Call to undefined function zen_product_in_category() in /home/mysite/public_html/admin/includes/functions/extra_functions/edit_orders_functions.php on line 326
    The line number's most likely not going to match because I've kept this site up-to-date with the EO bug-fixes as they're reported. To correct the issue, I edited /admin/includes/functions/extra_functions/edit_orders_functions.php, conditionally adding the function defined in the store-front's /includes/functions/functions_categories.php as highlighted below:
    Code:
    //-bof-20160128-lat9-Forum bugfix
    if (!function_exists ('zen_product_in_category')) {
      function zen_product_in_category($product_id, $cat_id) {
        global $db;
        $in_cat=false;
        $category_query_raw = "select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . "
                               where products_id = '" . (int)$product_id . "'";
    
        $category = $db->Execute($category_query_raw);
    
        while (!$category->EOF) {
          if ($category->fields['categories_id'] == $cat_id) $in_cat = true;
          if (!$in_cat) {
            $parent_categories_query = "select parent_id from " . TABLE_CATEGORIES . "
                                        where categories_id = '" . $category->fields['categories_id'] . "'";
    
            $parent_categories = $db->Execute($parent_categories_query);
    //echo 'cat='.$category->fields['categories_id'].'#'. $cat_id;
    
            while (!$parent_categories->EOF) {
              if (($parent_categories->fields['parent_id'] !=0) ) {
                if (!$in_cat) $in_cat = zen_product_in_parent_category($product_id, $cat_id, $parent_categories->fields['parent_id']);
              }
              $parent_categories->MoveNext();
            }
          }
          $category->MoveNext();
        }
        return $in_cat;
      }
    }
    //-eof-20160128-lat9
    
    // Start Edit Orders configuration functions
    function eo_debug_action_level_list($level) {
    	global $template;

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    This one, on the other hand, just cropped up recently on a client's site when he was editing an order with a restricted coupon ...
    Good Eye, should be applied along with the patches here. May also have to include zen_product_in_parent_category from "/includes/functions/functions_categories.php".
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,948
    Plugin Contributions
    96

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    Good Eye, should be applied along with the patches here. May also have to include zen_product_in_parent_category from "/includes/functions/functions_categories.php".
    Good eye back at you, lhungil. I totally missed that one.

  4. #4
    Join Date
    Jan 2010
    Location
    Richmond, Virginia, United States
    Posts
    123
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    I'm using the mod Big Chooser by That Software Guy and can't get it to work with this mod. When I upload the orders.php file that comes with this mod, I get the same warning everyone else does about the shipping address (because 99.9% of my products are virtual), so I would like to have that removed. But when I click update, I get a 500 server error. Checking my logs, this is the error I get:

    [29-Jan-2016 18:51:21 America/New_York] PHP Warning: array_key_exists() expects parameter 2 to be array, boolean given in /includes/functions/extra_functions/edit_orders_functions.php on line 1409

    [29-Jan-2016 18:51:21 America/New_York] PHP Warning: array_key_exists() expects parameter 2 to be array, boolean given in /includes/functions/extra_functions/edit_orders_functions.php on line 1409

    [29-Jan-2016 18:51:21 America/New_York] PHP Fatal error: Call to undefined function zen_get_products_manufacturers_id() in /includes/modules/order_total/ot_big_chooser.php on line 942

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 818
    Last Post: 9 Jul 2026, 10:12 AM
  2. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 29 Jul 2019, 07:05 PM
  3. Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 656
    Last Post: 18 Apr 2016, 06:28 PM
  4. v139h Super Orders v3.0 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1018
    Last Post: 28 Apr 2014, 11:38 PM
  5. RE: Super Orders v3.0 Support Thread
    By Johnnyd in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jun 2011, 09:28 AM

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