Miva Merchant 5 Module FAQs » Phone Order Manager 5.x


{docurl}

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

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Records in this category