Magento 2 Sort by Price: Use Low to High and High to Low Options

Magento 2 Sort by Price: Use Low to High and High to Low Options

Are you struggling to make it easier for your customers to find the products they want? Magento 2 Sort by Price sorts products from low to high or high to low prices on the category and search result pages.

This tutorial will cover how to customize and set up the Magento 2 sort-by-price feature.

Best Magento Hosting now

Key Takeaways

  • Learn how to change Magento 2 Sort Order according to the specified order.
  • Get an overview of how to sort the product order in Magento.
  • Gain insights into configuring ‘out of stock’ products for price low to high.
  • Understand how to display featured product block options in the order sorting labels.
  • Discover top extension files for additional sorting by default of the cheapest products.

Why Is The Sorting Process By Price Important in Magento 2?

1. Improves User Experience for Price-Sensitive Shoppers

i. Helps budget-conscious customers quickly find affordable options

When customers see products sorted from low to high, they set a lower price anchor in their minds. It increases their willingness to spend more on higher-priced items with better value. This saves them time and effort.

ii. Makes it easy to compare prices and find the best deals

Presenting cheaper options first reduces decision fatigue. Compare similar items at price points with products arranged from lowest to highest. You can weigh factors like quality and brand against the price to make a purchase decision.

2. Boosts Sales by Showcasing Cheapest or Premium Products First

i. Drives price-sensitive shoppers to convert by highlighting low prices

Displaying premium products first can attract quality-focused shoppers. Thus, It can cater to different customer segments. Featuring low-priced items initially can serve as a "loss leader". It can attract customers with appealing prices. Also, it can lead to additional higher-margin purchases.

ii. Appeals to luxury buyers by putting high-end, expensive items upfront

Customers who equate high prices with quality are drawn to premium, high-ticket items. Putting your most expensive products in the spotlight caters to luxury shoppers. It communicates that you offer top-of-the-line merchandise. Also, it motivates shoppers to splurge or save up for the pricey items they desire.

3. Allows Customizing Sorting Options to Match Business Goals

i. Tailor sorting options to your store's unique strategy and target audience

Sorting can be strategically used to promote overstocked items or to clear out seasonal inventory. Configure Magento's sorting options as per your customers' needs and goals. Mainly sell luxury goods or remove price sorting altogether. Downplay cost and include high to low sorting.

For example, you can include swimwear during summer.

ii. Emphasize products you want to push, like bestsellers or high-margin items

Set the default sort order to position certain products at the top of the list. You might sort by "best selling" to feature popular products. Convert or sort by "highest margin" to push products that are most profitable. Conduct A/B tests to identify the most effective strategies for product types. For example, you can include prioritizing gift items during holidays.

3 Methods To Change Magento 2 Category Sort Order By Price

Method 1: Product Listing

Magento 2 provides three options for product listings:

  • position
  • product name
  • price

Note: If the Magento 2 sort by price feature is not working, you may need to adjust the sorting type.

To change the default sorting:

  1. Navigate to Catalog > Categories.
  2. Select the desired category.
  3. Open the Display Settings tab.
  4. In the Default Product Listing Sort By field, choose the desired parameter from the dropdown menu.

Magento 2 category sort order product listing configuration

  1. Save the changes.

Method 2: Product Sorting

1. Magento 2 Open Source Edition

  1. Navigate to Catalog > Categories.
  2. Select the Store View you want to modify.
  3. Choose the desired product category.
  4. Open the Products in the Category tab.
  5. Edit the Position column.

Magento 2 category sort order product sorting options

  1. Save the changes.

2. Magento 2 Commerce Edition

  1. Navigate to Catalog > Categories; if needed, change the Store View at the top of the page.
  2. Select the required category from the category tree.
  3. Expand the Products in the Category tab.
  4. Click the tiles icon to display products on a grid.

Navigating to catalog categories in Magento 2

You can sort products manually or automatically:

i. Manual Sorting
  1. Choose the desired option from the Sort Order dropdown.
  2. Click on the 'Sort' button.
  3. Update any invalid indexers if needed.
  4. Save the category.

Note: Use the Visual Merchandiser to change product positions with the drag-and-drop tool.

ii. Automatic Sorting
  1. Select 'Yes' in the Match products by rule field.
  2. Choose the desired option from the Automatic Sorting dropdown.
  3. Add conditions by clicking on the 'Add condition' button for your desired attribute rule.
  4. Choose an operator (e.g., Equal, Not equal, Greater than, etc.) and fill in the value.
  5. Repeat for all required conditions.
  6. Save the category.
  7. Clear the Magento cache.
  8. Check the result of the new sorting order on your store frontend.

Method 3: Improved Sorting

