A product has Size and Pickup Location as attributes; Size can be S, M, L, and XL, while Pickup Location gives 10 choices.

The Pickup Location value does not affect the product price; that is only influenced by Inventory and Size.

When a product is created, I have to create 40 variations, even though the price changes only when Size has a different value. The Pickup Location value is just shown as reference in Add to cart.

How can I choose the Pickup Location attribute?

I am using Drupal 10 and Commerce 8.x-2.36.

Product detail

Create the Pickup Location attribute

Add the attribute to the product variation type

Add the product variation type to the product types

Add the variation to the Product

1 Answer 1


We typically only recommend using product attributes for those aspects of a family of product variations that differentiate one from another. Size is a reasonable attribute, because logically you would group together the various size variations as a single product. However, pickup location is more of a fulfillment detail - I wouldn't use product attributes for this.

What you do instead really depends on your business requirements. For example, if all products have the same potential pickup locations, it would be as simple as adding a List (text) field to your order item instead and displaying it on the Add to Cart form mode. If your options vary based on product and / or location inventory, then you'll need to pair that with custom code to filter the options as needed. (Alternately, if it's one pickup location for an entire order, you also could make this a field on the order itself, but again, really depends on your business requirements.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.