Add support for commerce conditions

Created on 2 July 2022, about 2 years ago
Updated 27 July 2023, about 1 year ago

Problem/Motivation

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.

$form['commerce_conditions'] = [
        '#type' => 'commerce_conditions',
        '#title' => $this->t('Applies to'),
        '#parent_entity_type' => 'eca_condition',
        '#entity_types' => ['commerce_order'],
        '#default_value' => $this->configuration['get_conditions'],
      ];

What I see:

I should get something similar to this:

Steps to reproduce

Install commerce demo

composer create-project -s dev centarro/commerce-kickstart-project commerce_kickstart
composer require drupal/commerce_demo:^3.0
composer require drupal/bpmn_io
composer require drupal/eca_state_machine

Add and install attached sandbox eca_commerce β†’ module.

Add ECA Commerce Condition on a State Machine Event.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom lexsoft London

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024