Each day we upload the music files we produce to our server in a protected directory.
Selected files have to be automatically renamed with its extension on demand (create a OSC Admin page with "from / to" file date filter + validation button).
Notice that each new uploaded file starts with its REF # (REF - xxxx - [url removed, login to view] or [url removed, login to view])
Use its REF and search in products.products_model table if exist.
then use products.products_id and search for the associated filename to apply (use products_attributes and products_attributes_filename tables) - don't forget to look at the extension (could be mp3, zip etc). filename is always like "xxxx - xxxx.ext"
then rename file + extension as it was found in database
then update orders_status_history table set status orders_status_id to “3” where orders_status_id = 2 or =4
then notify customer by email (use orders_comment + table + orders_status_history table).