It's my first test with Drupal Commerce on D8 and came to this question: How do i add extra fields to checkout for example to get some extra information, if people buy a special product. I don't need it on product level but in checkout.
I don't find any information how to do that, so I tried "Checkout Flows" and "Order Types". I put an extra field in the default order type, but it doesn't show on cart...
I'm stuck and any help is appreciated.

Comments

krabbe created an issue. See original summary.

bojanz’s picture

Same way you would in Commerce 1.x, by writing a custom checkout pane.

krabbe’s picture

Thank you, bojanz!
So, I guess, it has to be in a custom plugin? No backend-solution?
Is there some sort of tutorial on the web? I didn't find D8 related stuff, and still struggling with symphony and OOPs and all that...
Maybe I can learn from commerce checkout module. Where is the important part in the module files?

mglaman’s picture

Review https://github.com/drupalcommerce/commerce/tree/8.x-2.x/modules/checkout..., this is best way to learn how to write a checkout pane.

If you're new to D8, the Plugin system has had a lot of blog posts and documentation written around it. Such as https://www.drupal.org/developing/api/8/plugins

Or, as a shameless plug, I wrote the Drupal 8 Development Cookbook which has a whole section on plugins: https://www.packtpub.com/web-development/drupal-8-development-cookbook#

rszrama’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.