Describe your bug or feature request.

If a bug, provide steps to reproduce it from a clean install.

  1. Create a new order type from the UI
  2. Create a new order of that type
  3. Click on "Add order items" below the order items table
  4. Notice the modal is empty

Add order items modal

Also, I realized the order_items field still uses the Inline Entity Form widget by default:

      ->setDisplayOptions('form', [
        'type' => 'inline_entity_form_complex',
        'weight' => 0,
        'settings' => [
          'override_labels' => TRUE,
          'label_singular' => t('order item'),
          'label_plural' => t('order items'),
          'removed_reference' => 'delete',
        ],
      ])

I thought we changed that, and made our new order items widget the default.

Issue fork commerce-3561175

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jsacksick created an issue. See original summary.

jsacksick’s picture

Issue summary: View changes
StatusFileSize
new122.34 KB

tbkot made their first commit to this issue’s fork.

jsacksick’s picture

Also the "Order items" label is visible on a new order type.

jsacksick’s picture

I'm not sure I understand the proposed changes... Is it not sufficient to have access control for the route? Why do we need changes to the form method etc?
Also the tests seem to be failing.

tbkot’s picture

Status: Active » Needs review
jsacksick’s picture

StatusFileSize
new27.95 KB
new18.34 KB
new27.95 KB

@tbkot: Ok after pulling your changes, with no order item type configured, The add items button is gone...
But after creating a new order item type referencing it, I have an empty modal which is the main issue I wanted to get fixed with this report.

Is there anything we can do to fix this?

Also, the "Order items" label should be hidden:

Order items label

Modal still empty:
Order items modal

jsacksick’s picture

Status: Needs review » Needs work

  • jsacksick committed 0cd92c0b on 3.x authored by tbkot
    fix: #3561175 Add order items modal is empty for a new order type
    
    By:...
jsacksick’s picture

Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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