Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 345,922

Results 521 to 540 of 1,927
1 Jun 2014, 4:13 PM
#521
sudakoma avatar

sudakoma

New Zenner

Join Date:
Jul 2006
Posts:
83
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

Hello all,

I have just installed this on a fresh 1.51 installation and it didn't throw up any error messages on installation.

Adding products to an existing order works without a hitch but attempting to edit an order in any way, such as the quantities, results in a HTTP 500 Internal Server Error being thrown up.

Can someone offer any advice or help troubleshooting?

Thanks!

Edit Orders 4.1.4
ZC 1.51
PHP Version 5.4.28

1 Jun 2014, 4:23 PM
#522
sudakoma avatar

sudakoma

New Zenner

Join Date:
Jul 2006
Posts:
83
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

From the order details page, the order status can be updated without problems, however, when updating the status from the edit order page I get the same Error 500 but on clicking back, the order status has indeed been updated.

1 Jun 2014, 4:44 PM
#523
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

A "500" error typically indicates an error occured. Please check your server error logs. This should contain additional information (unless logging is disabled). Please post the error messages so we can help futher troubleshoot.

The most common causes are issues with the "manual" portion of the installation or 3rd party order total modules installed (and enabled) which do not support being loaded from the Zen Cart admin interface.

3 Jun 2014, 3:34 PM
#524
linniedarling avatar

linniedarling

New Zenner

Join Date:
Feb 2014
Location:
Austin, TX USA
Posts:
52
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I've got some baffling math going on and not sure what to poke to get Edit Orders to wake up.

ZC 1.5.1, Edit Orders 4.1.4

I had to change one of the items in this person's order. Same price, different style. Everything seemed to be ok yesterday and I printed out a correct packing slip. When I glanced at the order this morning as I was preparing to ship, one item was missing ($17.47); this was not the item that was editted. So I manually added the missing item in and now the math is incorrect.

3@ $18 - $54
1@ $18 - $18
2@ $18 - $36
1@ $17.47
1@ $17.47

subtotal- $160.40 ?

the extra amount comes to $17.46. Note that this was a currency conversion order from Russia and so that would account for the penny.

No error messages or other warnings. There won't be a log file since I did not have this turned on initially. It's not stopping me from shipping but it would be nice to figure out what's going on...

Attachment 14122

3 Jun 2014, 6:44 PM
#525
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

linniedarling:

... I had to change one of the items in this person's order. Same price, different style. Everything seemed to be ok yesterday and I printed out a correct packing slip. When I glanced at the order this morning as I was preparing to ship, one item was missing ($17.47); this was not the item that was editted. ...
The list of products and product attributes for an order are stored in the database. You have indicated everything looked correct yesterday. If you still have a copy of the "packing slip" you printed yesterday can you double check and see if everything was correct yesterday?

If the packing slip was correct
This indicates something OTHER than this module most likely resulted in one of the products going missing from the database table "orders_products"... If this is the case it would be a really good idea to determine what the cause was to avoid running into it again.

I'd backup the database and then run a "repair" of the tables (if needed). If no repair was needed, I'd check the MySQL logs and the Zen Cart activity log (to see when and possibly what and who made the change).

If the packing slip was not correct
Are there any Zen Cart debug logs (these are enabled by default in Zen Cart 1.5.1)?
What order total modules are enabled?
Can you provide some additional details about your server environment ("admin" -> "version")?
Have you been able to duplicate this behavior with a test order? Specific steps to duplicate?
If occurs with specific products / attributes, what differs from other products?

linniedarling:

... So I manually added the missing item (using Edit Orders) and now the math is incorrect. ...
This is what I would expect if somehow one of the database tables relating to the order were somehow modified outside Edit Orders (or if a 3rd party order total module crashed during the update).

When a product is added the final price is added to the "subtotal" in the database.
When a product is removed the final price is subtracted to the "subtotal" in the database.

Basically what appears to have occurred is somehow the database entry storing the running "subtotal" for the order is out of sync with the actual order's subtotal.

If you know the order number and are comfortable working with phpmyadmin:

  1. Make a database backup to be on the safe side.
  2. Correct the products (including attributes, quantities, and price) using "Edit Orders".
  3. Calculate the correct "subtotal" and store for future reference.
  4. In phpmyadmin open up the "orders_total" database table and find the row matching the affected "orders_id" with "class"="ot_subtotal".
  5. Edit both the "text" and "value" columns in the row with the correct "subtotal".
  6. Go back to "Edit Orders" and click "update".
  7. Verify pricing is now correct.

NOTE: The above instructions will only work when the subtotal is calculated based only upon the products added to an order. There are some circumstances where the subtotal may contain additional costs or deductions.

12 Jun 2014, 7:42 AM
#526
niki avatar

niki

