I was wondering if anyone knows of any modules / example code / documentation on implementing non commerce cart line item collections
Examples can be: Favorites, Watched items, Products on back-order

This would have four key elements:
1) A container entity to hold the line items
2) A way to add line items grammatically / add to collection form (same as add to cart)
3) view the collection (a view)
4) Collection actions user actions (an alternative to checkout) or automated actions like inform me on price change.

Point 4 will need specific code written for each use case but looks to me like 1 to 3 can be generalized.

Comments

rszrama’s picture

I've thought about using additional order bundles in the past but have never gone anywhere with it. That approach seems to make sense for something like a wishlist where you want people to specify quantities desired and add a shipping address. It may not make as much sense for something like favorites or watch lists; in those cases I'd probably evaluate the Flag module.

guy_schneerson’s picture

thanks @rszrama, I suppose if you only need the product display a flag would do, but looks to me like even for a none customizable commerce_product (no quantity or other line item attributes) you need the display path.
in any case i was thinking of using this for backorder out of stock items and "using additional order bundles" sounds like the place to start.

rszrama’s picture

Yeah, I'd like into an additional order bundle, but what about an Entity Queue? I'm not sure, but the queue might be a fieldable entity itself. amateescu was working on such a module, but it might still be a sandbox.

guy_schneerson’s picture

thanks @ rszrama
worth checking it out Entity Queue if i get the time ill investigate both the Entity Queue and order bundles approach.
for now i will look into adding a new function for stock that allows users to override the add to cart function so people can write their own back order functionality until i have a solution for this

guy_schneerson’s picture

Status: Active » Closed (works as designed)

closing this as it needs investigation and specific solutions for specific use cases,

If anyone is interested we had a good session on this in the Brighton Area Drupal Camp see notes