Ever wanted to create a pure wishlist based on your entries. With the wishlist for ExpressionEngine you are able to create an entry based wishlist. No more struggeling arround all your code, just use the simple set of tags of the Wishlist module. The wishlist module also support a public wishlist that you can share with an unique url across your social network.
Make sure your system meets the minimum requirements:
The add tag will add an entry to the wishlist table.
{exp:wishlist:add}
Below are the Tag Variables. Those Variables can be used in the tag described above
Set the entry ID that has to move to the Wishlist
{exp:wishlist:add entry_id="15"}
Set the return url
{exp:wishlist:add return_url="/example/wishlist"}
return only the url instead of an HTML element
url_only="yes"
Below are the Tag Variables. Those Variables can be used in the tag described above
Returns if the user has any entries added to the wishlist.
{wishlist:has:items}
Returns if the user has any public entries added to the wishlist.
{wishlist:has:items:public}
Counter of the total items.
{wishlist:total:items}
Counter of the total public items.
{wishlist:total:items:public}
(added in v1.0)
Triggerd before saving the entry to the wishlist
if (ee()->extensions->active_hook('add_wishlist_start') === TRUE)
{
ee()->extensions->call('add_wishlist_start', $entry);
}
(added in v1.0)
Triggered after saving the entry to the wishlist
if (ee()->extensions->active_hook('add_wishlist_end') === TRUE)
{
ee()->extensions->call('add_wishlist_end', $entry);
}
(added in v1.0)
Triggered before removing an entry from the wishlist
if (ee()->extensions->active_hook('remove_from_wishlist_start') === TRUE)
{
ee()->extensions->call('remove_from_wishlist_start', $entry);
}
(added in v1.0)
Triggered end removing an entry from the wishlist
if (ee()->extensions->active_hook('remove_from_wishlist_end') === TRUE)
{
ee()->extensions->call('remove_from_wishlist_end', $entry);
}
(added in v1.0)
Extend the data for the {exp:wishlist:entries}
loop
if (ee()->extensions->active_hook('wishlist_row') === TRUE)
{
$entry_data = ee()->extensions->call('wishlist_row', $entry);
}
{exp:wishlist:wishlist_public_url}
This tag generate a unique url (based on your public url setting in the CP) for you, where your public wishlist items are shown. This way you can share a public list with your friends.
Show a list of all entries from the wishlist.
{exp:wishlist:entries} ... {/exp:wishlist:entries}
All entry field are available inside this tag pair.
Below are the Tag Parameters. Those parameters can be used in the tag described above
Get the url to delete an entry from the wishlist
<a href="{wishlist:remove_from_wishlist}">Delete from wishlist</a>
Return 1 or 0 and indicate if the wishlist entry is public.
{if wishlist:public}...{/if}
Set/Mark an entry as public
<a href="{wishlist:set_public}">Set public</a>
Unmark/unset na entry as public
<a href="{wishlist:unset_public}">Set public</a>
Toggle na entry as public or non-public
<a href="{wishlist:toggle_public}">Set public</a>