Page 84 of 149 FirstFirst ... 3474828384858694134 ... LastLast
Results 831 to 840 of 1482
  1. #831
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    1,401
    Plugin Contributions
    2

    Default Re: Edit Orders v4.0 Support Thread

    bug in the code. lines 1025-1028 in the function eo_remove_product_from_order. i have shown my correction (although there are other possibilities):

    PHP Code:
    // original code
                    
    $check $db->Execute(
                        
    'SELECT `p`.`products_quantity` FROM `' TABLE_PRODUCTS '` ' .
                         
    'WHERE `p`.`products_id` = \'' . (int)$query->fields['products_id'] . '\''
                    
    );

    // correction

                    
    $check $db->Execute(
                        
    'SELECT `p`.`products_quantity` FROM `' TABLE_PRODUCTS '` p ' .
                         
    'WHERE `p`.`products_id` = \'' . (int)$query->fields['products_id'] . '\''
                    
    ); 
    best.
    no good deed goes unpunished. help out with the green....

  2. #832
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,948
    Plugin Contributions
    71

    Default Re: Edit Orders v4.0 Support Thread

    Yes, that one's been around for a while now: https://www.zen-cart.com/showthread....66#post1235066

  3. #833
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,948
    Plugin Contributions
    71

    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;

  4. #834
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,811
    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 lhngl : Plugin / Module Tracker

  5. #835
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,948
    Plugin Contributions
    71

    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.

  6. #836
    Join Date
    Jan 2010
    Location
    Richmond, Virginia, United States
    Posts
    105
    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

  7. #837
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    1,401
    Plugin Contributions
    2

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    Yes, that one's been around for a while now: https://www.zen-cart.com/showthread....66#post1235066
    sorry. did not see it....

    on another note, i am hopeful that in future releases, the admin of ZC makes use of the customer facing functions and then starts extending/adding as opposed to re-creating and having the ame code in 2 places... although some times the functions are slightly different which in my mind only makes matters worse.

    best.
    no good deed goes unpunished. help out with the green....

  8. #838
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,948
    Plugin Contributions
    71

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by carlwhat View Post
    sorry. did not see it....

    on another note, i am hopeful that in future releases, the admin of ZC makes use of the customer facing functions and then starts extending/adding as opposed to re-creating and having the ame code in 2 places... although some times the functions are slightly different which in my mind only makes matters worse.

    best.
    <off-topic>
    Agreed on the combined use of functions on the admin/store-front! It's got to be a pain to the developers, too, since they need to maintain two versions of most of the functions.
    </off-topic>

  9. #839
    Join Date
    Jan 2004
    Posts
    65,286
    Blog Entries
    7
    Plugin Contributions
    227

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    <off-topic>
    Agreed on the combined use of functions on the admin/store-front!

    It's got to be a pain to the developers, too, since they need to maintain two versions of most of the functions.
    </off-topic>
    Yup. There's been some work in the upcoming v1.6.0 to consolidate some of the duplication. It's not perfect, but it's progressively improving over time.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #840
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,948
    Plugin Contributions
    71

    Default Re: Edit Orders v4.0 Support Thread

    Apologies if this has been previously reported, but if Edit Orders is used to add a multi-line comment, the comments are "over-prepared" as described in this (https://www.zen-cart.com/showthread....94#post1303394) posting, i.e. the comments display as
    Code:
    line 1\r\nline2\r\n
    instead of
    Code:
    line 1
    line 2
    That posting also contains the corrective action.

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread (for ZC v1.5.x)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 713
    Last Post: 14 Sep 2019, 10:37 AM
  2. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    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

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