Question

I am building an app that has several tabs, among them the Browse tab and the Cart tab.

When clicking on the "Add to cart" button in the item details activity, I get a notice saying "Product must have a combination chosen". How can I have the app show the combination choices so these can be selected?

Was it helpful?

Solution

The reason you're getting this error message is that the product has variations (for example a t-shirt coming in several colors/sizes). You can't add to cart since you did not choose a specific combination of these variations.

You need to add a variation chooser to your item details. You can try the ItemVariationsView module.

This view will display all the possible variations to the user. By default, it uses image thumbnails, so you'll have to prepare an image for every option. If you don't want to mess around with all these images, you can add a DefaultRenderTypeOverride and make it a Select. This will make the variations appear as a combo-box.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top