Yup, quite simple, but strangely well hidden. You want to go Structure > Content Types > ... then click on Manage Display for the Product Display, then in the Product Reference field there is a little cog on the far right hand side, click on that, then just check the text box to display a quantity field in the add to cart form.
This works if I do through “product display” but I have created a views page to display a list of products, any idea what the field name is for this as I cant see it listed
Not 100% sure on this, and I'm a complete novice with views. But I believe qty isn't a field of a product, but is instead a field of a line item when it gets added to the cart, so maybe have a look in the line item for it rather than the product. But if you have the add to cart form in the view, is there a similar option to show it?
that was the way i was thinking but as soon as i add a "Commerce Line item: Product (temp)" I get the following error
Status message
1325855618
Error message
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS commerce_product_, 'commerce_product' AS field_data_field_descripition_commer' at line 1
Comments
Yup, quite simple, but
Yup, quite simple, but strangely well hidden. You want to go Structure > Content Types > ... then click on Manage Display for the Product Display, then in the Product Reference field there is a little cog on the far right hand side, click on that, then just check the text box to display a quantity field in the add to cart form.
works but one more question
Thanks Shaun
Wouldn't of found that !!!!
This works if I do through “product display” but I have created a views page to display a list of products, any idea what the field name is for this as I cant see it listed
Thanks for the help
paul
Not 100% sure on this, and
Not 100% sure on this, and I'm a complete novice with views. But I believe qty isn't a field of a product, but is instead a field of a line item when it gets added to the cart, so maybe have a look in the line item for it rather than the product. But if you have the add to cart form in the view, is there a similar option to show it?
error message
hi
that was the way i was thinking but as soon as i add a "Commerce Line item: Product (temp)" I get the following error
Status message
1325855618
Error message
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS commerce_product_, 'commerce_product' AS field_data_field_descripition_commer' at line 1
thanks again for the help
Paul
Adding a quantity field to a view
I believe you should be able to add a Quantity field to a view after you add a relationship to the Commerce Line Item: Product. See screenshot.
John / NEAR DARK