Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

attaching categories to a product

http://support.google.com/merchants/bin/answer.py?hl=en&answer=160081

want to create a form that adds categories to products

product 1 could be
electronics

product 2
electronics > audio > audio components




how could I design this process

not sure if google merchant has an api

my best idea is
form1 inserting categories to categories table
form2 updating products table setting categories column
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

You could have a products table with a categories column, but that might be better served with three tables.  Products would be a table, Categories would be a table and Products_Categories would be a junction table establishing a relationship between the other tables.  Products_Categories Would have two columns with the keys of a row in Products and a row in Categories.  In my experience, this third table makes the queries easier to get right.

At the top level of this design, you probably want to decide how many layers of hierarchy you need.  I'm not sure if Google builds that in or if you have to make it up.  I think Amazon builds it in, and you choose where your products fit in their giant online department store.
Avatar of rgb192

ASKER

>>
Products_Categories Would have two columns with the keys of a row in Products and a row in Categories.

could you give example



and how could I do levels
a product may only have one level
electronics
or it could have 3
electronics > audio > audio components

or maybe 5
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Jonathan: Would you consider writing an article for EE on the Google Merchant?
Avatar of rgb192

ASKER

thanks

I should learn the api