Product attributes select list > render with checkboxes

Created on 19 May 2024, 4 months ago
Updated 20 May 2024, 4 months ago

The product attributes is rendered with a select list in the 'add-to-cart' display mode. How to display options with checkboxes ?

- I have created a 'variation-type' for a specific product type. This variation type is related to attributes.
- I have created several attributes, and defined variations
- In the 'order item type' settings, linked with my product type, purchased entity is rendered with 'attributes variation product' widget
- On the attributes settings (form display...), i don't see how to change the select list to checkboxes

In the public page, how to render product attributes with checboxes ?

Thanks for yours replies.

💬 Support request
Status

Closed: won't fix

Version

2.39

Component

Product

Created by

🇫🇷France kumkum29

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kumkum29
  • Status changed to Closed: won't fix 4 months ago
  • 🇮🇱Israel jsacksick

    You can expose radios, not checkboxes, (See https://docs.drupalcommerce.org/v2/developer-guide/products/product-info...).

    The attribute selection is here to select an entity to purchase, as a result checkboxes can't work here (since you could select multiple).

  • 🇫🇷France kumkum29

    Hello jsacksick,

    yes it was an error on my part, I want to modify the rendering of the attributes to radio buttons.

    I don't see in the commerce settings how to proceed.

    For the moment, i use this hook to alter the type on the attributes : hook_form_commerce_order_item_add_to_cart_form_alter. It's not user friendly.

    Can I choose the display mode in Drupal commerce settings?

    Thanks.

Production build 0.71.5 2024