Categories
Development

PayPal Buy Now add quantity with HTML

I was working on a project where PayPal Buy Now buttons were being generated by a widget and not allowing the quantity option to be used when a user was making a purchase. PayPal’s button generator does easily allow for quantities to be enabled with simple click, but this wasn’t an option for me in this case.

It was fairly difficult finding the tag to add to enable quantity on checkout, so I figured I’d share in case someone else ran into the same issue. Official documentation was eventually found.

It’s a very basic input that must be included with the form:

<input type="hidden" name="undefined_quantity" value="1">

<input type=”hidden” name=”undefined_quantity” value=”1″>

That’s all, just include that with the form and you’re all set.