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

Advice on Subcategories #8

Closed
ghost opened this issue Jan 25, 2017 · 7 comments
Closed

Advice on Subcategories #8

ghost opened this issue Jan 25, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Jan 25, 2017

I'm just getting into this piece of code (Great Work!) and I'm wanting to add subcategories. Any suggestions on how to go about this? I'd be looking to have Brand as the main category, then Specific Phones (We're a cellphone shop). Also looking to add Variants. I just need an overall idea of how to go about this.

Thanks.

@andrecrt
Copy link
Member

Hi!

Thanks for your feedback, interest on the project and looking forward to seeing your store powered by it!

The concept of Category/Collection is something up to the storefront, as you might have already noticed. On the API/Atlas (https://github.com/yoonic/atlas) side of things, there's only the concept of "Collections" which can be used to group Products (and also Contents, Customer, etc if you wish).

In order to achieve sub-categories, you just need to set a parentId to the sub-category (collection) --> https://github.com/yoonic/atlas/blob/master/src/resources/collections/models.js#L87-L89

@ghost
Copy link
Author

ghost commented Jan 26, 2017

I'm building 2 sites - one backend for corporate customers for the Boss and a simple Disaster Preparedness Kits ecommerce site ( I can show you the latter one once it is up!).

@andrecrt
Copy link
Member

Nice! Did my answer help?

@ghost
Copy link
Author

ghost commented Jan 31, 2017

Yes, I believe it will work. I've been working on creating Variants first. Also, wiped my HD accidentally so I'm starting over a bit. I'll let you know on the subcategories!

@ghost
Copy link
Author

ghost commented Feb 1, 2017

Question on variants: I'm getting the options to appear on the CartItems. Where will I be storing the Product Variant Data, or is there nothing to hold the Data at the moment and i must create my own StoreHandler?

@andrecrt
Copy link
Member

andrecrt commented Feb 1, 2017

The Products entity has the concept of "metadata" that is an object in which you can store whatever sorts of information you want. You can use that for variant logic.

@andrecrt andrecrt closed this as completed Feb 1, 2017
@mateomorrison
Copy link

@stevecawdery Share that backend with the opensource! Would love to integrate it

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

No branches or pull requests

2 participants