Shipstation Tweak for v156 - Updated By
ZC 1.5.6 has a new field in the table zen_orders_status_history which is titled 'Updated_by' and shows the username of the person creating the update.
For a very minor update, you can make the following change to the shipstation_zc.php file so that any updates by Shipstation will show the username instead of just a blank.
Around line 346, find the section that looks similar to this and replace it with this code:
Code:
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments, updated_by)
values ('" . (int) $_GET['order_number'] . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($comments) . "',
'" . zen_db_input($_GET['SS-UserName']) . "')");
Again, quite minor, but thought we would share it.
Re: Shipstation Tweak for v156 - Updated By
Yep, I've been applying that change to the sites I manage that use shipstation and have the 'updated_by' field (whether via the plugin or zc156).
Update: Just make sure to wrap that $_GET value with zen_db_input ... just in case there are single-quotes in the shipstation-admin's name. I usually just hardcode the `updated_by` field as 'shipstation'.
Re: Shipstation Tweak for v156 - Updated By
Thank you lat9. Both valid points. :smile:
Re: Shipstation Tweak for v156 - Updated By