hmmm...just realize an important doc to answer your question is in the documentation that ships with the product, but not on plone.org...fixing that...in the meantime, have a look at http://code.google.com/p/getpaid/source/browse/Products.PloneGetPaid/trunk/Products/PloneGetPaid/docs/development/make-content-types-buyable.txt
(or look in your local copy for that file) Cheers, Chris On Mon, Feb 23, 2009 at 1:13 PM, s_kelley <[email protected]> wrote: > > I would be most grateful is someone could point me in the right > direction. I would like to make my UML generated custom type > buyable. I found this explanation: > > http://plone.org/products/getpaid/documentation/how-to/how-to-tie-actions-to-payments > > I am not a strong python/zope 3 user so I do not know where to put the > subscriber and other code to accomplish this. > > my type, located in Products/show has a "ride" class defined in > Products/show/ride.py and has a Products/show/configure.zcml and > Products/show/interfaces.py file auto generated for me. > > I came up with the following code modification for my type. Is it > correct? Where do I put it? In Products/show/configure.zcml file? > > <subscriber > for="Products.show.interface.Iride > zope.app.container.interfaces.IObjectAddedEvent" > factory="Products.show.makePayableOnCreation" > /> > > How about the second block of code? Where does it go? In Products/ > show/ride.py or ? > > from Products.PloneGetPaid import interfaces > from getpaid.core import interfaces as coreInterfaces > from Products.Five.utilities.marker import mark > > def makePayableOnCreation(obj, event): > mark(obj, interfaces.IBuyableMarker) > coreInterfaces.IBuyableContent(obj).setProperty('price', 3.14) > coreInterfaces.IBuyableContent(obj).setProperty('product_code', > obj.ID) > > thanks in advance. many of the tutorials on interfaces, adapters, etc > are a little over my head at the moment :-) > > > -- Cofounder and CEO ifPeople - Innovation for People www.ifpeople.net t: 678-608-3408 130 Boulevard NE, #6 Atlanta, GA 30312 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
