Fetching contributors…
Cannot retrieve contributors at this time
39 lines (35 sloc) 1.04 KB
<!DOCTYPE html>
<meta charset="utf-8" />
#PPMiniCart .quantity { visibility: hidden; }
<form action="" method="post">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="" />
<input type="hidden" name="item_name" value="Test Product" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="amount" value="1.00" />
<input type="hidden" name="currency_code" value="USD" />
<strong>Test Product</strong>
<input type="submit" name="submit" value="Add to cart" />
<script src="../dist/minicart.js"></script>
paypal.minicart.cart.on('add', function (idx, product, isExisting) {
if (isExisting) {
product.set('quantity', 1);
alert('Sorry, you can only have one of those.');