New Zenner

Join Date:
Apr 2014
Location:
Australia
Posts:
2
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

Running EO 4.1.2 on Zen Cart v1.5.1. Storefront highly customized; admin not so much! The only thing that might be interfering is the "Minimum Customer Account" plugin, since I'm getting the edit_orders message:

Warning: One or more of the customer address fields contains a country name unknown to Zen Cart ("Locations / Taxes"->"Countries").
Taxes and some shipping modules may not function correctly until the issue has been resolved.

This typically occurs if someone deletes or renames a country's name from Zen Cart ("Locations / Taxes"->"Countries"). You can fix the issue by doing one of the following:

Add the country (and name) back to the Zen Cart database.
Adjust the country name to match one of the country names in the Zen Cart database.
> There is a virtual product that is $1.00 and the product-quantity is used to determine the final price.  When an order is initially placed, the quantity is 1.  I go to the admin to use edit_orders and change the quantity to 100 and click "Update", the line-item total for the product is updated to $100.00 but the order_totals total remains at $1.00.  The order includes neither tax nor shipping.
> 
> I don't know if this is a procedural issue on my part, an incompatibility or something else.  I'm off to investigate further.
> 
> --> One other thing I noticed is that the only order_total that is enabled is the ot_total (no ot_subtotal).

I got this same error when trying to edit orders for products that didn't require a shipping address such as virtual orders. I temporarily resolved this Warning error by editing the edit_order.php file from Edit Order 1.4.1. Line 655 was throwing the error as it was checking for a shipping address country when none was needed. So I commented out the line.

Original: 
 	if(!is_array($order->customer['country']) || !array_key_exists('id', $order->customer['country']) ||
    		!is_array($order->billing['country']) || !array_key_exists('id', $order->billing['country']) ||
    		 !is_array($order->delivery['country']) || !array_key_exists('id', $order->delivery['country'])) {
    		$messageStack->add(WARNING_ADDRESS_COUNTRY_NOT_FOUND, 'warning');
to:
    	if(!is_array($order->customer['country']) || !array_key_exists('id', $order->customer['country']) ||
    		!is_array($order->billing['country']) || !array_key_exists('id', $order->billing['country']) /*||
    		 !is_array($order->delivery['country']) || !array_key_exists('id', $order->delivery['country'])*/) {
    		$messageStack->add(WARNING_ADDRESS_COUNTRY_NOT_FOUND, 'warning');

This section 
|| !is_array($order->delivery['country']) || !array_key_exists('id', $order->delivery['country'])
is commented out. Now is doesn't check for the country and no more error.

Might not be totally related to your problem but my issue gave the same error.
12 Jun 2014, 11:39 AM
#527
linniedarling avatar

linniedarling

New Zenner

Join Date:
Feb 2014
Location:
Austin, TX USA
Posts:
52
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hi Niki,

Thanks for the tip. I have not had to actually edit any orders since. I'm waiting until it happens again to try to debug further.

However I do think it's related to Shipstation "pushing" some of the order information back after I had editted. I'm in a one sided dialog right now trying to discover what's going on.

12 Jun 2014, 4:55 PM
#528
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

Niki:

I got this same error when trying to edit orders for products that didn't require a shipping address such as virtual orders. I temporarily resolved this Warning error by editing the edit_order.php file from Edit Order ...
I would caution against disabling warnings output by Edit Orders. Warnings are usually displayed for well thought out reasons. The one you mention exists to indicate the order details (specifically all of the addresses) are not fully populated in the database (or may contain invalid information). It goes on to let you know the missing / incorrect data may cause problems with some order total modules and tax calculation. This specific WARNING is only a warning and does not indicate a failure within Edit Orders.

You do bring up a good point however. Perhaps this warning should be split into two parts... One for missing information and a second one for invalid data. This would allow us to emit more accurate "how to fix" information. Or perhaps "Edit Orders" should just automatically copy the billing address to the shipping address fields when no shipping address is entered...

Some of the reasons for this warning message:
A handful of the order total modules for Zen Cart attempt to read addresses (such as the shipping address) and can crash / emit invalid totals when various address fields are not populated (or contain invalid data). When this address data is not present and one of these order total modules enabled, editing an order may result in corrupted order information (and pricing) in the database.

When a new order is created (on behalf of a customer - such as email or phone orders) directly in the administrative interface, this also serves as a reminder to the person entering the order to fill out all of the address fields which may be required by various order total modules.

For example, what happens if for some reason the order needs to have one of the products shipped? While a rare case, a customer may call in and ask instead for a physical copy and to have the physical copy shipped. Editing the order to add shipping will cause problems with pricing and tax if the billing address is not present

So even when a purchase may be for "virtual only" products, if you are going to edit the order, entering the shipping address (populating with the billing address) is usually a good idea.

NOTE 1: just as a reminder, Edit Orders should ONLY be used to edit customer details / addresses, products in the order, and order totals. It should not be used simply for changing the order status. If only changing the order status (or adding comments), it is always better to use the "details" button instead.

NOTE 2: If one reads the very next post after the one quoted by Niki, one will notice the actual cause of the problem for the OP (Edit Orders requires ot_subtotal enabled). The current versions of Edit Orders display a warning when ot_subtotal is not enabled.

12 Jun 2014, 5:07 PM
#529
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

linniedarling:

... I do think it's related to Shipstation "pushing" some of the order information back after I had editted. ...
Hmmm. I do not see any SQL statements in the Shipstation module (in the plugins section of this website) which would alter products or order totals... Are you using a different module for Shipstation?

12 Jun 2014, 5:10 PM
#530
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

lhungil:

So even when a purchase may be for "virtual only" products, if you are going to edit the order, entering the shipping address (populating with the billing address) is usually a good idea.The front-end checkout skips the shipping step of the checkout if the entire order contains only virtual products. I would think that f the ENTIRE order contains only virtual products that Edit Orders should NOT throw this warning at all...

12 Jun 2014, 7:05 PM
#531
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

DivaVocals:

The front-end checkout skips the shipping step of the checkout if the entire order contains only virtual products. I would think that f the ENTIRE order contains only virtual products that Edit Orders should NOT throw this warning at all...
So you would be in favor of me splitting up this error message. :-)

One warning for when ZERO shipping information has been added AND if after looping through the current products in the order all items are virtual.

One warning for the actual reason this check was added (invalid country data which causes pricing, tax, and some order total modules to crash).

12 Jun 2014, 7:07 PM
#532
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

lhungil:

So you would be in favor of me splitting up this error message. :-)

