a small php script writen by a friend and given to me that will auto-insert a product model with a custom prefix based on the product_id field in the products table of the osc database
example:
1)edit the php file to connect to your database
2)your product_id is 103, in the script you set the length to "6" and the prefix to "ABC-"
3)the output to the "product_model" field will be "ABC-000103"
when adding a product in the admin section, just leave the product model blank and then run the script. you can run this script as many times as you need, all it does is takes the product_id and add the prefix and max length to output the model #
this script will overwrite any existing product models you have set
Legend: 
Download

Report
There was a '<br>' in at the $model_number. It's made a model number with a line break. I' have deleted and did it at the end of line 76 and 78. Now it prints correct on the screen.
Changes:
- reworked the code to make it more efficient
- added ability to use first n letters of image filename in model number
- added ability to use default text value when no filename exists
- removed the osc layout because it was broken and pointless for this task
- commented the code to make it easy to follow for anyone who wants to modify it
- rewrote documentation in html format
Changes :
---------
1.10 by azer :
- added easier config by define in beginning of file
- now possible to choose between replacing all products_model field or fill only the empty one
- respected the admin the osc layout
To do :
- Count and show number of empty fields
- Write a better confirmation of message at the end
- Show the product processed by the script
- Ask a confirmation showing the number of field that are about to be remplaced or filled
sorry, forgot some info in the php file
a small php script writen by a friend and given to me that will auto-insert a product model with a custom prefix based on the product_id field in the products table of the osc database
example:
1)edit the php file to connect to your database
2)your product_id is 103, in the script you set the length to "6" and the prefix to "ABC-"
3)the output to the "product_model" field will be "ABC-000103"
when adding a product in the admin section, just leave the product model blank and then run the script. you can run this script as many times as you need, all it does is takes the product_id and add the prefix and max length to output the model #
this script will overwrite any existing product models you have set