Using the Improved Sorting extension, you can:

  1. Sort products by various criteria. For example, newest, popularity, position, price, rating, relevance, and more.
  2. Disable unwanted sorting options, reorder them and rename them.
  3. Boost your sales by moving out-of-stock products to the end of the list.
  4. Showcase category listings on the Magento homepage.
  5. Display a special product block at the top of the product page featuring:
  • Best Sellers
  • Most Viewed
  • Now in Wishlists
  • Top Rated
  • New

Advanced Techniques For Customizing Product Sorting Orders By Price

Advanced Techniques Implementation Details
Exclude Out-of-Stock Products - Prevent unavailable items in results.
- Reduce customer frustration.
- Streamline purchasing process.
Implement Special Price/Tier Price Sorting - Allow sorting by discounted prices.
- Highlight promotions and deals.
- Support seasonal/member offers.
Enhance with Layered Navigation - Combine price sorting with filters.
- Enable attribute-based filtering.
- Improve product discovery experience.

5 Steps To Add Magento 2 Sort By Price For Low To High And High To Low Options

  1. Create the registration.php file in app\code\Vendor\Extension with the following content:
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Vendor_Extension',
    __DIR__
);

  1. Create the module.xml file in app\code\Vendor\Extension\etc with the following content:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Extension" setup_version="1.0.0"/>
</config>
  1. Create the di.xml file in app\code\Vendor\Extension\etc with the following content:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Block\Product\ProductList\Toolbar">
        <plugin name="custom_custom_block_toolbar" type="Vendor\Extension\Plugin\Catalog\Block\Toolbar"/>
    </type>
    <type name="Magento\Catalog\Model\Config">
        <plugin name="custom_catalog_model_config" type="Vendor\Extension\Plugin\Catalog\Model\Config"/>
    </type>
</config>
  1. Create the Toolbar.php file in app\code\Vendor\Extension\Plugin\Catalog\Block with the following content:
<?php
namespace Vendor\Extension\Plugin\Catalog\Block;
class Toolbar
{
    public function aroundSetCollection(
        \Magento\Catalog\Block\Product\ProductList\Toolbar $subject,
        \Closure $proceed,
        $collection
    ) {
        $currentOrder = $subject->getCurrentOrder();
        $result = $proceed($collection);
        if ($currentOrder) {
            if ($currentOrder == 'high_to_low') {
                $subject->getCollection()->setOrder('price', 'desc');
            } elseif ($currentOrder == 'low_to_high') {
                $subject->getCollection()->setOrder('price', 'asc');
            }
        } else {
            $subject->getCollection()->getSelect()->reset('order');
            $subject->getCollection()->setOrder('price', 'asc');
        }
        return $result;
    }
}
  1. Create the Config.php file in app\code\Vendor\Extension\Plugin\Catalog\Model with the following content:
<?php
namespace Vendor\Extension\Plugin\Catalog\Model;
class Config
{
    public function afterGetAttributeUsedForSortByArray(
        \Magento\Catalog\Model\Config $catalogConfig,
        $results
    ) {
        $results['low_to_high'] = __('Price - Low To High');
        $results['high_to_low'] = __('Price - High To Low');
        return $results;
    }
}

Best Practices For Optimizing Priced Products In Magento 2 Store

Best Practices Implementation Details
Place Best Selling Products at Optimal Price Points - Analyze sales data.
- Adjust pricing strategically.
- Highlight top performers.
Use Sort by Price with Other Sorting Options - Offer variety (relevance, bestsellers).
- Enhance product discoverability.
- Cater to different preferences.
Monitor Analytics for Impact - Track key metrics (CTR, conversion, average order value, time spent on page).
- Use heat maps for user behavior analysis.
- Analyze customer behavior.
- Continually optimize strategy.

9 Steps To Sort Configurable Products By Price

  1. Go to the default Magento admin panel.
  2. Navigate to Catalog > Categories.
  3. Select a category that contains simple products (referred to as SP).

For example, Bags.

  1. Assign a configurable product (referred to as CP) and all its children to the selected category.

Assigning configurable product Kenobi Trail Jacket to category

For example, you can assign the product Kenobi Trail Jacket [sku MJ04] and its children to the Bags category.

  1. Navigate to Marketing > Catalog Price Rule.
  2. Click on 'Add New Rule'.
  3. Add a new rule ensuring that the CP discount price is higher than some SP discount prices but lower than the SPs' regular prices.

Note: If using Magento Sample data, add a rule to discount 10% for all website products.

  1. Re-index and flush the Magento cache.

Flushing Magento cache after sorting configuration

  1. On the frontend, navigate to the chosen category and then sort by descending price.

Adding new rule for configurable products sorting in Magento 2

