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

Specification problem. #50

Open
ltkrbk opened this issue Jul 24, 2016 · 4 comments
Open

Specification problem. #50

ltkrbk opened this issue Jul 24, 2016 · 4 comments

Comments

@ltkrbk
Copy link

ltkrbk commented Jul 24, 2016

I am current use this plugin to build a warehouse management system for shoes.
We known that shoes could have different size such as 5, 5.5, 6 etc..
How do we add different specification for one particular inventory?
So we can know how many stocks do we got of every size for one shoes.

Thanks.

@stevebauman
Copy link
Collaborator

Hi @ltkrbk, you could use variants for this:

https://github.com/stevebauman/inventory/blob/v1.7/docs/VARIANTS.md#variants

For a specific shoe, you could create variants per shoe size? This allows you to have individual stocks per variant (shoe size).

@ltkrbk
Copy link
Author

ltkrbk commented Jul 25, 2016

Hi @stevebauman thanks for your quick reply,
I've check the variants and it's useful.But what if one shoes have 3 different colors and each color contains
5 sizes. Such as datas below:
{"inventory":{"color":{"red":{"size":[1,2,3,4,5]},"green":{"size":[1,2,3,4,5]},"blue":{"size":[1,2,3,4,5]}}}}

I think it's little bit difficult for variants to handle.What I think is use Baum\Node for Inventory Model instead of use variants. But I think it's not a good solution,it's tricky to get relationship between each Inventory.Any suggestions?

@ltkrbk
Copy link
Author

ltkrbk commented Jul 26, 2016

It really clear my mind after I review the code and readme of variants today.Somehow I miss the point of the variants.I am using variants for the inventory now.
Thank you

@cdarken
Copy link

cdarken commented Dec 29, 2016

Hi @ltkrbk. Can you share a bit of sample code how you managed to use variants with multiple attributes like shoe size and color in your comment?

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

3 participants