You have chosen to sponsor your bid up to a maximum amount of .
We have Opencart Shopping Cart system and use a custom ORDER EXPORT program. We need an enhancement to the ORDER EXPORT program: The program adds orders to a orders.csv file.
1. Right now the program writes the orders to orders.csv. Edit it to write the orders to orders-holder.csv and also write the orders to orders-backup.csv as well, which we can clear manually as it grows.
2. To prevent concurrent writing to a file and the file getting corrupted, we need a file locking mechanism. i.e. if orders-holder.csv file is opened for writing, then if an order comes from another browser, then lock the file (orders-holder.csv), till the first write operation is completed, then unlock it for the second process.
3. Set cron job once an hour 50 minute) Lock orders-holder.csv file and copy (NOT append) orders-holder.csv to orders.csv. Clear out orders-holder.csv and unlock