-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d71b65
commit a722c64
Showing
5 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
</head> | ||
<body> | ||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> | ||
<input type="hidden" name="cmd" value="_cart" /> | ||
<input type="hidden" name="add" value="1" /> | ||
<input type="hidden" name="business" value="example@minicartjs.com" /> | ||
<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" /> | ||
<input type="hidden" name="shipping" value="1.00"> | ||
<strong>Test Product</strong> | ||
<input type="submit" name="submit" value="Add to cart" /> | ||
</form> | ||
|
||
|
||
<script src="../dist/minicart.js"></script> | ||
<script> | ||
paypal.minicart.render(); | ||
|
||
paypal.minicart.cart.on('checkout', function (evt) { | ||
var items, len, i; | ||
|
||
if (this.subtotal() > 0) { | ||
items = this.items(); | ||
|
||
for (i = 0, len = items.length; i < len; i++) { | ||
items[i].set('shipping', 0); | ||
items[i].set('shipping2', 0); | ||
} | ||
} | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters