Re: Edit Orders v4.0 Support Thread
This is a bug that might be too difficult to fix; I don't know, but I thought I'd report it anyhow so that at least people were aware of it.
If you have added fields to the orders_products table (as, for example, the dropship module does), edit orders will lose those fields. On an edit - even an edit as small as changing the order status - edit orders deletes and re-adds the orders_products table records. Since it is unaware that these additional fields exist, they are added back with their default values.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
This is a bug that might be too difficult to fix; I don't know, but I thought I'd report it anyhow so that at least people were aware of it.
If you have added fields to the orders_products table (as, for example, the dropship module does), edit orders will lose those fields. On an edit - even an edit as small as changing the order status - edit orders deletes and re-adds the orders_products table records. Since it is unaware that these additional fields exist, they are added back with their default values.
It's not a bug ... it's a feechur!:P
Seriously, though, that's how the current versions of EO work. I've been working over the past couple of releases to migrate the separate extra_functions file into a class-based structure which, in turn, will lead to a new major version of EO that reuses any orders_products table entries, if possible.
Re: Edit Orders v4.0 Support Thread
Thanks Cindy. This is great news.
Re: Edit Orders v4.0 Support Thread
I'm using Zen Cart v1.5.1 and Edit Orders 4.1.4.
I get the following error in my log files:
PHP Warning: Invalid argument supplied for foreach() in my admin directory/includes/classes/mock_cart.php on line 151
I searched this thread but was unable to find any information. I can't seem to pin down when it's actually ocurring.
Just wondering if anyone has any tips for me to investigate. Thanks!
Re: Edit Orders v4.0 Support Thread
Perhaps the order was missing products? That's the line where the class iterates over the products in the order.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
lat9
Perhaps the order was missing products? That's the line where the class iterates over the products in the order.
Thanks I'll go back and ensure I have products in the cart as that is likely what happened. Really appreciate the speedy reply!
Re: Edit Orders v4.0 Support Thread
Suggestion on admin/includes/classes/editOrders.php
instead of
Code:
$ot_tax_class = constant ($ot_tax_class_name);
use
Code:
$ot_tax_class = null;
if (defined($ot_tax_class_name)) {
$ot_tax_class = constant ($ot_tax_class_name);
}
to prevent a PHP Warning in case the tax class doesn't exist.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
Suggestion on admin/includes/classes/editOrders.php
instead of
Code:
$ot_tax_class = constant ($ot_tax_class_name);
use
Code:
$ot_tax_class = null;
if (defined($ot_tax_class_name)) {
$ot_tax_class = constant ($ot_tax_class_name);
}
to prevent a PHP Warning in case the tax class doesn't exist.
Thanks @swguy; I've created an issue in the Edit Orders GitHub repository to track. Could you provide details regarding how to reproduce the error?
Re: Edit Orders v4.0 Support Thread
1) Install Better Together and add a discount.
2) Run an order that gets this discount.
3) Edit that order.
Re: Edit Orders v4.0 Support Thread
Latest EO also has a bug which shows up editing an order which uses an order total module with recalculate taxes = Standard. You can dup with Group Pricing.
Original Order:
Sub-Total: $499.00
Shipping: $0.00
Group Discount: -$53.39
Tax 7.0%: $31.44
Total: $477.05
After EO:
Sub-Total: $499.00
Shipping: $0.00
Group Discount: -$53.04 (** error)
Tax 7.0%: $31.44
Total: $473.91 (** error)