Comments (7)
@huoxito What are thoughts on this please? Cheers
from spree-product-assembly.
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.
from spree-product-assembly.
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 variant_id
and a product_id
so we'd know where to look. See this piece of code here.
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.
from spree-product-assembly.
@huoxito Hey, I was just wondering how your strategy for this would change now that the Packer uses InventoryUnits instead of LineItems.
from spree-product-assembly.
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.
from spree-product-assembly.
Hi, have you some update for this issue? My ecommerce sells computers and users want to customize
the computers with Ram, cpu, Hdd,.... Every component can be sell or can be sell in a bundle (computer).
Example: I can sell a Ram product or I can give the user the ability to customize him computer with a Ram. The Ram product is the same.
from spree-product-assembly.
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.
from spree-product-assembly.
Related Issues (20)
- ETA on 3-0-stable compatibility? HOT 3
- translation missing en.spree.validation.must_be_int HOT 1
- Bundler could not find compatible versions for gem "activemerchant"
- Parts should be linked to Variants instead of Products. HOT 7
- Possible Issue with setting part master to not track inventory HOT 1
- Disabling of before_payment state eliminates payment_sources HOT 3
- Part items pricing not adding up
- Option to NOT add part to product assembly
- can_be_part and individual_sale translation
- Didn't work for spree 3.0.0 HOT 1
- Compatibility with Rails 5 and Spree 3.2
- Need of a clearer readme || Getting started || Documentation HOT 1
- spree 3.3 compatible? HOT 3
- Stock availability bug with multiple variants in assembly HOT 2
- Missing products due to translations HOT 2
- Caching issue on assembly product pages (product cache key) HOT 1
- Spree 3.7 compatibility
- undefined method `variant_options' in admin/orders/######/edit HOT 1
- Spree 4.2 HOT 1
- Not tracking inventory correctly when same product in multiple bundles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree-product-assembly.