Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
I want to create a site which has premium membership (Gold, silver and bronze) and want users to pay for those memberships.
I have installed commerce_sp on my site but I dont know how to configure it and use it.
I am not getting any subscription product on my product types. :(
Someone please help.
Comment | File | Size | Author |
---|---|---|---|
#16 | subscription_end.jpg | 100.39 KB | beatriz77 |
#11 | SubscriptionRule.jpg | 186.72 KB | edboost |
Comments
Comment #1
huah CreditAttribution: huah commentedSame question.
Comment #2
kerios83 CreditAttribution: kerios83 commentedStart on - http://dev.nodeone.se/node/634
Comment #3
mofdi2 CreditAttribution: mofdi2 commentedNo solution in this link !!
Comment #4
mediapal CreditAttribution: mediapal commentedThats the problem with so many modules here. No documentation or at least a how to get start. Its frustrating
Comment #5
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedInstall the module. You should get a new product type in Drupal Commerce, called "Subscription". Each Subscription has an SKU, title, and duration. Check that out and maybe create a couple of Subscription products for sale in your store.
With Rules UI module enabled, go to Admin > Config > System > Workflow > Rules > Rules Components . 90% of what this module does is in Rules configurations, so you can get in and tweak whatever behavior you want... but normally all you want to do is change what happens when a subscription starts or ends. This could be anything at all, but the default is nothing. In Rules components, look for the Rulesets called "Subscription Start" and "Subscription End". Edit those rulesets and customize what should happen when subscriptions start and end.... in my case, I set "add a role" and "remove a role", respectively.
Comment #6
nigelw CreditAttribution: nigelw commentedohthehugemanatee, what Data selector did you use to apply the role to?
site:current-cart-order:owner
or
site:current-user
Comment #7
bmx269 CreditAttribution: bmx269 commentedWhere does the interaction with Paypal recurring payments take place, ie, they cancel the payment on paypal?
Comment #8
marcoka CreditAttribution: marcoka commentedthis maybe helps
#1801402: Chart of flow (documentation suggestion)
Comment #9
RaphaelBriskie CreditAttribution: RaphaelBriskie commented@nigelwaters when you're typing the data selector select 'User' (only). Selecting anything else does nothing, at least for me anyway.
Comment #10
nigelw CreditAttribution: nigelw commentedI am absolutely confused and I am going to cry if i can't get this to work. :(
Can someone please give me a step by step on how I would add a role to a user when subscription starts and remove a role when a subscription ends (for the sake of the example, just use the administrator role)?
I really need my hand held on this. :(
Comment #11
edboost CreditAttribution: edboost commentedI don't fully understand how everything is working (so I can't say that this is the BEST way to configure) -- and until I can test more, I'm not sure that subscriptions are expiring properly BUT I have finally gotten this to work on our site.
Screenshot of details attached.
None of this worked until I changed the weight of this rule (by opening the settings option set at the bottom of the rule), so that it's evaluated first (in my case that just meant making the weight -1). I think that rule order has been one of my big problems all along. Now it seems to be working.
Hopefully if this doesn't solve your problems, it at least gives you a start.
Good luck!
Comment #12
likewhoa CreditAttribution: likewhoa commented@edboost why over complicate things with a clone of "Subscription Started (update)" when all you need to do is:
TIP: in "End subscription when validity is unset" add a new action that sends an email to the user notifying him/her that their subscription has expire and link them back to the website to buy more subscription ;)
I think this issue should be closed as there are several guides here already explaining the whole process. Good luck to all. PM me if you need further assistance.
Comment #13
edboost CreditAttribution: edboost commented@likewhoa: not trying to make anything too complicated. I just wasn't sure what the intended use case was for "insert" and "update" and didn't want to override them if I might want them later. When I'm unsure I tend to err on the conservative side.
Thanks for the tip on the email notification - I hadn't thought of that.
And, I'm wondering if I missed whatever guide(s) you're referring to. I've spent a lot of time on this, poring over e-amina's flowcharts and everyone else's info and have really struggled to get this to work (although I am by no means a Drupal expert, I did have this functionality working with Ubercart and have several other Rules actions working).
I feel like I'm feeling my way blindly through an excellent but undocumented module. Do you mind linking to the guide you recommend?
Thanks!
Comment #14
likewhoa CreditAttribution: likewhoa commented@edboost see #1372450: Please provide a basic HOWTO for this
Comment #16
beatriz77 CreditAttribution: beatriz77 commented@likewhoa
Hello,
i did exactly what you're writting, but subscriptions end doesn't work(the role is still on and the date of the validity subscription is always visible).
here a copy of my rule, thanks so much in advance
Comment #17
Outdoor Ed CreditAttribution: Outdoor Ed commentedI have commerce_sp up and running and have applied the rule. I actually have 3 membership levels basic, standard and premium granting Role Basic, Standard or Premium. What's the best way to do this in Rules? With my limited experience in Rules I would just create one Rule for each SKU-->Role.
Or is it possible to create a Loop in a Component that looks at each SKU and then somehow apply the result to the correct Role?
Here's my 1 SKU--> 1 Role rule
{ "rules_commerce_sp_subscription_started_insert" : {
"LABEL" : "Subscription started (insert)",
"PLUGIN" : "reaction rule",
"TAGS" : [ "commerce_sp" ],
"REQUIRES" : [ "rules", "commerce_order" ],
"ON" : [ "user_insert" ],
"IF" : [
{ "NOT data_is_empty" : { "data" : [ "account:field-commerce-sp-validity" ] } },
{ "commerce_order_contains_product" : {
"commerce_order" : [ "site:current-cart-order" ],
"product_id" : "SUB-CompanyProfile-Premium",
"operator" : "\u003E=",
"value" : "1"
}
}
],
"DO" : [
{ "component_rules_commerce_sp_subscription_start" : { "user" : [ "account" ] } },
{ "component_rules_commerce_sp_schedule_subscription_expiration" : { "account" : [ "account" ] } },
{ "user_add_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "323" : "323" } }
}
}
]
}
}
Comment #18
likewhoa CreditAttribution: likewhoa commentedsorry guys but if you can't get working my basic howto, i can only provide paid support as my time is money these days.
Comment #19
mrconnerton CreditAttribution: mrconnerton commentedThe problem with a module like this is that it provides a lot less "functionality" and a heck of a lot more default configuration that the end user will have to change on their own.
The first thing I suggest anyone trying to get this to work, especially with this post being as old as it is, is to first backup your site, then completely disable and uninstall commerce_sp module and download the latest 2.x-dev version and required modules/versions. There have been some rules updates and weight changes that were causing people issues. Once you do this, the basics outlined in #12 pretty much apply. Edit the start/insert/update rules and have it do what you want. If you are not familer with the rules module then you must stop and watch a video on rules such as http://dev.nodeone.se/node/634 as the expected functionality of this module is driven by rules. You cannot use this module if you can't use rules.
I am working on this module a lot at the moment and trying to figure out the best way to accomodate some of the major feature requests (role subscriptions, multiple teirs, etc) while still keeping the module maintainble and upgradeable. I am working on a basic patch right now that lets you pick the role to add/remove via role reference on the subscription product. That way for the very basic usage you can just turn it on and run with it.
Finally marking this a duplicate of #1372450: Please provide a basic HOWTO for this
Comment #20
Hadi Farnoud CreditAttribution: Hadi Farnoud commentedthank you. #5 was enough for me to learn how it works :)
Comment #21
pinkonomy CreditAttribution: pinkonomy commented@Hadi Fardnoud: I followed instructions of #5 but still cannot make it work.
I added a role when Subscriptions starts but the role is not assigned after buying a subscription.
Also the Subscription date on user account is not updated.
Am I missing something?
Sokratis
Comment #22
Hadi Farnoud CreditAttribution: Hadi Farnoud commentednot sure pinkonomy. might have done a few more steps. but, for the most part #5 was what I did.