Discussions

Qty

Hi all

Is there a way to add a qty section to a form ie I want the customer to set the qty before it goes in to the cart, then update the cart qty

thanks

Paul

Posted: Jan 6, 2012

Comments

ShaunP1989 on January 6, 2012

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.

ikmps on January 6, 2012

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

ShaunP1989 on January 6, 2012

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?

ikmps on January 6, 2012

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