User Tools

Site Tools


Sidebar

magento_2:improved-sorting

For more details see how the Amasty Improved Sorting for Magento 2 extension works.

Guide for Improved Sorting for Magento 2

An effective tool for customer care. Improve the usability of your store catalog with user-friendly search options. The module allows your potential customers to browse catalog or categories by any parameters they need: best-sellers, most viewed, top-rated, new and in a wishlist.

  • Offer suitable sorting options
  • Enable users to view products by Best Sellers, Top Rated, Most Viewed and etc.
  • Focus on better performing products
  • Set out-of-stock products and items with no image to display at the end
  • Change sorting order if you need
  • Add featured products blocks to any page

The extension is fully compatible with Magento Elasticsearch. See how to install and configure the Elasticsearch engine here.
This extension is available as a part of the Elastic Search Premium module. Check the configuration options here →

Steps to configure Improved Sorting

General Settings

To configure the module, go to Stores → Configuration → Amasty Extensions → Improved Sorting.

Disable Sorting By - exclude any of the sorting options if needed.

Sorting Order - Drag and drop sorting options in the order you want them to appear in the improved sorting drop-down for the customers.

Please select the attributes to have descending sorting for them by default. Not selected attributes will have ascending sorting.

Show Products without Images Last - show or hide products without images to effectively manage your products offering.

Show ‘Out of Stock’ Products Last - choose the variant to optimize the position of the ‘Out of Stock’ products.

Use qty to determine if the product is `Out of Stock`- enable this option to put products on the ‘out of stock’ list automatically. Products with the qty < 1 will be shown last regardless of the stock label.

To get the products' sorting query for a particular page:
  • enable Debug Mode
  • add the GET parameter amdebug=1 to the URL of the page you want to debug, as in example.com/shirts/amdebug=1
  • sort page by any option
  • look for /var/log/system.log file in the Magento folders
  • in the end of the file, find a products' sorting query

Sorting by Default

To specify the default sorting for search and category pages, expand the Sorting by Default tab.

Set the main algorithm at first, and then 2 additional ones according to your needs. Due to the feature, you can sort products in the most efficient way and thus increase more sales.

Configure Sorting Options

Using the Improved Sorting for Magento 2 extension, you can choose various additional attributes like 'Most Viewed', 'Bestsellers', etc. Note that even text attributes can be used for sorting. Please keep in mind that by using sorting by text, MySQL can process numerical entries (e.g. 20, 67, 1548, etc.) like text entries. In such cases, entry '67' will be considered as a bigger value one, compared to entry '200'

Newest - displays products in the order they were added to the website. If you would like to manage product order for this option by yourself, please, select a product attribute with the help of which you can specify the dates you need.

In cases when a product is configurable, the feature sorts by the value of the configurable product, not simple ones.

Label - specify a name of the sorting option you would like to be displayed on the frontend.

Attribute Code for the Newest Sorting - Leave empty to use product creation date. If you indicate a custom attribute, make sure `Used in Product Listing` for the attribute is set to `Yes`.

If you apply a custom attribute, the feature will sort by this custom attribute ONLY.

Bestsellers - displays best-selling products according to the statistics.

Bestsellers Period (days) - sorting option will be counted for the period, indicated here. So if you indicate ‘15’ here, sales for the last 15 days will be counted and the order of products for bestseller sorting option will be defined based on the count. Leave empty for lifetime statistics.

The field is validated by numbers. If you change the value, the index becomes invalid, that’s why reindex is required.

Custom Bestsellers Attribute - select the custom bestseller attribute to move products up in the bestsellers list manually.

Exclude Orders Statuses - products with specified order statuses will not be used in Bestsellers.

Most viewed - displays the products according to the number of views. This sorting option will be counted for the period, indicated the Most Viewed Period (days). Don’t forget to rename the sorting option to match your own vision.

Custom Most Viewed Attribute - use to artificially move some products up in the real most viewed list. Leave empty to show real data.

For the correct operation of the Most Viewed sorting Magento Reports should be enabled. Please navigate to: Stores → Configuration → General → Reports, than check that Enable Reports and Enable Product View Report settings are set to 'Yes'.

‘Biggest Saving’ - displays products with the biggest discount on the top of the list. You can use percentage or absolute values to show the difference between regular and special price. For example, you have products A & B. A costs $100; there is a 10% discount on this product, so special price $90. Product B costs $10, with a discount of 50% special price is $5. If the ‘Biggest Saving’ list is sorted by percentage, product B (50% off) would be listed above the product A. If you choose to make sorting by absolute price values, product A will go before product B on the list.

Now in Wishlists - sorting option displays products that were added by other customers to their wishlists. Put down the frontend name of the option in the ‘Label’ field and specify the data update period below.

Top rated - this option shows high rated products at the top. In the ‘Label’ field put down the name of the option that is displayed on the frontend.

Reviews count - the option sort products by the number of reviews. Fill in the ‘Label’ field with a frontend name.

Price: high to low or low to high - this option sorts items by price differentiation. You can also customize the title of the option.

To let customers apply all sorting options to product lists generated by layered navigation, see Improved Layered Navigation for Magento 2.

