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

Edit Orders v4.0 Support Thread

Views: 346,056

Results 1,121 to 1,140 of 1,927
27 Aug 2017, 4:27 PM
#1121
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Edit Orders v4.0 Support Thread

swguy:

Suggestion on admin/includes/classes/editOrders.php

instead of

$ot_tax_class = constant ($ot_tax_class_name);

> 
> use 
> 
> ```
        $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?

27 Aug 2017, 4:51 PM
#1122
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

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.
31 Aug 2017, 5:07 AM
#1123
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

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)

31 Aug 2017, 11:56 AM
#1124
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

swguy:

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.00S
Shipping: $0.00
Group Discount: -$53.39
Tax 7.0%: $31.44
Total: $477.05

After EO:
Sub-Total: $499.00S
Shipping: $0.00
Group Discount: -$53.04 (** error)
Tax 7.0%: $31.44
Total: $473.91 (** error)
@swguy, any idea where that trailing **S **on the sub-total is coming from? I'm guessing that that could be part of the issue.

31 Aug 2017, 12:07 PM
#1125
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Sorry - that was copy & paste cruft. Fixed.

31 Aug 2017, 12:15 PM
#1126
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

swguy:

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)
@swguy, would you enable EO debug, update that order and send me the generated EO log file via direct email?

31 Aug 2017, 12:22 PM
#1127
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Just completed and sent.

31 Aug 2017, 6:52 PM
#1128
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

... and I've replicated the issue locally. I'll post back when I've identified the root-cause.

15 Sep 2017, 11:05 AM
#1129
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Fix needed for virtual orders with no shipping address: such orders will show the message WARNING_ADDRESS_COUNTRY_NOT_FOUND
("Warning: One or more of the customer address fields contains a country name unknown to Zen Cart...")

edit_orders.php line ~ 677 change

      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'])) {
        $messageStack->add(WARNING_ADDRESS_COUNTRY_NOT_FOUND, 'warning');
      } else if ($order->delivery !== false && !empty($order->delivery['country'])) {
        if (!is_array($order->delivery['country']) || !array_key_exists('id', $order->delivery['country'])) {
           $messageStack->add(WARNING_ADDRESS_COUNTRY_NOT_FOUND, 'warning');
        }
      }
15 Sep 2017, 11:26 AM
#1130
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

@swguy, what version of EO are you running? That message being displayed for virtual orders was corrected last year via this GitHub commit for EO 4.1.6.

The code segment that you refer to currently reads (edit_orders.php, line 623):

        if (!$eo->eoOrderIsVirtual ($order) &&
               ( !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');
        }
15 Sep 2017, 11:31 AM
#1131
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Ah ok thanks I have 4.1.5-beta2.

15 Sep 2017, 11:48 AM
#1132
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

swguy:

Ah ok thanks I have 4.1.5-beta2.
Current version is 4.2.3.

1 Oct 2017, 2:38 PM
#1133
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

I've just submitted v4.3.0 of Edit Orders to the Zen Cart plugins for review. That release contains changes associated with the following GitHub issues:

#50: Correct product.products_ordered calculation (thanks @siliconforks!).
#52: Correct PHP warning when an order-total doesn't include a "TAX_CLASS" setting.
#53: Additional notifiers for address-field insertions.
#54: Invalid value used in "Mock Cart" processing.
#55: Correct PHP "notify" issues.
#56: Correct order-total calculations when order-totals re-compute tax (e.g. group pricing), as reported by @swguy here.
#57: Properly report missing notifiers

I'll post back here once the download is available.

1 Oct 2017, 2:40 PM
#1134
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Note on #56: Users must remember to manually press the button.

1 Oct 2017, 2:46 PM
#1135
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

swguy:

Note on #56: Users must remember to manually press the button.
Actually, it's changed from the prototype I sent you. The processing now has a checkbox field which, if set, causes the order's totals to be reset rather than a separate button. You can configure the default value for that checkbox field in Configuration->Edit Orders.

1 Oct 2017, 2:51 PM
#1136
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

:thumbsup:

1 Oct 2017, 5:08 PM
#1137
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lat9:

I've just submitted v4.3.0 of Edit Orders to the Zen Cart plugins for review. That release contains changes associated with the following GitHub issues:

#50: Correct product.products_ordered calculation (thanks @siliconforks!).
#52: Correct PHP warning when an order-total doesn't include a "TAX_CLASS" setting.
#53: Additional notifiers for address-field insertions.
#54: Invalid value used in "Mock Cart" processing.
#55: Correct PHP "notify" issues.
#56: Correct order-total calculations when order-totals re-compute tax (e.g. group pricing), as reported by @swguy here.
#57: Properly report missing notifiers

I'll post back here once the download is available.
That was quick! It's now available for download!

4 Oct 2017, 2:11 PM
#1138
purecarsound avatar

purecarsound

New Zenner

Join Date:
May 2006
Location:
Chester, UK
Posts:
99
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hi

Just updated to latest version. All works great (as expected!).

A wish list item for future versions/updates - not sure how hard it would be to incorporate - our site is UK based and we use 'state' (changed to 'County') as a dropdown which must be selected by a customer for UK Royal Mail shipping to be applied. Is it possible to have the 'state' field as a dropdown on the edit orders page so that we can ensure the correct state/county is selected?

Thanks

Mark https://www.johnwoodsmotorcare.co.uk/Shop | https://www.johnwoodsmotorcare.net

4 Oct 2017, 2:29 PM
#1139
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Sounds like a good idea; I've created an issue in Edit Orders' GitHub repository so that I don't lose the request!

4 Oct 2017, 2:52 PM
#1140
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: Edit Orders v4.0 Support Thread

lat9:

Sounds like a good idea; I've created an issue in Edit Orders' GitHub repository so that I don't lose the request!

@lat9 when i have some time, i will take a look at this new release, and compare it to all of the changes i have done over the years.

without even thinking too much about it, i remember order total calculations, tax calculations (especially when using a different tax module) and changing line item quantities have been problematic. the last item caused me a bunch of grief, as the deletion of a record in orders_products and re-creation of a new record in that same table seems like overkill for changing the quantity from 2 to 3. and despite it being overkill, it overlooks the idea that a store owner could have additional fields in that table due to modifications, and that significant data gets lost. i am not sure if this version addresses that issue. but considering i do have clients using this add-on, and with your name on it, i will try and spend a bit of time on it.

if i find any issues that i think are of merit, lmk if you would prefer me to add something onto your github or if you would prefer to discuss them here.

best.