There's an example product named GetPaidJob that Kapil did the initial work on for us that's in svn. You could follow this model for extending whatever content type you want to have its own custom pricing based upon whatever calculation and upon whatever properties you want. Look at browser.py and getPostingPrice() method. We could have coded whatever complex algorhythm we wanted to in that method and set it as the price on the item.
See the example product at: http://tinyurl.com/prwdsb
I know it's a bit of work to create an entire separate product that extends some existing type (or adapts it and adds a custom pricing method via the browser.py), but it's at least doable.
For more flexible per-object pricing, it might be nice to adapt IBuyable to support a PythonField (as PloneFormGen does) that could optionally be used rather than the simple numeric entry field for the price, so that a site admin could just plug-in a quick Python line/block/script call that provides the ad-hoc pricing algorhythm for that particular buyable content item (but not necessarily affect others of the same type), but maybe also allow (in a Site Setup configlet) the ability to provide the same and apply it to all instances of content items of that type. Just spit-balling here, but I think it'd be great and I don't think it'd be too difficult to do.
I haven't kept up with getpaid in a few months, so maybe it already has been?
Ken
-------- Original Message --------
Subject: Re: Buyable content with prices for anonymous and logged on
users
From: Rob LaRubbio <[email protected]>
Date: Mon, May 18, 2009 10:10 pm
To: [email protected]
Nope, getpaid.discount is fairly limted in what it can do. Out of the box it lets you mark anything for sale on your site as 'discountable', 'discountable w/ code', or 'buy x get y'.
Discountable is for temporary price reductions. It shows the new lower price to all visitors. You can set the price as a pct. off, or dollars off
Buy x get y I'm not that sure about. I didn't look into it when I was adding the discountable w/ code. I think after you buy a certain amount the next one is free.
Discountable w/ code allows you to set a code and a price for the product for users with the code. Only users who enter the code in the cart get the discount.
Hope that helps.
-RobOn Mon, May 18, 2009 at 12:48 PM, Tim Knapp <[email protected]> wrote:
Hi,
I've got a requirement whereby the client wants a piece of content to
have 1 price for logged on users and another for anonymous - can I use
the discount package to achieve this?
Thanks,
Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" 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/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---
