Open GoogleCodeExporter opened 8 years ago
in /Products.PloneGetPaid-0.7.5/Products/PloneGetPaid/content.py
we have
class ShippableItemFactory( LineItemFactory ):
def createLineItem( self, payable, quantity ):
nitem = item.PayableShippableLineItem()
nitem.item_id = self.content.UID() # archetypes uid
# we use intids to reference content that we can dereference cleanly
# without access to context.
nitem.uid = component.getUtility( IIntIds ).register( self.content )
# copy over information regarding the item
nitem.name = self.content.Title()
but nitem.name is a string
just above in class LineItemFactory( object )
we have
nitem.name = getUnicodeString( self.content.Title() )
where getUnicodeString
def getUnicodeString( s ):
"""Try to convert a string to unicode from utf-8, as this is what
Archetypes uses"""
...
I use as payable standard content objects and for me
nitem.name = self.content.title # <type 'unicode'>
seems to work
Original comment by danielle...@gmail.com
on 6 Apr 2009 at 10:47
I had this problem also.
I have used an workaround as described in the list:
http://www.mail-archive.com/getpaid-dev@googlegroups.com/msg00349.html
Original comment by rafaelcr...@gmail.com
on 14 Jun 2009 at 8:57
I had this problem also.
And after checking each solution I have refactored
Products/PloneGetPaid/content.py a
little and have included the patch.
Attached you can find the patch against svn revision 2719. Someone with
permission
should check this patch and commit it to the trunk.
Original comment by oggers
on 29 Jun 2009 at 9:24
Attachments:
I don't use anymore getpaid.paypal (I don't want to share my experience with my
customers). I just wanted to say I solve all my Unicode problems by patching
base.py
see issue Issue 242
Original comment by danielle...@gmail.com
on 17 Apr 2010 at 12:02
Original issue reported on code.google.com by
danielle...@gmail.com
on 6 Apr 2009 at 7:29