On Wed, Nov 26, 2008 at 3:13 PM, Kyle Fox <[EMAIL PROTECTED]> wrote:
>
> Hi, we're planning on releasing a web application as a subscription
> service in the near future. It looks like Satchmo has a lot of the
> features I was planning on building into our billing app (rate plans,
> subscriptions, trial periods, unit-based discounts, etc).
>
> I realize it's a cliche, but Basecamp is a perfect use case example.
> Has anyone ever used Satchmo for this purpose? I suppose my biggest
> question is how pluggable satchmo itself is; our "Account" model is
> what everything hangs off, and we need to be able to allow users to
> change their billing info, rate plan, etc.
>
I just did this for a client.
Make a listener function and connect to satchmo_order_success. In that
function look for your subscription products, and create or update your
Account model for the user attached to the order.
Something like this:
#=============
def subscription_sale_listener(order=None, **kwargs):
"""
Listen for a successful order, and if it contains a subscription
then create the proper profile.
"""
if order:
for item in order.orderitem_set.all():
if item.product.is_subscription:
log.debug('Found subscription for %s on order #%i',
item.product.slug, order.id)
make_my_profile(order.contact, item)
break
def make_my_profile(contact, item):
"""Make your custom profile here"""
pass
order_success.connect(subscription_sale_listener)
#=============
The only trick is that you'll need to turn on the "user must be logged in to
order" switch, and probably used the combined login/register page I added
last week. Otherwise you'd get people who order a subscription but have no
way to login, since they aren't users.
---
Bruce Kroeze
http://gosatchmo.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---