View Single Post
  #4  
Old 09-09-2008, 06:14 PM
 
wayfarer wayfarer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 56
 

Unhappy Re: How to disable Wish List redirect

Actually... no it doesn't work. It will only work if a section of button.tpl is commented out. This section here:

{if $js_to_href ne 'Y'}
{assign var="onclick" value=$href}
{assign var="href" value="javascript: void(0);"}
{/if}

HOWEVER, if I do that then this small mod (http://forum.x-cart.com/showthread.php?t=40022), which is supposed to show the number of items in the customer's wish list every time something is added, doesn't update the number of items - until the page is refreshed by clicking on another page or actually going to the wish list page...

I have included the full text of my button.tpl - what is the significance of that piece of code and how can make a change that will allow the disabling of the wish list to work, as well as have the number of items updating correctly?




{* $Id: button.tpl,v 1.25.2.2 2006/06/16 10:47:41 max Exp $ *}
{if $config.Adaptives.platform eq 'MacPPC' && $config.Adaptives.browser eq 'NN'}
{assign var="js_to_href" value="Y"}
{/if}
{if $type eq 'input'}
{assign var="img_type" value='input class="InputNoBorder" type="image"'}
{else}
{assign var="img_type" value='img'}
{/if}
{assign var="js_link" value=$href|regex_replace:"/^\s*javascript\s*:/Si":""}
{if $js_link eq $href}
{assign var="js_link" value="javascript: self.location='"|cat:$href|amp|cat:"';"}
{else}
{assign var="js_link" value=$href}
{if $js_to_href ne 'Y'}
{assign var="onclick" value=$href}
{assign var="href" value="javascript: void(0);"}
{/if}
{/if}

{if $style eq 'button' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<td>
<{$img_type} src="{$ImagesDir}/but1.gif" class="ButtonSide" alt="{$title|escape}" />
</td>
<td class="Button"{$reading_direction_tag}>
<font class="Button">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/but2.gif" class="ButtonSide" alt="{$title|escape}" />
</td>
</tr>
{/strip}
</table>
{elseif $image_menu}
{strip}
<table cellspacing="0" class="SimpleButton">
<tr>
{if $button_title ne ''}
<td>
<a class="VertMenuItemsLight" href="{$href|amp}"
{if $onclick ne ''} onclick="{$onclick}"{/if}
{if $title ne ''} title="{$title|escape}"{/if}
{if $target ne ''} target="{$target}"{/if}>
<font class="VertMenuItemsLight">{$button_title}</font>
</a>
</td>
{/if}
<td>
{if $img_type eq 'img'}
<a class="VertMenuItemsLight" href="{$href|amp}"
{if $onclick ne ''} onclick="{$onclick}"{/if}
{if $title ne ''} title="{$title|escape}"{/if}
{if $target ne ''} target="{$target}"{/if}>
{/if}
<{$img_type} {include file="buttons/go_image_menu.tpl"} />
{if $img_type eq 'img'}
</a>
{/if}
</td>
</tr>
</table>
{/strip}
{else}
{strip}
<table cellspacing="0" class="SimpleButton">
<tr>
{if $button_title ne ''}
<td>
<a class="Button" href="{$href|amp}"
{if $onclick ne ''} onclick="{$onclick}"{/if}
{if $title ne ''} title="{$title|escape}"{/if}
{if $target ne ''} target="{$target}"{/if}>
{$button_title}
</a>
</td>
{/if}
<td>
{if $img_type eq 'img'}
<a class="Button" href="{$href|amp}"
{if $onclick ne ''} onclick="{$onclick}"{/if}
{if $title ne ''} title="{$title|escape}"{/if}
{if $target ne ''} target="{$target}"{/if}>
{/if}
<{$img_type} {include file="buttons/go_image.tpl" full_url='Y'} />
{if $img_type eq 'img'}
</a>
{/if}
</td>
</tr>
</table>
{/strip}
{/if}
__________________
X Cart Pro
v. 4.1.9
Download Expander (from Altered Cart)
X-Magnifier
Dynamic Preview (from BCS Engineering)
Customer Rewards Points (BCSE), used as credit purchasing system
Reply With Quote