Is it possible to sort the product in the "product listing" on the Product Search pop-up?
This can be accomplished by adding tokens to the "Product Search Page template" screen (on the "Search Pages" tab in admin) that provide for the ability to sort the displayed listing of products. These tokens must be used inside of the %beginform% and %endform% tokens:
%sort_codeup|x|% sorts alphabetically by the product code ascending or descending
%sort_codedown|x|%
%sort_nameup|x|% sorts alphabetically by the product name ascending or descending
%sort_namedown|x|%
%sort_orderup|x|% sorts by the order of the product as set in Merchant admin
%sort_orderdown|x|%
%sort_availup|x|% sorts by the inventory count as determined from Merchant's
%sort_availdown|x|% inventory feature (untracked items will be "lowest")
where "x" can be d, h, or n. If d is used, then that radio button will be checked by default (d for default). If h is used then that option will be set but "hidden" (i.e. a hidden form field will be used, you would want only one of these). If n is used then the radio button will be displayed but will not be checked.
So, for example, to give the user the ability to sort the products by the product code or inventory count, and set the "code upwards" option as the default, you could add to the "Product Search page template" (on the "Search Pages" tab) the code:
Sort: %sort_codeup|d|%code up %sort_codedown|n|% code down %sort_availup|n|% inv. up %sort_availdown|n|% inv. down
Each of these tokens displays a radio button that gives the field name, Prod_Sort, the values (respectively):
codeu
coded
nameu
named
orderu
orderd
availu
availd
So you could use your own html form fields to set these options instead of using the tokens. An example, using a
Last update: 2007-09-07 13:57
Author: Brok
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- I have the module configured to add the key ... (2008-08-13 14:50)
- What is the format for the htaccess file if ... (2008-08-12 14:50)
- Is there any way to look up a customer's ... (2008-08-06 18:04)
- I am looking for a module that will allow ... (2008-08-06 18:00)
- Is it possible to display a link in Phone ... (2008-08-06 12:05)
Top 10 
- 2754 views:
Adding Tokens to Evaluate Expressions - 2698 views:
Is there a way to "Limit" the number of ... - 2654 views:
Why won't you call me for technical support? I ... - 2549 views:
Are license keys valid for more than one store? ... - 2447 views:
I'm trying to enter a license key and get ... - 2425 views:
How do I install a module? - 2286 views:
How do I check for a module upgrade? - 2255 views:
How can display and change the parameters of an ... - 2097 views:
The total on my checkout pages are not correct. ... - 1932 views:
I have select and radio type attributes in my ...
















