Hi,

What is the best way to build a "pay to read" site ? (one acces per node, no subscription)
I found a solution with Druapl Commerce and Content access, but it is not too heavy for that?

Thanks in advance

Comments

bander2’s picture

You need a way to sell something and Commerce is a good choice and you need a way to restrict node access per user so Content Access is a good choice. And if it's the solution that Commerce Guys recommend then I think it's the way to go:

https://commerceguys.com/blog/selling-node-access-drupal-commerce

- Brendan

Paulset’s picture

Thanks bander2 for your answer, I appreciate.

I had found this solution, but it doesn't correspond in what I need.

I have to can by creating a product display, to create directly the product with Inline entity form. Yet, there it is necessary to create a content type premium, a product, then a product display... Many manipulations...

Don't you know a "simpler" solution ?

bander2’s picture

I hear a lot of complaints about the product/product display issue with Commerce. It provides flexibility, but can be annoying to administer. This module automatically creates a product display when you create a product:

https://www.drupal.org/project/commerce_auto_product_display

I do not understand your issue with inline entity forms, but that's another way to create products and product displays at once. Maybe you can rephrase that?

You won't be able to get around creating the premium content type, that's just part of site building.

- Brendan

Paulset’s picture

Thanks for your help brander (and sorry for my bad english).

I try to rephrase my problem :

There will be several authors on my site, who can publish paying contents. The process of publication must be thus simplified for them. Furthermore, they will have no same permissions as the administrator, I do not thus think that they can create a premium content, then a product, then a product display...

For inline entity forms, I had chosen this solution to simplify the creation of products. But there, I do not how see simplifying the process of publication with the solution given by Commerce Guys.

I hope to have been more clear ;)
Would you know in which direction I could look?

bander2’s picture

I see, you need to streamline this for content authors.

It sounds like what you need is for when a author creates a "premium content" node it kicks off a process which creates the corresponding product and adds it to your existing product display or creates a new one.

I am trying to think through how this would be done with the Rule module and I think it should be possible, theoretically. But, in my experience, when creating entities and having them interact with other entities, I usually need to write code. It can be kicked off with hook_node_insert.

- Brendan

zeezhao’s picture

An alternative simple way may be as follows:
- use ubercart + content_access + acl modules
- create "premium content" product class in ubercart
- grant access to create this content type to the authors
- then create a rule so that once the product is purchased and fully paid for, grant read only access to the buyer
[you can clone the "Complete non-shippable order after payment received" uc_checkout_complete_paid rule and then add extra conditions to it e.g.
extra condition: content type is "premium content",
extra action: Grant access by user --> Grant view access: [order:customer]
]

Paulset’s picture

@bander2 Other solution: to use again Inline entity form, like that it's possible to create everything in the air. However, no problem at the level safety or others?

@zeezhao Thank you for this suggestion. Ubertcart is it a viable solution on the long term? I was able to read that it was preferable to use Drupal Commerce (solution of future). So, will the users have access to a teaser before buying?

Otherwise, with the solution of commerce guys, when the buyer paid the contents, we find ourselves with 2 contents visible : product display and premium content. Is it possible to remove the product display when he was bought?
Finally, there is not a risk of duplicate (the same title for the product display and the premium content) ?

Thank you very much for your help ;)

bander2’s picture

However, no problem at the level safety or others?

Can you rephrase this?

... we find ourselves with 2 contents visible : product display and premium content. Is it possible to remove the product display when he was bought?

If you are talking about a View, then I am sure it's possible. Off the top of my head, I am not sure if it can be done in the user interface or if you will need to code.

Finally, there is not a risk of duplicate (the same title for the product display and the premium content) ?

What about this worries you?

I think you should give the Commerce Guys' solution and zeezhao's solution a shot. Build a small proof of concept. You need to get the authorship experience right. This other stuff about Views and duplicate content can be worked out after the fact. Don't get hung up on it.

If you do have something built and are running into an issue of filtering the view for unpurchased product displays and purchased premium content, then open another thread for that. Someone else may have a ready answer.

- Brendan

Paulset’s picture

Can you rephrase this?

The use of the module "Inline Entity Form" and the fact of creating several entities simultaneously does not raise problems of security ?

All right for the rest, thanks !

bander2’s picture

Thanks for bearing with me. Your English it much better than my French :)

It depends on what you consider a security problem. The author will need access to create all the entities on the form. Other than that, no.

- Brendan

anshul.udapure’s picture

Hi It is not at all good to user commerce for small requirement. in fact commerce module can ruin existing system. It is better you use
https://www.drupal.org/project/nodeaccess_password . with small customization with payment gateway and combination of node access module you can make page protected with password. one more module you can take help https://www.drupal.org/project/protected_pages

Let me know if this solve your problem.

Thanks

bander2’s picture

I agree that Commerce is a large complex system, but...

in fact commerce module can ruin existing system

is a pretty inflammatory statement. Care to offer evidence?

- Brendan

Paulset’s picture

Thanks anshul.udapure for your suggestion.

I also think that Drupal Commerce is too big for my need. But I do not either try to protect the access to a page by a password, and I need that taxes, change of currency ... are managed..

With your solution, it is possible to automate the process by giving access to the node after payment?

Otherwise I found this solution : https://www.drupal.org/project/field_paywall, but I do not know if it is possible to combine it with a system of payment.