I have just installed PPN with ubercart.

I have three features:
a) Feature 1
b) Feature 2
c) Feature 3

I have set ubercart up to have product bundles, so a 5 pack, a 10 pack etc.

What I cannot seem to get right is to have a 5 or 10 pack bundle (product) linked to PPN in such a way that when a user creates any 1 of the 3 features, that feature is decremented or the Product feature created by PPN is decremented.

So for example, a user buys a 5 pack, if they create:
1 x a) node (see above)
3 x b) nodes
1 x c) node

then their 5 pack is consumed, they should now no longer be able to create any nodes until they purchase another bundle.

I can see how to add features to a product in the UI, but it seems I have to allocate a specific number for each feature, so in the example above:

a) if I gave each feature a value of 5, I would end up allowing a total of 15 nodes, when I really only want to allow 5.

- or -

b) if I try to limit the total to 5 I would have to predetermine the number for each feature, so assign feature 1 a value of 1; feature 2 a value of 3, etc which is not really what I am trying to do.

Any advice would be greatly appreciated and I am not adverse to a bit of coding if you have any suggestions where to start.

Thanks.

Comments

maurizio.ganovelli’s picture

Assigned: Unassigned » maurizio.ganovelli
Status: Active » Fixed

This situation cannot be handled directly from user interface offered by ppn.
You can try to give each feature a value of 5 (case "a") then, upon node creation, say of type A, decrease user balance also for types B and C. I think this can be done with Rules using functions paypernode_update_user_balance and paypernode_user_get_balance.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.