Forum

Thread tagged as: Question, Problem, PayPal

Paypal cart upload multiple items

Hi, I'm building a site for competition entry and I can't ask the user to add each item to the cart, I want to compile all their choices and add it to the cart in one go, while allowing them to see the individual products they have selected, not to aggregate them, before they pay.

When I try and use: <perch:input type="hidden" name="item_name_1" value="Test Item" /> instead of <perch:input type="hidden" name="item_name" value="Test Item" />

PayPal responds with an empty cart ?

Obviously adding more than one item gives the same result.

here is my full ADD TO CART button code:

<perch:form id="_xclick" method="post" action="https://www.paypal.com/cgi-bin/webscr">

    <perch:input type="hidden" name="business" value="<perch:setting id="perch_shop_paypal_email" />" />
    <perch:input type="hidden" name="currency_code" value="EUR" /> 
    <perch:input type="hidden" name="cmd" value="_cart" />
    <perch:input type="hidden" name="upload" value="1" />
    <perch:input type="hidden" name="bn" value="XXX_AddToCart_WPS_IE" />  

<perch:input type="hidden" name="item_name_1" value="Test Item" />
<perch:input type="hidden" name="item_number_1" value="123456" />
<perch:input type="hidden" name="amount_1" value="2.50" />
    <perch:input type="hidden" name="quantity_1" value="2" />

<perch:input type="submit" name="add" value="Add to cart" />

</perch:form>

I wan't to add multiple items e.g. item_name_2, item_name_3 etc... but getting one to work would be an amazing start !

I would be really grateful if anyone could help with this, I've been through the paypal IPN so many times now, it's not funny :-(

Thanks Dylan

Dylan Rynhart

Dylan Rynhart 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you need to set the _cart option?

Hi Drew, do you mean, do i need to set the "cmd" option to "_cart", yes I believe so. If I leave is out it doesn't even go to the shopping cart page.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah right, didn't spot it there. You also have _xclick set as the form ID - is that correct?

Yes, I do, it's just not coming up int the black box above. I'm not sure the form ID matters ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's why I was asking. I don't know a lot about PayPal, but you were asking me for help.

Ah, thanks Drew, no it's probably the wrong forum for this. I'll try and find a way around it. Thanks for your time :-)