Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to embed part of the order entity in a custom pane by following the documentation
https://docs.drupalcommerce.org/commerce2/developer-guide/checkout/creat...
$form_display = EntityFormDisplay::collectRenderDisplay($this->order, 'my_form_display');
$form_display->buildForm($this->order, $pane_form, $form_state);
return $pane_form;
However as I have the commerce_promotions module enabled the coupons is being automatically displayed.
I would like to make this optional
Patch provided.
Comment | File | Size | Author |
---|---|---|---|
#3 | interdiff_1-3.txt | 566 bytes | Aerzas |
#3 | commerce-coupons_field_form_display-3131962-3.patch | 813 bytes | Aerzas |
configurable_promotion.patch | 605 bytes | au_dave | |
Comments
Comment #2
au_dave CreditAttribution: au_dave commentedComment #3
Aerzas CreditAttribution: Aerzas at Watch Dreamer SA commentedWhen the form display is made configurable it makes kernel tests fail because the size settings is of the wrong type. Here is the updated patch with the side issue fixed.
Comment #4
skyredwangThe fix looks good. The test is green on D9
Comment #7
jsacksick CreditAttribution: jsacksick at Centarro commented60 is the default value, so it doesn't even have to be specified, other than that, fix looks good, committed, thank you!