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

Edit Orders v4.0 Support Thread

Views: 346,084

Results 1,821 to 1,840 of 1,927
13 Dec 2024, 2:39 PM
#1821
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

lat9:

Try ticking the "Reset totals prior to update" box.

Tried both checked and unchecked and same result. Tax line disappears completely when adding a product.

14 Dec 2024, 4:30 PM
#1822
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
71
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

mcqueeneycoins:

Tried both checked and unchecked and same result. Tax line disappears completely when adding a product.

May I make a suggestion? Do you use new 2.1.0 version of Zen-Cart ?

It seems, there are some issues with loading language files using new ResourceLoaders there

(only suggestion!! I have not had time to investigate further)

14 Dec 2024, 5:09 PM
#1823
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

yesaul:

May I make a suggestion? Do you use new 2.1.0 version of Zen-Cart ?

It seems, there are some issues with loading language files using new ResourceLoaders there

(only suggestion!! I have not had time to investigate further)

No, I'm using 1.5.8a

31 Dec 2024, 1:25 PM
#1824
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

mcqueeneycoins:

Hi all, just recently installed EO 4.7.1 on my site and having some issues with sales tax displaying when items are added/removed from an order.

Example: 1 item order
Sub-Total: $0.25
Ground Advantage® (3 - 5 days): $4.95
CA State Sales Tax (7.25%): $0.02
Total: $5.22

Used EO to add second item, also taxable:

Sub-Total: $1.00
Ground Advantage® (3 - 5 days): 4.9500
Total: $6.02

The tax line is removed from the order. Tax is still calculated correctly in the total, but no longer displays in admin OR on customer order history page. Did I missing something here?

I tried installing with and without the optional overrides without any change in result. Anyone able to point me in the right direction? Thank you.

Anyone have additional thoughts on this issue? I enabled debug and log file appears to have tax calculated, just not displayed. Could there be an issue with my order total module or something else I have set?

2024-12-31 05:16:41, Edit Orders entered (4.7.1) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo(edit), on entry: Called by /home/.../edit_orders.php on line #112
	Subtotal: (not set), Shipping: (not set), Shipping Tax-Rate:  (not set), Shipping Tax-Description:  (not set), Shipping Tax: (not set), Tax: 31.1815, Total: 467.3715, Tax Groups: {"7.2500":"1"}
	$_SESSION['shipping']: (not set)

Order Totals
		ot_subtotal. Text: $430.09, Value: 430.0900
		ot_shipping. Text: $6.10, Value: 6.1000
		ot_total. Text: $467.37, Value: 467.3715
1 Jan 2025, 2:59 AM
#1825
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

mcqueeneycoins:

Anyone have additional thoughts on this issue? I enabled debug and log file appears to have tax calculated, just not displayed. Could there be an issue with my order total module or something else I have set?

2024-12-31 05:16:41, Edit Orders entered (4.7.1) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo(edit), on entry: Called by /home/.../edit_orders.php on line #112
Subtotal: (not set), Shipping: (not set), Shipping Tax-Rate: (not set), Shipping Tax-Description: (not set), Shipping Tax: (not set), Tax: 31.1815, Total: 467.3715, Tax Groups: {"7.2500":"1"}
$_SESSION['shipping']: (not set)

Order Totals
ot_subtotal. Text: $430.09, Value: 430.0900
ot_shipping. Text: $6.10, Value: 6.1000
ot_total. Text: $467.37, Value: 467.3715


After a lot of trial and error, I discovered a small modification in the ot_tax.php file that apparently caused this issue. I have restored the file to the original ZC distribution and it now displays properly. However, it is showing up as follows:

CA State Sales Tax (7.25%) + Shipping Tax (0.0000%):	$23.58

Is there any way to "hide" the + Shipping Tax portion?
1 Jan 2025, 1:29 PM
#1826
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

mcqueeneycoins:

After a lot of trial and error, I discovered a small modification in the ot_tax.php file that apparently caused this issue. I have restored the file to the original ZC distribution and it now displays properly. However, it is showing up as follows:

CA State Sales Tax (7.25%) + Shipping Tax (0.0000%): $23.58

Is there any way to "hide" the + Shipping Tax portion?
That would be (most likely) a combination of Zen Cart Configuration settings:

My Store // Sales Tax Display Status, set to 0. That will remove the display of any 0-value taxes, like shipping in your example.
My Store // Show Split Tax Lines, set to true. That will result in each type of tax being separately reported. For your example, that would display as

CA State Sales Tax (7.25%): $23.58
Shipping Tax (0.0000%): $0.00

