This repository has been archived by the owner on May 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (45 loc) · 1.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<html>
<head>
<title>Snipcart theme</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" id="snipcart" data-api-key="YjdiNWIyOTUtZTIyMy00MWMwLTkwNDUtMzI1M2M2NTgxYjE0"
src="https://app.snipcart.com/scripts/snipcart.js"></script>
<link id="snipcart-theme" type="text/css" href="css/snipcart-theme.css" rel="stylesheet">
</head>
<body>
<nav>
<span class="snipcart-summary">
Number of items: <span class="snipcart-total-items"></span>
Total price: <span class="snipcart-total-price"></span>
</span>
<a href="#" class="snipcart-checkout">View cart</a>
</nav>
<p>
<label>Quantity</label>
<select id="quantity">
<option value="1">1</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
</select>
</p>
<p>
<button type="button"
class="snipcart-add-item"
data-item-name="Bacon"
data-item-price="10"
data-item-id="BACON"
data-item-url="/update-quantity-manually"
data-item-weight="20">Buy it now
</button>
</p>
<script type="text/javascript">
$(function () {
$("#quantity").change(function () {
$(".snipcart-add-item").data("item-quantity", $(this).val());
});
});
</script>
</body>
</html>