- Issue created by @uridrupal
- 🇳🇿New Zealand john pitcairn
No sorry. This module adds a separate form to each individual product variation. That's all it does.
It sounds like you need a single customised add to cart form on the product.
- 🇳🇿New Zealand john pitcairn
It seems like a use case that would not be uncommon. I'm surprised there isn't anything.
At a minimum you'd need to swap out the default add-to-cart form class and write your own custom form class that (probably) extends the default form. If you also need to use the default form on some some products, you'd need a field formatter so you can choose which form to use on the variations field rather than blindly swapping it.
Have a look at these first:
Commerce Add To Cart Matrix → - seeking new maintainers, but looks like it does almost exactly what you want.
Commerce Variation Add To Cart → . That operates at the product level and I think it builds a single form. But last time I looked at that it was building the form entirely in a twig template which is not a good way of doing this. It may have changed.
- Status changed to Closed: works as designed
about 1 year ago 12:05am 27 October 2023