Edit Orders 4.1

Support thread: http://www.zen-cart.com/showthread.php?200407
Download link: http://www.zen-cart.com/downloads.php?do=file&id=1513


PURPOSE & AIM

Edit Orders v4.1 is an admin module that allows store owners to edit a customer's order.

Version 4.1 is based on version 4.03 of Edit Orders. (See the "Credits & History" tab to see a more detailed list of credits and the changelog.

Please check your host's PHP version. This module will NOT work for hosting configurations using PHP versions older than 5.2.x

EDIT ORDERS 4.1 IS NOT COMPATIBLE WITH VERSIONS OF ZEN CART PRIOR TO ZEN CART 1.5!!

There will be no support provided for Zen Cart v1.3.x with v4.1 of Edit Orders
(if you are still running an older version of Zen Cart we strongly recommend that you upgrade as there have been many security enhancements made in Zen Cart v1.5.)

*** READ EVERYTHING IN THIS README BEFORE YOU BEGIN ***

After following the installation instructions (and any additional instructions as needed), it is very strongly recommended that you read through the ENTIRE "How to Use" section. There you will find out exactly what Edit Orders can do.

The following edit options are available:

  • Change the customer, billing or shipping information on an order
  • Add or delete products from an order
  • Update product quantities
  • Add or subtract values to/from overall order totals

Potential Future Enhancements

This module will only get better with the help of active contributers. If you use this module please consider helping answer questions in the Zen Cart forums regarding this module and contributing to the development of future versions.

  • Add Get Shipping Quote.
  • Add Resend Order Update E-Mails.
  • Add option to disable automatic order total calculations. This would allow the use of lines which do not have a corresponding order_total.
  • Update the installation script to be more user friendly.
  • Add upgrade support to the installation script.
  • Add an uninstallation script.
  • Refactor relevant functions into subclasses of existing Zen Cart classes.
  • Add integration with Stock by Attributes (for stock levels).

Known Issues

  • Not all order total modules are fully supported.
  • Zen Cart FILE_UPLOAD attributes are not supported.
  • Orders containing multiple products with the same ID and different attributes are not supported.
  • The documentation needs to be updated with more examples of how to use this module.

Ready to get started? Just follow the installation instructions.

INSTALLATION

There are THREE folders in the fileset

  • 1_Base_Files
  • 2_Modified_Core_Files
  • 3_SQL
  • 4_Available_Language_Packs

*** READ EVERYTHING IN THIS README BEFORE YOU BEGIN ***

***** BACKUP YOUR STORE BEFORE YOU BEGIN*****

New Installation or Upgrading your store to Zen Cart v1.5 with an older version of Edit Orders installed

Here's the BEST part of the new Edit Orders.. two words.. AUTO INSTALLER!! No more external SQL files needed to install/upgrade Edit Orders.. Yep that's right.. The Edit Orders install/upgrade is easier than ever!!! Whether you are upgrading from a previous Super Orders install or doing a vanilla Edit Orders install, the newauto installer has got you covered. Please note: Uninstall is not automated. So to uninstall you will still need to use an external SQL file..

DO NOT RUN THE UNINSTALL SQL when upgrading..

Let me repeat..

DO NOT RUN THE UNINSTALL SQL when upgrading!!!!!!

DO NOT RUN OLDER VERSIONS OF THE INSTALL/UPGRADE SQL FILES when installing/upgrading!!!!!! Doing so will cause issues with your Edit Orders v4.0 install.

To install/upgrade Edit Orders:

  1. Unzip the package contents to a temp directory
  2. Rename the YOUR_ADMIN_FOLDER folder in the 1_Base_Files folder to match the name of your shop's admin folder.. Let me repeat this as this is the one step in module installs that most OFTEN gets overlooked/missed:

    Rename the YOUR_ADMIN_FOLDER folders to match the name of your shop's admin folder
  3. Rename the YOUR_ADMIN_FOLDER folders in the 2_Modified_Core_Files folder to match the name of your store's admin folder

    Because these are core files, they have been separated in the install fileset so they are easily identified. If you have installed any mods which make changes to the files in this folder, you will need to use a tool like Winmerge or Beyond Compare to incorporate those changes into these files.
  4. Log into your store's admin before uploading the files.
    If you log into your store after uploading the files, the auto-install will still ocurr, but you will not see the install confimation message. (this is because the auto-install will take place during the login action and the confirmation message will not display during the login process)
  5. IF YOU ARE UPGRADING A PREVIOUS EDIT ORDERS INSTALL
    The files in the "Deprecated files" section below should be deleted in their entirety or replaced with Zen Cart defaults. Do not keep "backup" copies of these files on your web server as they will not work with Zen Cart v1.5 and therefore keeping backups of them serves NO useful purpose. Keeping these files will in fact cause errors in your store. (Please see the "Deprecated files" section below before proceeding)
  6. Upload ALL the files in the 1_Base_Files folder to your store directory. The directory structure within these folders is like your Zen Cart store's folder structure
  7. Upload files to from 2_Modified_Core_Files to your store directory. The directory structure within these folders is like your Zen Cart store's folder structure.

    IMPORTANT: If you have Ty Package Tracker or Super Orders installed see the "Integration with Other Modules" tab for instructions on using Ty Package Tracker or Super Orders with Edit Orders BEFORE uploading any of the files in the "2_Modified_Core_Files" folder.
  8. Once the files are uploaded, click ANY link in your store's admin, and the auto-installer will be triggered. If you have followed the install instructions, you will see the installation confirmation message.
Basic Un-Install Instructions
  1. Remove all the Edit Orders base install files and reverse any changes made to modified core files.
  2. Run the edit_orders_uninstall.sql using the "SQL Query Executor" tool in the Admin (Tools > Install SQL Patches)
Deprecated files - Delete or replace with defaults

These file(s) are from previous versions of Edit Orders and are no longer needed for this version of Edit Orders. They are safe to delete where marked as such. Modified core files (if included in this list) should be replaced with Zen Cart defaults. DO NOT keep ANY of these files as they may in fact cause errors in your store.

As with ANY module, any files which override existing cart files should be examined using a tool like Winmerge or Beyond Compare to ensure that any other non Edit Orders related modifications are included.

  • YOUR_ADMIN_FOLDER/includes/functions/extra_functions/common_orders_functions.php (delete)

HOW TO USE

Edit Orders is EASY to use. The interface looks similar to your orders (or Super Orders) page.

We do not recommend clicking "Edit" on completed orders. When you edit an order with this version ALL Order Totals are recalculated including tax, sub total, and total. Editing a completed order may result in undesired changes.

To Edit An Order

Go to ADMIN->CUSTOMERS->ORDERS. Click the "Edit" button to open the edit order page.

  • To delete a product, Change quantity to 0 and then click the "Update" button.
  • You may update the customer, billing or shipping information then click the "Update" button.
  • You may update the product pricing by simply entering a new product price then click the "Update" button.
  • You may update the product quantity by simply entering a quantity then click the "Update" button.
  • You may update the order totals by simply the values you wish to update then click the "Update" button.
  • You may add an order total by simply selecting the order total module and entering the description (ie: "Credit") and amount. Click the "Update" button to apply the changes.
  • You may remove an order total by simply deleting the description (ie: "Credit") and amount. Click the "Update" button to apply the changes.
  • Update order comments and statuses as you do within the orders (or Super Orders) page then click the "Update" button.
  • You may add additional products to an order by simply clicking on the "Add Products" button, following the easy to follow steps.

INTEGRATION WITH OTHER MODULES

Super Orders v4.x

(You MUST have Super Orders installed to use the Super Orders integration features)

You will need to follow the following steps to use Edit Orders with Super Orders v4.x.

  • If you are running Super Orders v4.x, no patches or additional files are needed. DO NOT UPLOAD the orders.php file from the Edit Orders 2_Modified_Core_Files folder.

    To add buttons that take you back to the edit_orders.php page from the Super Orders orders.php page, go to
    Admin > Configuration > Super Orders
    . Set the "Edit Orders Module Switch" to "True" to activate the Edit Orders navigation buttons in Super Orders.
Ty Package Tracker v3.1.3

(You MUST have Ty Package Tracker installed to use the Ty Package Tracker integration features)

You will need to follow the following steps to use Edit Orders with Ty Package Tracker v3.1.3.

  • If you are running Ty Package Tracker v3.1.3 , you will need to use a tool like Winmerge or Beyond Compare to merge the orders.php files from both Edit Orders and Ty Package Tracker.
    (if you are in using all three add-ons -- Super Orders, Edit Orders and Ty Package Tracker -- skip this step and DO NOT UPLOAD the orders.php file from the Edit Orders 2_Modified_Core_Files folder.)


    If you'd like to add the shipper tracking number fields to the edit_orders.php page, go to
    Admin > Configuration > Ty Package Tracker
    . Set the "Ty Package Tracker Module Switch" to "True" to activate the Ty Package Tracker shipper tracking number fields in Edit Orders.
Local Sales Taxes

(You MUST have Local Sales Taxes 2.3.5 or newer installed)

You will need to follow the following steps to use Edit Orders with Local Sales Taxes 2.3.5 or newer.

  • Copy "/includes/functions/extra_functions/functions_local_sales_taxes.php" to the location of your Zen Cart admin folder under "/includes/functions/extra_functions/functions_local_sales_taxes.php".
Price Markup (not released)

No special steps are needed, just install the Price Markup module.

CREDITS & CHANGE HISTORY

A special thank you to all those who have taken the time to BETA test Edit Orders and provide active feedback and functionality testing. BETA testers have contributed to the QA testing and helped create a better "Edit Orders" module!

We would also like to thank those who have joined the Zen Cart community and provided active help to others with Zen Cart, Edit Orders, and other modules.

v4.1 A Ballanger: http://www.zen-cart.com/member.php?115838
C Jones: http://overthehillweb.com
  • Reduced duplicate code for Ty Package Tracker support.
  • Complete rewrite of the code handling products and attributes.
    • Utilizes Zen Cart funtions 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 similiar 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 handlful 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 accidently 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 "accidently" 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.

v4.0.4 - 12/06/2012 chriscallan
  • When adding a product display the product model along with the name.

v4.0.3 - 04/14/2012 C Jones: http://overthehillweb.com
  • Updated to to be compatible with Zen Cart v1.5
  • Removed Super Orders links to the super_orders.php page. Super Orders v4.0 is now integrated into the default orders.php file which makes the links to the super_orders.php page and the Super Orders on/off configuration switch in the Edit Orders configuration menu obsolete.
  • Updated edit_orders.php commenting to implement the same commenting code as orders.php (remove the need for the includes/functions/extra_functions/common_orders_functions.php file)
  • Removed additional stray hard coded text and replaced them with proper language file definitions
  • Added an admin setting to set the shipping tax (previous versions required an edit to the edit_orders.php to set this value)

v3.03 - 01/06/2011 C Jones: http://overthehillweb.com & Andrew Moore: hem@omnicia.com
  • Bug fix - Corrects issue where order comments which included apostrophe's would generate an error.
  • Bug fix - Corrects issue where on certain host configurations shopowner would get language ID errors.
  • Buglet (little bug.. ) fix - Fixed Shipping method filed so that it no longer shows raw HTML outputs (affected mainly FedEx shipping users)
  • Added last updated field to properly support Rewards module
  • Added French language support (courtesy of sanji!!!) If anyone has other language translations, send them to me and I will update the fileset.
  • More formatting fixes to totals section. All entry fields now right align
  • Included required PHP version data in the Purpose & Aim tab
  • Minor updates and tweaks to readme for clarity

v3.02 - 12/11/2010 C Jones: http://overthehillweb.com
  • Full integration of Ty Package Tracker files
  • MINOR edit to the orders.php file. Added "Details" icon and modified the "Edit" icon to correctly redirect to the Edit Orders page
  • Formatting fixes so that numeric entry fields right align (taxes, prices, additional total options, etc.)

v3.0 Rev 1a - 12/04/2010 C Jones: http://overthehillweb.com
  • Refined and corrected errors in the readme file
  • Added missing license.txt file
  • Included a set files required for Super Orders v1.3.9 users

v3.0 Rev 1 - 11/28/2010) C Jones: http://overthehillweb.com & J Theed: http://gticustom.com
  • Clean up and reorganize the readme file
  • Removed all of the hard coded text and fixed file names and replaced them with proper language file definitions
  • Replaced "Add Product" text link with an "Add Products button
  • Add icons to the customer section
  • Corrected table format and layout of the customer section.
  • Modified customer section layout so that field labels appear next to each field for each customer address type.
  • Removed unused left column call and corrected <head> section to remove unused/erroneous code.
  • Order status and send email features now work like Zen Cart 1.3.9 (includes the no e-mail and hidden "admin" comments options)
  • Includes the properly modified orders.php file
  • The back button now returns to the order list page
  • Added an order details button to return to the detail page of the order you are editing
  • The back button on the add product section returns to the order editing page
  • Added an order details button on the add product section to return to the detail page of the order you are editing
  • Added an admin flag that toggles the display of navigation buttons required for use with Super Orders
  • Added an admin flag that toggles the display of input fields required for use with Ty Package Tracker

