Monday 27 May 2013

"X-cart Product Sort By - Dropdown"


Use belwo code instead of current used by "main/search_sort_by.tpl" or "customer/search_sort_by.tpl"

<strong class="search-sort-title">{$lng.lbl_sort_by}:</strong>
      <select name="sort_by" ONCHANGE="location = this.options[this.selectedIndex].value;" >
    {foreach from=$sort_fields key=name item=field}
        {if $navigation_page > 1}
            {assign var="cur_url" value=$url|cat:"page="|cat:$navigation_page|cat:"& amp;sort="|cat:$name|cat:"&amp;sort_direction="}
        {else}
            {assign var="cur_url" value=$url|cat:"sort="|cat:$name|cat:"&amp;sort_direction="}
        {/if}
        <option value="{$cur_url}1" {if $name eq $selected && $direction eq 1}selected="selected"{/if}>{$field} (UP)</option>
        <option value="{$cur_url}0" {if $name eq $selected && $direction eq 0}selected="selected"{/if}>{$field} (Down)</option>
    {/foreach}
    </select>
 

2 comments:

  1. there is a small problem, when I search a word in my x-cart, and then I want to sort my search . the link will be without the url and shows www.mywebsite.com/sort=title&sort_direction=0 .
    instead of www.mywebsite.com/search.php?mode=search&sort=price&sort_direction=0

    Best Regards

    ReplyDelete
  2. check your form action attribute either its missing or wrong. still have issue provide site url. so i can check the problem.

    ReplyDelete

List OF BANK PAN Numbers

List OF BANK PAN Numbers Bank/Home Loan Providers PAN Number Allahabad Bank AACCA8464F Andhra Bank AABCA7375C Axis Bank...