Forums / Addon Admin Tools / Batch Order Status Update

Batch Order Status Update

Views: 4,161

Results 1 to 18 of 18
6 Jul 2021, 8:53 PM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Batch Order Status Update

Mod - Batch Order Update, for Zen Cart 1.5.7.

This mod is for the Admin, Order listing page. It is multi-language.

When an order status filter is selected:

  1. A checkbox is added to each order to allow multiple selection multiple selection.
  2. A dropdown is displayed to select the new status for the selected orders.
    The orders can be updated in one action, emails can be optionally sent.

Attachment 19664

How it works
The list of orders and their languages is stored in an array and updated one-by-one using redirects and the language parameter to send each email in the order language.
When complete, the admin language is reset to it's original language.
Clumsy, slow, inefficient...but until the whole order email process is reworked, it will have to do. But it works.

Get it here:
https://github.com/torvista/Zen_Cart-Batch_Order_Update

Use GitHub to see what happened and when. Use a Github client to keep up to date. I use GitKraken.

After downloading, use GitHub to see what happened subsequently and when. Use a Github client to keep up to date. I use GitKraken.

Report errors on GitHub as they should be temporary and here they only clutter up the thread.

If someone wants the challenge to make it look pretty/fit well into the responsive structure, go right ahead!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

26 Jul 2021, 4:50 PM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Batch Order Status Update

Well, that opened the flood-gates of pent-up demand!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

29 Jul 2021, 8:25 PM
#3
jimmyv avatar

jimmyv

Zen Follower

Join Date:
Feb 2008
Location:
Philadelphia
Posts:
292
Plugin Contributions:
2

Re: Batch Order Status Update

Summertime kids are off school. Definitely a valid plugin will test it out.

31 Jul 2021, 4:17 AM
#4
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

I installed on my test server 1.5.7c 7.4 php - also running Comment Boiler plate

merged the 2 orders.php files and when I select a status to filter, the page displays as follows:
Attachment 19695
and here is the error log... not sure what to trace.

[31-Jul-2021 04:14:29 UTC] PHP Fatal error: Uncaught Error: Call to undefined function zen_draw_order_status_dropdown_batch_update() in /admin/orders.php:635
Stack trace:
#0 /admin/index.php(11): require()
#1 {main}
thrown in /admin/orders.php on line 635

[31-Jul-2021 04:14:29 UTC] Request URI: /XXkcaz00/index.php?cmd=orders&status=1, IP address: xxxxxxxxx
--> PHP Fatal error: Uncaught Error: Call to undefined function zen_draw_order_status_dropdown_batch_update() in /admin/orders.php:635
Stack trace:
#0 /admin/index.php(11): require()
#1 {main}
thrown in /admin/orders.php on line 635.

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

31 Jul 2021, 10:45 AM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Batch Order Status Update

Fixed... got lost in the forest of comparisons between versions.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

31 Jul 2021, 2:58 PM
#6
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

Downloaded the newest GitHub update and merged... works! Great Contribution!

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

31 Jul 2021, 5:07 PM
#7
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

Carbonless:

Downloaded the newest GitHub update and merged... works! Great Contribution!

BUG UPDATE

The batch Status is working... HOWEVER, it broke the ability to update the status within an order.

Bugfile

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: 91.242.162.12
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

[25-Jul-2021 07:20:45 UTC] Request URI:  /index.php?cPath=43&main_page=index&zenid=ks9nrlduulcisu8dr55qmlpra1,  IP address: xxxxx
#1  mysqli_connect() called at [/includes/classes/db/mysql/query_factory.php:63]
#2  queryFactory->connect() called at [/includes/init_includes/init_database.php:23]
#3  require(/includes/init_includes/init_database.php) called at [/includes/application_top.php:189]
#4  require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or  directory in /includes/classes/db/mysql/query_factory.php on line 63.

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

2 Aug 2021, 12:25 PM
#8
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Batch Order Status Update

The problem with ZC157 is the listing page and details page use the same form attribute name for status.

I did this code based on ZC158 and it's proved impossible to backport to ZC157 without using the unique form attributes introduced in ZC158.
Github is updated with changes.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

