How to add Wishlist buttons to Search Results Page?

Smart Wishlist Supports Wishlist button on Search Results Page also. If you want to add wishlist button on Search Results page, please follow the below steps:

1. Open the template which is used to display the Search Results. It could be either of the following file depending on the theme.

snippets/search-result-grid.liquid, templates/search.liquid

2. Locate the code for displaying price and add the following code at the location you want the Wishlist button to appear.

<span class="smartwishlist searchwishlist" data-product="{{ }}" data-variant="{{ }}"></span>

Once added, the Wishlist button shall start appearing on Search Results page also.

Note that this code is slightly different from the code for collection page. The ‘product’ variable has been replaced by ‘item’.

Leave a Reply

Your email address will not be published. Required fields are marked *