User Tools

Site Tools



For more details see the Amasty Improved Sorting extension page.

Guide for Improved Sorting

Configure the extension

Please go to admin panel → System → Configuration → Improved Sorting to configure the extension.

Use Index - We recommend to enable Use Index option for large catalogs to improve the extension performance for sorting options Best Sellers, Most Viewed and Now in Wishlists. For the information to be up to date, the index is refreshed automatically once per day, if you have cron enabled for your website.

You can also refresh the index manually in admin panel → System → Index Management.

Bestsellers Period - The sales of products for Bestsellers sorting option will be counted for the period, indicated here. So if you indicate 30 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.

Custom Bestsellers Attribute Code - It is possible to manually move products up in the bestsellers list. For this please fill in this field with attribute code of the custom bestseller attribute.

To create and use the custom bestseller attribute go to CatalogAttributesManage Attributes and click 'Add new attribute' button.

Exclude Products - Products with specified statuses will not be used in Bestsellers.

Custom Most Viewed Attribute Code - It is possible to manually move products up in the most viewed list as well. Fill in this field with attribute code of the custom most viewed attribute to use this feature. Steps to create the attribute code are the same as for bestsellers.

Attribute Code for the Newest Sorting - New sorting option displays products in the order they were added to the website. If you would like to manage product order for this option yourself, please create a product attribute with the help of which you can specify the dates you need. Then indicate the attribute code here.

Use Percentage for Biggest Saving Sorting - Set Yes to sort the products by the highest percentage of discount in the Biggest Savings ranking option.

Show `Out of Stock` Products Last - You can move products without images to the bottom of the product list (it is possible to apply this option only to catalog page and leave the search page as is).

Use qty to determine if the product is `Out of Stock` - If you allow backorders, however would like to show products with zero stock last, set this option and the above one to Yes.

Remove `Position` Sorting Option - If you would like to remove Position sorting option from front end, please turn this setting to Yes.

Sort attributes descending by default - To have descending sorting for some attributes by default, please indicate codes of these attributes here (separated by comma).

Disable Sorting By - You can disable any of the sorting options, if needed.

Cost Attribute for Profit Sorting - In case you want products to get sorted by Profit, specify which attributes will be set as Cost and Price.

The Profit equals Price minus Cost.
  • Bestseller - the value for this attribute is specified in products' General tab.
  • Cost - by default this attribute can be set for virtual and downloadable products only. You can configure the attribute here: Admin > Catalog > Attributes > Manage Attributes.
  • Group Price - this attribute is available for all products except Grouped Products.
  • Minimal Price - this option takes the lowest price of simple products in Configurable, Bundle, Grouped products.
  • Manufacturer's Suggested Retail Price - this attribute is available for all types of products except Grouped Products.
  • Price - the price value.
  • Special Price - the special price value.
  • Tier Price - is not available for Grouped Products.

Revenue Period (days) - Sorting by revenue displays products based on their sales amount. The sales of products for Revenue sorting option will be counted for the period, indicated here.

Custom Positions for Sorting Options - Specify the sorting options order. A sorting option with the largest negative value will be placed at the top of the listing. Default position for all sorting options is 0.

In this sample, the first three sorting options are custom specified as top (Price -3, Bestseller -2, Top Rated -1) positions.

Sorting by Default

Sort your products' assortment on the catalog and search results pages via any available sorting method.

Custom attributes for bestsellers and most viewed

To create custom attributes for bestsellers and most viewed options, please go to admin panel → Catalog → Attributes → Manage Attributes and click Add new attribute button.

Attribute code - Specify any attribute code you like for the custom attribute.

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

Catalog Input Type for Store Owner - Select Price for Catalog Input Type setting.

Used in Product Listing - Set this option to Yes for the attribute specified in the Custom Bestsellers Attribute Code field.

Specify the desired title and save the attribute.

Assign the created attribute to the attribute set you use for creation of your products in Catalog → Attributes → Manage Attribute.

bestsellers - The amount you specify here will be taken instead of real sales statistics for this product, when the extension will define the order of products for bestsellers sorting option. You can create a custom attribute and use it on analogy for most viewed sorting option.

Sorting Options on Category Page

The new product sorting options are available on Display Settings tab of category page, so you can specify which sorting options to use for which category.

Creating blocks based on sorting options

You can add blocks based on sorting options to any page or CMS block for different categories. For this please add such code:

{{block type="amsorting/featured" header="DON’T MISS THE DEAL, BIGGEST SAVING YOU’VE EVER SEEN"
sorting="saving" category="8" limit="3" template="amasty/amsorting/list.phtml"}}
  • header variable is used for the block title.
  • Use sorting variable to specify which sorting option should be used for the block.
  • To use New sorting option, specify code new,
  • for Biggest Saving – saving, Best Sellers - bestselling; Most Viewed – mostviewed, Top Rated – toprated, Review Count – commented.
  • Now in Wishlists – wished.
  • category variable allows you to choose from which category to display products in the block – just specify the category id. If you would like to show products from the category, on which the block is displayed, please remove the variable.
  • limit variable enables you to specify the number of products in the block.
  • template variable lets you choose the template for the block.

is one of the templates we provide with the extension. Please feel free to create your own ones.

At the homepage, the blocks will use all store products (if not, set Is Anchor to Yes for store root category). At the category pages - another category of products can be added.

Please note: If you're planing to use 'amsorting/featured' block for Magento 1.9/2.2 and higher or after installing SUPEE-6788 security patch is needed to create a permission for it: Backend – > System – > Permissions – > Blocks – > Add New Block button

Sample of blocks

This is the block based on the Biggest saving sorting option by category, which was created with the code mentioned on the previous page.
This block is based on Top Rated option.
Rate the user guide
 stars  from 3 votes (Details)
magento_1/improved-sorting.txt · Last modified: 2019/07/22 13:50 by skudrov