MoveToWishList for UserWishList
Addon for UserWishList to move items between multiple wishlists
Required Extras: UserWishList, DocLister
MoveToWishList extends the functionality of UserWishList by allowing users to move items between different wishlists. It provides both single-destination buttons and multi-destination dropdown selects. The addon seamlessly integrates with UserWishList's existing features, including dynamic counter updates and toast notifications.
Example usage:
- Move items between a main wishlist and a private list
- Transfer products between seasonal wishlists
- Organize items across different categories or priority lists
Key Features
- AJAX management for instant movement of items
- Real-time updates without page reloading
- Toast notifications to confirm operations
Installation instructions
- Install with Extras Module
- Make sure you have set the "caption" field for all your UserWishList (userTv) template variables.
MoveToWishList Parameters
- &item_id: Document ID
- ¤t: Current UserWishList Tv name
- &moveToLists: Destination UserWishList Tv name (or a comma separated list of names)
- &btnClass: (optional) classes for Move to WishList Button
- &btnAddText: (optional) text for Move to WishList Button
- &selectClass: (optional) classes for Move to WishList Select
- &wrapperClass: (optional) classes for the Select Wrapper
Like UserWishList, MoveToWishList provide control over the appearance and behavior of Toast notifications.
See UserWishList Toast notifications Parameters.
Usage
- Add the snippet call to your UserWishList Chunk tpl
Move the item to a different Wishlist
When the &moveToLists parameter includes a single list name, the MoveToWishList snippet generates a button that moves the item to the target Wishlist.
Example with custom button class and text
[!MoveToWishList?
&item_id=`
[+id+]
`¤t=`UserWishList`
&moveToLists=`UserWishList-Privata`
&btnClass=`btn btn-info`
&btnText=`
<i class="fas fa-exchange-alt">
</i>
Sposta in [+destination_name+]
`!]
Move the item to the selected wishlist
When the &moveToLists parameter includes multiple list names, the MoveToWishList snippet automatically generates a selection form to choose the preferred list for transfer.
Example with custom select and wrapper classes
[!MoveToWishList?
&item_id=`[+id+]
`
¤t=`UserWishList`
&moveToLists=`UserWishList-Regali,UserWishList-Privata`
&selectClass=`form-control`
&wrapperClass=`mt-3 mr-5`
!]