Edit Orders for Zen Cart®

Version 4.3.4. Copyright © 2015-2018, Vinos de Frutas Tropicales.

Current Support Thread on the Zen Cart forums: https://www.zen-cart.com/showthread.php?200407

Usage Notes:

  1. A working copy of Zen Cart (v1.5.5a or later) is required by Edit Orders.
  2. Some order-total modules are incompatibile with EO, especially if they require storefront conditions to perform their processing.
  3. Products added to an order via EO cannot include a "file-upload" option as that option-type is not currently supported.

Edit Orders (EO) is a Zen Cart admin module that allows administrative users to edit a customer's order to:

  • Change the customer, billing or shipping information
  • Add, delete, and edit products in an order
  • Update product quantities and pricing
  • Modify product attributes
  • Add, delete, and edit order totals

This section identifies the processes you'll use to initially install Edit Orders, upgrade or uninstall EO entirely.

Note: Before you install EO v4.2.0, you'll need a working copy of Zen Cart 1.5.5a or later.

There are core-file overwrites required by this plugin; you should always backup your cart's database and files prior to making any changes. Unzip the plugin's package file and then:

  1. Rename the YOUR_ADMIN folder to match your custom admin folder's name.
  2. Merge any pre-existing core-file changes with the changes required by Edit Orders:
    1. /includes/classes/order.php (2 marked change-sections)
    2. /YOUR_ADMIN/orders.php (3 marked change-sections)
  3. Sign into your Zen Cart's admin panel.
  4. Copy the plugin's files to your store's folder structure:
    1. /includes/auto_loaders/config.vinos_common.php
    2. /includes/classes/order.php
    3. /includes/classes/VinosAutoload.php (Added in v4.2.0)
    4. /includes/classes/vinos/common/NotiferCheck.php (Added in v4.2.0)
    5. /includes/init_includes/init_vinos_autoload.php (Added in v4.2.0)
    6. /includes/languages/english/modules/order_total/ot_onetime_discount.php
    7. /includes/languages/english/modules/order_total/ot_misc_cost.php
    8. /includes/modules/order_total/ot_onetime_discount.php
    9. /includes/modules/order_total/ot_misc_cost.php
    10. /YOUR_ADMIN/edit_orders.php
    11. /YOUR_ADMIN/orders.php (Zen Cart 1.5.5d version, with additional notifiers)
    12. /YOUR_ADMIN/images/icon_billing.png
    13. /YOUR_ADMIN/images/icon_comment_add.png
    14. /YOUR_ADMIN/images/icon_customers.png
    15. /YOUR_ADMIN/images/icon_details.gif
    16. /YOUR_ADMIN/images/icon_shipping.png
    17. /YOUR_ADMIN/images/icon_track_add.png
    18. /YOUR_ADMIN/includes/edit_orders.css
    19. /YOUR_ADMIN/includes/auto_loaders/config.eo.php
    20. /YOUR_ADMIN/includes/auto_loaders/config.vinos_common_admin.php (Added in v4.2.0)
    21. /YOUR_ADMIN/includes/classes/attributes.php
    22. /YOUR_ADMIN/includes/classes/editOrders.php
    23. /YOUR_ADMIN/includes/classes/EditOrdersQueryCache.php
    24. /YOUR_ADMIN/includes/classes/mock_cart.php
    25. /YOUR_ADMIN/includes/classes/EditOrdersAdminObserver.php (Added in v4.2.0)
    26. /YOUR_ADMIN/includes/extra_configures/edit_orders.php (Non-processing module, can be safely removed)
    27. /YOUR_ADMIN/includes/extra_datafiles/edit_orders_defines.php
    28. /YOUR_ADMIN/includes/extra_datafiles/eo_sanitization.php
    29. /YOUR_ADMIN/includes/functions/extra_functions/common_orders_functions.php (Non-processing module, can be safely removed)
    30. /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
    31. /YOUR_ADMIN/includesinit_includes/init_eo_config.php
    32. /YOUR_ADMIN/includes/languages/english/edit_orders.php
    33. /YOUR_ADMIN/includes/languages/english/extra_definitions/edit_orders.php
    34. /YOUR_ADMIN/includes/languages/english/images/buttons/button_add_product.gif
  5. Click the "Admin Home" link in your Zen Cart's top admin menu. This action will cause the plugin's installation script to run.

First, delete the files that were copied to your Zen Cart's file-system, then copy the contents of the plugin's /docs/edit_orders/uninstall/uninstall_eo.sql to your clipboard and paste into your admin's Tools->Install SQL Patches to complete the uninstall process.