7 Jan 2025, 7:17 PM
#1827
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
71
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Good day

Is anybody using EO with new ZC v2.1.0 ??

I'm trying to experiment with EO 4.7.1 on freshly installed ZC v2.1.0 (no another modules installed or no any changes made)

Problems are appearing with loading language files for different OT modules
(for ex: Could not locate language file: includes/languages/english/modules/order_total/ot_shipping.php)

Systems crashes also by calling zen_calculate_tax function from editOrders->calculateOrderShippingTax
(for ex: Uncaught TypeError: Unsupported operand types: string * int)

7 Jan 2025, 8:05 PM
#1828
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

yesaul:

Good day

Is anybody using EO with new ZC v2.1.0 ??

I'm trying to experiment with EO 4.7.1 on freshly installed ZC v2.1.0 (no another modules installed or no any changes made)

Problems are appearing with loading language files for different OT modules
(for ex: Could not locate language file: includes/languages/english/modules/order_total/ot_shipping.php)

Systems crashes also by calling zen_calculate_tax function from editOrders->calculateOrderShippingTax
(for ex: Uncaught TypeError: Unsupported operand types: string * int)
Yep, EO 4.1.7 isn't ready for zc210. I'm working hard to get EO-5 ready (see https://github.com/lat9/edit_orders) for progress and pre-release testing.

8 Jan 2025, 7:35 AM
#1829
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
71
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Yep, EO 4.1.7 isn't ready for zc210. I'm working hard to get EO-5 ready
Thank you. We'll be waiting

9 Jan 2025, 6:26 PM
#1830
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I updated my first live order using EO 4.7.1 with 1.5.8a and had a couple of issues/questions:

  1. I received this error when updating the order:
 Warning: The coupon code was not found in the database. Note: the title / text of a coupon is usually formatted like "Discount Coupon : coupon_code :".

I have a feeling it has to do with changes I made to how the coupon code displays to the customer, and I believe the change I need to make is in the eo_update_order_action_processing.php file here:

// Look for correctly formatted title
                    preg_match('/([^:]+):([^:]+)/', $coupon, $matches);
                    if (count($matches) > 2) {
                        $order_total['title'] = trim($matches[1]);
                        $coupon = $matches[2];
                    }
                    $coupon = trim($coupon);
                    $cc_id = $db->Execute(
                        "SELECT coupon_id, coupon_type
                           FROM ". TABLE_COUPONS . "
                          WHERE coupon_code = '$coupon'
                          LIMIT 1"
                    );

The change I made to the ot_coupon.php file is:

$this->output[] = [
                'title' => $this->title . ' (' . $this->coupon_code . '):',
                'text' => '-' . $currencies->format($od_amount['total']),
                'value' => $od_amount['total']
            ];

Can someone help me correct the EO code to prevent this error in the future?

  1. I have EO set to reset totals on update in the config menu. When I change a quantity to 0 to remove an item, should the totals automatically update (like an auto page refresh), or is it normal to not display any changes until I click "Update"? I was hoping to be able to see the impact the changes have prior to finalizing an update but that's not happening.
9 Jan 2025, 8:06 PM
#1831
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

mcqueeneycoins:

I updated my first live order using EO 4.7.1 with 1.5.8a and had a couple of issues/questions:

  1. I received this error when updating the order:

Warning: The coupon code was not found in the database. Note: the title / text of a coupon is usually formatted like "Discount Coupon : coupon_code :".

> 
> I have a feeling it has to do with changes I made to how the coupon code displays to the customer, and I believe the change I need to make is in the eo_update_order_action_processing.php file here:
> 
> ```
// Look for correctly formatted title
                    preg_match('/([^:]+):([^:]+)/', $coupon, $matches);
                    if (count($matches) > 2) {
                        $order_total['title'] = trim($matches[1]);
                        $coupon = $matches[2];
                    }
                    $coupon = trim($coupon);
                    $cc_id = $db->Execute(
                        "SELECT coupon_id, coupon_type
                           FROM ". TABLE_COUPONS . "
                          WHERE coupon_code = '$coupon'
                          LIMIT 1"
                    );

The change I made to the ot_coupon.php file is:

$this->output[] = [
'title' => $this->title . ' (' . $this->coupon_code . '):',
'text' => '-' . $currencies->format($od_amount['total']),
'value' => $od_amount['total']
];

> 
> Can someone help me correct the EO code to prevent this error in the future?
> 
> 2) I have EO set to reset totals on update in the config menu. When I change a quantity to 0 to remove an item, should the totals automatically update (like an auto page refresh), or is it normal to not display any changes until I click "Update"? I was hoping to be able to see the impact the changes have prior to finalizing an update but that's not happening.
1) Change that section to read

// Look for correctly formatted title
preg_match('/((.+))/', $coupon, $matches);
if (count($matches) === 2) {
$order_total['title'] = rtrim(str_replace('(' . $matches[1] . ')', '', $order_total['title']), ' :');
$coupon = $matches[1];
}
$coupon = trim($coupon);
$cc_id = $db->Execute(
"SELECT coupon_id, coupon_type
FROM ". TABLE_COUPONS . "
WHERE coupon_code = '$coupon'
LIMIT 1"
);

2) EO 4.7.1 can be quite finicky.  The totals 'should' automatically update to reflect the removed item; if not, just click the reset-totals box and update again.
10 Jan 2025, 10:06 PM
#1832
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

:beta:
EO v5.0.0-beta1 is now available for (er) beta-testing: https://github.com/lat9/edit_orders/releases/tag/v5.0.0-beta1

Currently supported on Zen Cart 2.1.0 only.

14 Jan 2025, 8:20 PM
#1833
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

zen 210 php 8.3 lots of mods when editing an order and you apply shipping to an order and you update the order, customers cant see the edits on the invoice or i cant see in orders, i see the amount was applied but does not show what the amount was applied to, or maybe im not doing something right.

14 Jan 2025, 10:49 PM
#1834
swguy avatar

swguy

Administrator

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

Re: Edit Orders v4.0 Support Thread

EO v5.0.0-beta1 is now available for beta-testing

Fantastic news! Thank you @lat9!

15 Jan 2025, 3:16 PM
#1835
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

jimmie:

zen 210 php 8.3 lots of mods when editing an order and you apply shipping to an order and you update the order, customers cant see the edits on the invoice or i cant see in orders, i see the amount was applied but does not show what the amount was applied to, or maybe im not doing something right.
I'm guessing that you're using EO 4.7.1. That version doesn't include details as to the changes made.

16 Jan 2025, 2:48 AM
#1836
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

I'm guessing that you're using EO 4.7.1. That version doesn't include details as to the changes made.

I DELETED EVERY FILE FROM 4.71 tried to install 5.0 from plugin manager and get this

 This version of EO cannot be installed until you remove the files associated with the non-encapsulated version. See the generated log-file for details.
16 Jan 2025, 4:46 AM
#1837
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
366
Plugin Contributions:
6

Re: Edit Orders v4.0 Support Thread

I tested EO5 on a freshly installed ZC 2.1.0 with demo data (PHP 8.3.15 and 8.4.2). I got some problem with product quantity and total not updating. Here is what I did:
Installed EO5 without any problem.
First placed an order with the first two action DVDs from demo data.
Then in admin order page edit this order. As soon as I changed product quantity of first item from 1 to 2 I got this debug file:

[16-Jan-2025 13:24:50 Asia/Tokyo] Request URI: /admin/ajax.php?act=ajaxEditOrdersAdmin&method=updateProduct, IP address: 116.58.186.193, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(828): trigger_error()
#2 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(648): zcAjaxEditOrdersAdmin->processOrderUpdate()
#3 xxxx\ajax.php(77): zcAjaxEditOrdersAdmin->updateProduct()
#4 xxxx\zclast\admin\ajax.php(17): require('...')
--> PHP Notice: array (
  'name' => 'Bill Smith',
  'company' => 'JustaDemo',
  'street_address' => '123 Any Avenue',
  'suburb' => '',
  'city' => 'Here',
  'postcode' => '12345',
  'state' => 'California',
  'country' => 
  array (
    'id' => '223',
    'title' => 'United States',
    'iso_code_2' => 'US',
    'iso_code_3' => 'USA',
  ),
  'format_id' => 7,
  'zone_id' => '12',
  'country_id' => 223,
  'state_code' => 'CA',
) in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php on line 828.

In admin page everything looks good with new quantity and subtotal/total except in comment where subtotal and total modification are reported but not quantity and product total ones.
Then I commit changes to order and product quantity and total goes back to origin. Order subtotal and total are thenew updated ones. There is no new debug file.

It seems there is a problem with ajax update.

16 Jan 2025, 5:01 AM
#1838
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
366
Plugin Contributions:
6

Re: Edit Orders v4.0 Support Thread

Just after having done test in precedent post, if I try to click on Edit button for a product, nothing happens and I got a similar debug file:

[16-Jan-2025 13:55:30 Asia/Tokyo] Request URI: /admin/ajax.php?act=ajaxEditOrdersAdmin&method=getProductUpdateModal, IP address: yyyy, Language id 1
#0 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(589): zen_debug_error_handler()
#1 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(360): zcAjaxEditOrdersAdmin->getModalContent()
#2 xxxx\ajax.php(77): zcAjaxEditOrdersAdmin->getProductUpdateModal()
#3 xxxx\admin\ajax.php(17): require('...')
--> PHP Warning: Undefined array key "eoChanges" in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php on line 589.

[16-Jan-2025 13:55:30 Asia/Tokyo] PHP Fatal error:  Uncaught Error: Call to a member function getOrderId() on null in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php:589
Stack trace:
#0 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(360): zcAjaxEditOrdersAdmin->getModalContent()
#1 xxxx\ajax.php(77): zcAjaxEditOrdersAdmin->getProductUpdateModal()
#2 xxxx\admin\ajax.php(17): require('...')
#3 {main}
  thrown in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php on line 589

[16-Jan-2025 13:55:30 Asia/Tokyo] Request URI: /admin/ajax.php?act=ajaxEditOrdersAdmin&method=getProductUpdateModal, IP address: yyyy
--> PHP Fatal error: Uncaught Error: Call to a member function getOrderId() on null in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php:589
Stack trace:
#0 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(360): zcAjaxEditOrdersAdmin->getModalContent()
#1 xxxx\ajax.php(77): zcAjaxEditOrdersAdmin->getProductUpdateModal()
#2 xxxx\admin\ajax.php(17): require('...')
#3 {main}
  thrown in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php on line 589.

[16-Jan-2025 13:55:30 Asia/Tokyo] Request URI: /admin/ajax.php?act=ajaxEditOrdersAdmin&method=getProductUpdateModal, IP address: yyyy
--> PHP Fatal error: Uncaught Error: Call to a member function getOrderId() on null in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php:589
Stack trace:
#0 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(360): zcAjaxEditOrdersAdmin->getModalContent()
#1 xxxx\ajax.php(77): zcAjaxEditOrdersAdmin->getProductUpdateModal()
#2 xxxx\admin\ajax.php(17): require('...')
#3 {main}
  thrown in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php on line 589.
16 Jan 2025, 1:31 PM
#1839
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

pilou2:

I tested EO5 on a freshly installed ZC 2.1.0 with demo data (PHP 8.3.15 and 8.4.2). I got some problem with product quantity and total not updating. Here is what I did:
Installed EO5 without any problem.
First placed an order with the first two action DVDs from demo data.
Then in admin order page edit this order. As soon as I changed product quantity of first item from 1 to 2 I got this debug file:

[16-Jan-2025 13:24:50 Asia/Tokyo] Request URI: /admin/ajax.php?act=ajaxEditOrdersAdmin&method=updateProduct, IP address: 116.58.186.193, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(828): trigger_error()
#2 xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php(648): zcAjaxEditOrdersAdmin->processOrderUpdate()
#3 xxxx\ajax.php(77): zcAjaxEditOrdersAdmin->updateProduct()
#4 xxxx\zclast\admin\ajax.php(17): require('...')
--> PHP Notice: array (
'name' => 'Bill Smith',
'company' => 'JustaDemo',
'street_address' => '123 Any Avenue',
'suburb' => '',
'city' => 'Here',
'postcode' => '12345',
'state' => 'California',
'country' =>
array (
'id' => '223',
'title' => 'United States',
'iso_code_2' => 'US',
'iso_code_3' => 'USA',
),
'format_id' => 7,
'zone_id' => '12',
'country_id' => 223,
'state_code' => 'CA',
) in xxxx\zc_plugins\EditOrders\v5.0.0\catalog\includes\classes\ajax\zcAjaxEditOrdersAdmin.php on line 828.

> 
> In admin page everything looks good with new quantity and subtotal/total except in comment where subtotal and total modification are reported but not quantity and product total ones.
> Then I commit changes to order and product quantity and total goes back to origin. Order subtotal and total are thenew updated ones. There is no new debug file.
> 
> It seems there is a problem with ajax update.
Please report EO-5 issues on GitHub and note that it's a beta version.  <https://github.com/lat9/edit_orders>
16 Jan 2025, 1:33 PM
#1840
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

jimmie:

I DELETED EVERY FILE FROM 4.71 tried to install 5.0 from plugin manager and get this

This version of EO cannot be installed until you remove the files associated with the non-encapsulated version. See the generated log-file for details.

... and what did the generated log-file indicate?

As noted before, EO-5 issues (since it's still beta) are to be reported via GitHub issues: <https://github.com/lat9/edit_orders>