-
-
Notifications
You must be signed in to change notification settings - Fork 450
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Prerequisites
- PR Fix: Decouple product detail swatches from listing attribute requirement #5137 must be merged first (decouples product detail swatches from listing attribute requirement)
When "Product Attribute to Use for Swatches in Product Listing" is explicitly set to "-- Please Select --" (empty selection), swatches display on the product detail page but don't function when clicked. The hidden select value doesn't update, causing "Please specify the product's option(s)" error on add to cart.
Expected Behavior
The explicit selection of "-- Please Select --" should behave the same as having no listing attribute configured. Product detail swatches should function independently.
Steps To Reproduce
- Enable Configurable Swatches
- Set "Product Attributes to Show as Swatches in Product Detail" to an attribute (e.g., Size)
- Explicitly set "Product Attribute to Use for Swatches in Product Listing" to "-- Please Select --"
- View configurable product page
- Click a swatch option
- Click "Add to Cart"
- Error: "Please specify the product's option(s)"
Environment
- OpenMage: latest
- php: 8.4Anything else?
Workaround
Select any attribute (even unused) in the listing field instead of "-- Please Select --".
Technical Notes
The issue is specific to the empty string value when "-- Please Select --" is chosen, versus null/undefined when the field is left unconfigured. Related to getSwatchAttributeId() handling in Helper/Productlist.php.