Adding a custom wishlist button

Adding a custom wishlist button

The wishlist is normally triggered through the standard button, placed in one of the corners of the website. If you want to add a custom wishlist button instead, you can do this by adding a JavaScript onclick event to an element. 

This could be added to any element that you prefer to use, i.e. <a>, <button>, <div>

The preferred method, that can be used on both product pages and other pages like category pages, looks like this:

ADDWISH_PARTNER_NS.add_to_wishlist({
title: 'TITLE',
url: 'URL',
imgUrl: 'IMGURL',
price: 'PRICE'})

All parameters needs to have the correct value inserted.

Example:

<a href="#" onclick="ADDWISH_PARTNER_NS.add_to_wishlist({
 title: 'Title of the thing',
 url: 'http://example.com/products/thing',
 imgUrl: 'http://example.com/images/products/thing.jpg',
 price: 'DKK 1999.95'})">Add to wishlist</a>

If you only want the button on product pages, you can use a more basic version of the method; onclick="ADDWISH_PARTNER_NS.link_click()"

Example:

<a href="#" onclick="ADDWISH_PARTNER_NS.link_click()">Add to wishlist</a>

These JavaScript events makes your element trigger the wishlist just like the standard buttons.

Using helloretail graphics

If you would like to use the helloretail icon or logo, for your custom wishlist button - you can download them here:

 

Download

 

Download

 

Download

 

Download


 

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Follow
  • 6 mths agoLast active
  • 30Views
  • 1 Following