1 reply [Last post]
Frank_McLean's picture
Offline
Joined: 06/24/2012
Juice: 7
Was this information Helpful?

Hi,

Ok, enough forum searching. I've done my best, honest. Smiling

We are using Organic Groups (OG), as a stand-in for 'subscription', where users can be part of more than one OG. A member of an OG can buy quantities of 'accesses' to one of our software products ON BEHALF OF that particular OG. Every member of the OG can then draw on the total quantity bought. The OG can be 'topped up' at any time by a member of it. When logged in, a user's cart can add accesses to as many of the OGs to which they belong as they like, and CANNOT add accesses to any OG of which they are not a member. In fact, they should never even be aware that such OGs exist.

Ok, so, hopefully that's fairly clear. Smiling Our issues are:

1. How do we get some form of OG identifier on each order line? [Remembering that each time we actually allow access we have to run a check that 'total accesses bought by anyone for this OG must be > number of accesses made by this OG'. SO, we have to (pseudo) 'select sum(qty) from order lines where OG = whatever'.]

2. How do we create multiple cart lines when we only have a single product, one cart line per OG? Or do we need multiple dynamically created products, one per OG? Or dynamically created attributes [do I mean one attribute with dynamically created options?], one per OG? Or some way to blow the user straight through to checkout, allowing only one line per order, i.e. only one OG at any time, hardcoded from a button IN the OG? Or...? [From our delving, there are many potential ways to deal with this, none of which we can make head nor tail of working. Smiling ]

3. However the answer to issue 2 pans out, how do we restrict users to only buying for their OG(s)? That is, whilst keeping invisible the presence of OGs to which they do not belong. Here I'm thinking that it might be possible to show them all the 'OGs' on each order line and let them choose, but block order processing at the back end for OGs to which they don't belong. We'll probably have to do this anyway, but we definitely don't want to present a big list of interesting OGs to every user.

4. For any solution, how do we allow the user to see the OGs they're buying for / have bought for? I mean in the cart and on the order. And how for our purposes would this be best done to allow leveraging of any nice precanned reports?

I know, this is a tall order for a forum post. This is a real headache for us and ANY help would be much appreciated. We will definitely share any end solution to the forum.

Thanks.

Frank_McLean's picture
Offline
Joined: 06/24/2012
Juice: 7
Answering my own post

Ok, so we went with the dynamic product approach, creating a trigger on subscription creation with an action of 'Execute PHP'.

Most useful post I've ever found about Drupal - http://www.unleashed-technologies.com/blog/2010/07/16/drupal-6-inserting...

Thanks.