Re: [Zope] Zope Newbie
Thanks for the tip. On Saturday 09 July 2005 1:58 am, you wrote: > Emmanuel V. Salvador wrote at 2005-7-8 10:51 +0800: > > ... > >Upon trying out the page with the script as an anonymous user, I'm asked > > for a username and password. According to the book, this was not suppose > > to happen since I already gave the script manager rights. Please refer > > to the error below. > > > > > >Site Error > > > >An error was encountered while publishing this resource. > > > >Error Type: Unauthorized > >Error Value: You are not allowed to access 'manage_addDTMLDocument' in > > this context > > Whenever you get an "Error" (as the above one), you > *ALWAYS* should look at the traceback. You find it in the "error_log" > object (ZMI --> "Root Folder" --> "error_log"). > > "Unauthorized" are usually discarded. You must reconfigure "error_log" > to keep them. > > Difficult "Unauthorized" problems are best analysed with > the "VerboseSecurity" product. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DTML bug with database arrays in sqltest
David Pratt wrote at 2005-7-8 14:08 -0300: > ... > > an_array_key type="int">][2] name=a_title_var op="eq" type="string" >optional> >. (rest of query) > >The issue is how to test against these values when DTML cannot parse >them? You can emulate the "dtml-sqltest" with "dtml-if" and "dtml-sqlvar" (or "dtml-var"). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Simple paypal IPN external method or product
Maybe you got it solved already, but here is some of my stuff (which works ;-): I looked into PloneMall, but it's code is in some closed CVS and looked very complex. I decided to create my own shop starting from the product Simple Cart Item (by Aaron). In the end it was much expanded. This is the code that does the PayPal checkout - largely stolen from the product Simple Cart Item: from Products.PythonScripts.standard import urlencode '''This is the digester for the cart string. Currently this digester formats a string to be sent to a Pay Pal gateway, but could be modifed for other gateways''' portal_props=context.portal_properties shop_props = portal_props.mshop_properties shop_tool = context.mshop_tool r= context.REQUEST s = r.SESSION # retrieve the cartList cartlist=s.get("cartList", []) # calculate items total cart_total = 0.0 for item in cartlist: item_total = item['item_total'] cart_total += item_total # calculate payment costs (depends on items bought) shipping= shop_tool.getPaymentCosts("paypal", cart_total) shipping += shop_props.shipping #cart preamble cart_commands = {"cmd" : "_cart", "upload": "1", "business" : shop_props.paypal_business, "currency_code" : "EUR", "invoice" : DateTime(), "no_shipping" : "0", "handling_cart" : shipping, "cancel_return" : context.portal_url() + '/sys/pp_cancel_callback', "return": context.portal_url() + '/sys/pp_success_callback', "image_url" : context.portal_url() + '/pp_shoplogo.gif', "notify_url": context.portal_url() + '/pp_ipn', } # formats cart items l = 0 for item in cartlist: cart_item = item l+=1 d ={'item_name_%d' % l : cart_item['name'], 'on0_%d' % l : 'variant', 'os0_%d' % l : cart_item['variant'], 'on1_%d' % l : 'maat', 'os1_%d' % l : cart_item['item_size'], 'amount_%d' % l: cart_item['price'], 'quantity_%d' % l : cart_item['quantity'] } cart_commands.update(d) #points to (sandbox) paypal account if shop_props.paypal_use_sandbox: url = shop_props.paypal_sandbox_url else: url = shop_props.paypal_url context.plone_log("Commands send to paypal url (%s):%s" % (url, str(cart_commands))) redirect_url = '%s?%s' % (url, urlencode(cart_commands)) state.setNextAction('redirect_to:string:'+redirect_url) return state === This script calls into a plone tool (MShopTool): it is only a script to handle the callback from PayPal: # MShopTool does the real work mst = context.mshop_tool result = mst.handlePayPalIpn(context.REQUEST) === This is the relevant code from the tool MShopTool: def handlePayPalIpn(self, request): log("Starting PayPal IPN") portal_props=getToolByName(self, 'portal_properties') shop_props = portal_props.mshop_properties #points to (sandbox) paypal account if shop_props.paypal_use_sandbox: url = shop_props.paypal_sandbox_url else: url = shop_props.paypal_url # copy the incoming form vars formvars = request.form # append validation command formvars['cmd']='_notify-validate' # remove Zope funny var: if '-C' in formvars: del formvars['-C'] data = urllib.urlencode(formvars) response = urllib.urlopen(url,data).read() if response=="VERIFIED": log("PayPal IPN verification call: VERIFIED response. \n", formvars ) self.notifyShopPayPalResult(formvars) elif (response=="INVALID" or formvars['receiver_email']!=shop_props.paypal_business): # message compromised or not intended for us logerror("PayPal IPN verification call: INVALID response. \n", formvars ) else: logerror("PayPal IPN verification call failed. \n", formvars ) HTH M.J. Maré WebToTheMax On 23-jun-05, at 19:47, Ed Colmar wrote: I found the Bastion Ledger and Bastion Paypal connection, but it is way way overkill for what I want to do. Does anyone have a simple(r) IPN script they can point me towards? TIA! -e- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) M.J. Maré WebToTheMax T +31-20-4 100 242 F +31-20-4 100 243 W www.webtothemax.com E [EMAIL PROTECTED] J [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zop
[Zope] Re: [Zope-Annce] [ANN] Zope 2.7.7 released
fixed --On 10. Juli 2005 13:00:19 +0200 Sebastien Douche <[EMAIL PROTECTED]> wrote: On 7/10/05, Andreas Jung <[EMAIL PROTECTED]> wrote: Dear Zope Community, on behalf of Zope Corporation and all Zope 2 developers and contributors I am pleased to announce the release of Zope 2.7.7 final. Yeah ! But : % tar tvfz Zope-2.7.7-final.tgz | grep tgz -rw-rw-r-- ajung/ajung 49152 2005-07-10 11:15:58 Zope-2.7.7-final/Zope-2.7.7-final.tgz A tarball in the tarball ? % tar xfz Zope-2.7.7-final.tgz % cd Zope-2.7.7-final % ls -l total 172 -rwxr-x--- 1 seb seb 7083 2005-07-10 11:12 configure drwxr-x--- 2 seb seb 4096 2005-07-10 11:14 CVS drwxr-x--- 5 seb seb 4096 2005-07-10 11:13 doc drwxr-x--- 3 seb seb 4096 2005-07-10 11:11 Extensions drwxr-x--- 3 seb seb 4096 2005-07-10 11:11 import drwxr-x--- 4 seb seb 4096 2005-07-10 11:15 inst drwxr-x--- 5 seb seb 4096 2005-07-10 11:11 lib -rw-r- 1 seb seb 4788 2005-07-10 11:15 makefile -rw-r- 1 seb seb 1103 2005-07-10 11:11 README.txt -rw-r- 1 seb seb 39413 2005-07-10 11:12 setup.py drwxr-x--- 10 seb seb 4096 2005-07-10 11:11 skel -rw-r- 1 seb seb 30091 2005-07-10 11:12 test.py drwxr-x--- 4 seb seb 4096 2005-07-10 11:13 utilities -rw-r- 1 seb seb 49152 2005-07-10 11:15 Zope-2.7.7-final.tgz % file Zope-2.7.7-final.tgz Zope-2.7.7-final.tgz: gzip compressed data, from Unix % tar xvfz Zope-2.7.7-final.tgz Zope-2.7.7-final/ Zope-2.7.7-final/import/ Zope-2.7.7-final/import/README.txt Zope-2.7.7-final/import/ZopeTutorialExamples.zexp gzip: stdin: unexpected end of file tar: Read 2745 bytes from Zope-2.7.7-final.tgz Mistake ? PS : perharps delete all cvs contents ? (CVS directories and .cvsignore files) Regards. -- Sébastien Douche <[EMAIL PROTECTED]> pgpQRQ1mo2pc5.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Zope-Annce] [ANN] Zope 2.7.7 released
Yes, in fact...there seems to be a probllem with the command line parameters creating the tar file (which worked for me on FC3 but I am running FC4 since some days)...looking into it.. -aj --On 10. Juli 2005 13:00:19 +0200 Sebastien Douche <[EMAIL PROTECTED]> wrote: On 7/10/05, Andreas Jung <[EMAIL PROTECTED]> wrote: Dear Zope Community, on behalf of Zope Corporation and all Zope 2 developers and contributors I am pleased to announce the release of Zope 2.7.7 final. Yeah ! But : % tar tvfz Zope-2.7.7-final.tgz | grep tgz -rw-rw-r-- ajung/ajung 49152 2005-07-10 11:15:58 Zope-2.7.7-final/Zope-2.7.7-final.tgz A tarball in the tarball ? % tar xfz Zope-2.7.7-final.tgz % cd Zope-2.7.7-final % ls -l total 172 -rwxr-x--- 1 seb seb 7083 2005-07-10 11:12 configure drwxr-x--- 2 seb seb 4096 2005-07-10 11:14 CVS drwxr-x--- 5 seb seb 4096 2005-07-10 11:13 doc drwxr-x--- 3 seb seb 4096 2005-07-10 11:11 Extensions drwxr-x--- 3 seb seb 4096 2005-07-10 11:11 import drwxr-x--- 4 seb seb 4096 2005-07-10 11:15 inst drwxr-x--- 5 seb seb 4096 2005-07-10 11:11 lib -rw-r- 1 seb seb 4788 2005-07-10 11:15 makefile -rw-r- 1 seb seb 1103 2005-07-10 11:11 README.txt -rw-r- 1 seb seb 39413 2005-07-10 11:12 setup.py drwxr-x--- 10 seb seb 4096 2005-07-10 11:11 skel -rw-r- 1 seb seb 30091 2005-07-10 11:12 test.py drwxr-x--- 4 seb seb 4096 2005-07-10 11:13 utilities -rw-r- 1 seb seb 49152 2005-07-10 11:15 Zope-2.7.7-final.tgz % file Zope-2.7.7-final.tgz Zope-2.7.7-final.tgz: gzip compressed data, from Unix % tar xvfz Zope-2.7.7-final.tgz Zope-2.7.7-final/ Zope-2.7.7-final/import/ Zope-2.7.7-final/import/README.txt Zope-2.7.7-final/import/ZopeTutorialExamples.zexp gzip: stdin: unexpected end of file tar: Read 2745 bytes from Zope-2.7.7-final.tgz Mistake ? PS : perharps delete all cvs contents ? (CVS directories and .cvsignore files) Regards. -- Sébastien Douche <[EMAIL PROTECTED]> pgpGmQ1fNjL7N.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Zope-Annce] [ANN] Zope 2.7.7 released
On 7/10/05, Andreas Jung <[EMAIL PROTECTED]> wrote: > > Dear Zope Community, > > on behalf of Zope Corporation and all Zope 2 developers and contributors > I am pleased to announce the release of Zope 2.7.7 final. Yeah ! But : % tar tvfz Zope-2.7.7-final.tgz | grep tgz -rw-rw-r-- ajung/ajung 49152 2005-07-10 11:15:58 Zope-2.7.7-final/Zope-2.7.7-final.tgz A tarball in the tarball ? % tar xfz Zope-2.7.7-final.tgz % cd Zope-2.7.7-final % ls -l total 172 -rwxr-x--- 1 seb seb 7083 2005-07-10 11:12 configure drwxr-x--- 2 seb seb 4096 2005-07-10 11:14 CVS drwxr-x--- 5 seb seb 4096 2005-07-10 11:13 doc drwxr-x--- 3 seb seb 4096 2005-07-10 11:11 Extensions drwxr-x--- 3 seb seb 4096 2005-07-10 11:11 import drwxr-x--- 4 seb seb 4096 2005-07-10 11:15 inst drwxr-x--- 5 seb seb 4096 2005-07-10 11:11 lib -rw-r- 1 seb seb 4788 2005-07-10 11:15 makefile -rw-r- 1 seb seb 1103 2005-07-10 11:11 README.txt -rw-r- 1 seb seb 39413 2005-07-10 11:12 setup.py drwxr-x--- 10 seb seb 4096 2005-07-10 11:11 skel -rw-r- 1 seb seb 30091 2005-07-10 11:12 test.py drwxr-x--- 4 seb seb 4096 2005-07-10 11:13 utilities -rw-r- 1 seb seb 49152 2005-07-10 11:15 Zope-2.7.7-final.tgz % file Zope-2.7.7-final.tgz Zope-2.7.7-final.tgz: gzip compressed data, from Unix % tar xvfz Zope-2.7.7-final.tgz Zope-2.7.7-final/ Zope-2.7.7-final/import/ Zope-2.7.7-final/import/README.txt Zope-2.7.7-final/import/ZopeTutorialExamples.zexp gzip: stdin: unexpected end of file tar: Read 2745 bytes from Zope-2.7.7-final.tgz Mistake ? PS : perharps delete all cvs contents ? (CVS directories and .cvsignore files) Regards. -- Sébastien Douche <[EMAIL PROTECTED]> ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] [ANN] Zope 2.7.7 released
Dear Zope Community, on behalf of Zope Corporation and all Zope 2 developers and contributors I am pleased to announce the release of Zope 2.7.7 final. Zope 2.7.7 can be downloaded from http://www.zope.org/Products/Zope/2.7.7 The release notes can be found at http://www.zope.org/Products/Zope/2.7.7/CHANGES.txt For information on using Python 2.4 with Zope 2.7.7: see doc/INSTALL.txt Andreas Jung Zope 2 Release Manager pgp2yYp4KZhie.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] where is Zope-2.7.6
--On 9. Juli 2005 15:31:55 -0700 Dennis Allison <[EMAIL PROTECTED]> wrote: The download list at zope.org does not have any releases between 2.7.3 and 2.8. We've been using 2.7.6 and would like to be able to download clean copies... This is a problem of this half-baked software running on zope.org. -aj pgpwhLypBFctL.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )