b101aa2 Posted January 17, 2007 Posted January 17, 2007 This is kind odd thing. Does anyone know of a contrib or mod that one can edit the product ID after initital creation, or even assigned your own product ID during the creation of a product? For me, I need them to be upc codes. So, hhmm.
Jack_mcs Posted January 17, 2007 Posted January 17, 2007 Setting the ID to such a code wouldn't gain you anything. It is a number that is used behind-the-scenes. Besides, it would probably break the shop since the ID is incremented automatically. Are you sure you don't mean the product model number? Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
b101aa2 Posted January 17, 2007 Author Posted January 17, 2007 Nope. product id. Right now, I have to go into mysql db and edit the three tables before I can do options. UPC must be product ID for sales reporting to external companies and distributors. Otherwise a complex set of queries would have to be developed from scratch that would export the orders and match them with existing product tables to achieve the same result. As an example, product ID of 62 will not meet the requirement of teh upc code of the movie Titanic that is 993330943187. It's perfectly ok for a small shop to add another colum in products for barcodes, but if they will need to provide reporting to companies like soundscan, their contract will be dropped in half a nano second.
Jack_mcs Posted January 18, 2007 Posted January 18, 2007 You're going to run into problems then. When a product is added, the product_id is automatically incremented to the next number. So even if you set up a product id to the number you wanted, the next product would be that number plus one, which won't work for what you describe, I don't think. You can change the code, possibly, to make it work, but it would be just as easy, and less danagerous, to just add a upc code (I think there is a contribution for that already). Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
cannuck1964 Posted January 18, 2007 Posted January 18, 2007 You maybe able to set the product_id = to the model number (sku) as well. As long as you know that all will be unique, and not contain letters, you should be ok. Here is what you would have to do, first, create the product as is normally done, then add in some logic to enter the product id when creating the product, this should not be a huge thing to do. The system would have to be smart enough to first check that it is not present, and if not create it, if it is present, put up a warning message and do not add it in, this could be shown on the product preview page, so that nothing has been entered into the system. You may need to alter the product id field so it will be large enough for these new product ids, as well, you would need to remove the auto-increment part on the products table. cheers, Peter M Peter McGrath ----------------------------- See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation
Recommended Posts
Archived
This topic is now archived and is closed to further replies.