The installation for Edit Orders changed drastically for v4.2.0 and later. Following is a "secret decoder ring" to let you where files from those earlier releases have been moved (or removed) in the v4.2.0 or later distributions of EO:

EO v4.1.7 or earlier EO v4.2.0 or later
/1_modified_core_files/includes/classes/order.php/includes/classes/order.php
/1_modified_core_files/includes/classes/order_total.php
/1_modified_core_files/includes/classes/shipping.php
/1_modified_core_files/your_admin_folder/orders.php/YOUR_ADMIN/orders.php
/1_modified_core_files/your_admin_folder/images/icon_edit.gif
/1_modified_core_files/your_admin_folder/includes/languages/english/orders.php
/2_new_files/your_admin_folder/edit_orders.php/YOUR_ADMIN/edit_orders.php
/2_new_files/your_admin_folder/images/icon_billing.png/YOUR_ADMIN/images/icon_billing.png
/2_new_files/your_admin_folder/images/icon_comment_add.png/YOUR_ADMIN/images/icon_comment_add.png
/2_new_files/your_admin_folder/images/icons/icon_customers.png/YOUR_ADMIN/images/icon_customers.png
/2_new_files/your_admin_folder/images/icon_details.gif/YOUR_ADMIN/images/icon_details.gif
/2_new_files/your_admin_folder/images/icon_invoice.gif
/2_new_files/your_admin_folder/images/icon_shipping.png/YOUR_ADMIN/images/icon_shipping.png
/2_new_files/your_admin_folder/images/icon_track_add.png/YOUR_ADMIN/images/icon_track_add.png
/2_new_files/your_admin_folder/includes/edit_orders.css/YOUR_ADMIN/includes/edit_orders.css
/2_new_files/your_admin_folder/includes/auto_loaders/config.eo.php/YOUR_ADMIN/includes/auto_loaders/config.eo.php
/2_new_files/your_admin_folder/includes/auto_loaders/config.zc154_compatibility.php
/2_new_files/your_admin_folder/includes/classes/attributes.php/YOUR_ADMIN/includes/classes/attributes.php
/2_new_files/your_admin_folder/includes/classes/editOrders.php/YOUR_ADMIN/includes/classes/editOrders.php
/2_new_files/your_admin_folder/includes/classes/EditOrdersQueryCache.php/YOUR_ADMIN/includes/classes/EditOrdersQueryCache.php
/2_new_files/your_admin_folder/includes/classes/eo_plugin.php
/2_new_files/your_admin_folder/includes/classes/mock_cart.php/YOUR_ADMIN/includes/classes/mock_cart.php
/2_new_files/your_admin_folder/includes/classes/plugin.php
/2_new_files/your_admin_folder/includes/extra_configures/edit_orders.php/YOUR_ADMIN/includes/extra_configures/edit_orders.php (Placeholder, can be removed)
/2_new_files/your_admin_folder/includes/extra_datafiles/edit_orders_defines.php (Placeholder, can be removed)/YOUR_ADMIN/includes/extra_datafiles/edit_orders_defines.php
/2_new_files/your_admin_folder/includes/extra_datafiles/eo_sanitization.php/YOUR_ADMIN/includes/extra_datafiles/eo_sanitization.php
/2_new_files/your_admin_folder/includes/functions/extra_functions/common_orders_functions.php (Placeholder, can be removed)/YOUR_ADMIN/includes/functions/extra_functions/common_orders_functions.php (Placeholder, can be removed)
/2_new_files/your_admin_folder/includes/functions/extra_functions/edit_orders_functions.php/YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
/2_new_files/your_admin_folder/includes/init_includes/init_eo_config.php/YOUR_ADMIN/includes/init_includes/init_eo_config.php
/2_new_files/your_admin_folder/includes/init_includes/init_zc154_compatibility.php
/2_new_files/your_admin_folder/includes/languages/english/edit_orders.php/YOUR_ADMIN/includes/languages/english/edit_orders.php
/2_new_files/your_admin_folder/includes/languages/english/extra_definitions/edit_orders.php/YOUR_ADMIN/includes/languages/english/extra_definitions/edit_orders.php
/2_new_files/your_admin_folder/includes/languages/english/images/buttons/button_add_product.gif/YOUR_ADMIN/includes/languages/english/images/buttons/button_add_product.gif
/2_new_files/your_admin_folder/includes/languages/english/modules/plugin/eo.php
/2_new_files/your_admin_folder/includes/languages/english/modules/plugin/plugin.php
/3_install/your_admin_folder/includes/auto_loaders/config.eo_onetime.php
/3_install/your_admin_folder/includes/init_includes/init_eo_install.php
/4_optional_items/1_onetime_discount/1_new_files/includes/languages/english/modules/order_total/ot_onetime_discount.php/includes/languages/english/modules/order_total/ot_onetime_discount.php
/4_optional_items/1_onetime_discount/1_new_files/includes/modules/order_total/ot_onetime_discount.php/includes/modules/order_total/ot_onetime_discount.php
/4_optional_items/1_onetime_discount/1_new_files/includes/languages/english/modules/order_total/ot_misc_cost.php/includes/languages/english/modules/order_total/ot_misc_cost.php
/4_optional_items/1_onetime_discount/1_new_files/includes/modules/order_total/ot_misc_cost.php/includes/modules/order_total/ot_misc_cost.php

