ACSD-51497: Cannot sort catalog page by custom attribute of type Dropdown
The ACSD-51497 patch fixes the issue where a customer cannot sort a catalog page by a custom attribute of the type Dropdown. This patch is available when the Quality Patches Tool (QPT) 1.1.33 is installed. The patch ID is ACSD-51497. Please note that the issue was fixed in Adobe Commerce 2.4.7.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.3.7 - 2.3.7-p4, 2.4.1 - 2.4.6-p1
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
A customer is unable to sort a catalog page by a custom attribute of the type Dropdown.
Steps to reproduce
-
Create about six simple products and assign them to a single category.
-
Create a product attribute in order to add it as a sorting option on the listing pages.
-
Go to Admin > Stores > Attributes > Add New Attribute.
-
In the Properties tab, set the following:
-
Default Label = test
-
Catalog Input Type for Store Owner = Dropdown
-
Options:
- first
- second
- third
- fourth
-
-
In the Storefront Properties tab, set the following:
- Used for sorting in product listing = Yes
- Leave all the other options as Default.
-
-
Assign the test attribute to the Default attribute set in Admin > Stores > Attributes > Attribute Set.
-
Configure the products to have test attribute values.
- SKU: s00001, test: fourth
- SKU: s00002, test: third
- SKU: s00003, test: second
- SKU: s00004, test: first
- SKU: s00005, test: fourth
- SKU: s00006, test: third
-
Reindex and clear cache.
-
Go to the category on the storefront.
-
Sort by the test attribute.
Expected results:
The products are sorted by the test attribute.
Actual results:
The products are not sorted by the test attribute.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.