One warning for when ZERO shipping information has been added AND if after looping through the current products in the order all items are virtual.

One warning for the actual reason this check was added (invalid country data which causes pricing, tax, and some order total modules to crash).Not sure that first warning is required at all if the entire order consists of virtual products... The front-end checkout doesn't show any warning message.. it simply skips the shipping step..

12 Jun 2014, 7:42 PM
#533
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

DivaVocals:

Not sure that first warning is required at all if the entire order consists of virtual products... The front-end checkout doesn't show any warning message.. it simply skips the shipping step..
:lookaroun That is what I said in my head when typing that last post (although I seem to have typed the opposite).

Perhaps some sleep (or at least a break) is in order :cool:

12 Jun 2014, 7:52 PM
#534
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

lhungil:

:lookaroun That is what I said in my head when typing that last post (although I seem to have typed the opposite).

Perhaps some sleep (or at least a break) is in order :cool:
Perhaps a nap is in order.. :laugh:

12 Jun 2014, 10:35 PM
#535
linniedarling avatar

linniedarling

New Zenner

Join Date:
Feb 2014
Location:
Austin, TX USA
Posts:
52
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lhungil:

Hmmm. I do not see any SQL statements in the Shipstation module (in the plugins section of this website) which would alter products or order totals... Are you using a different module for Shipstation?

Wow, I wasn't even aware of a Shipstation module. No, I'm not using any ZC Shipstation modules. I gave Shipstation an admin access and password and it updates the order(s) as shipped or cancelled and perhaps even does some other things.

The particular order that I had this problem with I had to modify not just the items in the order but also the shipping address as it was too long to print on the 4x6 label. I made the mistake, probably, of fixing the address within Shipstation. Afterwards I found out that the customer wanted a different color and then changed the items in her order and printed the packing slip. The next morning I pulled the order again from the Shipstation side which removed my address fix; I fixed the address a second time within Shipstation, prepped the label and found all the customs information had disappeared. I hand entered the customs information and then printed the shipping label at which time Shipstation sends back a "delivered" status. When I went back to my admin area I caught the bad total.

I'm waiting until I have to edit another order and will carefully monitor each step to see if I can catch where (and if) things go awry.

12 Jun 2014, 10:50 PM
#536
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

linniedarling:

Hi Niki,

Thanks for the tip. I have not had to actually edit any orders since. I'm waiting until it happens again to try to debug further.

However I do think it's related to Shipstation "pushing" some of the order information back after I had editted. I'm in a one sided dialog right now trying to discover what's going on.

linniedarling:

Wow, I wasn't even aware of a Shipstation module. No, I'm not using any ZC Shipstation modules. I gave Shipstation an admin access and password and it updates the order(s) as shipped or cancelled and perhaps even does some other things.

