Magento 1.9.1 not sorting Configurable product attributes dropdown by position

Magento 1.9.1 not sorting Configurable product attributes dropdown by position

September 27, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento 1.9.1 not sorting Configurable product attributes dropdown by position

Magento 1.9.1: Configurable Product Attribute Sorting Issues and Solutions

Fresh install of Magento 1.9.1

Magento 1.9.1 appears to have an issue with attribute sorting for configurable product dropdowns, even though the attribute position is correctly set in Catalog > Attributes > Manage Attributes > Manage Labels/Options. Instead of using the specified positions, Magento ignores them and relies on the product ID to determine the list order.

Investigating the Issue

Code Analysis

I have compared various relevant files and functions across different versions, starting from 1.7.0.2 up to 1.9.1, but found no significant changes that would explain this behavioral shift:

  • Mage/Catalog/Model/Product/Type/Configuarable.php: getConfigurableAttributes()
  • Mage/Catalog/Model/Product/Option.php: getProductOptionCollection()
  • Mage/Catalog/Block/Product/View/Type/Configuarable.php: getJsonConfig()

Even when testing on a live site’s database copy, the attribute sorting remained based solely on the product ID.

Replicating the Issue

Steps to Reproduce:

  1. Create an attribute called “Colour”.

  2. Add labels in the following order: Black, Red, Green, Blue.

  3. Save the attribute.

  4. Create a configurable product and associate it with simple products using the above attributes in that specific order.

  5. Edit the “Colour” attribute and change the label positions:

    • Blue: 0
    • Green: 1
    • Red: 3
    • Black: 4
  6. Save the changes and view your configurable product.

The Problem Persists

Even after manually adjusting the attribute labels’ position, Magento still sorts the attributes based on the product ID when displaying the dropdown options for the configurable product. This discrepancy suggests a bug or an oversight in the version 1.9.1 update process.

Potential Causes and Workarounds

Lack of Update Documentation

The official Magento documentation for release 1.9.1 does not mention any changes related to attribute sorting behavior. The lack of clear communication about this shift could indicate a recent addition or oversight during the development cycle.

Possible Solutions

1. Custom Product Option Sorting

To resolve this issue, you might need to implement custom logic for sorting product options based on your defined positions. This would involve modifying the getProductOptionCollection() function in Mage/Catalog/Model/Product/Option.php or creating a plugin to override the default behavior.

2. Using an Extension

There are third-party extensions available, such as Advanced Configurable Products and Configurable Swatches by Amasty, that provide more advanced options for configurable products, which may include better attribute sorting control (although they come with their own set of features and costs).

Conclusion

The Magento 1.9.1 version appears to have an undiscovered bug in its default behavior regarding the sorting of configurable product attributes based on positions. While this issue might be specific to certain edge cases or configurations, it highlights the importance of thoroughly testing attribute management functionality during updates.

As a developer, I recommend keeping track of the official Magento release notes for any updates and being cautious when applying patches or minor versions that may introduce unexpected changes in core functionalities. For now, the suggested workarounds involve custom development or leveraging third-party extensions to ensure your product attributes are sorted as expected.

Remember that while exploring these solutions, always maintain a backup of your database and thoroughly test each change before deploying it to a live environment. If you encounter any further issues or need assistance with configuring attribute positions in Magento 1.9.1, feel free to reach out to our team at https://laravelcompany.com/contact.

Magento 1 Catalog Database Configuration

Our network