I enabled commerce_add_to_cart_extras module to get a new views handler for product quantity, which makes it possible to create a view and make that into an add to cart form.

However, when enabling the block on my product, the action is node/6/6 and not just node/6 which causes the form not to be submitted.

I followed this procedure.

1) Created a view with product quantity and product title
2) Added a reference to a node
3) Added a contextual filter so it only chooses the correct products for a particular product display
4) Added it via Structure > Block to a particular page
5) Hide the standard commerce add to cart block
6) Go to node/6 (where I implemented it)
6) Punch in some values and hit Add to cart on my custom views block created in #1
7) Redirected to node/6/6 because form action is node/6/6
8) No message with stuff being put into the cart
9) Go to /cart. Confirm that no products has been put into the cart

Comments

lsolesen’s picture

Project: Commerce Add to Cart Extras » Views (for Drupal 7)
Issue summary: View changes

Added more info.

lsolesen’s picture

Title: Not adding products to cart » Action wrong when enabling the views block form on a page
Version: 7.x-1.x-dev » 7.x-3.5
lsolesen’s picture

Issue summary: View changes

Fixed op explanation.