883f971 Apr 16, 2014
55 lines (48 sloc) 1.53 KB
<!DOCTYPE html>
<meta charset="utf-8" />
<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 with a really, really long name" />
<input type="hidden" name="amount" value="1.00" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="return" value="http://localhost/" />
<input type="hidden" name="cancel_return" value="http://localhost/" />
My color:
<input type="hidden" name="on0" value="My option" />
<select name="os0">
<option value=""></option>
<option value="R">Red</option>
<option value="O">Orange</option>
<option value="Y">Yellow</option>
<option value="G">Green</option>
<option value="B">Blue</option>
<option value="I">Indigo</option>
<option value="V">Violet</option>
<input type="submit" value="Add to cart" />
<script src="../dist/minicart.js"></script>
paypal.minicart.cart.on('add', function (idx, product, isExisting) {
if (!product.get('os0')) {
alert('Please select an option first!');