1

I have two different order types and two different order item types. Let's say they're "Default" and "Custom". On the configuration page for the Default order item type, I've specified Default as the Order type. On the configuration page for the Custom order item type, I've specified Custom as the Order type. For both order types, I use the "Inline entity form - Complex" widget for the Order items. I've set the "Allow users to add new order items" option and left the "Allow users to add existing order items" option unselected.

I expect that when I create an order of type Default, I will only be allowed to add Default order items. And when I create an order of type Custom, I will only be allowed to add Custom order items.

However, what I get instead is the option to choose from a select list whether I want to add a Default or Custom order item, regardless of the order type. So it's possible to create orders that have a mix of Default and Custom type order items. I do not understand why this is so. It seems that the "Order type" value for order item types is being ignored.

Is there a way to set up commerce order/order item types so that an order item can only be added to an order if the order type is the one specified in the order item type configuration?

  • 1
    Hi Lisa, please be aware that you are stating facts without asking a specific question. Can you edit the question to include what you want to know? Are you interested in why this is designed like this, or are you wondering if you have done something wrong? – Neograph734 Jun 27 '17 at 17:15
  • 1
    I've edited the question. Thank you. I am interested in why this is designed like this but mostly I just want to fix things so that the Order items widget on an order has a simple "Add new order item" button without the confusing order-item-type select widget next to it. – user72086 Jun 27 '17 at 17:42
  • 1
    There's no deep mystery to it, there's a UI bug where the order item type is being ignored by the widget (and possibly by the underlying field). Please create an issue in the Commerce issue queue. – Bojan Zivanovic Jun 29 '17 at 15:13
  • Hi BojanZ, thank you so much for your response. I was going crazy trying to figure out what I was doing wrong. I will create an issue. – user72086 Jun 29 '17 at 17:27
0
+50

As BojanZ (the maintainer of the module) has stated in his comment above, you have located a bug :) Congrats! Post it to the Commerce issue queue here:

https://www.drupal.org/project/issues/commerce?categories=All

  • So, was there an issue posted? Can someone provide the link? – jackbravo Jul 17 '17 at 17:31
  • 2
    This is the issue that was created for this question: drupal.org/node/2890837 – jackbravo Jul 17 '17 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy