Speak to our experts today 0333 004 0333
Speak to one of our experts today
User Guides

EKM Tag: [ekm:add_to_wishlist]

Use this tag to output a button that allows a logged in customer to add a product to their wishlist.

This tag can only be used within the product page. This tag MUST be placed within the [ekm:productstart] and [ekm:productend] tags in order to work.

  • Tag Information
Basic Use
This tag is used to output a basic add to wishlist button on your product page.

[ekm:add_to_wishlist][/ekm:add_to_wishlist]
                                
Advanced Use
This tag will output an add to wishlist button on your product page and will notify the customer if they need to login or the product has already been added to their wishlist.

[ekm:add_to_wishlist]

    output_start='<div>';
    output_item='[button]';
    output_item_no_login='<p>Login to add this product to your wishlist.</p>';
    output_item_added='<p>Product is in your wishlist.</p>';
    output_end='</div>';

    button_class='add-to-wishlist-button';

[/ekm:add_to_wishlist]
                                
This would output something like...
Tag Attributes
output_start
output_start='';

Here you can specify what will be output at the start of the ekm:add_to_wishlist tag. Typically you would start to output some HTML.

Example: You would open a containing div at this point.

Value
Description
{user defined}
Specify your own starting HTML.
output_item
output_item='';

This where you can control the output of the actual button or create your own button.

Value
Description
{user defined}
Specify your own item HTML and include the tags you wish to use. A full list of these tags can be seen below.

Within [ekm:tags] you would need to open and close them in the same way you would open and close HTML tags. However with attribute tags, like the ones below, they are self closing and work alone without any need to close them.

Value
Description
[button]
Outputs an "add to wishlist" button.
[onclick]
Outputs the javascript that should run when the button is clicked. Add this to the onclick HTML attribute of the button.
Useful when creating your own button.
[url]
Outputs the url to use in the formaction HTML attribute of the button.
Useful when creating your own button.
[is_added]
Outputs "is_added" when the product has already been added to the wishlist.
output_item_no_login
output_item_no_login='';

When the customer is not logged in then this attribute can be used to output a message instead of the button.

If this attribute is present but has no value then the whole tag will output nothing when a user is not logged in.

If this attribute is not present then the output_item attribute will be output when a customer is not logged in.

Value
Description
{user defined}
Specify your own item HTML and include the tags you wish to use. A full list of these tags can be seen below.

Within [ekm:tags] you would need to open and close them in the same way you would open and close HTML tags. However with attribute tags, like the ones below, they are self closing and work alone without any need to close them.

Value
Description
[button]
Outputs an "add to wishlist" button.
[onclick]
Outputs the javascript that should run when the button is clicked. Add this to the onclick HTML attribute of the button.
Useful when creating your own button.
[url]
Outputs the url to use in the formaction HTML attribute of the button.
Useful when creating your own button.
output_item_added
output_item_added='';

Output instead of output_item when the customer has already added the product to the cart.

Value
Description
{user defined}
Specify your own item HTML and include the tags you wish to use. A full list of these tags can be seen below.

Within [ekm:tags] you would need to open and close them in the same way you would open and close HTML tags. However with attribute tags, like the ones below, they are self closing and work alone without any need to close them.

Value
Description
[button]
Outputs an "add to wishlist" button.
[onclick]
Outputs the javascript that should run when the button is clicked. Add this to the onclick HTML attribute of the button.
Useful when creating your own button.
[url]
Outputs the url to use in the formaction HTML attribute of the button.
Useful when creating your own button.
[is_added]
Outputs "is_added" when the product has already been added to the wishlist.
output_end
output_end='';

Sets whether the tag will be output. Set this to no and the tag will not output. Useful for turning off seasonal offers.

Value
Description
{user defined}
Specify your own HTML to go after the add to wishlist button.
button_class
button_class='';

Sets a CSS class name on the button output by the [button] attribute tag.

Value
Description
{user defined}
Specify your own class name to add to the button.