<div>In order to interact with the paypal shopping cart system, they want me to increment hidden fields, such as:</div>


<div>&nbsp;</div>


<div>&lt;input type="hidden" tal:attributes="value item/name; name python:'item_name_' + `x`"&gt;<br>
&lt;input type="hidden" tal:attributes="value item/id; name python:'item_number_' + `x`"&gt;<br>
<br>
where "x" is a number from 1 on up, where "1" represents the first product in the shopping cart, "2" represents the second product, etc. So...we have to do it their way. Perhaps this is really bad ZPT, but we have to do it their way. Can ZPT handle this, or not?<br>
TIA,<br>
Tony<br>
<br>
-----Original Message-----<br>
From: Andreas Jung &lt;lists@zopyx.com&gt;<br>
To: tonylabarbara@aol.com; zope@zope.org<br>
Sent: Mon, 30 Jul 2007 10:23 am<br>
Subject: Re: [Zope] Increment In PT?<br>
<br>
</div>


<div id=AOLMsgPart_1_5d48d0e2-00a2-403d-a33a-edfad4d1ccf9 style="FONT-SIZE: 12px; MARGIN: 0px; COLOR: #000; FONT-FAMILY: Tahoma, Verdana, Arial, Sans-Serif; BACKGROUND-COLOR: #fff">&nbsp;<br>
--On 30. Juli 2007 10:16:35 -0400 <A href="mailto:tonylabarbara@aol.com">tonylabarbara@aol.com</A> wrote:&nbsp;<br>
&nbsp;<br>
&gt; Hi;&nbsp;<br>
&gt; I´m trying to increment a variable in a page template. Here´s the&nbsp;<br>
&gt; general idea in my code:&nbsp;<br>
&gt;&nbsp;<br>
&gt;&nbsp;<br>
&gt; &lt;div metal:define-macro="main" tal:define="x python:0"&gt;&nbsp;<br>
&nbsp;<br>
Why do you need a counter in ZPT? This is absolutely one&nbsp;<br>
of the worst things you can go in ZPT. Describe your concrete use-case&nbsp;<br>
and we might think about a suitable and clean solution. But thinking&nbsp;<br>
about counters in ZPT is a waste of life-time.&nbsp;<br>
&nbsp;<br>
-aj&nbsp;<br>
</div>
<!-- end of AOLMsgPart_1_5d48d0e2-00a2-403d-a33a-edfad4d1ccf9 --><div class="AOLPromoFooter">
<hr style="margin-top:10px;" />
AOL now offers free email to everyone.  Find out more about what's free from AOL at <a href="http://www.aol.com?ncid=AOLAOF00020000000437" target="_blank"><b>AOL.com</b></a>.<br />
</div>