Hi all,
I am trying to convert the Buy Now and Add to Wish List button/links on the product/thumbnail list to small icon-like graphics. I figured the first thing to do is to convert the buttons to simple style (I had previously changed them to style="button") and then move on to change the label to be blank, just leaving the graphic link. However, when I change the relevant code pertaining to the button links in /customer/main/buy_now.tpl to style="simple" like in the following example
from:
Code:
<td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product.add_date`.submit();"}</td>
{else}
<td>{include file="buttons/buy_now.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product.add_date`.submit();"}</td>
{/if}
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne "" && $special_offers_add_to_cart eq "" && ($product.is_product_options ne 'Y' || $buynow_enabled)}
<td style="padding-left: 20px;">
{include file="buttons/add_to_wishlist.tpl" style="button" href="javascript:document.orderform_`$product.productid`_`$product.add_date`.mode.value='add2wl'; document.orderform_`$product.productid`_`$product.add_date`.submit()"}
</td>
to:
Code:
<td>{include file="buttons/add_to_cart.tpl" style="simple" href="javascript: document.orderform_`$product.productid`_`$product.add_date`.submit();"}</td>
{else}
<td>{include file="buttons/buy_now.tpl" style="simple" href="javascript: document.orderform_`$product.productid`_`$product.add_date`.submit();"}</td>
{/if}
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne "" && $special_offers_add_to_cart eq "" && ($product.is_product_options ne 'Y' || $buynow_enabled)}
<td style="padding-left: 20px;">
{include file="buttons/add_to_wishlist.tpl" style="simple" href="javascript:document.orderform_`$product.productid`_`$product.add_date`.mode.value='add2wl'; document.orderform_`$product.productid`_`$product.add_date`.submit()"}
</td>
The style changes fine, showing the text link and go button next to it, but, clicking on the link does not add the product to the cart and when I hover my mouse over the text label or the go button image, the status bar of my browser (lefthand bottom) displays: javascript
: void(0);
If I change the button style back (this is the only change being made), the product is added to the cart as expected, and everything works as it should...
I have discovered that this only appears to be the case in Internet Explorer. Firefox works just fine...
Can anyone shed any light on why the functionality stops working when changing the button style? Any help would be much appreciated...