Posted - 05/27/2022 : 13:15:54
This is actually something we have coded in ourselves for an admin page we made. I highly suggest it for adminorders.asp
Between shipping, customer service, email, livechat - there is often more than one person editing the order notes in the order admin for the same order. It isn't all the time, but it happens pretty regularly here. The problem is that one person will overwrite the notes of another person or even worse yet, overwrite an order status change that another person made. More than one order has been shipped out by shipping while customer service is in the process of refunding that order. (yikes!)
Preventing this is pretty easy. It requires a quick database check for any new edits prior to updating with new data.
For example. When an order is opened in adminorders.asp, a copy of the original data in ordStatusInfo is saved as a variable.
When the person editing that order hits update, the page first checks to see if the data in the ordStatusInfo variable still matches the database. If it DOESN'T match, that means someone else edited that data since you first opened the order and your update would effectively erase their update. Naturally, the page instead gives an error notice and shows what changed since the order was opened at your local computer. This allows us to keep from overwriting each other's changes and saves a heck of a lot of confusion.
Creating this doesn't even require any other updates or additions to the database. It just intelligently uses data that already exists.
|