Question

I need some suggestion to add some fields to the "Add to cart" page.

Out of many products, one of the product requires some user information to be filled before proceeding to "Add to cart" process. I am selling a product of type "Exam". Before buying Product of type "Exam" (Before adding to cart), user has to input his person details like name, address, DOB and other mandatory details without which he is not able to proceed.

Could you please guide me, how to achieve this?

Was it helpful?

Solution

It sounds like you need the Customizable Products module.

Once you have that module installed, you can go to Administration > Store > Configuration > Line item types. Add a custom line type and add as many custom fields there as you'd like. You'll see - the interface for adding fields to the custom line type is the same as when you create a content type, so it's easy to use.

Then, when you've added all the customer info you need in your new line item, go ahead and modify your 'Exam' product to include those fields in the product display. Hit the 'Display' settings for the content type, and configure the settings for the 'Add to cart' field. Make sure you choose the correct line item for it to use and Save!

Does that work for you?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top