Revindex Storefront

How to change default sort order

To change the product list to sort by a different order:

  1. Create a custom display template from the Storefront's Configuration > Display templates menu.
  2. Select the "Product list" module control and Add new.
  3. Give the new custom display template a name (e.g. CustomProductList)
  4. Always choose the latest Base display template with the highest version number.
  5. Look for the desired sort order line and add the Selected="True" attribute as shown in the example below:
    <asp:DropDownList ID="PageViewDisplayOrderDropDownList" runat="server" AutoPostBack="True"
    <asp:ListItem Value="1" resourcekey="RecommendedPageViewDisplayOrderListItem">Recommended</asp:ListItem>
    <asp:ListItem Value="2" resourcekey="ProductNameAZPageViewDisplayOrderListItem" Selected="True" >Product Name A to Z</asp:ListItem>
    <asp:ListItem Value="3" resourcekey="ProductNameZAPageViewDisplayOrderListItem">Product Name Z to A</asp:ListItem>
    <asp:ListItem Value="4" resourcekey="PriceLowHighPageViewDisplayOrderListItem">Price Low to High</asp:ListItem>
    <asp:ListItem Value="5" resourcekey="PriceHighLowPageViewDisplayOrderListItem">Price High to Low</asp:ListItem>
    <asp:ListItem Value="6" resourcekey="RatingLowHighPageViewDisplayOrderListItem">Rating Low to High</asp:ListItem>
    <asp:ListItem Value="7" resourcekey="RatingHighLowPageViewDisplayOrderListItem">Rating High to Low</asp:ListItem>
  6. Save the display template.
  7. Under Configuration > Product list menu, set the Display template to your newly created custom display template.


Powered by Revindex Wiki