Adding custom fields and tables to the DB
Posted: Wed Apr 15, 2009 3:25 pm
I need to add a handful of custom fields to the database for the products. I see where I can add fields to the product template and then enter values for those fields in the Product Template section of the EditProduct Screen.
I am not sure that is really what I need to do. The store is going to be a book store. They need some simple "custom fields" like number of pages. I could do that with a template field I suppose, but there are also fields that need to come from a list, like classification and author.
Yes, I also need a custom author table that will store the author's personal information and be bound by a one-to-many relationship to the products. It would be nice if the classifications were managed in a separate table as well.
I know you can add a "Drop Down List" style template field and enter the optional values, but that is not sufficient for the authors. I need an entire table to store name, bio, url, etc.... for each author.
So, do I just add extra fields to the ac_Products table for authorId and classificationId? I am sure the answer to that is no.
Do I use the product template fields and add those fields as "Text Box" input and then manually edit the EditProduct page to instead show a drop down list of authors from the authors table.
Or, do I need to use ac_CustomFields table? I really don't understand that table at all.
Is there any documentation that can point me in the right direction here or is there a thread I can look at?
Thanks for any help.
I am not sure that is really what I need to do. The store is going to be a book store. They need some simple "custom fields" like number of pages. I could do that with a template field I suppose, but there are also fields that need to come from a list, like classification and author.
Yes, I also need a custom author table that will store the author's personal information and be bound by a one-to-many relationship to the products. It would be nice if the classifications were managed in a separate table as well.
I know you can add a "Drop Down List" style template field and enter the optional values, but that is not sufficient for the authors. I need an entire table to store name, bio, url, etc.... for each author.
So, do I just add extra fields to the ac_Products table for authorId and classificationId? I am sure the answer to that is no.
Do I use the product template fields and add those fields as "Text Box" input and then manually edit the EditProduct page to instead show a drop down list of authors from the authors table.
Or, do I need to use ac_CustomFields table? I really don't understand that table at all.
Is there any documentation that can point me in the right direction here or is there a thread I can look at?
Thanks for any help.