Discussions

Purchasing content field level access question?

Hello...

Everyone is the newbie at some point with something. Today it's my turn with Drupal and Drupal Commerce.

Question if I may... I think I understand the process of purchasing Role upgrades and Node access. However would I go about the process of doing a Content Field access purchase?

Example, unauthorized visitor / user stops by the site and sees a Node with some content fields with general information. Logs in becomes authorized as a user with Member Role and now sees additional fields on the same node. Eg. using Field Access module.

Basic I know, but for us beginners it's still impressive and now for my point of need.

The user with Member Role uses Drupal Commerce to purchase access to see even more fields on the same Node. However, the next visitor that logs in as a user with a Member Role would not see the paid content field unless they made a similar purchase.

I hope I have explained the question well enough. I do not want to create special user Roles for each product nor additional Nodes for little extra bits of content. Just a few user Roles that also have access to specific content fields, available only to users of that Roles and that have now made a purchase, on a Node that is available for access by all visitors / users that want to see the Node's general fields.

Content Access module is sometimes mentioned as a way to grant user specific access, much like field access. Though I am looking for the other side of that, the access to fields by specific individual users of various roles that have purchased that additional field.

Thank you for any suggestions and guidance.

Also, when I get it working I'll be sure to invite everyone over for an open house to see what you helped me do.

Respectfully,
Derek

Posted: Mar 26, 2011

Comments

rickmanelius on June 15, 2011

I know there are other modules out there. Commerce Files for downloads. Commerce Product Key for software. But what if I'm selling access to a teleconference number and access code? Using commerce files doesn't make sense because then they'll have a clutter of 'licenses' that are nothing more than a text file. And since it'd be a single access code, using the product key also doesn't quite make sense.

So I'm also looking for a field access level solution... where the product display (or the product entity) would have a field of information that is turned on by a purchase.

This is probably an edge case, but I can see it being useful for a lot of people.

I could probably get away with node access, but then that's a bit of duplicate content spread across the product display and then the product information node.

rickmanelius on June 15, 2011

I think I may have a different solution using views.

- Add fields to product entity
- Hide fields from being displayed
- On order: use rules to send additional email with this field
- On product display: show field if user ordered
- On order page: show field

The problem is, one has to relate the user, product display, product entity, and order entity together to determine whether or not to display this. I think it's possible, I'm just having a difficult time piecing it together.

robwithhair on February 9, 2012

I too am in need of this functionality. If someone managed to figure out how to get this working, can they please let me know? File field access or node access is what I need really.