Part of the simplification of the EO installation process is to lessen the core-file changes required. Zen Cart 1.5.5a has been updated to include additional notifiers within the admin's Customers->Orders processing and Zen Cart 1.5.6 (and later) expands on that update. EO now makes use of those notifications to add its buttons and icons to that tool.

The possibility does exist, however, that these required notifiers didn't get included when a store's Zen Cart installation was upgraded from a prior version. The following table lists the notifiers that allow EO to perform its processing.

Module Name Notifier "Key" Comments
/YOUR_ADMIN/orders.php NOTIFY_ADMIN_ORDERS_MENU_BUTTONS Built-in, issued during the orders-listing display, after creating the upper button-group for the selected order in the sidebar.
/YOUR_ADMIN/orders.php NOTIFY_ADMIN_ORDERS_MENU_BUTTONS_END Built-in, issued during the orders-listing display, after creating the lower button-group for the selected order in the sidebar.
/YOUR_ADMIN/orders.php NOTIFY_ADMIN_ORDERS_SHOW_ORDER_DIFFERENCE Added, issued during the orders-listing display, enabling additional icons to be associated with each order's line-item when creating the bottom button-group. This notifier is based on the like-named one in the Zen Cart 1.5.6+ repository.
/YOUR_ADMIN/orders.php NOTIFY_ADMIN_ORDERS_EDIT_BUTTONS Added, issued during an order's detailed view when creating the bottom button-group. This notifier is based on the like-named one in the Zen Cart 1.5.6+ repository.

Edit Orders is easy to use; the interface looks similar to the Customers->Orders processing that is built into Zen Cart. Once the plugin is installed, navigate to Customers->Orders and click the "edit" button to view the editable details of the order.

Starting with v4.3.0 of EO, a checkbox input ("Reset totals prior to update?") appears next to the upper update button. Its default value is controlled by Configuration->Edit Orders->Reset Totals on Update — Default. If an order includes order-total modules (like Group Pricing) that affect both the order's total and tax values, you might need to tick that box to have EO correctly calculate any updated order.

Note: We do not recommend clicking "edit" on completed orders. When you edit an order, all order-totals are recalculated including tax, sub-total and total. Editing a completed order may result in undesired changes!

Edit Order customer and address

Once you've opened an order for editing, you can edit the customer, billing and/or shipping addresses as needed:

  1. You must enter a valid country name (and state) registered in the store's Zen Cart database. Failure to do so may result in incorrect calculation of taxes and order totals, warnings in the Zen Cart debug logs or potentially more serious errors resulting in the display of a "blank page" or the inability to correctly load or edit the order.
  2. Edit the phone number associated with the order as needed.
  3. Edit the payment method as needed. If you edit the "CC number" associated with the order, EO will sanitize that value in the database, removing portions of the value for PCI compliance.
  4. To save the changes, click the "update" button.
Edit Order add product

To add a product to the order, start by clicking the "Add Products" button near the center of the page and

  1. Narrow down the list of products by either selecting a category from the list or entering a search term and pressing the "enter" key on your keyboard.
  2. Choose a product from the list.
  3. Choose any product options / attributes as needed.
  4. Select quantity and pricing options.
    1. Enter the desired quantity. This field will be subject to the product's min / max configured settings. Inventory numbers will be adjusted for the selected product in the database.
    2. Choose whether to use any configured store specials or sales price for the product or to only use the full product price.

Once you've made your selections, click the "Add now" button.

Edit Order update product

You can update (edit) each product's quantity, name, model, price, one-time charges, tax-rate and product options. When you're finished, click the "update" button to save your changes.