Previous Version History

v 2.04 11/6/2010 - Scott Turner

  1. Fixed problem with add product page in v1.3.9h.
v 2.03 2/21/2009 - Scott Turner
  1. Fixed problems with updating text attributes when more than one text attribute is used in Zen Cart.
  2. Fixed problems with adding a product with text attributes when more than one text attribute is used in Zen Cart.
  3. Fixed problem with using apostrophes in a text attribute when adding a product.

v 2.02 2/18/2009 - Scott Turner

  1. Fixed problem with adding products when they are in the Top Category (i.e. they aren't in a category folder).
  2. Fixed problem with adding products that are not on special being added at $0 when the apply special price box is checked.
v 2.01 11/16/2008 - Scott Turner
  1. Fixed problem with TABLE_ORDERS not updating when adding a new product.
  2. Fixed problem with wrong currencies when adding a new product.

v 2.0 10/15/2008 - Scott Turner

  1. Implemented new attributes handling in the following ways:
    • -- a) In addition to the more complicated attribute editor, a simpler option is available.
      • -- i) Select a new attribute from a drop-down menu in admin.
      • -- ii) The new price will be automatically calculated by subtracting the old attribute price and adding the new attribute price.
    • -- b) Text attributes now are implemented through a text box.
    • -- c) Fixed attribute pricing for the following scenarios:
      • -- i) One Time Charges Implemented
      • -- ii) Price Factor & Offset Implemented
      • -- iii) One Time Price Factor & Offset Implemented
      • -- iv) Attributes Qty Price Implemented
      • -- v) One Time Attributes Qty Price Implemented
      • -- vi) Price Per Word & Free Words Implemented
      • -- vii) Price Per Letter & Free Letters Implemented
      • -- viii) Specials and Sales Implemented for Attributes When Option is Selected for Attribute
    • -- d) Product one time charges are easily editable.
    • -- e) You can switch back and forth between the old advanced attribute editor and the easier one using a text-link.
      • -- i) The advanced attribute editor allows you to change the price and attribute option and value manually.
      • -- ii) The simple attribute editor allows you to choose from the attributes listed in your database.
      • -- iii) The advanced attribute editor will not update prices it leaves you to do this.
      • -- iv) The simple attribute editor updates prices automatically.
      • -- v) The simple attribute editor is the preferred method of altering attributes! The advanced is useful for advanced purposes.
    • -- f) Downloads are now implemented correctly and will change automatically when using the simple attribute editor.
    • -- g) All attribute data from TABLE_PRODUCTS_ATTRIBUTES now moves succesfully to TALBE_ORDERS_PRODUCTS_ATTRBIUTES when an attribute option is changed using the simple attribute editor.
  2. Adding products has added a few new features.
    • -- a) You can choose whether or not new products use the special or sales price.
    • -- b) Text attributes now work with a text box.
    • -- c) Many new attribute options are implemented correctly when calculating the price for new products. See 1-c for more info.
    • -- d) Downloads are now implemented correctly.
    • -- e) All attribute data from TABLE_PRODUCTS_ATTRIBUTES now moves succesfully to TALBE_ORDERS_PRODUCTS_ATTRBIUTES when a new product is added with an attribute.
  3. Coupon and group discounts now calculate correctly with taxes. To do so, the mod uses your average tax rate for all the products that were purchased.
  4. Fixed problem with quantity discounts adding to total instead of subtracting.
  5. Changed behavior so that clicking "details" on the order screen will give you the original edit orders page that Zen Cart has built in.
    • -- a) This allows you to choose which page you want to use. Click "details" for just the basics. Click "edit" to make some changes to an order.
  6. Fixed problems with data in TABLE_ORDERS_PRODUCTS not updating includng products_price, products_tax, and final_price.
  7. You can now enter a value for shipping taxes and this will calculate correctly. Zen Cart doesn't store this info in the database, so this must be changed every time when editing orders. A compromise, but better than nothing.
  8. Added lines for edits to orders.php per popular demand on Zen Cart forums.

