Page 1 of 5
S05E01 - Batch Actions
Posted: Tue Nov 30, 2021 1:12 pm
by Kofod95
@ecartz
1.0.8.8 on Xampp (Windows)
Going to admin/orders_batch.php throws:
Warning: Use of undefined constant TABLE_HEADING_DATE_EXPECTED - assumed 'TABLE_HEADING_DATE_EXPECTED' (this will throw an Error in a future version of PHP) in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 75
and
Fatal Error:
: Uncaught TypeError: Argument 2 passed to Input::__construct() must be of the type array, string given, called in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 57
and defined in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.1\input.php:22
Stack trace:
#0 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(57): Input->__construct('actions_multi[]', '2', 'checkbox')
#1 C:\Xampp\htdocs\1.0.8.8\admin\includes\components\paginated_table.php(50): {closure}(Array)
#2 C:\Xampp\htdocs\1.0.8.8\admin\includes\classes\paginator.php(68): include('C:\\Xampp\\htdocs...')
#3 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(190): Paginator->display_table()
#4 {main} thrown in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.1\input.php on line 22
//Daniel
Re: S05E01 - Batch Actions
Posted: Wed Dec 01, 2021 3:01 pm
by ecartz
Kofod95 wrote: ↑Tue Nov 30, 2021 1:12 pm
Warning: Use of undefined constant TABLE_HEADING_DATE_EXPECTED - assumed 'TABLE_HEADING_DATE_EXPECTED' (this will throw an Error in a future version of PHP) in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 75
That should be TABLE_HEADING_DATE_PURCHASED
Kofod95 wrote: ↑Tue Nov 30, 2021 1:12 pm
Fatal Error:
: Uncaught TypeError: Argument 2 passed to Input::__construct() must be of the type array, string given, called in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 57
Code: Select all
$tickable = new Tickable('actions_multi[]', $row['orders_id'], 'checkbox');
should be
Code: Select all
$tickable = new Tickable('actions_multi[]', ['value' => $row['orders_id']], 'checkbox');
Re: S05E01 - Batch Actions
Posted: Wed Dec 01, 2021 7:21 pm
by Kofod95
ecartz wrote: ↑Wed Dec 01, 2021 3:01 pm
should be
Those corrections got rid of the prior errors. Now when opening admin/orders_batch.php:
Notice: Undefined variable: Admin in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 112
Fatal error: Uncaught Error: Call to a member function link() on null in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php:112
Stack trace: #0 C:\Xampp\htdocs\1.0.8.8\admin\includes\classes\paginator.php(112): {closure}(Array)
#1 C:\Xampp\htdocs\1.0.8.8\admin\includes\components\paginated_table.php(33): Paginator->fetch()
#2 C:\Xampp\htdocs\1.0.8.8\admin\includes\classes\paginator.php(68): include('C:\\Xampp\\htdocs...')
#3 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(190): Paginator->display_table()
#4 {main} thrown in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 112
using the filter to find orders with a certain status hides the above errors but gives (at the very bottom):
Notice: Undefined variable: orders_statuses in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 167
Warning: array_merge(): Expected parameter 2 to be an array, null given in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 167
Fatal error: Uncaught TypeError: Argument 2 passed to Select::__construct() must be of the type array, null given,
called in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 167
and defined in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.1\select.php:32
Stack trace: #0 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(167): Select->__construct('status', NULL, Array)
#1 C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.1\hooks.php(150): {closure}(Array)
#2 C:\Xampp\htdocs\1.0.8.8\admin\includes\components\paginated_table.php(74): hooks->cat('buttons')
#3 C:\Xampp\htdocs\1.0.8.8\admin\includes\classes\paginator.php(68): include('C:\\Xampp\\htdocs...')
#4 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(190): Paginator->display_table()
#5 {main} thrown in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.1\select.php on line 32
pressing the checkbox next to an order gives this URL: admin/return%20false; and a 404. It returns checked, when using the browser-back-button.
None of the "print"-buttons seems to do anything at the moment
//Daniel
Re: S05E01 - Batch Actions
Posted: Thu Dec 02, 2021 11:39 am
by Kofod95
Revision recieved 02/12/2021 (dd/mm/yyyy)
admin/orders_batch.php throws:
Notice: Undefined index: products_id in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 112
Fatal error: Uncaught TypeError: Argument 2 passed to Href::set_parameter() must be of the type string, null given,
called in C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php on line 112
and defined in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.5\href.php:42
Stack trace: #0 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(112): Href->set_parameter('pID', NULL)
#1 C:\Xampp\htdocs\1.0.8.8\admin\includes\classes\paginator.php(112): {closure}(Array)
#2 C:\Xampp\htdocs\1.0.8.8\admin\includes\components\paginated_table.php(33): Paginator->fetch()
#3 C:\Xampp\htdocs\1.0.8.8\admin\includes\classes\paginator.php(68): include('C:\\Xampp\\htdocs...')
#4 C:\Xampp\htdocs\1.0.8.8\admin\orders_batch.php(190): Paginator->display_table()
#5 {main} thrown in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.8.5\href.php on line 42
It shows only the newest order, but the rest can be found be filtering based on status. There no errors are thrown.
Pressing for invoices, packing slips or Pick'N'Pack with no orders selected gives:
Notice: Undefined index: currency in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php on line 42
Notice: Undefined index: currency in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php on line 43
Notice: Undefined index: in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php on line 43
Notice: Trying to access array offset on value of type null in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php on line 43
Notice: Undefined index: cart in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php on line 148
Fatal error: Uncaught Error: Call to a member function get_content_type() on null in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php:148
Stack trace: #0 C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\order.php(25): cart_order_builder::build(Object(order))
#1 C:\Xampp\htdocs\1.0.8.8\admin\ext\batcher\batch_invoice.php(28): order->__construct('')
#2 {main} thrown in C:\Xampp\htdocs\1.0.8.8\includes\system\versioned\1.0.7.10\cart_order_builder.php on line 148
and the same errors populate the csv, when downloaded.
Pressing the checkbox gives a 404 on the URL: admin/return%20false;, but the checkbox is ticked, when returning with the browser back-button. Pressing any of the above with an order ticked makes it work.
Using any of the update-options does not update the status, but goes to a listing of the selected new status, where it looks like this:
error-when-update.png
(I cropped the image, but the table-heading is cut off like shown on the image)
//Daniel
Re: S05E01 - Batch Actions
Posted: Fri Dec 03, 2021 12:46 pm
by Kofod95
@ecartz
Revision recieved 03/12/2021(dd/mm/yyyy)
Above errors are gone
Clicking invoice or packing slip with no orders ticked gives:
Warning: Use of undefined constant ERROR_MUST_SELECT_AT_LEAST_ONE_ORDER - assumed 'ERROR_MUST_SELECT_AT_LEAST_ONE_ORDER' (this will throw an Error in a future version of PHP) in C:\Xampp\htdocs\1.0.8.8\admin\ext\batcher\batch_invoice.php on line 18
ERROR_MUST_SELECT_AT_LEAST_ONE_ORDER
Pick'N'Pack and CSV gives a blank page with the words:
Must select at least one order on which to act.
(Might be intended, but I expected a back-button or something similar to that - or the error as a modal or messagestack)
It is possible to select one order with the checkboxes, but clicking another one makes all boxes unticked, and actions cannot be preformed.
Changing the status of an order does not change the status. The filter-by-order-status-dropdown changes to the status selected, but it shows the same orders as before, with the old status(es)
//Daniel
Re: S05E01 - Batch Actions
Posted: Sat Dec 04, 2021 9:42 pm
by Kofod95
@ecartz
Revision recieved 04/12/2021 (dd/mm/yyyy)
Invoice, Packing Slip, Pick'N'Pack all opens a new tab with the message to select at least one order. CSV redirects to a page with that message, with only the browser back-button (or changing the URL) to get back to an admin-page that offers navigation. No errors.
Selecting multiple orders is not possible. Checking a checkbox of an order that is not "marked", changes the URL to that order (oID=X), and removes the previous tick without adding a new one. The "marked" order can be ticked.
Changing the status of an order does not change the status. The filter-by-order-status-dropdown changes to the status selected, but it shows all orders, and the order-status is not updated (regardless of using the silent option, or the email option). The URL after pressing update looks like this:
admin/orders_batch.php?formid=fa4d1789b9f122ef2fb62173e4fbea38a506a524877b873be11455fecb3933ad&action=update
//Daniel
Re: S05E01 - Batch Actions
Posted: Sat Dec 11, 2021 11:43 am
by Kofod95
@ecartz
1.0.8.9-update of paginated_table solves
Selecting multiple orders is not possible. Checking a checkbox of an order that is not "marked", changes the URL to that order (oID=X), and removes the previous tick without adding a new one. The "marked" order can be ticked.
//Daniel
Re: S05E01 - Batch Actions
Posted: Tue Dec 14, 2021 9:58 am
by Kofod95
@ecartz
The only error persisting now is the missing update of orders.
It could be argued that the white page telling:
Must select at least one order on which to act.
should be given a back-button for the "Delivery CSV"-option
//Daniel
S05e01 - Batch Actions QUESTIONS/SUPPORT
Posted: Wed Jan 05, 2022 7:14 am
by admin
Addon:
Allows shopowner to save time by performing lots of actions in one go (eg print off 50 invoices, rather than print off individual invoices).
Download:
viewtopic.php?f=28&t=1071
--
Questions / Comments / Concerns
Re: S05e01 - Batch Actions
Posted: Mon Aug 22, 2022 9:22 am
by 14Steve14
Would it be very hard to replace the text in the first column header which says OID with a 'Select All' button.
I have been looking into this but an no coder and am a little bit confused as all the examples I can find use tables to create the page.
We have completed orders selected as 'Payment Received' and some days it a PITA to click every box on in the list. Some days there are over 60 orders.