Score:0

How do I conditionally restrict an attribute

ph flag

I'm using Drupal Commerce 8.x-2.x on Drupal 9.5.x. I need to restrict a particular product attribute to certain regions (regions selected via an attribute). My thinking is that the region is selected via an attribute; I can't see another way to do it for my means.

In my use case, regions are not location based geographical regions; they are locally defined regions, so I can't see a way other than attributes to define this.

So, for example, in attribute Region | Region A, only attributes Product Type | Types A and C are available, but in attribute Region | Region B, attributes Product Type | Types B and C are available.

How do I make the availability of attributes conditional upon other attributes?

Core components > Conditions is a start, but only works for payment gateways and promotions.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.