1

I got a Commerce Product set up in Drupal 7 with a content-type Product Display that have a product reference to it. Users have read access to Product Display but not direct access to the Commerce Product.

I am now trying to set up a Pane in Views 3 that list Product Display nodes in a table. I want to include the Price in every row. I have added the referenced product in relationship and were about to add the price field from the product.

This view however does not display at all for normal users. I suspected that normal users don't have access to the Product entity, so turned on Disable SQL Rewriting and now Views displays the table as intended for normal users.

I am wondering if this is the right way to get the price to show up in Views? I can see that the Product Display node can actually display the price on its page without giving access to the Product to normal users, but cannot find how to access that display field within just the node in Views.

1 Answer 1

1

This has been discussed in a lengthy thread on drupal.org. The recommendation apparently is indeed to disable SQL Rewriting. There is a pretty good explanation of the ramifications in the middle of the thread along with alternative suggestions. But it appears that you got it right for now.

1
  • Thanks, haven't came along with that thread yet in my Google search for some reason! I had a read and seems like Disable SQL Rewriting is the way to go for my usage for now.
    – Machoke
    Oct 22, 2014 at 0:25

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.