Edit Order change order totals

Price calculations for order-totals are processed by the order-total modules directly and not Edit Orders. This helps prevent math errors and ensure consistency. Not all 3rd party order-total modules were written with the capability to be loaded and run against an order from the Zen Cart admin interface.

Many of the common order-total modules are automatically calculated for the order based upon store settings and information present in the order. Automatically calculated order-totals such as ot_tax, ot_loworderfee, ot_subtotal and ot_total cannot be edited or removed from an order.

Add an Order-Total

To add an order-total to the active order's calculations:

  1. Select the order-total module to be added; if you select shipping, you need to also choose a specific shipping-module name.
  2. Enter the textual name that is displayed to the customer (and admins) when viewing the to-be-updated order — note that some order-total modules will automatically change this name!
  3. Add the desired order-total cost. Note that while Gift Certificates and Vouchers costs can be entered as either a positive or negative value, the value is displayed as a negative number after the order is updated.
  4. Click the "update" button to save the changes.

Remove an Order-Total

To remove an order-total from the active order's calculations:

  1. Clear the order-total "name" and cost fields.
  2. Click the "update" button to save the changes.

Update an Order-Total

To update an order-total for the active order's calculations:

  1. If you are editing the Shipping order-total (ot_shipping), you can change the shipping-module by selecting the desired module from the drop-down list.
  2. Update the order-total's name as displayed to the customer, noting that some order-total modules automatically update the name.
  3. Update the order-total's cost to reflect the desired amount.
  4. Click the "update" button to save the changes.

Note: Prices are displayed with or without tax based upon the storefront settings not the admin settings, in an attempt to emulate the environment in which the order-totals are calculated. Most of the order-total modules are designed to run from the storefront only. Refer to the Zen Cart configuration setting DISPLAY_PRICE_WITH_TAX.

To change an order's status and/or add a comment to the order, follow the procedure you use within the built-in Customers->Orders processing and click the "update" button to apply the changes to the order.

The following is a list of some commonly installed 3rd party Zen Cart modules (plugins) known to be compatible with Edit Orders. The list is mainly confined to 3rd party plugins which also affect customer orders or placing customer orders. Please refer to the appropriate module for further notes and instructions (if any).

Order-total modules are used to change the total cost of an order. Edit Orders uses the same order-total modules as the storefront checkout process. Most of the order-total modules which ship with Zen Cart have been validated and work as expected (ot_coupon, ot_gv, ot_loworderfee, ot_shipping, ot_subtotal, ot_tax and ot_total). Both ot_subtotal and ot_total must be enabled for Edit Orders to function correctly.

If your store includes products with attributes and your want EO to display your products' attributes in the same order as the storefront operation, you'll need to make a change to /includes/modules/attributes.php. See this Zen Cart posting for additional information.

  1. If you don't already have a template-override version of the file, make one by copying /includes/modules/attributes.php to /includes/modules/YOUR_TEMPLATE/attributes.php.
  2. Locate the following section (towards the top of the file):
                        if (PRODUCTS_OPTIONS_SORT_ORDER=='0') {
                          $options_order_by= ' order by LPAD(popt.products_options_sort_order,11,"0")';
                        } else {
                          $options_order_by= ' order by popt.products_options_name';
                        }
                    
  3. Change the line indicated:
                        if (PRODUCTS_OPTIONS_SORT_ORDER=='0') {
                          $options_order_by= ' order by LPAD(popt.products_options_sort_order,11,"0", popt.products_options_name)';
                        } else {
                          $options_order_by= ' order by popt.products_options_name';
                        }
                    

Edit Orders has been validated with Local Sales Tax v2.3.5 or newer installed; previous versions are not supported. To integrate the two plugins, you'll need to copy the file /includes/functions/extra_functions/functions_local_sales_taxes.php to /YOUR_ADMIN/includes/functions/extra_functions/functions_local_sales_taxes.php for that order-total module to "find" the functions it needs!

Note: The tax rate shown next to individual products reflects only the Zen Cart configured tax rate. It does not include any tax rates defined by Local Sales Tax. The sales tax rate cannot be adjusted by Edit Orders for the Local Sales Taxes module.

Because Edit Orders loads the same order-total modules as the storefront checkout process, all enabled modules must be able to be loaded and processed from the store's Zen Cart admin-console. Because Zen Cart traditionally does not use those modules during admin-level processing, many 3rd-party order-total modules were designed without the authors taking this into consideration.

