Breaking out this feature request from http://drupal.org/node/881752#comment-3685442 .

I would like to add the ability to store/share user carts, and retrieve them later. I think cart links might be a good place to start -- adding a cart link builder that generates a link from the current cart might provide a way for users to generate cart links to share on other sites.

My initial thoughts:

1. On the cart page, cart links can generate a URL link that visitors can cut and paste to send to anybody they'd like to send their cart to, if the admin allows.

2. When any cart link is followed, if the user has any items currently in their cart, their current cart link is stored as a "previous" cart and a new empty cart is populated from the link.

3. The cart page shows a history of previous carts, back to a configurable time or count. Users may swap their current cart with any in their history, by simply following one of the links.

4. Any or all previous carts can be easily deleted.

5. On checkout with payment, the current cart is emptied along with any matching previous carts. Other carts remain in the history.

6. Provide users with a link to "save my cart for later"

7. Provide admins with a configurable security option -(a) "Private cart links" that include a user-based token that cannot be used by other users - no sharing, but cart history -(b) "Sharing cart links" that uses a hash to obscure links and associate with a particular user account, allowing them to be canceled and/or user account blocked, and the source tracked -(c) "Open cart links" that uses something similar to today's links, possible to construct from third party systems with knowledge of product nids and the pattern, skips tokens and hashing entirely

8. Perhaps even provide a permission for "Sharing cart links" to restrict that functionality to certain roles when the "Private cart links" is otherwise selected -- to allow members of a role to generate links that can be used by others, while only allowing regular users the cart history.

Comments?

Comments

tr’s picture

Status: Active » Closed (won't fix)

This seems like a useful piece of functionality. I think you should write a module that does this, and if it proves useful then we can consider it for incorporation into Ubercart core.

Instead of doing your own hashing and keeping track of various links, I think there are several tiny URL modules for Drupal that you can probably use to do this for you.

Some of this can already be done by http://drupal.org/project/uc_save_for_later, so you might consider helping out with that and adding features rather than starting a new project.