v 1.53 8/1/08 - Scott Turner

  1. Fixed problem with customer's billing information not updating.
  2. Fixed problem with adding product attributes with apostrophes causing an error.
  3. Fixed problem with quotes and apostrophes being ignored.

v 1.52 7/31/08 - Scott Turner

  1. Fixed problems with coupons and gift certificates adding to total instead of subtracting.

v 1.51 6/22/08 - Scott Turner

  1. Fixed problems with emails when HTML emails are enabled.

v 1.5 5/24/08 - Scott Turner

NOTE: 1.5 - Works With Zen Cart 1.3.8

  1. Fixed Issues with Adding a Product With Attributes
  2. Adding Products with Attributes Will Automatically Recalculate Price
  3. Fixed Issue with Deleting a Product (Thanks zc_tester)
  4. Fixed Issue with Editing a Product Attribute (Thanks zc_tester)
  5. Added Ability to Edit Product Attributes Price Increases/Decreases
    ---- NOTE: This will not change the unit price - this must be edited manually.
  6. Corrected PHP tags
  7. Fixed Problems with Status/Comments Updates & Emails

v 1.2.6 11/12/2007 - numinix

  1. Re-added functions (required)
  2. Re-added missing installation instructions
  3. Re-wrote readme.txt

v 1.2.5 10/15/2007 - san

  1. Bug fix
  2. Removed functions
  3. Code optimization

v 1.2.0 10/01/2007 - Chris Barnhill

  1. Added additional payment options
  2. Updated how credit card numbers are displayed

v 1.1.0 02/16/2007 - Igor Couto

  1. Bug fix
  2. Updated readme.txt

v 1.0.0 01/07/2007 - Kathleen

  1. Ported from OSC for Zen Cart v1.2

LICENSE

Edit Orders v4.0 is released under the General Public License (see LICENSE.txt)

This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Always backup your shop and database before making changes.



W3C validation logo Valid CSS!