The particular order that I had this problem with I had to modify not just the items in the order but also the shipping address as it was too long to print on the 4x6 label. I made the mistake, probably, of fixing the address within Shipstation. Afterwards I found out that the customer wanted a different color and then changed the items in her order and printed the packing slip. The next morning I pulled the order again from the Shipstation side which removed my address fix; I fixed the address a second time within Shipstation, prepped the label and found all the customs information had disappeared. I hand entered the customs information and then printed the shipping label at which time Shipstation sends back a "delivered" status. When I went back to my admin area I caught the bad total.

I'm waiting until I have to edit another order and will carefully monitor each step to see if I can catch where (and if) things go awry.

Ummmmm there is a Shipstation module.. the only way your store could communicate with Shipstation is if a module is installed.. It's probably this one:
http://www.zen-cart.com/downloads.php?do=file&id=1324 (ShipStation USPS, UPS, and FedEx Shipping Module) Which is described as follows:
This module integrates your Zen Cart site with the ShipStation web-based shipping system.

and you've just described the problem and confirmed that the issue isn't with Edit Orders but with Shipstation overriding your order edits with the original order data.. (happens when you pull order from Shipstation back to Zen Cart)

19 Jun 2014, 8:04 AM
#537
niki avatar

niki

New Zenner

Join Date:
Apr 2014
Location:
Australia
Posts:
2
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Running zencart 1.51
Edit order vs 1.4.1 along side Admin New Customer 1.3 and Admin New Order 1.4

When entering order details via Edit Orders to add a new product, along each step I get the following 'error' messages from the browser i.e Done but with errors.... Object Required
Line numbers are in relation to "action Add Product" along each step
258 char 4 - <TR> tag
263 char 4 - seems to refer to If statement regarding eo_debug_action_level ??
268 char 4 - IF statement

After clicking [Add Now]
Line numbers are
1269 char 4 - </TR> closing table row tag
1274 char 4 - </TR> closing table row tag with <?php>.... unset ()

All error notifications don't seem to cause an issue with the function of the module. I'm just curious what could be throwing out these errors. What "object" are they requiring.

Also, I don't use TY Tracker as I'm in Australia. Can I remove these code blocks or will they just be ignored by the Edit Order module?
Thank you in advance for any input.

19 Jun 2014, 12:29 PM
#538
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

Niki:

Also, I don't use TY Tracker as I'm in Australia. Can I remove these code blocks or will they just be ignored by the Edit Order module?
Thank you in advance for any input.

Leave the code alone.. If you don't use Ty Tracker then the code doesn't need to be removed..

BTW, Ty Package Tracker isn't an "American" module, it is a SHIPPING TRACKING module.. which means it can be used with nearly any shipper you add when it is configured.. (Including those in Australia)

19 Jun 2014, 5:48 PM
#539
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I'm confused. I carefully read the read me instructions and successfully installed Super Orders.

I'm in trouble now, because I want to add Edit Orders and according the the read-me, Edit Orders should have been installed BEFORE Super Orders.

Super Orders Add-On's Integration:

In order for these modules to work with Super Orders it is presumed that you already have these modules installed and working correctly. To use them with Super Orders, you only need to turn on the corresponding admin flag - see Figure 2 & 3 below.
If you don't have any of these modules installed, but DO plan to install them to use with Super Orders, we STRONGLY suggest that you install them BEFORE YOU INSTALL SUPER ORDERS. Make sure you get them working correctly FIRST before you install Super Orders.

However, in searching to find out what to do about this I saw this:

lhungil:

....Once everything with Ty Package Tracker and Super Orders is installed (and fully working), running the Edit Orders installer again should get you back up and running.

**NOTE 1: **Reading the README for Edit Orders, it states Ty Package Tracker and Super Orders should be installed PRIOR to Edit Orders... Reading the README for Super Orders, it states Ty Package Tracker should be installed PRIOR to installing Super Orders to avoid potential problems... So the correct order of installation to avoid issues would be Ty Package Tracker, Super Orders, Edit Order.

So - I installed Edit Orders, and I get a nice blank screen when I click on the edit button.

Before I start re-installing stuff, can someone clarify what order I should do things in? Is this fixable?

Should I completely install Edit Orders again and then completely re-install Super Orders? I have no personally modified files to merge.

AND - what if I ever want to add TY Package Tracker? Should I do it now - before I re-install Super Orders to avoid trouble later?

19 Jun 2014, 6:03 PM
#540
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

In general a "blank page" means an error occurred. Before starting over, if you could answer a few questions, we may be able to give more specific help.

Three Sisters:

... I installed Edit Orders, and I get a nice blank screen when I click on the edit button. ...
Did you run the edit orders installer (step 3 - Install)?
What messages (if any) did you see at the top of the screen (during step 3 - Install)?
What is the URL in the browser's address bar after you click "edit" (replace your admin folder name with admin)?
What are the contents of any Zen Cart "debug" logs generated when clicking "edit" (use code tags)?