Default sort order of shop items

Last post 06-24-2008 6:17 AM by Robert Nash. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-24-2008 6:04 AM

    Default sort order of shop items

    Hi

    The default sort order of shop items appears to be by date added.  How can I change this to be by group/category and then price within category?

    Maybe even just by price.

    Regards

     

    Filed under: ,
  • 06-24-2008 6:17 AM In reply to

    Re: Default sort order of shop items

    Order by price is an easy answer, you simply need to insert a <QureyOverride tag into the <ItemList and specify a different sort order.

    Displaying a list of products in each category requires is a bigger customization, I assume that you are looking for something simlar to our own products page?  If thats the case here is a cut of the markup from the shopHome.aspx page.

     <%-- display a list of categories  and within each category a list of products --%>
     <FRS:ItemCategoryList runat="server" Tag="div" CssClass="productCategory">
     
      <ItemTemplate>
     
        <FRS:ItemList runat="server">
         <QueryOverrides runat="server" SortBy="Price" SortOrder="Ascending" />
         <LeaderTemplate>
         
         <div>
         <FRS:AssetViewerContainer ID="AssetViewerContainer1" Tag="div" CssClass="browseCategoryImage" runat="server"/>
         <FRS:ItemCategoryData runat="server" Property="description" Tag="div" CssClass="browseCategoryDescription" />
         
         </div>
         <FRS:ItemCategoryData runat="server" LinkTo="CategoryPage" LinkCssClass="specialButton browseCategoryMoreInfo" Text="More Information"></FRS:ItemCategoryData>
         <div style="clear:both;"></div>
         </LeaderTemplate>
          <HeaderTemplate>
       <table class="productList">
      </HeaderTemplate>
       <FooterTemplate>
        </table>
        <hr />
        <br />
       </FooterTemplate>
      <ItemTemplate>
          <tr>
           <td class="productCatName">
            <FRS:ItemData runat="server" Property="subtitle" LinkTo="ItemDetail"/>
           </td>
           <td>
            <FRS:ItemData runat="server" Property="CurrentPrice"/>
           </td>
           <td>
            <FRS:AddToCartButton CausesValidation="false" ID="AddToCartBtn" runat="server"
             CssClass="CommonTextButton" ResourceName="Shop_AddToCart" NotAuthenticatedRedirect="" NotAuthenticatedResourceName="" />
           </td>
           <td>
            <FRS:BuyNowButton CausesValidation="false"  id="BuyNowButton" runat="server"
             CssClass="CommonTextButton" ResourceName="Shop_BuyNow" NotAuthenticatedRedirect="" NotAuthenticatedResourceName=""/>
           </td>
          </tr>
         </ItemTemplate>
        </FRS:ItemList>
        
       </ItemTemplate>
      </FRS:ItemCategoryList>

     

    Cheers,
    Rob

    Filed under:
Page 1 of 1 (2 items)