The most common symptom caused by a problematic order-total module (when editing an order) is the presentation of a "blank" page when adding a product to (or updating) the order. In most cases taking a look at the generated debug log provides valuable insight as to how to correct the underlying issue. Another option is to disable all add-on order-total modules and then enable them one-by-one to determine which order-total module is causing the blank page.

Here are some common causes of issues with 3rd-party order-total modules and possible corrective actions:

  1. The order-total's installation includes additional storefront functions.
    • Copy the order-total's function file(s) to your store's /YOUR_ADMIN/includes/functions/extra_functions directory.
  2. The order-total inspects the values in $_SESSION['cart'] instead of those present in the $order object to determine the associated value to display.
    • Update the module to check and use the $order object; disable the "mock" shopping cart if necessary.

You can view the details of these changes on the plugin's GitHub repository.

  • v4.3.4, 2018-04-08 (lat9)
    • BUGFIX/CHANGE: Re-align /YOUR_ADMIN/orders.php notifiers with v1.5.6 and later.
    • BUGFIX: Change to shipping-method doesn't "stick".
    • CHANGE: Additional notifiers for stock-decrement and order-total processing.
    • BUGFIX: Correct interaction with various order-total plugins, especially with tax calculations.
    • BUGFIX: Correct PHP 7.1+ warning about "A non-numeric value".
    • CHANGE: Modify ot_onetime_discount to enable the entry of both additions to and deductions from an order's total. You'll need to remove and re-install the order-total module prior to use.
    • BUGFIX/CHANGE: Entered product prices no longer honored after v4.3.3 update; additional configuration settings added.
    • The following files were changed:
      1. /includes/modules/order_total/ot_onetime_discount.php
      2. /YOUR_ADMIN/edit_orders.php
      3. /YOUR_ADMIN/orders.php Single line (#928) changed, modifying notification id from NOTIFY_ADMIN_ORDERS_LISTING_ROW to NOTIFY_ADMIN_ORDERS_SHOW_ORDER_DIFFERENCE.
      4. /YOUR_ADMIN/includes/classes/observers/EditOrdersAdminObserver.php
      5. /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
      6. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
      7. /YOUR_ADMIN/includes/languages/english/edit_orders.php
  • v4.3.3, 2018-03-09 (lat9)
    • BUGFIX: Product price not updated when attributes are changed.
    • BUGFIX: Incorporate zc156+ notification.
    • CHANGE: Display warning if Configuration->Stock->Allow Checkout is set to 'false' and insufficient stock is available.
    • The following files were changed:
      1. /YOUR_ADMIN/includes/edit_orders.php
      2. /YOUR_ADMIN/includes/classes/observers/EditOrdersAdminObserver.php
      3. /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
      4. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
      5. /YOUR_ADMIN/includes/languages/english/edit_orders.php
  • v4.3.2, 2018-03-07 (lat9)
    • BUGFIX: Attributes are lost from products when an order is updated.
    • BUGFIX: Load admin extra functions only for edit_orders use; corrects unwanted interaction with Admin New Order.
    • CHANGE: Log-file formatting updates.
    • The following files were changed:
      1. /YOUR_ADMIN/includes/edit_orders.php
      2. /YOUR_ADMIN/includes/classes/editOrders.php
      3. /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
      4. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
  • v4.3.1, 2018-01-16 (lat9)
    • BUGFIX: Correct shipping-tax calculations when shipping is the only taxed portion of the order.
    • BUGFIX: Correct shipping-tax calculations when a store "Displays prices with tax".
    • BUGFIX: Correct unwanted multiple messages on initial plugin installation.
    • BUGFIX: Allow "special characters" in updated address fields.
    • The following files were changed:
      1. /YOUR_ADMIN/edit_orders.php
      2. /YOUR_ADMIN/includes/classes/editOrders.php
      3. /YOUR_ADMIN/includes/extra_datafiles/eo_sanitization.php
      4. /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
      5. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
  • v4.3.0, 2017-10-01 (lat9)
    • BUGFIX: Include "products_ordered" in columns retrieved from the "products" table.
    • CHANGE: Add notifiers to enable additional address fields to be inserted.
    • BUGFIX: Use "correct" variable in the mock cart's get_products function.
    • BUGFIX: Correct PHP "notify" logs for missing/undefined variables.
    • BUGFIX: Correct PHP "notify" logs when an order-total doesn't include a TAX_CLASS.
    • BUGFIX: Missing notifiers were not being reported.
    • BUGFIX: Order-total recalculation incorrect when some order-totals (e.g. Group Pricing) are included.
    • The following files were changed:
      1. /includes/classes/vinos/common/NotifierCheck.php
      2. /YOUR_ADMIN/edit_orders.php
      3. /YOUR_ADMIN/includes/classes/editOrders.php
      4. /YOUR_ADMIN/includes/classes/mock_cart.php
      5. /YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php
      6. /YOUR_ADMIN/includes/languages/english/edit_orders.php
      7. /YOUR_ADMIN/includes/languages/english/extra_definitions/edit_orders.php
      8. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
  • v4.2.3, 2017-04-23 (lat9)
    • BUGFIX: Correct attribute-sorting issue.
    • The following files were changed:
      1. /YOUR_ADMIN/includes/classes/attributes.php
      2. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
  • v4.2.2, 2017-03-20 (lat9)
    • BUGFIX: Correct PHP parse error introduced in v4.2.1.
    • The following files were changed:
      1. /YOUR_ADMIN/orders.php
      2. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
  • v4.2.1, 2017-03-19 (lat9)
    • BUGFIX: Incorrect variable used in Packing Slip and Invoice links on an order's details page.
    • The following files were changed:
      1. /YOUR_ADMIN/orders.php
      2. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
  • v4.2.0, 2017-03-01 (lat9)
    • CHANGE: Require Zen Cart 1.5.5a or later.
    • CHANGE: Remove integration with Ty Package Tracker from \YOUR_ADMIN\orders.php.
    • CHANGE: Restructure plugin installation.
    • The following files were changed, added or removed:
      1. /includes/auto_loaders/init_vinos_autoload.php
      2. /includes/classes/order_total.php1
      3. /includes/classes/shipping.php1
      4. /includes/classes/VinosAutoload.php
      5. /includes/classes/vinos/common/NotifierCheck.php
      6. /includes/init_includes/init_vinos_autoload.php
      7. /YOUR_ADMIN/orders.php
      8. /YOUR_ADMIN/images/icon_edit.gif1
      9. /YOUR_ADMIN/includes/auto_loaders/config.eo.php
      10. /YOUR_ADMIN/includes/auto_loaders/config.zc154_compatibility.php
      11. /YOUR_ADMIN/includes/classes/eo_plugin.php
      12. /YOUR_ADMIN/includes/classes/plugin.php2
      13. /YOUR_ADMIN/includes/classes/observers/EditOrdersAdminObserver.php
      14. /YOUR_ADMIN/includes/extra_configures/edit_orders.php
      15. /YOUR_ADMIN/includes/extra_datafiles/edit_orders_defines.php
      16. /YOUR_ADMIN/includes/init_includes/init_eo_config.php
      17. /YOUR_ADMIN/includes/init_includes/init_vinos_common_admin.php
      18. /YOUR_ADMIN/includes/init_includes/init_zc154_compatibility.php
      19. /YOUR_ADMIN/includes/languages/english/orders.php1
      20. /YOUR_ADMIN/includes/languages/english/extra_definitions/edit_orders.php
      21. /YOUR_ADMIN/includes/languages/english/plugins/eo.php
      22. /YOUR_ADMIN/includes/languages/english/plugins/plugin.php2
      1Identifies that the file was removed from this plugin's distribution only; use the version associated with your Zen Cart distribution.
      2Other plugins, notably Ultimate SEO URLs, that make use of a module using the same name but different contents; make sure that the module isn't required by others prior to removing.
  • v4.1.7, 2016-10-24 (lat9)
    • BUGFIX: Modify order.php to include the "value" for each order-total in the order.
    • BUGFIX: Correct interaction with "ot_cod_fee".
    • BUGFIX: Correctly handle taxable order-totals.
    • BUGFIX: Correct currency-related rounding issues.
  • v4.1.6, 2016-08-06 (lat9)
    • CHANGE: Convert tabs to 4 spaces in some of the files.
    • CHANGE: Re-factor debug-output; the EO debug output file is now generated on an order-by-order basis.
    • BUGFIX: Don't display the "Missing shipping information" message is the order contains only virtual products.
    • BUGFIX: Tax not added if the order didn't start with taxes and/or if a product is added to the order.
    • BUGFIX: Missing echo in admin's orders.php merge; the bottom "Edit Order" button was rendered useless.
  • v4.1.5, 2016-05-19 (A. Ballanger and lat9)
    • BUGFIX: Correct "Unknown column 'p.products_quantity' in 'field list".
    • BUGFIX: Corrections for coupons with category / product restrictions.
    • CHANGE: Account for order-total modules that have been removed.
    • CHANGE: Mimic storefront sort-order for attributes' display.
    • BUGFIX: Correct incorrect tax-calculations after editing an order.
    • BUGFIX: Correct multi-line comments display with \r\n.
    • CHANGE: Include a "Miscellaneous Cost" order-total that's Edit Orders specific.
    • BUGFIX: Correct interaction with stores that use the "Split Tax Lines" configuration.
    • CHANGE: Remove reliance on the built-in currency initialization scripts.
    • CHANGE: Add support for the "admin sanitization" introduced in Zen Cart 1.5.5.
  • v4.1.4, 2015-01-27 (A. Ballanger)
    • Updated the installation, upgrade, and removal process to use "Plugin Manager" 0.5rc2 core files.
  • v4.1.3, 2014-01-06 (A. Ballanger and lat9)
    • Updated the installation, upgrade, and removal process to use a newer version of "Plugin Manager" core files.
    • Cleaned up the english language files. Obsolete entries were removed and some new entries added.
    • Removed the optional language files as they no longer contain all the neccessary defined constants.
    • Added various changes to support Zen Cart 1.5.2 (including copying additional functions from the catalog side).
    • Added a mock "shopping cart" class which reads product data from the current order. This should help with Order Total modules which only look at the shopping cart ($_SESSION['cart']) and ignore the order ($order).
    • Added optional "debug" file logging. This should only be used for problem solving as it may adversely affect performance.
    • When a product is loaded from the database, additional fields are populated to match Zen Cart 1.5.2 handling.
    • Added handling for updating an order containing a deleted product. It is strongly recommended to not delete products until after all editing of orders containing the product are completed.
      • The tax description is neccessary and will be generated using TEXT_UNKNOWN_TAX_RATE.
      • Tax class details will not be present or generated.
      • Attribute information may not fully populate or may be lost.
    • One can now place the coupon code by itself in the "title" for "ot_coupon"
    • Included an optional "Onetime Discount" order total module.
    • Changes to the way order status / order history is handled:
      • If the status is changed it will be recorded (with or without comment).
      • The comment (if any) will be added to the order history (previously only added if the status changed).
      • The tracking number(s) (if any) will be added to the order history.
      • If the option to notify the customer is selected the customer will be sent an email.
      • When the option to append comments is selected the following will be included in the email:
        • The comment (if any) along with EMAIL_TEXT_COMMENTS_UPDATE.
        • The tracking number(s) along with EMAIL_TEXT_COMMENTS_TRACKING_UPDATE.
    • Added the option to "strip" HTML and PHP tags from the list of enabled shipping modules.
    • Added warning messages if ot_total or ot_subtotal are disabled.
    • Added a check (and repair) for missing core configuration directives related to attributes.
    • Moved initial checks and warnings performed by the edit orders admin page to a function.
    • Fixed a bug which did not allow products to use "partial" quantities (fractions).
    • Fixed a bug causing an obsolete file to not be removed upon install / upgrade.
    • File Upload attributes will now be passed along when updating the product. Removing a File Upload attribute is not supported.
    • Updated the code removing products from an order. These now use the Zen Cart "stock" configuration options to increment / decrement stock quantities.
  • v4.1.2, 2017-07-28 (A. Ballanger)
    • Changed the "local_sales_tax" line to no longer be editable as the value is automatically generated based upon the order.
    • When adding a coupon code, if the code is not valid the order total will not be added (and if invalid and present will be removed).
    • Added a check when adding checkboxes to avoid generating a warning when no checkbox in the option group was selected.
    • When removing a product from the order, other items in the order are now correctly processed and updated (if changed).
    • Fixed a bug caused when adjusting the quantity of an item in an order (introducted in Edit Orders 4.1.1).
    • Fixed a bug when adding a product to an order w/ a text attribute containing a double quote (").
    • Functions handling form inputs now utilize zen_db_output (added in Zen Cart 1.5.1) or fall back to htmlspecialchars.
    • One Time Charges for a product are now reflected in the Total Price column for the product (were already added to the subtotal).
  • v4.1.1, 2013-07-13 (A. Ballanger)
    • Updated tax calculations to Zen Cart 1.5.1 based code.
    • Fixed a tax calculation bug when all products were removed from an order.
    • Fixed the code handling product attribute updates to be more accurate.
    • Fixed a bug which caused the subtotal to always be zero.
    • Fixed a bug with the automatic calculation of onetime charges based on attributes (when adding a product).
    • When the order is loaded address information more closely matches the information found during checkout.
      • If we can determine the country by id, name, or iso code:
        • The "country" field will contain the Zen Cart country array.
        • The "zone_id" field will be populated based upon country and state.
      • Otherwise, the "country field will contain the country name. This allows one to see / update the country (to one found in the Zen Cart country database).
    • The country listed for addresses will now be displayed as a dropdown if the country exists in the Zen Cart database. Otherwise it will be displayed as text.
    • Copied the catalog tax function "zen_get_tax_rate_from_desc()" from Zen Cart 1.5.1 to support additional order total modules.
    • Copied the catalog function "zen_get_country_list" from Zen Cart 1.5.1 to support country dropdowns in the addresses.
    • Zen Cart functions copied from the "catalog" side are only included if not already present.
    • Disabled manual editing of the "Low Order Fee" order total module. This is handled automatically.
    • If no remaining order total modules are available to add to an order, the order total entry fields will not be shown.
    • Ty Tracker will add a tracking number to the sent email when:
      1. The order is updated and notify customer is selected.
      2. Ty Tracker is installed and enabled.
      3. A Tracking Code is present for the "shipper".
      4. The "shipper" is enabled in Ty Tracker.
    • Included the "plugin" class and associated files.
      • The class and files are not part of "Edit Orders".
      • Provides for simplification of the installation / upgrade process.
      • Provides for simplification of the removal process.
      • Does some extra checks against Zen Cart's configure.php files.
    • Created new install, upgrade, and removal processes.
      • Makes use of the "plugin" class and associated files
      • On upgrade attempts to make needed modifications to any existing orders.php from "Super Orders" or "Admin New Order"
    • Cleaned up comments in "orders.php" to be more friendly.
    • Links in "orders.php" to edit will no longer appear if Edit Orders is not installed.
    • Moved 'BOX_CONFIGURATION_EDIT_ORDERS' into a language file (used to display the configuration menu item).
    • Updated readme (collaboration of Zen Cart forum members).
  • v4.1, 2017-04-12 (A. Ballanger and C. Jones)
    • Reduced duplicate code for Ty Package Tracker support.
    • Complete rewrite of the code handling products and attributes.
      • Utilizes Zen Cart functions and classes where possible.
      • Added many new functions to provide better support products and attributes.
      • Added a class used to abstract access to product attributes.
      • Used when displaying, updating, and adding products (including attributes).
    • Added updated versions of some Zen Cart core classes to allow them to work correctly from the admin side of Zen Cart.
      • admin/init_includes/init_currencies.php to load the currencies class.
      • includes/classes/order_total.php to load the correct language files.
      • includes/classes/shipping.php to load the correct language files.
    • When adding a product:
      • You can now search by product id, name, description, and model.
      • Step 2 now shows both the product name and model.
      • The built-in Zen Cart functions are called in a similar manner as adding a product to your shopping cart. This ensures the order totals can be automatically updated.
      • You can disable the use of "specials / sales prices" still. This is not recommended.
      • The store settings for handling attributes (including showing / hiding) are utilized.
    • When updating a product: product information is pulled from the database, then requested changes (such as name and price) are merged. This ensures the correct product information is always present in the order.
    • Updated to utilize the order_totals class and modules
      • Order Total modules are loaded when adding or updating a product.
      • Ensures proper calculation of subtotal and total.
      • Tax calculation now is done automatically using the store settings (same as during a customer checkout).
      • Order Total Lines are now added by selecting the desired module from a dropdown.
      • The Order Total dropdown contains a list of installed order totals not already present in the order.
      • Added support for specifying and changing the shipping module when a shipping line is used.
      • Removed field for changing the shipping tax. This is automatically calculated by includes/modules/order_total/ot_shipping.php.
    • Copied (and modified for use in the admin side of Zen Cart) a handful of the catalog tax functions to admin/functions/extra_functions/edit_orders_functions.php
    • Updated the installation script to add additional failure messages and not report success if a step fails.
    • Fixed the order status dropdown to correctly select order status. This avoids the status being accidentally changed if the status is not "Pending (1)".
    • Moved the "edit" button in the order menu over so the "details" button is more likely to be clicked by someone quickly looking at an order. This should hopefully lower the number of "accidentally" edited orders.
    • Added special handling to support the ot_loworderfee module.
    • Added some "dummy" files for those upgrading from an older version.
    • Minor updates to the readme for version 4.1.
  • Older, pre-v4.1 changes can be viewed here.