Expresso Store Wishlists

Shortlist can integrate with Expresso Store to allow usage of Shortlist for product wishlists with purchased item tracking.

This can be really useful if you're building a gift registry. Setup shortlist as normal to allow a member to add items, then use the Sharing Lists option to let them pass that list around. On the shared list view, simply put some 'add to cart' buttons, and you've got a working gift registry setup.

To set this up is very simple, and requires only 3 small adjustments :

1. Adding a Tracking Parameter to the {exp:store:product} Tags

On the Expresso Store product tag itself we need to enable our custom tracking variable. That just a case of adding a parameter to the tag called 'input:shortlist_track_item="WishlistID"' anywhere you're looping over the wishlist and want to let people add to their cart. Like :

{exp:shortlist:view list_id="{segment_3}"}
{exp:store:product entry_id="{entry_id}" input:shortlist_track_item="WishlistID"}
	..
	<input type="submit" name="submit" value="Add to Cart"/>
{/exp:store:product}
{/exp:shortlist:view}

2. Adding the Shortlist Hidden Tracking Variable to the Product Forms

With the tracking variable enabled from step 1, now just use the {exp:shortlist:store_track_item} tag to add the actual item_id to the product form. Like :

{exp:shortlist:view list_id="{segment_3}"}
{exp:store:product entry_id="{entry_id}" input:shortlist_track_item="WishlistID"}
	{exp:shortlist:store_track_item item_id="{item_id}"}
	..
	<input type="submit" name="submit" value="Add to Cart"/>
{/exp:store:product}
{/exp:shortlist:view}

This simply adds a hidden input to the form with the id of the shortlist item.

3. Updating the Wishlist displays to show when items have been purchased

Now - when the visitor adds that item to their cart we can keep track of the original shortlist item that was the source. When the order with the item is completed we update the original item with details of the purchase.

{exp:shortlist:view list_id="{segment_3}"}
{exp:store:product entry_id="{entry_id}" input:shortlist_track_item="WishlistID"}
	{exp:shortlist:store_track_item item_id="{item_id}"}
	..
	{if extra:store_purchased}
		This Item has Already Been Purchased
	{if:else}
		<input type="submit" name="submit" value="Add to Cart"/>
	{/if}
{/exp:store:product}
{/exp:shortlist:view}

Optionally you might want to show the owner addtional details :

{exp:shortlist:view list_id="{segment_3}"}
{exp:store:product entry_id="{entry_id}" input:shortlist_track_item="WishlistID"}
	{exp:shortlist:store_track_item item_id="{item_id}"}
	..
	{if extra:store_purchased}
		This Item has Already Been Purchased
		{if is_owner}
			This Item was purchased in Order #{extra:store_order_id}
			{exp:store:orders order_id="{extra:store_order_id}"}
				..
				Purchased by {screen_name} on {order_date}
			{/exp:store:orders}
		{/if}
	{if:else}
		<input type="submit" name="submit" value="Add to Cart"/>
	{/if}
{/exp:store:product}
{/exp:shortlist:view}