Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How to change magento sorting default field and direction?

  1. #1
    Moderator shunavi's Avatar
    Join Date
    Mar 2013
    Posts
    124
    Thanks
    9
    Thanked 26 Times in 17 Posts

    Thumbs up How to change magento sorting default field and direction?

    Category toolbar has many options. By default it shows how many items are in the category, you can choose how many products you wish to be displayed per page, you can change the listing type (List or Grid) and you may choose Sort Order. This “Sort Order” can be confusing. The default “Sort Order” is “Best Value”. What does it mean? How is the Best value determined? Can we change the default sort order?

    What is “Best Value” field?



    From official Magento Community User Guide 1.7:

    page 75./85. “Product Listing Sort By: The products are sorted, by default, by the selected attribute. The Best Value products are featured products as determined by the store administrator; for more information, see “Creating Categories,” page 83. The customer can select from the other options on a per-page basis. You can configure attributes to be used for sorting using the Used for Sorting in Product Listing setting of an attribute. For details, see “Managing Product Attributes,” page 92.”

    page 88./98. “3. In the Position column, specify a whole number that indicates the order in which the product is listed when the products are sorted by Best Value. The product with a Position value of 1 is listed first, 2 is listed second, and so on. If more than one product has the same value for Position, the product with the lowest (that is, closest to 1) ID number is listed first.”

    When you go to Category page in Magento administration (Catalog/Manage Categories), you will see “Category Products” tab. From there, you will see the list of products that are associated to this category. The last column is “Position”. That is how “Best Value” is determined. So, best value is not something that is dynamically calculated. You can tailor it to your likings.


    Now after you’ve changed “Best Value” you can visit your Category page on frontend and you’ll see your new sorting in Product Listing (if your default sort is by Position).

    There are two options you can use via Magento administration.

    1. Setting default Sort Order for category



    When you go to Category page in Magento administration (Catalog/Manage Categories), you’ll see “Display Settings” tab. From there you can modify “Available Product Listing Sort By” and “Default Product Listing Sort By” values.
    Let’s modify “Default Product Listing Sort By”. If you deselect “Use Config Settings” and if you select “Price” for “Default Product Listing Sort By”, on frontend for specified category you’ll see that all items are now sorted by price ascending (growing upward). If you have Magento CE 1.7 with Sample Data you can modify sorting by Price for, i.e. Bedroom category. Additionally you can deselect “Use All Available Attributes” for “Available Product Listing Sort By” and if you check only few of them (“Best Value” and “Price”), on frontend you’ll be able to sort only by selected options. Now click “Save Category” button.
    You should see something like this:




    2. Setting default Sort Order for Store / Website / Default Config



    When you go to System / Configuration / Catalog (left menu) / Frontend you’ll see “Product Listing Sort by” drop down menu. Now if you deselect “Use Default” you’ll select default sorting for specified view (Store/Website/Default). This will apply to all categories but notice that by override rule (fallback) this has lower priority than “Sort Order for category”.


    Fallback for Magento sorting



    When you visit some category page on frontend, this is how Magento choose “Default Sorting” for specific category page:


    • look for Default Sort set in Category page in Magento administration, if not set then
    • look for Default Sort set in configuration for Store, if not set then
    • look for Default Sort set in configuration for Website, if not set then
    • look for Default Sort set in configuration for Default Config, if not set then



    Note that configuration could be in database, table core_config_data, or config.xml file (for sorting – app/code/core/Mage/Catalog/etc/config.xml around line 723. – position). And that’s why you have default sorting by Position (“Best Value”) for category view page.

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Nov 2019
    Posts
    1,083
    Thanks
    6
    Thanked 3 Times in 3 Posts

    Default

    Hello there if you are looking for the best tool for easy product sorting you can try out Advanced Sorting Magento 2 Extension. This module will help you add custom sorting options to your Magento store to make the product search process easier for the end-users.

    This extension offers effective options to customers for product sorting by Best Sellers, Biggest Savings, Most Viewed, and lots more.

    It facilitates your users to search for the right products most effortlessly. With the help of this module, the store owner can exhibit their most popular products smoothly and boost their sales in record time.

    Name:  advanced-sorting-front-side.png
Views: 0
Size:  199.9 KB

    Highlighted Features:
    1. Provides fully customizable interface of the extension from admin side.
    2. Ability to enable/disable this extension from backend. Very easy to manage.
    3. Store owner can select multiple sort option from backend.
    4. Store owner can set default product listing sort by from Catalog -> Storefront.
    5. Make your store more user-friendly to increase profit – more orders for you.



  3. #3
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Hi, Smart arranging in list is a Magento Enterprise highlight. So I'm shutting this issue since nothing will be finished with respect to this issue in CE.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •