forked from wojodesign/simplecart-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (109 loc) · 3.29 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>simpleCart(JS) 2.0 Demo </title>
<script type="text/javascript" src="simpleCart.js"></script>
<script type="text/javascript">
simpleCart.email = "[email protected]";
simpleCart.checkoutTo = PayPal;
// simpleCart.merchantId = "118575326044237";
// simpleCart.checkoutTo = GoogleCheckout;
simpleCart.currency = USD;
// simpleCart.currency = GBP;
// simpleCart.currency = EUR;
simpleCart.taxRate = 0.08;
// simpleCart.shippingFlatRate = 5.25;
simpleCart.shippingQuantityRate = 1.00;
/* CartItem.prototype.shipping = function(){
if( this.size ){
switch( this.size.toLowerCase() ){
case 'small':
return this.quantity * 10.00;
case 'medium':
return this.quantity * 12.00;
case 'large':
return this.quantity * 15.00;
case 'bull':
return 45.00;
default:
return this.quantity * 5.00;
}
}
};
*/
simpleCart.cartHeaders = ["Thumb_image_noHeader", "Name" , "Size_input_div_div", "Price" , "decrement_noHeader" , "Quantity", "increment_noHeader", "remove_noHeader", "Total" ];
</script>
<style >
.itemContainer{
width:100%;
float:left;
}
.itemContainer div{
float:left;
margin: 5px 20px 5px 20px ;
}
.itemContainer a{
text-decoration:none;
}
.cartHeaders{
width:100%;
float:left;
}
.cartHeaders div{
float:left;
margin: 5px 20px 5px 20px ;
}
</style>
</head>
<body>
<p>
Cart: <span class="simpleCart_total"></span> (<span class="simpleCart_quantity"></span> items)
<br />
<a href="javascript:;" class="simpleCart_empty">empty cart</a>
<br />
</p>
<ul>
<li class="simpleCart_shelfItem">
<h2 class="item_name">Zebra</h2>
<img class="item_thumb" src="e.png" />
<span class="item_price">$187.95</span>
<select class="item_Size">
<option value="Small">Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
</select>
<input type="hidden" class="item_shipping" value="20" />
<input type="text" class="item_quantity" value="1" />
<input type="button" class="item_add" value="add to cart" />
</li>
<li class="simpleCart_shelfItem">
<h2 class="item_name">Cow</h2>
<img class="item_thumb" src="e.png" />
<span class="item_price">$18.00</span>
<select class="item_Size">
<option value="Tiny">Tiny</option>
<option value="Medium">Medium</option>
<option value="Bull">Bull</option>
</select>
<input type="text" class="item_quantity" value="1" />
<input type="button" class="item_add" value="add to cart" />
</li>
<li>
<h2>Baby Lion</h2>
<div>$34.95</div>
<a href="javascript:;" onclick="simpleCart.add('name=baby lion', 'price=34.95','size=tiny','quantity=1','thumb=e.png');" >add to cart</a>
</li>
</ul>
<div class="simpleCart_items" >
</div>
<br />
SubTotal: <span class="simpleCart_total"></span> <br />
Tax: <span class="simpleCart_taxCost"></span> <br />
Shipping: <span class="simpleCart_shippingCost"></span> <br />
-----------------------------<br />
Final Total: <span class="simpleCart_finalTotal"></span> <br />
<a href="javascript:;" class="simpleCart_checkout">checkout</a>
</body>
</html>