-
Notifications
You must be signed in to change notification settings - Fork 187
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 the ability to create Kits using Products and let the user pick the variant #75
Comments
@huoxito What are thoughts on this please? Cheers |
Hey @simmsy I haven't really had any chance to take a deeper look at this to reply with ideas and examples on how to achieve it but I will take a look once I'm back home on Monday. We're at Spree Team week until tomorrow. |
Hey @simmsy finally looked for a bit to into what I'd change to have that feature here. First thing we need to allow users to select a general product on backend "products/:product_id/parts". Right now you need to pick a variant. We should make it so that something like let customer choose shows up on the Options dropdown for that page. Of course besides changing the UI we need to make the backend code handle that. We could pass a Considering the admin user is able to also add a product to a bundle. Then we need to make the OrderContents object in spree core smarter (or extend it) to build the LineItem#parts on the fly. For example: Customer would pick which variants available for the bundle they want to purchase. Once they click the Add to Cart button we would persist those variant ids in some new table associated to line items or perhaps an attribute on the line item itself. By doing that we should be able to change the implementation of this method to return those parts chosen by the customer when necessary. So any time spree builds the shipments it should gracefully pick the proper variants and we wouldn't have to change much, perhaps very little of the Packer and Spree::Stock logic in general. See this code for reference on how this extension currently build the parts for a bundle / kit. It all starts by fetching the parts of the line items. That is the approach I'd take to add the feature to this extension. Can't say I'm 100% sure that is the best way to do it without actually doing it and see if any challenges come up. Over all I think it's a great feature and surely could be implemented using the current product-assembly code base. No idea when or if this will get in here any time soon though but wanted to log my thoughts in case someone else of even me what to give that a try in the future. |
@huoxito Hey, I was just wondering how your strategy for this would change now that the Packer uses InventoryUnits instead of LineItems. |
hey @hipsterelitist, I probably know less about this extension now than when I wrote that but I think I'd still start using the same line of thought more or less, perhaps now it would build the parts earlier on the InventoryUnitBuilder and the change from LineItem to InventoryUnit on the Packer should make this easier to implement. |
Hi, have you some update for this issue? My ecommerce sells computers and users want to customize |
It's been a while so I don't remember the details, but I believe this commit in master allows user to select the variant in a bundle. |
Add the ability to create Kits using Products, thereby letting the user select the product's variant from the options provided.
An example would be a Snow Board and Bindings. The User would be required to select the size of Snowboard and also the size of Binding to build the Kit.
The text was updated successfully, but these errors were encountered: