Open orenyk opened 10 years ago
Would this make more sense on the finalize reservation view? It would certainly be easier to implement.
If we did go the JS route, we could do something like Amazon, where they display a modal that both confirms that you added an item to your cart and suggests other items to add.
This isn't going to be trivial and isn't strictly necessary prior to export; moving to the Wish List.
Ah yeah, I'm remembering now, this is actually an even older feature idea, and we realized quickly back then that it would be pretty hard to implement. (We were thinking we'd need some kind of Amazon-esque related products algorithm :grimacing:)
We ended up going with the "associated equipment models" feature instead so admins can decide what equipment models go with what. But for this feature we'd need to add another view for it in the cart. Not as hard as making an Amazon algorithm, but what would take the longest is figuring out where exactly it should go for the best UX.
true. although an (extremely simplified) amazon-esque algorithm wouldn't actually be too difficult to implement I think
You could make a graph where the vertices represent equipment models and the (weighted) edges representing how many times two models have been reserved at the same time, (you could even go through reservation history to build associations, and you also probably need to normalize all the weights somehow).
Then you can use these associations to build a hash of 'suggested' models where the key is the model and the value is the 'weight' or 'closeness' of the associated model (just add the edge values), and throw out any entries with too-low closeness values.
The implementation would probably be easiest with equipment_model
has_many_and_belongs_to
assocation
At checkout you can just update the table. Normalizing (so that there's a maintainable 'threshold' for deciding if an item is 'close enough' to be recommended) is trickier, but I think you can just divide everything by em.reservations.count
to get a figure for 'when someone reserves X how often do they also get Y'
Definitely a wishlist kind of feature but fun to think about
Nice, it would be great to add a little more machine learning / intelligence to the backend. I feel like we also discussed something like this in terms of expected reservation lengths, maybe with the waitlist? Either way, good stuff!
Via IdeaScale:
We have some of this functionality with
associated_equipment_models
, not sure if this could just be adding some JS magic to the cart.