Custom attributes for Bestsellers and Most Viewed

With the extension, you can artificially move some products up in the real bestsellers list.

To do this, please go to Stores → Attributes → Product.

Hit the Add New Attribute button.

Default Label - specify any label you like for the custom attribute.

Catalog Input Type for Store Owner - select Price value for the setting.

Attribute code - set any code for the custom attribute.

You will also need to type this code in the configuration fields Custom Most Viewed Attribute Code or Custom Bestseller Attribute Code.

Go to Storefront Properties and set Used in Product Listing and Used for Sorting in Product Listing fields to Yes.

Hit the Save Attribute button.

Attribute Sets

To assign the created attribute to products,, please go to Stores → Attribute Sets.

Assign the created attribute to the attribute sets that you use for the creation of products in Catalog. Remember to save the changes.

To create a new set, click Add Attribute Set.

Specify the Name of the attribute set and the category to Base On. Hit the Save button.

How Does It Work?

Let's see how the feature with custom attributes works.

For example, your Best Sellers default option shows the real bestsellers first.

But you want to display a Savvy Shoulder Tote first so that it could be sold out faster. So, you create a custom bestseller attribute and assign it to Bags attribute set.

Select the attribute code of a custom attribute in the general settings:

Now find the necessary product and specify the value to improve its position.

Save the changes. Thus, the extension will display the products according to the value of this attribute. If the value is not specified, the products will be shown according to the real bestseller data.

Check the result on the frontend.

New sorting options on category page

To create and manage categories, please go to Catalog → Categories.

The new product sorting options are available on ‘Display Settings’ tab of the category page.

Display Mode - choose the mode of the block: Products Only, Static Block Only or Static Block and Products.

Available Product Listing Sort By - specify which sorting options to use.

Default Product Listing Sort By - choose the automatic algorithm to sort the products.

Manage Widgets

Let your customers know about your new, top-rated, most viewed products with the help of Featured Products Block. To manage Featured Products widget, go to Content → Widgets.

Hit the Add Widget button.

Specify widget Type and Design Theme. Click Continue.

Then specify Storefront Properties.

Widget Title - specify the title of the block you would like to be displayed on your product page.

Assign to Store Views and choose the Sort Order.

Click Add Layout Update to choose where exactly the widget will be displayed.

Display on - choose the categories, products or pages for the block to be displayed on.

Products - you can apply widget to all products or choose specific products.

Container - specify the place of the widget on the frontend.

Template - choose the type of the template. In some cases, the template is set by default.

Go to the Widget Options tab.

Widget options are variable depending on the type of the widget chosen.

1. If you choose CMS Page Link, Category Page Link or Catalog Product Link, specify the Anchor Custom Text and the Anchor Custom Title.

Select the Page, the Category or the Products for the widget accordingly.

2. If you want to add a Catalog Product List or Catalog New Product List, specify the Display Type - All products or New products.

Enable or disable Page control.

Also specify the Number of Products per Page, the Number of Products to Display and the Cache Lifetime (Seconds). 86400 by default, if not set. To refresh instantly, clear the Blocks HTML Output cache.

For the Catalog Product List type, specify the necessary conditions .

3. If the type is CMS Static Block, you have to specify the block only.

4. For the Featured Products Type, specify the Header, the way of Sorting, the Number of Products to Display, Cache Lifetime and the Conditions if needed.

5. For the Recently Compared Products or Recently Viewed Products, choose the Number of Products to display, the Product attributes to show and the Buttons to show.

Save the settings.

New sorting options on front end

The new sorting options and widgets are added to standard Magento ones on the front end and enable your customers to find the right products faster. Also Ratings and reviews of other people can be really helpful for your customers.

Compatibility with Yotpo Reviews. As well as with the Magento default reviews, you can use a 'Reviews Count' feature with popular Yotpo Reviews extension. Easily collect customer reviews and then display them on site pages to help buyers with purchase decisions. Moreover, analyzing customers' feedback data you can continually optimize your web store to provide better customer experience and increase your store conversion.

Boost your most popular products to sell even better with Featured Products Block.

Cron Tasks List

Effectively control the performance of your website by managing all existing cron tasks in one place. Please, go to System → Cron Tasks List.

Here, you can see all the existing cron tasks and their statuses. Run cron tasks and generate their schedule by clicking the ‘Run Cron’ button. Also, delete tasks in bulk, apply filtering and sorting options when it is needed.

Index management

To manage indexers and see their current status, please, go to System → Index Management

To manage sorting indexer modes for sorting options like ‘Bestsellers’, ‘Most Viewed’ and ‘Wishlists’, click the ‘Actions’ button.

If the sorting is disabled by any value (see 'General Settings' - 'Disabled sorting by'), the status is ‘Reindex Required’ but reindex doesn’t perform.

‘Update by Save’ mode means that the index is refreshed automatically once per day at 3 a.m.

‘Update by Schedule’ means that the index refreshes according to your cron and reindex performs when the index becomes invalid.

Find out how to install the Improved Sorting extension for Magento 2 via Composer.

Rate the user guide
 stars  from 6 votes (Details)
magento_2/improved-sorting.txt · Last modified: 2021/07/12 07:58 by asemenova