Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

sortby

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-12-2008, 05:17 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Arrow sortby

i want to add another sort-by option and also want it to be displayed in a dropdown box along with the default option.
pls help me in doing it




thanks in advance
Reply With Quote
  #2  
Old 08-12-2008, 06:22 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: sortby

to create a sortby dropdown box

main/seach_sort_by.tpl :

Code:
{* $Id: search_sort_by.tpl,v 1.5.2.2 2007/03/01 10:42:12 max Exp $ *} {if $url eq '' && $navigation_script ne ''}{assign var="url" value=$navigation_script|replace:"&":"&"|cat:"&"}{elseif $url ne ''}{assign var="url" value=$url|amp}{/if} <select name="sort_field" onchange="MM_jumpMenu('parent',this,0)"> {foreach from=$sort_fields key=name item=field} <option {if $name eq $selected and $direction eq 0}SELECTED{/if} value="{$url}sort={$name}&sort_direction=0">{$field} (Ascending)</option> <option {if $name eq $selected and $direction eq 1}SELECTED{/if} value="{$url}sort={$name}&sort_direction=1">{$field} (Descending)</option> {/foreach} </select>


And add the following in the <head> section of customer/home.tpl :
Code:
{literal} <script> function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } </script> {/literal}

Example here :
http://www.cglass.co.uk/lever-door-handles-and-escutcheons-c-635.html
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote

The following 2 users thank carlisleglass for this useful post:
chamberinternet (06-07-2011), Phoenixone (02-03-2011)
  #3  
Old 08-13-2008, 04:37 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: sortby

Please don't double post - I have removed your second post on this topic.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 08-13-2008, 06:43 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: sortby

oops.. sorry.. i didnt get the answer yet......thats why...
Reply With Quote
  #5  
Old 08-13-2008, 06:51 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: sortby

It doesn't matter if you got an answer or not - cross posting is not allowed One thread per question - if you don't get an answer, you can always open a ticket via your help desk.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 08-13-2008, 08:08 PM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: sortby

i am really sorry.i will not repeat this in the future......
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:03 PM.

   

 
X-Cart forums © 2001-2020