Page 52 of 179 FirstFirst ... 242505152535462102152 ... LastLast
Results 511 to 520 of 1787
  1. #511
    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 burtonte View Post
    ... I'm not a web site developer or hard core programmer ... I just upgraded to v4 with zen cart 1.5.1. When I did I was very careful to merge the core files ... When (I) try to add an order from admin -- blank screen. ...
    A "blank screen" in Zen Cart means a problem occurred. There WILL in most cases be a log of the issue. The starting point for diagnosing any problem is to locate any log file (Zen Cart debug log). The contents of the log files will usually tell you where (and why) a problem occurred and allow for troubleshooting. This log would be useful to the volunteers here at the Zen Cart forums (to help us help you).

    Zen Cart does not natively (out of box) support creating a new order from the administrative interface. What "modification" are you using to "create" a new order using the Zen Cart admin? Name + Version + Link would be useful. If errors are occurring there is a good possibility something is not quite right with either the 3rd party module or the installation of the 3rd party module.

    In a "stock" Zen Cart 1.5.1 installation, there is no code around line 81 of "/includes/classes/order_total.php" which looks like what you are describing. I am going to guess you (or someone else) made modifications to the file (introducing an issue)...

    Edit Orders 4.1+ requires "/includes/classes/order_total.php" to properly load under both the catalog (store front) and admin interface. If order total modules or other processing are "excluded" via a check like the one you are describing other errors and miscalculations may occur. I would not recommend disabling portions of this critical module loader (as it appears your line of code may)...

    NOTE 1: I would strongly suggest rechecking your upgrade to Zen Cart 1.5 and make sure all the core files were updated / merged correctly. Typically when upgrading Zen Cart one starts with clean files from the new version of Zen Cart, determines what alterations (if any) have been made to the old files, and only (if needed) applies the "changes". Doing a full merge can cause issues...

    NOTE 2: Edit Orders 4.1+ includes a "slightly" modified version of "/includes/classes/order_total.php" designed to allow the "stock" (and most other) order total modules to load from the administrative side of Zen Cart. The one supplied with Edit Orders 4.1+ can directly replace the stock Zen Cart 1.5 version of the file.
    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

  2. #512
    Join Date
    Apr 2014
    Location
    texas
    Posts
    3
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    I will try to supply as much info as I can. I am sunning zen cart 1.5.1 and I originally installed edit orders version 2.x.x. I have many many addons installed on top of the out-of-the box zen cart plus some of my own. I realize that this doesn't help but I seem to remember during the original install of zen cart and edit orders this problem arouse. I searched and searched then and found other people with the same problem when installing edit orders but no fixes. The log files complained about GetRewardPoints() as an undefined function. I assumed this was because it's not an admin function. I tried setting up the scope so admin could see this function but again I don't fully understand how php/zen cart handles scope. My assumption again was that reward points might not be calculated during an admin order entry. This was not a problem with me because I was going to use that as an excuse to drive customers to use my web site instead of phone orders but all seems to work for now. It's a new release so...we will see I'm sure

  3. #513
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Edit Orders v4.0 Support Thread

    right... but keep in mind that no one can help you on the support forums with guesses. you really are going to have to post your error log messages.. it really helps the community to help you
    Quote Originally Posted by burtonte View Post
    I will try to supply as much info as I can. I am sunning zen cart 1.5.1 and I originally installed edit orders version 2.x.x. I have many many addons installed on top of the out-of-the box zen cart plus some of my own. I realize that this doesn't help but I seem to remember during the original install of zen cart and edit orders this problem arouse. I searched and searched then and found other people with the same problem when installing edit orders but no fixes. The log files complained about GetRewardPoints() as an undefined function. I assumed this was because it's not an admin function. I tried setting up the scope so admin could see this function but again I don't fully understand how php/zen cart handles scope. My assumption again was that reward points might not be calculated during an admin order entry. This was not a problem with me because I was going to use that as an excuse to drive customers to use my web site instead of phone orders but all seems to work for now. It's a new release so...we will see I'm sure
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #514
    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 burtonte View Post
    ... I am sunning zen cart 1.5.1 and I originally installed edit orders version 2.x.x. I have many many addons installed on top of the out-of-the box zen cart plus some of my own. ...
    Edit Orders 2.x and 4.1.x run completely different code. So what applied to a past version does not necessarily apply to the current version.

    Edit Orders 2.x is not (to my knowledge) compatible with Zen Cart 1.5.x. Based on your statement of installing Edit Orders 2.x, it sounds like your store may have been upgraded "in-place" multiple times over the years. Over time this can result in lots of clutter, outdated files, and other issues. If this is the case with your site, it could be a contributing factor...

    It may be in your best interest to start over with a clean install of the current version of Zen Cart 1.5.x (if the above is true). Once installed, start with a new template (designed for 1.5.x). Upgrade a "copy" of your old database and test. Only install Zen Cart plugins / modifications designed for 1.5.x (and required by your business needs). When done testing (and ensuring all required functionality works), deploy to the new site.

    NOTE 1: I will not be responding further on this subject until answers to all of the questions listed in the "Posting Tips" have been supplied, answers to the questions asked in this thread have been supplied, and the response shows appropriate research (including reading the README, searching the forums, and applying known patches) has been completed.

    NOTE 2: The appropriate place to change how individual order total modules operate is inside the order total modules themselves. Changes should not applied by editing the core loader / processing class "order_total.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

  5. #515
    Join Date
    Apr 2014
    Location
    texas
    Posts
    3
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Ok sorry for the missing information. I have included the differences between the vanilla zencart 1.5.1 install and the edit_orders 4.1.4 install. The responses I received caused me to go back and research what I think to be the real issue. Thanks again for your responses...

    includes/classes/order_total.php

    function order_total() {
    global $messageStack;
    if (defined('MODULE_ORDER_TOTAL_INSTALLED') && zen_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {
    $module_list = explode(';', MODULE_ORDER_TOTAL_INSTALLED);

    reset($module_list);
    while (list(, $value) = each($module_list)) {
    // Fixes for when called from ADMIN
    $lang_file = null;

    // edit_orders v4.1.4 has this here.. causes blank screen when add new order from admin
    // $module_file = DIR_WS_MODULES . 'order_total/' . $value;

    if(IS_ADMIN_FLAG === true) {
    $lang_file = zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/', $value, 'false');
    $module_file = DIR_FS_CATALOG . $module_file;
    }
    else {
    $lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/order_total/', $value, 'false');
    }
    if (@file_exists($lang_file)) {
    include_once($lang_file);
    } else {
    if (IS_ADMIN_FLAG === false && is_object($messageStack)) {
    $messageStack->add('header', WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
    } else {
    $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
    }
    }
    // Moved to original position from zen cart 1.5.1 install to make add new order work in admin
    $module_file = DIR_WS_MODULES . 'order_total/' . $value;

    if (@file_exists($module_file)) {
    include_once($module_file);
    $class = substr($value, 0, strrpos($value, '.'));
    $GLOBALS[$class] = new $class;
    $this->modules[] = $value;
    }
    }
    }
    }

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

    Default Re: Edit Orders v4.0 Support Thread

    For anyone else reading this thread. Please disregard changes posted by burtonte.

    In a properly configured store, moving that line will usually result in order total modules not loading from the admin interface. This includes "subtotal", "total", "tax", etc.

    If order total modules are not loaded Edit Orders 4.1+ will not function correctly.

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

    Default Re: Edit Orders v4.0 Support Thread

    Does anyone have a copy of the plugin's v4.0.2 zip-file? I'm trying to "get a feeling" for the complexity of an upgrade to the most recent version.

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

    Default Re: Edit Orders v4.0 Support Thread

    FWIW, EO 4.1.4 installed without a hitch over the v4.0.2 "mystery version"!

    I did, however, run into an issue that I'm not sure how to resolve:

    SCENARIO: I've got an order total (a deduction) where the amount of the deduction is, essentially, dependent on the value of the cart/order. It uses the order-class structure to determine the overall order value and, if the order's total is less than some configurable value, then discount is not applied.

    EO and my OT recalculate the deduction properly so long as the deduction doesn't change from a non-zero to a zero value! That's because, when the deduction is 0, the order-total class doesn't return that OT value as part of its modules. The order's subtotal, tax and total values are correct, it's just that the now-zero deduction doesn't get removed from the order's totals.

    Any guidance would be much appreciated.

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

    Default Re: Edit Orders v4.0 Support Thread

    FWIW, here's how I corrected my issue (/YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php):
    Code:
    function eo_update_database_order_totals($oID) {
    	global $db, $order;
    
    	// Load required modules for order totals if enabled
    	if(defined('MODULE_ORDER_TOTAL_INSTALLED') && zen_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {
    
    		// Load order totals.
    		require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'order_total.php');
    		$GLOBALS['order_total_modules'] = new order_total();
    
    		// Load the shopping cart class into the session
    		eo_shopping_cart();
    
    		// This fixes an issue caused by ot_shipping assuming shipping tax amount
    		// has not already been added to the shipping cost and order tax.
    		if(array_key_exists('shipping_tax', $order->info)) {
    			$order->info['tax'] -= $order->info['shipping_tax'];
    			if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] -= $order->info['shipping_tax'];
    		}
    
    		// Reset the final total (include tax if not already tax-inc)
    		// This code causes the order totals to be correctly calculated.
    		if (DISPLAY_PRICE_WITH_TAX == 'true') {
    			$order->info['total'] = $order->info['subtotal'] + $order->info['shipping_cost'];
    		} else {
    			$order->info['total'] = $order->info['subtotal'] + $order->info['tax'] + $order->info['shipping_cost'];
    		}
    
    		// Process the order totals
    		$order_totals = $GLOBALS['order_total_modules']->process();
    
    		// Update the order totals in the database
    		for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
    			eo_update_database_order_total($oID, $order_totals[$i]);
    		}
    //-BOF-lat9-account for order total modules that have been removed
        if (count ($order->totals) > $n) {
          for ($i=0, $totals_titles = array (); $i<$n; $i++) {
            $totals_titles[] = $order_totals[$i]['title'];
          }
          for ($i=0, $n=count($order->totals); $i<$n; $i++) {
            if (!in_array ($order->totals[$i]['title'], $totals_titles)) {
              $db->Execute ("DELETE FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = $oID AND title = '" . zen_db_input ($order->totals[$i]['title']) . "' LIMIT 1");
            }
          }
          unset ($totals_titles);
        }
    //-EOF-lat9
    		unset($order_totals);
    	}
    }

  10. #520
    Join Date
    Aug 2009
    Location
    Greeneville, TN USA
    Posts
    51
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Hello,

    I'm running a fresh install of ZenCart v1.5.1 and Edit Orders 4.1.4.

    I've searched the threads and installation document and don't see the answer to this.

    Is this compatible with "Fast and Easy Checkout". Are there any issues I need to consider before installing it?

    Thanks

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 797
    Last Post: 23 Mar 2024, 06:51 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

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