Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Was just testing out the VBO Add to cart (uc_product_action_add_to_cart) and noticed that if the view has either one of these fields "Buy it now button" and "Add to cart form" only the first item in the view is added to the cart or no items at all are added to the cart. If I remove those fields from the view, using the VBO Add to cart button adds all selected products to the cart like it should but that means you can use the quantity or attributes fields.
Comments
Comment #1
longwaveCan you export a simple view that demonstrates this, to make it easier to replicate?
Comment #2
end user CreditAttribution: end user commentedYah I'll set up a test site/page and post the view export.
Comment #3
end user CreditAttribution: end user commentedOk here's the test site
Products with Add To Cart Form
http://dev.ubercartdemo.com/vbo-test
Products with out Add To Cart Form
http://dev.ubercartdemo.com/vbo-test-2
Exports of both views
Comment #4
longwaveHaven't had time to test this yet but I guess this is probably similar to #1800626: Drupal comment preview conflicts with add to cart form
VBO wraps the entire view in a form, but the add to cart buttons are already individual forms. I am not really sure what we can do about this, and also can't really see why a form with both VBO add to cart and individual add to cart buttons would be useful?
Comment #5
end user CreditAttribution: end user commentedWell this can be usefull in many ways. One is an upselling feature on product pages so if some products have attributes the form wont work with those. Something like this http://www.ridetech.com/store/2005-and-up-mustang-tigercage.html Yah I guess I could use product kits but I think its better to have individal products plus give me more display options using videws instead of having custom code.
Also I'm trying to use the VBO instead of attributes. I create a product container node and use entity references to reference other products that are the same products but different sizes. I then use views to display them in a table and using VBO would allow the user to select each product and also attributes. Again give me way more leway in the way I can display products. I aos also keep rating and comments to the container node instead of multiple nodes of the same product.
Comment #6
end user CreditAttribution: end user commentedAny more suggestion? I'd be willing to spend some $$$ to make this happen. I can live with the way it works atm but it would be great to have the quantity field available but since its tied to the buy forms it can't be used.
Longwave I've sent you an email through Drupal a few days ago, not sure if you received it.
Comment #7
DanZ CreditAttribution: DanZ commentedSee also #1323656: The comment preview form doesn't account for nodes that already contain a form and #1800626: Drupal comment preview conflicts with add to cart form.
Comment #8
longwaveMarked #1925606: Add multiple items on same page to cart (While still having individual add to cart buttons) as duplicate