mons/magento-toolbar-sorter
最新稳定版本:1.0.0
Composer 安装命令:
composer require mons/magento-toolbar-sorter
包简介
README 文档
README
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
统计信息
- 总下载量: 573
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AFL-3.0
- 更新时间: 2023-02-28
