Help with Add to PayPal Cart increment (ASP)
Hi. Need some help with my "Proceed to Checkout" button to PayPal.
I need to pass a name, amount and quantity variable from my cart page, to PayPal, but I need to add an incremental number, beginning with 1, to the variable name.
In PHP, I have the code as:
<? $i = 1;?>
<? foreach ( $cart->items() as $item ) { ?>
<input type="hidden" name="item_name_<?=$i?>" value="<?= _h($item->product()->full_name())?>">
<input type="hidden" name="amount_<?=$i?>" value="<?=$item->product()->price()?>">
<input type="hidden" name="quantity_<?=$i?>" value="<?=$item->quantity()?>">
<? $i++; ?>
<? } ?>
How do I recreate this for Classic ASP, whilst integrating with my eCart Repeat Region?
Here's my eCart Repeat Region, without the incremental code:
<%
while (NOT WA_eCart_EOF(spCART))
%>
<input type="hidden" name="item_name_1" value="<%=WA_eCart_DisplayInfo(spCART, "Name")%> - <%=WA_eCart_DisplayInfo(spCART, "Description")%>">
<input type="hidden" name="amount_1" value="<%=WA_eCart_DisplayInfo(spCART, "Price")%>">
<input type="hidden" name="quantity_1" value="<%=WA_eCart_DisplayInfo(spCART, "Quantity")%>">
<%
set spCART = WA_eCart_MoveNext(spCART)
wend
set spCART = WA_eCart_MoveFirst(spCART)
%>
Also, I wondered if there was anything I could add that would prompt a user if they edited the quantities of an item in their eCart but forgot to click the 'Update' cart button, and subsequently then tried to click the 'Proceed to Checkout' button?
Appreciate the help, thanks.
Nath.