I have the same problem as Damon. I have a product based on a ZClass. I have followed the example of the cookbook, and can easily get OFS products to add because they seem to have a manage_addXXXXXX(id='yyyy') attribute. However, my product based on the ZClass has no such attribute, hence the attribute error. The only attributes it appears to have are '_product' and '_d' and none of those appear to have an attributed 'manage_addXXXXXX(id='yyyy'). Any further help greatly appreciated. Rob Oliver Bleutgen wrote:
Damon Eckhoff wrote:
Hey All,
I have a product, MyProduct, and am not able to add it programmatically.
For Example.. inside a python script I do:
folder_id = "yada" folder_obj = getattr( container, folder_id ) folder_obj.manage_addMyProduct( id, title, etc )
This raises an AttributError with value of 'manage_addMyProduct'. I can add/edit/view my product from the ZMI without any problem. I'm stumped, could someone help? I have no idea what direction to pursue on this one.
please see http://www.zopelabs.com/cookbook/1012279676
for an explanation how to do that.
cheers, oliver
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
________________________________________________________________________ Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!! visit http://in.autos.yahoo.com