Results 1 to 10 of 1919

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by Angry Bill View Post
    If the order grand total was an editable box, just like all the rest of the boxes, the problem would be solved. I don't have to edit the totals often (less than 10%) and I certainly can be trusted to so math !! Thanks, Bill.
    Quote Originally Posted by Angry Bill View Post
    Used the fix zero subtotal copy/paste. THANKS !!. I have Ceon Manual CC installed with a surcharge. The edit order doesn't include the CC surcharge after an edit. I may be able to fix but suggestions welcome. I can take screen shot of the results I'm getting.
    Quote Originally Posted by lhungil View Post
    This field is calculated by Zen Cart in the same manner as during checkout. This field is not editable because it is always recalculated (any changes to the subtotal / total one might want to make would be erased). Also if one just edited the total the surcharge would not show up on a customer's invoice or history.

    Background
    Edit Orders DOES let you add / remove / edit order total modules (which add the order total lines to the database). It does this by first loading the order information from the database into the same locations used by the Zen Cart checkout process. Then "Edit Orders" loads each corresponding order total modules (based upon sort order) and calls the "process" method (same as the checkout process). It is up to the order total module to return the correct value based upon the order information.

    The "CEON Payment Surcharges/Discounts" module makes the assumption it will only be loaded from the catalog side of Zen Cart. It does not take into consideration one might wish to load the order total module from the admin side of Zen Cart and make modifications. This is an issue with the "CEON Payment Surcharges/Discounts" module.

    How to Fix
    One would need to remove the assumption made by the "CEON Payment Surcharges/Discounts" module.

    A brief look through the "process()" code indicates this specific order total module expects the "payment" module to load surcharge information and call "setTablesOfRatesAndLongDescriptions()". If this has not been done the process method does nothing (never sets the order total line output).

    One could add a block of code to the "process" method (If in the admin side of Zen Cart and existing order data is present in the database, set the order total line output to be the surcharge data stored in the database). There are some other ways as well, but this is one of the simplest solutions providing a long term fix (as a bonus it would allow one to edit the surcharge).
    If I may add this.. Translated another way..
    1. If Angry Bill wants Edit Orders to display the CC surcharge from the Ceon Manual CC module, he will need to modify the Ceon Manual CC module so that the surcharge can be picked up and edited by Edit Orders.
    2. Modifying the grand total is not a feature that will be added to Edit Orders, but if Angry Bill wants this feature he can certainly make these changes to his store.. (it's not a recommended change which is why it will not be included in the Edit Orders module)
    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.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: Edit Orders v4.0 Support Thread

    Does anyone have a merged version of /YOUR_ADMIN/orders.php that includes the changes for Edit Orders 4.1 and Ty Package Tracker 3.13?

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

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    Does anyone have a merged version of /YOUR_ADMIN/orders.php that includes the changes for Edit Orders 4.1 and Ty Package Tracker 3.13?
    Never mind on the merge; I finally got that sorted out.

    Running Edit Orders 4.1 w/ Ty Package Tracker on Zen Cart v1.5.1, PHP v5.4.8.

    Whenever I click on the Edit button in the Customers->Orders display, I receive the following debug log:
    Code:
    [06-Jul-2013 14:32:15 Europe/Berlin] PHP Warning:  Illegal string offset 'id' in C:\xampp\htdocs\zc_151\includes\modules\shipping\freeshipper.php on line 32
    
    [06-Jul-2013 14:32:15 Europe/Berlin] PHP Warning:  Illegal string offset 'iso_code_2' in C:\xampp\htdocs\zc_151\includes\modules\shipping\usps.php on line 1248
    
    [06-Jul-2013 14:32:15 Europe/Berlin] PHP Warning:  Illegal string offset 'iso_code_2' in C:\xampp\htdocs\zc_151\includes\modules\shipping\usps.php on line 1262
    
    [06-Jul-2013 14:32:15 Europe/Berlin] PHP Warning:  Illegal string offset 'id' in C:\xampp\htdocs\zc_151\includes\modules\shipping\freeshipper.php on line 32
    
    [06-Jul-2013 14:32:15 Europe/Berlin] PHP Warning:  Illegal string offset 'iso_code_2' in C:\xampp\htdocs\zc_151\includes\modules\shipping\usps.php on line 1248
    
    [06-Jul-2013 14:32:15 Europe/Berlin] PHP Warning:  Illegal string offset 'iso_code_2' in C:\xampp\htdocs\zc_151\includes\modules\shipping\usps.php on line 1262
    The two shipping modules that I've got enabled are (you guessed it), Free Shipping and USPS. The issue is that when the shipping modules are loaded under edit_orders, the global variable $order->delivery['country'] is a string containing the country's name. When the shipping modules are loaded from the store-front, $order->delivery['country'] is an array:
    Code:
    country (array)
        id (string) => 223
        title (string) => United States
        iso_code_2 (string) => US
        iso_code_3 (string) => USA
    I'm not sure if the following is the 'best' way to correct the problem ... but it works! Changes made to \YOUR_ADMIN\includes\functions\extra_functions\edit_orders_functions.php:
    Code:
    function eo_get_available_shipping_modules() {
    	$retval = array();
    	if(defined('MODULE_SHIPPING_INSTALLED') && zen_not_null(MODULE_SHIPPING_INSTALLED)) {
      
    //-bof-a-lat9-illegal-string-offset
        global $order, $db;
        if (!isset($order)) {
          error_log('/includes/functions/extra_functions/edit_orders_functions.php (eo_get_available_shipping_modules()): global $order not set');
          die();
          
        }
        $country_info = $db->Execute('SELECT countries_id as id, countries_name as name, countries_iso_code_2 as iso_code_2, countries_iso_code_3 as iso_code_3 FROM ' . TABLE_COUNTRIES . " WHERE countries_name = '" . $order->delivery['country'] . "'");
        $order->delivery['country'] = $country_info->fields;
        unset($country_info);
    //-eof-a-lat9-illegal-string-offset
    
    		if(!isset($_SESSION['cart'])) {
    			require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'shopping_cart.php');
    			$_SESSION['cart'] = new shoppingCart();
    		}
    
    		// Load the shipping class into the globals
    		require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'shipping.php');
    		$shipping_modules = new shipping();
    
    		for($i=0, $n=count($shipping_modules->modules); $i<$n; $i++) {
    			$class = substr($shipping_modules->modules[$i], 0, strrpos($shipping_modules->modules[$i], '.'));
    			if(isset($GLOBALS[$class])) {
    				$retval[] = array(
    					'id' => $GLOBALS[$class]->code,
    					'text' => $GLOBALS[$class]->title
    				);
    			}
    		}
    		unset($shipping_modules, $class, $i, $n);
        
    //-bof-a-lat9-illegal-string-offset
        $order->delivery['country'] = $order->delivery['country']['name'];
    //-eof-a-lat9-illegal-string-offset
    
    	}
    
    	return $retval;
    }
    Code:
    function eo_get_order_by_id($oID) {
    	global $db, $order;
    
    	// Retrieve the order
    	$order = new order($oID);
    
    	// Add some required customer information for tax calculation
    	// The next method has been modified to add required info to the
    	// session and global variables.
    	zen_get_tax_locations();
    
    	// Cleanup tax_groups in the order (broken code in order.php)
    	// Shipping module will automatically add tax if needed.
    	$order->info['tax_groups'] = array();
    	foreach($order->products as $product) {
    		eo_get_product_taxes($product);
    	}
    
    	// Correctly add the running subtotal (broken code in order.php)
    	if(!array_key_exists('subtotal', $order->info)) {
    		$query = $db->Execute(
    			'SELECT value FROM `' . TABLE_ORDERS_TOTAL . '` ' .
    			'WHERE `orders_id` = \'' . (int)$oID . '\' ' .
    			'AND `class` = \'ot_subtotal\''
    		);
    		if(!$query->EOF) {
    			$order->info['subtotal'] = $query->fields['value'];
    		}
    	}
    
    	// Handle shipping costs (module will automatically handle tax)
    	if(!array_key_exists('shipping_cost', $order->info)) {
    		$query = $db->Execute(
    			'SELECT value FROM `' . TABLE_ORDERS_TOTAL . '` ' .
    			'WHERE `orders_id` = \'' . (int)$oID . '\' ' .
    			'AND `class` = \'ot_shipping\''
    		);
    		if(!$query->EOF) {
    			$order->info['shipping_cost'] = $query->fields['value'];
    
    			$_SESSION['shipping'] = array(
    				'title' => $order->info['shipping_method'],
    				'id' => $order->info['shipping_module_code'] . '_',
    				'cost' => $order->info['shipping_cost']
    			);
    
    			if(!isset($_SESSION['cart'])) {
    				require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'shopping_cart.php');
    				$_SESSION['cart'] = new shoppingCart();
    			}
          
    //-bof-a-lat9-illegal-string-offset
          $country_info = $db->Execute('SELECT countries_id as id, countries_name as name, countries_iso_code_2 as iso_code_2, countries_iso_code_3 as iso_code_3 FROM ' . TABLE_COUNTRIES . " WHERE countries_name = '" . $order->delivery['country'] . "'");
          $order->delivery['country'] = $country_info->fields;
    //-eof-a-lat9-illegal-string-offset
    
    			// Load the shipping class into the globals
    			require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'shipping.php');
    			$shipping_modules = new shipping($_SESSION['shipping']);
    
    //-bof-a-lat9-illegal-string-offset      
          $order->delivery['country'] = $order->delivery['country']['name'];
    //-eof-a-lat9-illegal-string-offset
    		}
    	}
    
    	return $order;
    }

  4. #4
    Join Date
    Feb 2013
    Posts
    41
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    I have this error in admin



    Filesystem Error: Unable to delete '/var/www/vhosts/myserver.co.uk/joblotdeals/zen_admin/includes/functions/extra_functions/common_orders_functions.php'. Verify your web server has access to delete this file. Installation will not continue until the web server is granted access to remove the file.
    Filesystem Error: Unable to delete '/var/www/vhosts/myserver.co.uk/joblotdeals/zen_admin/includes/extra_datafiles/edit_orders_defines.php'. Verify your web server has access to delete this file. Installation will not continue until the web server is granted access to remove the file.
    Edit Orders installation / upgrade failed!

    How can I fix this please?

  5. #5
    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 Quality Refurbished View Post
    Filesystem Error: Unable to delete '/var/www/vhosts/myserver.co.uk/joblotdeals/zen_admin/includes/functions/extra_functions/common_orders_functions.php'. Verify your web server has access to delete this file. Installation will not continue until the web server is granted access to remove the file.

    Filesystem Error: Unable to delete '/var/www/vhosts/myserver.co.uk/joblotdeals/zen_admin/includes/extra_datafiles/edit_orders_defines.php'. Verify your web server has access to delete this file. Installation will not continue until the web server is granted access to remove the file.
    This message appears when permissions are not configured to allow the web server to delete those files. Give the web server access to delete those two files (via FTP, CPanel, etc). Afterwards run the installer again.
    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

  6. #6
    Join Date
    Mar 2013
    Location
    South Carolina, United States
    Posts
    23
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Ok, I have somehow successfully broken everything. So, I originally had a problem with a shipping address. I went into an order and edited it, and then got the problem of the subtotals not updating correctly. So, I decided to try to update to 4.1.1 to have the problem fixed. But, I still had the subtotal problem and then I messed something up and have tried to revert back and then re-do and now I am just stuck. I made the stupid mistake of not backing up before beginning this process. I am willing to let the order just be messed up due to the frustration it has caused me. BUT, now when I try to edit an order, I get a Page Not Found Error on - admin/FILENAME_ORDER_EDIT.php?origin=index&page=1&oID=XXXX&action=edit So, I believe I am missing a page on my Edit Order install, any suggestions? I also notice when trying to print a packaging slip it is showing the same image for 2 products, which makes me think it is messed up on them.

    So, I have Edit Orders 4.1.1, Super Orders 4.0.5 and Ty Tracker 3.1.3 - Zen Cart 1.5.1 and I would love any suggestions please?

  7. #7
    Join Date
    Feb 2013
    Posts
    41
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Thank you for your reply and help

  8. #8
    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 RyanEOD View Post
    ...But, I still had the subtotal problem and then I messed something up and have tried to revert back and then re-do and now I am just stuck. ...
    Re-install Edit Order's 4.1.1 (all steps to make sure your files are up to date) and make note of any messages. If you replaced "orders.php" with the one from "Super Orders" or any other module after the installation of "Edit Orders", the changes made during installation of "Edit Orders" will no longer be present in "orders.php". If you re-install "Edit Orders" the installer should automatically make the needed changes to "orders.php".

    The "Edit Orders" installer changes all instances of FILENAME_ORDER_EDIT to FILENAME_EDIT_ORDERS if a version of "Super Order" <= "4.0.5" is installed.

    Quote Originally Posted by RyanEOD View Post
    ...I am willing to let the order just be messed up due to the frustration it has caused me. ...
    Once "Edit Orders" 4.1.1 is re-installed (and working), you have two options to fix the "messed up" order's subtotal:
    1. Write down a list of products (including attributes and price) from the order. Remove all products from the order using "Edit Orders". Use phpMyAdmin or similiar to manually correct the "text" and "value" for subtotal and total (if nothing is in the order these should be "$0.00" and "0.0000" in the orders and orders_total database tables (for the specific order_id). This should fix the order to have correct subtotal and total data. You can then go back to "Edit Orders" and re-add the products.
    2. Simply create a new order for the customer (see the "Admin New Order" plugin or "Encrypted Master Password" plugin). You can then use "Edit Orders" to re-create the order information in the "messed up" order. When done, you can delete the "messed up" order (so it does not show in invoices or the customer history).
    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

  9. #9
    Join Date
    Nov 2014
    Location
    us
    Posts
    4
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    This message appears when permissions are not configured to allow the web server to delete those files. Give the web server access to delete those two files (via FTP, CPanel, etc). Afterwards run the installer again.
    Hi, may i know how to give the web server access to delete those files..
    i really have no idea. sorry.
    Please help me, thanks.

  10. #10
    Join Date
    Nov 2014
    Location
    us
    Posts
    4
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    ok. i manually delete those files which need to be deleted, cause even i set the 777 permission to these files, they still can not be deleted by the web browser. Also for those files need to be written, i set the permission to 777, and then it seems Edit Orders works well.

    Not sure if there will be any problem in the future, if any one knows, please let me know. thank you.

 

 

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