Add to Wishlist

I created a custom image button called Add To Wishlist. I would like to replace the text link of add to wishlist with the button I have created. Looking around the forum I have not been able to find a solution to this. Can anyone help?

you need to put your button (and its references) in the

add_to_wishlist.tpl



in:

skins/YOUR_SKIN/customer/buttons/

{if $auth.user_id}

{include file=“buttons/button.tpl” but_text=$lang.add_to_wishlist but_style=“text” onclick=$but_onclick but_type=“”}

{else}

{assign var=“c_url” value=$current_url|escape:url}

{include file=“buttons/button.tpl” but_text=$lang.add_to_wishlist but_style=“text” but_type=“” but_href=“$index_script?$target_name=auth&$mode_name=login_form&redirect_url=$c_url”}

{/if}





Where would I put it an how would it be? The name of the image file is wishlist.gif

When I tried to edit the file it does not come out with the button that I created.

The file add_to_wishlist.tpl is located in the addons folder. It seems that if it’s not text based than the buttons source is from the file /buttons/button.tpl

I know this is OLD, but could someone answer the nexus last post? I am really curious how to create buttons and this would help a lot.

[quote name=‘Dave the Slave’]I know this is OLD, but could someone answer the nexus last post? I am really curious how to create buttons and this would help a lot.[/QUOTE]



In 2.0+ versions the add to wishlist button is generated by the HTML link code below this {if} statement in the buttons/button.tpl file:


{elseif $but_role == "text" || $but_role == "act" || $but_role == "edit" || ($but_role == "text" && $but_name)} {* TEXT STYLE *}

{$but_text}




it is a text link… I’m still trying to find out how to break the wishlist link out of the button.tpl file and allow it to be placed outside of the buttons section on the details page. But, I have been able to test and confirm that the this is generating the link.

I will work on it too - maybe together we will figure it out :slight_smile:

I found how to modify the Add to Wishlist button in version 2.0.+:



skins/your-skin/customer/addons/wishlist/views/wishlist/components/add_to_wishlist.tpl

is the tpl file that has the include.



for my purposes, I was able to add this to style it:

but_meta=“addtowishlist”

Let try and reply :smiley: