Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.help Subject: Re: How to dynamically post a variable number of products to Paypal? Date: Wed, 18 May 2011 15:44:58 -0400 Organization: albasani.net Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net Xcf3KfSo3dFV0YNoKUVEiV7fXntelf1PzuMnI+h4Octuc57EpB0Nqphgx6cthhCEDgGPHND+Mb3sVXEJOrTrcnqFbcFWoFRUH4OpaYx/H8bDtmYpAvTrnoIQ7wOaAUXT NNTP-Posting-Date: Wed, 18 May 2011 19:44:35 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="KUcOiqI3iw/ajcxfvJ7n4zo9l9SVuBo9Ygon+PvT7YeOmrqBLajJbWUd6ZsrReTdhQ4BsqUo8Au6U0U4TjWTA9JiilasE2eOouiCcMReYdrZ7W12VkwxI7nfQrblLS0/"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:aop1rVAvNqXiLH8Vq1tv2i6rYwc= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:688 On 05/18/2011 02:51 PM, markspace wrote: > On 5/18/2011 1:20 AM, macoln wrote: >> I have some shopping cart code that I took over when I started with a >> company, but unfortunately I'm weak on Java and integrating with >> Paypal. Here is the form that sends data to Paypal when a customer >> checks out of the shopping cart. I can get it to send one product, >> but I would like it to include data on all the products purchased >> from the cart. I am thinking logic:iterate will help me? But then how >> do I increment the "on#" and "os#" when presented with a variable >> amount of products? > > No, logic:iterate is for output, not input. This form outputs HTML to the user > so they can click the accept button. > > To increment variables that you output to the user, change the variables in a > scriptlet, JSP, Struts Action or the like before you send those to the user. > > > style="cursor: pointer;" onclick="javascript:goPayPal();" /> > > > > This is what sends your information to PayPal. "javascript:goPayPal()" > > Unfortunately I don't know PayPal or JavaScript, you might want to check > PayPal's tech support to understand what that script does. JSF components for input incorporate this type of logic under the hood, typically by appending an index to the specified name. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg