Add support for commerce conditions
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3293930. -->
Reported by: [lexsoft](https://www.drupal.org/user/2529292)
Related to !3
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When adding a ECA condition with commerce_condition element type in the build form, it does not displays the table conditions instead we get an empty field.</p>
<pre>$form['commerce_conditions'] = [<br> '#type' => 'commerce_conditions',<br> '#title' => $this->t('Applies to'),<br> '#parent_entity_type' => 'eca_condition',<br> '#entity_types' => ['commerce_order'],<br> '#default_value' => $this->configuration['get_conditions'],<br> ];</pre><p>
What I see:<br>
<img src="https://www.drupal.org/files/issues/2022-07-02/Screenshot-2022-07-02-at-21.46.26.png" alt=""><br>
I should get something similar to this:<br>
<img src="https://www.drupal.org/files/issues/2022-07-02/Screenshot-2022-07-02-at-22.10.04.png" alt=""></p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Install commerce demo</p>
<pre>composer create-project -s dev centarro/commerce-kickstart-project commerce_kickstart<br>composer require drupal/commerce_demo:^3.0<br>composer require drupal/bpmn_io<br>composer require drupal/eca_state_machine</pre><p>Add and install attached sandbox <a href="https://www.drupal.org/files/issues/2022-07-02/eca_commerce.tar_.gz">eca_commerce</a> module.</p>
<p>Add ECA Commerce Condition on a State Machine Event.</p>
issue