jdhamhock Posted September 5, 2011 Posted September 5, 2011 My tables have product_id set as an "Int" but my new product names are alphanumeric, so when I import them they get set to "0". How do I make product_id accept alpha?
web-project Posted September 5, 2011 Posted September 5, 2011 product_id are normally numbers only as only numbers go up: 1,2,3,4,5 and so on. I haven't seen any systems which used the following format: 1a, 4c, 7h, 9z I know that the modification is possible but you will need to modify the entire database (at least several tables) and entire code to support different id system. product names are alphanumeric no connection to product_id, as above data is stored in product_name field. Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you.
jdhamhock Posted September 5, 2011 Author Posted September 5, 2011 When I change the product_id to "char" everything works as far as products aligning with correct categories and sub-categories, the big issue is that I lose the product info page. So is there something that can be edited somewhat easily or is this a lost cause? I ask because I cannot have the product_id remain "INT" my vendor uses alphanumeric product codes and with the amount of inventory changes it will take me way too long to edit and align fields to stay up to date.
♥toyicebear Posted September 6, 2011 Posted September 6, 2011 You will have to change code in alot of the shop files to allow for such id's , basically any file which is related to product_id's But you would probably be much better of if you let the default osCommerce product_id system in "peace" and just created an extra filed in the products table for the import id..which then was only used for the import feed id matching. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here]
jdhamhock Posted September 6, 2011 Author Posted September 6, 2011 You will have to change code in alot of the shop files to allow for such id's , basically any file which is related to product_id's But you would probably be much better of if you let the default osCommerce product_id system in "peace" and just created an extra filed in the products table for the import id..which then was only used for the import feed id matching. Problem is my vendors product_to_catalog file contains ~7900 entries and there are currently only ~7000 products available so by using "INT" and letting it auto increment I will ultimately lose my product-to-category referance without doing a whole lot of editing to that particular file, unless I am not understanding your solution. This is frustrating because everything works when product_id is set as "char" except for that darn product_info page, I get "page not found"
jdhamhock Posted September 6, 2011 Author Posted September 6, 2011 You will have to change code in alot of the shop files to allow for such id's , basically any file which is related to product_id's But you would probably be much better of if you let the default osCommerce product_id system in "peace" and just created an extra filed in the products table for the import id..which then was only used for the import feed id matching. Could you elaborate on your "work-around", I really dont see anything else, without a code rewrite, I guess.
♥toyicebear Posted September 6, 2011 Posted September 6, 2011 You will run into problems from product info page, to the shopping cart, to orders and so on...basically through the whole catalog..since all is based on unique numbers only product id. You might get it to work, but as mentioned you would need to edit all catalog files where product_id is used in some capacity. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here]
jdhamhock Posted September 6, 2011 Author Posted September 6, 2011 You will run into problems from product info page, to the shopping cart, to orders and so on...basically through the whole catalog..since all is based on unique numbers only product id. You might get it to work, but as mentioned you would need to edit all catalog files where product_id is used in some capacity. I am surprised this does'nt come up more often, kinda seems like an obvious roadblock. Guess I should start shopping for a programmer to do some rewrite since there is no simple solution.
satish Posted September 6, 2011 Posted September 6, 2011 Product id is something that is auto increment and an internal integral part of oscommerce. If your vendors have something that should be associated to SKU( product model) or to Product name. No vendor will say that your product ID should be a specific value. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
satish Posted September 6, 2011 Posted September 6, 2011 Also please state the ultimate objective as I think viewing it and thinking it from a broader prospective will help you get a solution that does not need chenging product ID to var Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.