Problem/Motivation

The billing address is currently listed under the Customer category; however the billing information is a property of the order, not the customer.

Screen shot showing Address in Customer Category

Proposed resolution

Set the Category for the OrderBillingAddress, CommerceCondition to "Billing"

/**
 * Provides the billing address condition for orders.
 *
 * @CommerceCondition(
 *   id = "order_billing_address",
 *   label = @Translation("Billing address"),
 *   category = @Translation("Billing"),
 *   entity_type = "commerce_order",
 *   weight = 10,
 * )
 */

For constancy OrderPaymentGateway should also be changed and Commerce Shipping Conditions should be in a "Shipping" category.

Remaining tasks

  • OrderBillingAddress Condition
  • OrderPaymentGateway Condition
  • Commerce Shipping Issue

Comments

dwkitchen created an issue. See original summary.

dwkitchen’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB
bojanz’s picture

FWIW this was done to match what other systems do in their UIs, the billing address is conceptually considered to be customer data.

dwkitchen’s picture

Hi @bojanz do you have any examples?

In our case the Billing Address in primarily related to the order and the other items in the Customer category are about the user - role, email, etc.

rszrama’s picture

Category: Bug report » Task
Status: Needs review » Needs work

This came out of a UX review I ran with David a little bit ago, and the main challenge we're trying to overcome is the ambiguity between a customer's default billing address an order's billing address. It wasn't clear to me which one the condition would respect, and I was a little confused why the condition wasn't passing for a user account with a default billing address even before an address was provided on the checkout form. (This was possible in 1.x because of architectural differences that were obvious once I dug into it.)

That said ... I'm not sure a "Billing" tab is any clearer, since we're trying to make it clear the billing address and payment gateway are properties of the order under consideration. I believe we should consider this instead leaving the "Select payment gateway" condition on the "Order" tab and just move the "Billing address" condition to the same tab.

dwkitchen’s picture

But all the conditions are for "properties of the order under consideration"

Customer is the order customer, not the current logged in user (although normally is for checkout)
Products are the products on the order
etc.

I note that we don't have any line item conditions, i.e. order contains line item of type, this would be an intermediary before order contains products of type.

I can see that the number of conditions in the Billing and Shipping categories will grow as we build more use cases.

jsacksick’s picture

I second Ryan on this, I'm not sure "Billing" tab is any clearer. I would move the billing address to the "Order" group, as the original title suggests.