I want to set up a trial based account for an user who will sell his products. After he paid the payment, i will upgrade him to role seller.

Until his role is upgraded to role seller, i don't want to show add to cart button for the added products.

First of all how can i differentiate it to be a trail site for example. 30days until he pays, if not i want the role to be expired. How can i do it. Any suggestions will be helpful?

1 Answer 1

  1. Create 2 user roles: Trial Seller and Seller.
  2. Create a Rule.

The second question is another seperate task.

  1. Create a Rule:

    • Event: "Drupal is initializing"
    • Conditions: User is of role "Trial Seller" AND not "Seller" AND php "(Current_date_time - Account_Created_Date) > 30*24*60*60" (to see if the time from the user account date until now is more than 30 days, time in seconds) AND he has paid
    • Action: Remove user role -> "Trial Seller"

There is also the module Role_Expire that may help you.

  • First task i did using form alter and hide those add to cart buttons. Second Task i used rules to do it. Thanks
    – Ram
    Commented Aug 21, 2013 at 10:47

Your Answer

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

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