View Single Post
  #280  
Old 06-06-2012, 04:35 AM
 
jazzmang jazzmang is offline
 

Member
  
Join Date: Mar 2012
Posts: 12
 

Default Re: X-Cart Ability Template v4.4.x

Found a problem with the sort by feature.

The JavaScript posts back to just "home.php", which IE doesn't handle right. It gives a 404 error.

I did a quick fix by adding / in front of URL and it works fine now.

This was done in skin/ability/customer/main/search_sort_by.tpl.

All I did was change two lines #10 and #11 by adding "/" infront of {$cur_url} wit the end result being:
<option{if $smarty.get.sort eq $name && $smarty.get.sort_direction eq 0} selected="selected"{/if} value="/{$cur_url}sort={$name}&sort_direction=0" class="sort_asc">{$field} &uarr;</option>{* Ascending *}
and
<option{if $smarty.get.sort eq $name && $smarty.get.sort_direction eq 1} selected="selected"{/if} value="/{$cur_url}sort={$name}&sort_direction=1" class="sort_desc">{$field} &darr;</option>{* Descending *}
Seems to have fixed the issue in IE 9 and works fine still in FF 13. That's all I have on my laptop to test with at the moment, I'll do a more through run through of various browsers when I get to work.

UPDATE
Also I found last night that the default "Sort by" value of is blank,
i.e. <option value="" selected="selected">{$lng.lbl_sort_by}</option>

So if a user selects "Sort by..." (which I don't know why but I'm seeing users doing this) it bounces you back to the home page. I fixed this by chaning the value to "/{url}" so that it just takes you back to where you were already. More or leess just idiot proofing the sort menu.

So line 3 in search_sort_by.tpl goes to:
<option value="/{$url}" selected="selected">{$lng.lbl_sort_by}</option>
__________________
Version 4.5.0 with Ability Template v1.052 (modified)
LAWP - PHP 5.3.29 (patched) - MySQL - 5.0.96 Community - suPHP
Reply With Quote