A customer want to have the possibility to use different discounts on products. I'm working with the price resolver and I'll give the possibility to manage different discounts with taxonomy terms. I added an entity reference field (field_discount) to the product.

I'm writing the module that should look which discount is given to the product and then calculate the price based on the discount.

How can I load the value of field_discount in my module?

I made now a lot of research and I tried many different things, but nothing worked.

2 Answers 2


Have you tried?




Your Answer

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

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