Download the PHP package mons/magento-toolbar-sorter without Composer
On this page you can find all versions of the php package mons/magento-toolbar-sorter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package magento-toolbar-sorter
Magento 2 - Catalog toolbar custom sorter module
Customize and optimize the default product listing sort by, include the direction in a single select element.
Installation
- Install module via composer
composer require mons/magento-toolbar-sorter
- Register module
php bin/magento setup:upgrade
Configuration
- Navigate to Stores > Attributes > Product
- Choose the sortable attribute you want to configure
- From the "Storefront Properties" tab, turn on the "Used for Sorting in Product Listing", then choose the behavior from "Product Listing Sorter" (see the options below)
Options
- Default (do not override): use Magento's default sorting setting (normally ascending)
- Ascending: show only the option for ascending (from low to high) order
- Descending: show only the option for descending (from high to low) order
- Ascending + Descending: show both the options above, ascending first
- Descending + Ascending: show both the options, descending first
Theming
This module doesn't override the default template Magento_Catalog::product\list\toolbar\sorter.phtml
, giving you the full control on it.
Anyhow a working sample is provided as Mons_ToolbarSorter::product\list\toolbar\sorter.phtml
.
Tested working with
- Magento 2.4
- PHP 8.1
Contribution
- Fork this repository
- Create your feature branch (
git checkout -b feature/your-new-feature
) or a bugfix branch (git checkout -b bugfix/bug-short-description
) always fromdevelop
- Commit and submit a new Pull Request
All versions of magento-toolbar-sorter with dependencies
PHP Build Version
Package Version
Requires
php Version
~8.1.0||~8.2.0
magento/framework Version 103.0.*
magento/module-catalog Version 104.0.*
magento/module-layered-navigation Version 100.4.*
magento/framework Version 103.0.*
magento/module-catalog Version 104.0.*
magento/module-layered-navigation Version 100.4.*
The package mons/magento-toolbar-sorter contains the following files
Loading the files please wait ....