I am writing a price resolver for drupal commerce 2 (on drupal 8). To get the price i want, i will need to fetch some information from a field that has been placed on the attribute(s) that have been selected. More specifically, i added a price field to some attributes that i want to add.

Now both the $entity and the $context variable appear not to carry info on which attributes were selected. How can i get to those attributes?

Your Answer

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

Browse other questions tagged or ask your own question.