Skip to content

[19.0] [FIX] website_sale_hide_no_variant_attributes: never block add to cart - #1347

Open
ivantodorovich wants to merge 1 commit into
OCA:19.0from
camptocamp:19.0-imp-website_sale_hide_no_variant_attributes-add-to-cart
Open

ivantodorovich wants to merge 1 commit into
OCA:19.0from
camptocamp:19.0-imp-website_sale_hide_no_variant_attributes-add-to-cart

Conversation

@ivantodorovich

@ivantodorovich ivantodorovich commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Attributes that never create variants are hidden from the product page, but their values were still required to sell the product. When those values are excluded for some variants, no complete combination may be left, and the product cannot be sold at all.

When no complete combination exists, the product now falls back on the variant-defining values alone: for the Add to Cart check, and for the first combination used by the product page, the shop grid, the wishlist, the comparison pages and the backend configurator.

Steps to reproduce

  1. Create a product with a Size attribute (Small, Large) that creates variants.
  2. Add a Material attribute that never creates variants, with the single value Cotton, and set its "Exclude for" to Large.
  3. Add a Finish attribute that never creates variants, with the single value Glossy, and set its "Exclude for" to Small.
  4. Open the product page.

Current: "This product has no valid combination", no Add to Cart button.
Expected: both sizes can be selected and added to the cart.

@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_hide_no_variant_attributes Module website_sale_hide_no_variant_attributes labels Oct 7, 2026
@ivantodorovich
ivantodorovich force-pushed the 19.0-imp-website_sale_hide_no_variant_attributes-add-to-cart branch from e47864e to a3f42f4 Compare October 7, 2026 17:48
… add to cart

Attributes that never create variants are hidden from the product page,
but their values were still required to sell the product. When those
values are excluded for some variants, no complete combination may be
left, and the product cannot be sold at all.

Steps to reproduce:
1. Create a product with a Size attribute (Small, Large) that creates
   variants.
2. Add a Material attribute that never creates variants, with the single
   value Cotton, and set its "Exclude for" to Large.
3. Add a Finish attribute that never creates variants, with the single
   value Glossy, and set its "Exclude for" to Small.
4. Open the product page.

The page says "This product has no valid combination" and has no Add to
Cart button, although both sizes exist and can be sold.
@ivantodorovich
ivantodorovich force-pushed the 19.0-imp-website_sale_hide_no_variant_attributes-add-to-cart branch from a3f42f4 to 80a5e40 Compare October 7, 2026 18:26
@ivantodorovich
ivantodorovich marked this pull request as ready for review October 7, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_sale_hide_no_variant_attributes Module website_sale_hide_no_variant_attributes series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants