close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Help with Add to PayPal Cart increment (ASP)

Thread began 1/25/2011 5:08 am by Nathon Jones Web Design | Last modified 1/25/2011 2:44 pm by Nathon Jones Web Design | 1832 views | 5 replies

Nathon Jones Web Design

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)
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.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...