This plugin provides a common framework that other Zen Cart plugins can use to manipulate a newly-created field — updated_by — in the orders_status_history database table. The plugin includes an admin auto-installer to create the database field and a set of functions that provide a common-use manipulation of that field.
The primary processing file (/includes/functions/extra_functions/osh_updated_by_functions.php) contains the functionality used by both the Zen Cart storefront and admin:
- If not already present, the field named updated_by is added to the database table TABLE_ORDERS_STATUS_HISTORY.
- If running on the admin-side, a function named zen_updated_by_admin is defined (if it doesn't already exist). The function creates a common-format value for the updated_by when an order's status is updated by a Zen Cart admin.
- If not already present, the function zen_update_orders_status_history is defined to provide common handling/creation of an orders_status_history record (including the value for the updated_by field).
Note: v2.0.0 of the plugin operates only on Zen Cart versions 1.5.4 and 1.5.5. For previous versions of the plugin, please refer to the releases posted on this GitHub repository.