Community Add-Ons

Add file to this package
Top » Other

product_model auto insert
for osCommerce Online Merchant v2.2

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
Expand All / Collapse All
products_model auto insert v1.21 kornel76 11 Dec 2008  

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.

products_model auto insert v1.20 psynaptic 5 Apr 2007  
v1.10 azer 17 Jan 2007  
product_model auto insert v1.0 CybrGost 1 May 2004  
product_model auto insert Cybr Gost 1 May 2004