2 Aug 2021, 5:21 PM
#9
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

torvista:

The problem with ZC157 is the listing page and details page use the same form attribute name for status.

I did this code based on ZC158 and it's proved impossible to backport to ZC157 without using the unique form attributes introduced in ZC158.
Github is updated with changes.

Are you stating that it then wont work with 1.5.7c, or are you saying the github changes include certain files from 1.5.8 and can be used with 1.5.7c?

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

2 Aug 2021, 5:24 PM
#10
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Batch Order Status Update

The orders file contains snippets from ZC158 to enable this to work in ZC157.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

2 Aug 2021, 5:24 PM
#11
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

will install and test NOW...

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

2 Aug 2021, 5:40 PM
#12
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

Tested on 1.5.7c works without error. GREAT JOB!

attempting now to merge with with my existing file that includes Boiler Plate Comments

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

2 Aug 2021, 8:33 PM
#13
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

Carbonless:

Tested on 1.5.7c works without error. GREAT JOB!

attempting now to merge with with my existing file that includes Boiler Plate Comments

Merged with Boiler Plate Comments and both function perfectly!! THANK YOU!

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

16 Jan 2026, 8:51 PM
#15
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

ZC2.1 running php8.0, The observer file is throwing a fatal php error. Its resulting in a blank Orders page. When I turn the auto.PluginBatchOrderUpdate.php off, the orders page loads for all but orders themselves do not load once clicked on. Anyone else getting this to work?

[16-Jan-2026 20:53:10 UTC] PHP Fatal error: Uncaught Error: Undefined constant "TEXT_BATCH_UPDATE" in /includes/classes/observers/auto.plugin_batch_order_update.php:22
Stack trace:
#0 /includes/classes/traits/NotifierManager.php(106): zcObserverPluginBatchOrderUpdate->notify_admin_orders_list_extra_column_heading()
#1 /orders.php(1284): base->notify()
#2 /index.php(16): require('/home/XXXXX/p...')
#3 {main}
thrown in /includes/classes/observers/auto.plugin_batch_order_update.php on line 22

[16-Jan-2026 20:53:10 UTC] Request URI: /index.php?cmd=orders&statusFilterSelect=1, IP address: 000.00.00.000
--> PHP Fatal error: Uncaught Error: Undefined constant "TEXT_BATCH_UPDATE" in /includes/classes/observers/auto.plugin_batch_order_update.php:22
Stack trace:
#0 /includes/classes/traits/NotifierManager.php(106): zcObserverPluginBatchOrderUpdate->notify_admin_orders_list_extra_column_heading()
#1 /orders.php(1284): base->notify()
#2 /index.php(16): require('/home/XXXXX/p...')
#3 {main}
thrown in /includes/classes/observers/auto.plugin_batch_order_update.php on line 22.

[16-Jan-2026 20:53:10 UTC] Request URI: /index.php?cmd=orders&statusFilterSelect=1, IP address: 000.00.00.000
--> PHP Fatal error: Uncaught Error: Undefined constant "TEXT_BATCH_UPDATE" in /includes/classes/observers/auto.plugin_batch_order_update.php:22
Stack trace:
#0 /includes/classes/traits/NotifierManager.php(106): zcObserverPluginBatchOrderUpdate->notify_admin_orders_list_extra_column_heading()
#1 /orders.php(1284): base->notify()
#2 /index.php(16): require('/home/XXXXX/p...')
#3 {main}
thrown in /includes/classes/observers/auto.plugin_batch_order_update.php on line 22.

Attachment 21138

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

17 Jan 2026, 11:28 AM
#16
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Batch Order Status Update

I think you are using old code, I don't find that constant in the fileset in GitHub.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Jan 2026, 4:51 PM
#17
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

Wonder if I have part of the old fileset lingering....? I'll check it out and report back

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com

17 Jan 2026, 6:53 PM
#18
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Batch Order Status Update

I found a lone file that once deleted, enabled the plugin. thank you!

NTO: building a better network thru collaboration
www.needtoorder.com | www.coffeewitheinstein.com