With Craft Commerce, I have a custom field that allows you to select which user from a defined group the product belongs to/is associated with.

I want to be able to set the user in order to access additional information about this user (profile info etc) and display this on the relevant product page.

How would I achieve this?


{% set user = product.usersFieldHandle.first() %} will give you the UserModel of the first related user.

Then e.g. {{ user.fieldHandle }}


Your Answer

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

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