We have used field collections to add multiple products onto a page, those products have the add to cart form enabled, and since a recent update to Ubercart they now only add the first rendered product to the basket no matter what "add to cart" button you press.

So if you have three products, and click add to cart on the third one, product number one will be added to your basket instead.

In our example we are not using views to bring these products in, we are using field collections -> full content, incase that helps testing / evaluation / other users.

Many thanks,
Vince

Comments

vince.rowe created an issue. See original summary.

TR’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Please describe the steps you took to create your page. Perhaps I'm dense, but I don't see what field collections have to do with displaying multiple products on a page.

Like any form in Drupal or even in bare HTML, you need some way of associating a button with the form it is supposed to submit. If the add-to-cart button only adds the first product, the problem is almost certainly that the HTML id's are not set properly, which is most likely due to the way you are generating the page, as this works properly in core Ubercart. If you post the HTML source for your page or provide a link to the page itself, this is something we could look at. This part of Ubercart hasn't been altered in years - if you think the behaviour has changed then please provide an exact version number where it worked properly.

TR’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)