Note: SPs are sorted by regular price, but CPs are sorted by discounted price.

3 Best Custom Sorting Options By Price

1. Magento 2 Improved Sorting Extension by Amasty

Improved Sorting Extension for Magento 2 by Amasty

Amasty Magento 2 Improved Sorting Extension enhances the usability of your catalog with new search options. Allow your clients to browse catalogs or categories using their preferred parameters.

Features

  • Fully compatible with Yotpo Reviews.
  • Focus on better-performing products.
  • Add featured product blocks to any page.
  • Allow for changes in sorting order as needed.
  • Fully optimized for mobile use.
  • Hyva-ready storefront.
  • Compatible with Live Search for Magento Enterprise and Magento Cloud Editions.

Pricing

Community Edition- $199.00 Enterprise Edition- $499.00 Magento Cloud Edition- $799.00

2. Category Sorting for Magento 2 Extension by WeltPixel

Magento 2 Category Sort by Extension by WeltPixel

WeltPixel Advanced Category Sorting Extension offers alphabetical and price-based sorting options. You can enable/disable the sorting options:

  • Sort by Position
  • Sort by Product Name
  • Sort by Price
  • Sort by Newest Arrivals
  • Sort by Best Selling
  • Sort by Top Rated
  • Sort by Most Reviewed

Features

Pricing

  • Open Source (Community) Edition + Professional Installation- $398.00
  • Commerce (Enterprise) Edition + Professional Installation- $598.00
  • Cloud Commerce Edition + Professional Installation- $798.00

3. Improved Magento 2 Sorting Extension by FMEExtensions

Improved Sorting for Magento 2 Extension by FMEExtensions

FMEExtensions Improved Sorting Magento Extension sort products by 14 useful parameters. You can also display featured products via widgets based on various sorting attributes.

Features

  • Set the default sorting option.
  • Schedule cron jobs.
  • Display 'Out of Stock' products and products without images.
  • Approved by the Magento Marketplace.

Pricing

  • Community Edition + Installation- $138.99
  • Enterprise Edition + Installation- $338.99

Troubleshooting Common Issues With Magento 2 Product Prices

Common Issues Potential Fixes
Products Not Sorting Correctly - Re-index products.
- Verify price attribute is sortable.
- Check module configuration.
Conflicts with Other Extensions - Disable conflicting modules.
- Check extension compatibility.
- Consult extension providers.
Inconsistent Across Store Views - Test on all store views.
- Verify pricing settings.
- Ensure consistent configuration.

FAQs

1. Does the ability to sort products differ between Magento versions?

Yes, sorting capabilities may vary between Magento versions. Magento 2 generally offers more advanced sorting features compared to earlier versions. Always check your specific Magento version's documentation for accurate information.

2. How can I set up ascending order as the default sort option for product listings?

To set ascending order as the default, go to Stores > Configuration > Catalog > Catalog. Under "Product Listing Sort by", select "Price". Choose "Ascending" as the default direction.

3. Is it possible to sort products by newest in Magento, and how?

Yes, Magento allows sorting by the newest products. This option is usually available by default. If not, you can enable it in the admin panel under Stores > Attributes > Product. You then edit the "New From Date" attribute and set "Used for Sorting in Product Listing" to 'Yes'.

4. How does Magento handle 'out of stock' products when sorting?

By default, Magento usually displays out-of-stock products last in sorted lists. However, you can modify this behavior using custom extensions. You can also adjust the inventory settings in the admin panel.

5. Can I customize the order in which sorting options are displayed on the product listing page?

Yes, you can customize the order of the sorting options. Navigate to Stores > Configuration > Catalog > Catalog in the "Product Listing Sort by" section. You can also use custom Magento extensions for more advanced modifications.

6. How can I add the ability to sort by relevance for search results in Magento?

Sorting by relevance is available for search results and category pages by default. If it does not appear, check your Magento theme development settings. Enable this under Stores > Configuration > Catalog > Catalog in the "Search Engine Optimization" section.

CTA

Summary

Magento 2 Sort by Price enhances the shopping experience by providing sorting options. It allows users to:

  • Make it easy for customers to find products based on price.
  • Provide customizable sorting options.
  • Provide efficient cost-conscious solutions for consumers.
  • Build trust and loyalty.
  • Improve conversion rates for e-commerce stores.

Improve the user experience by allowing customers to sort products based on price with Magento hosting services.

Dikshya Shaw
Dikshya Shaw
Technical Writer

Dikshya leverages her content marketing and writing proficiency to deliver fresh, insightful content. Her meticulous research ensures industry expertise and emerging trends within the Magento landscape.


Get the fastest Magento Hosting! Get Started