Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to import categories #1

Open
joshribakoff opened this issue Jul 11, 2013 · 1 comment
Open

Add ability to import categories #1

joshribakoff opened this issue Jul 11, 2013 · 1 comment

Comments

@joshribakoff
Copy link
Member

In the products spreadsheet, just have a categories column. If they put a numeric value it assumes its the category ID, if they put alphanumeric text it assumes its the name of an existing category, or category to create. Categories separated by comma and optional white space after the comma. A slash indicates hierarchy e.g. "clothing/shirts" instructs it to create "clothing", and within that create a subcategory "shirts".

Not sure if they need the ability to mix & match category IDs & category names within the same row. I don't see that being needed in practice, doesn't hurt anything if it happens to behave that way though.

Prefixing a category ID or name with a minus unlinks that product from that category.

They should also be able to delete categories standalone, without products. In this version, prefixing with a minus deletes the whole category! (powerful operation, they better be warned about the products that would be affected!)

@joshribakoff
Copy link
Member Author

This is done but only works with top level categories for adding new categories. As far as creating nested categories at import, performance would be killed unless changed to materialized path for storing the hierarchical data. However since a category can have multiple parents, the materialized path itself will have to be stored in an association table.

Also consider the following

"baz/bat/foo/bar; foo; bar/foo".

In this DSL the user is asking for 3 categories, all of which contain "foo" in their path. Is there one category named foo created? Or multiple? Will have to decide how this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant