Hi Norman
Using the sorting tool, is there any way to automatically sort search results as being A-Z once they are all loaded? Maybe a script that runs once they are all loaded?
Thanks in advance
Chris
Sorter - Automatically sort A-z
Re: Sorter - Automatically sort A-z
The sort tool remember the users preference and uses that on all subseqent pages.
It may be possible to preset A-Z as the default. However you might get into a catch-22 situation in that the code that presets it would then override what customers prefer on subsequent page views.
It may be possible to preset A-Z as the default. However you might get into a catch-22 situation in that the code that presets it would then override what customers prefer on subsequent page views.
Norman
Re: Sorter - Automatically sort A-z
Here's how:
Edit file sortedproductsupport.js (in your Site folder) and look for thr line:
Amend it to be:
This should mean that as long as the user hasn't set a preference then A..Z will be used.
Edit file sortedproductsupport.js (in your Site folder) and look for thr line:
Code: Select all
if ( searchlastsorttype == null ) searchlastsorttype = 'default';
Amend it to be:
Code: Select all
if ( searchlastsorttype == null ) searchlastsorttype = 'alpha';
-
- Posts: 25
- Joined: Wed May 28, 2008 5:30 pm
Re: Sorter - Automatically sort A-z
That's great. This particular client only ever wants A-Z on the search results, so customers changing sort preferences won't be an issue.
Many thanks.
Chris
Many thanks.
Chris
Re: Sorter - Automatically sort A-z
Super. Remind the client that the search results are displayed in fixed count pages. Best set the count to a large number so that they all turn up in the first page.
Norman
-
- Posts: 25
- Joined: Wed May 28, 2008 5:30 pm
Re: Sorter - Automatically sort A-z
Hmmm - doesn't seem to be working.
Could you just take a very quick look at
http://dev.page45.com/actinic-test/store/
(try searching for 'Pilgrim')
And see what I've missed
The file at...
http://dev.page45.com/actinic-test/stor ... support.js
... definitely seems to have the correction in it.
Sorry to be a pain
Chris
Could you just take a very quick look at
http://dev.page45.com/actinic-test/store/
(try searching for 'Pilgrim')
And see what I've missed
The file at...
http://dev.page45.com/actinic-test/stor ... support.js
... definitely seems to have the correction in it.
Sorry to be a pain
Chris
Re: Sorter - Automatically sort A-z
There's some code missing from your Search Results layout. You have trimmed down the set of search links to be only SORT BY: Price | A-Z. In doing that you've removed the tags <span id="searchsortwidget"> and </span> which need to surround these links. Unless the add-on sees this span it doesn't know that there's anything to setup and uses the default.
Norman
-
- Posts: 25
- Joined: Wed May 28, 2008 5:30 pm
Re: Sorter - Automatically sort A-z
My bad - thanks again for all your help and support.