-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
154 lines (133 loc) · 5.11 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<html>
<head>
<title>FlashCart | WhatsApp shopping template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="description" content="FlashCart is shopping cart that lets your customers order via WhatsApp">
<meta property="og:title" content="FlashCart: Shop Via WhatsApp" />
<meta property="og:url" content="https://flashcart.wiosdesigns.xyz" />
<meta property="og:description" content="FlashCart is shopping cart that lets your customers order via WhatsApp">
<meta property="og:image" content="/codefiles/assets/ogicon.png">
<meta property="og:type" content="website" />
<meta name="twitter:card" content="app"></meta>
<meta property="twitter:image" content="/codefiles/assets/ogbg.png">
<link rel="shortcut icon" type="image/png" href="/codefiles/assets/icon.png"/>
<link rel="stylesheet" type="text/css" href="/codefiles/css/main.css"/>
<script src="/codefiles/js/hnav.js"></script>
<script src="/codefiles/js/papaparse.min.js"></script>
<script src="/codefiles/js/vue.min.js"></script>
<script src="/codefiles/js/main.js"></script>
</head>
<body onload="init()">
<div id="loading">
<img src="/codefiles/assets/icon.png"><br>
<h2>Loading</h2>
</div>
<div id="app">
<header>
<a href="#home">
<img src="/codefiles/assets/logotext.png">
</a>
<a href="#home" v-if="page=='shop'" style="color: var(--theme);">
HOME
</a>
<a href="#shop" v-else style="color: var(--theme);">
SHOP
</a>
</header>
<section id="home" class="hnav">
<h3>
Setup an ecommerce website and receive orders
on WhatsApp
<br>
</h3>
<a href="#shop" class="btn">See Demo</a>
</section>
<section id="shop" class="hnav" hnav:start>
<p>
<input type="name" id="searchquery" v-on:input="filter_items" placeholder="Search" autocomplete="off">
<select v-model="activeCategory" v-on:change="filter_items" style="text-align-last: right;">
<option value="All Categories">All Categories</option>
<option v-for="category in categories" v-bind:value="category">
{{category}}
</option>
</select>
</p>
<div v-bind:empty-message="'No matching items in '+activeCategory">
<shop-item
v-for="i in items"
v-bind:name="i.Name"
v-bind:image="i.Image"
v-if="i.match"
v-bind:description="i.Description"
v-bind:unitprice="i['Unit Price']"
v-bind:unit="i['Unit']"
v-bind:instock="i['In Stock']"
v-model:value="i.quantity"
>
</shop-item>
</div>
</section>
<section id="checkout" class="hnav" hnav:on="app.cartpage=true;" hnav:off="app.cartpage=false;">
<h1>Your Cart</h1>
<button v-if="nitems!=0" onclick="goToOrder()">Review & Place Order</button><br>
<shop-item
v-for="i in items"
v-if="i.quantity>0"
v-bind:name="i.Name"
v-bind:description="i.Description"
v-bind:unitprice="i['Unit Price']"
v-bind:unit="i['Unit']"
v-bind:instock="i['In Stock']"
v-model:value="i.quantity"
v-bind:compact="true"
>
</shop-item>
<div v-if="nitems==0">
Your cart is empty
</div>
<div v-else id="placeorder">
<span>Total: {{settings.currency}}{{carttotal}}</span>
<h2>Place order</h2>
<input type="text" v-model:value="name" placeholder="(Your Name)"><br>
<button v-on:click="orderwa">Order Via WhatsApp</button><br>
</div>
</section>
<div id="footer" v-if="nitems>0 && !cartpage">
<span>{{nitems}} item<span v-if="nitems>1">s</span> in cart</span>
<a href="#checkout">Checkout</a>
</div>
</div>
<script type="text/x-template" id="shop-item-template">
<div class="shopitem" v-bind:class="{compact:compact}">
<img
class="image-holder"
style="grid-area: 1 / 1 / 4 / 2;"
v-bind:src="image"
/>
<span class="name">{{name}}</span>
<span class="price">{{$parent.settings.currency}}{{unitprice}}/{{unit}}</span>
<div style="grid-area: 3 / 2 / 4 / 3;" v-if="instock=='yes' && addtocart && value<=0">
<button v-on:click="increment" class="addtocart" style="width: 100%; padding: 0.5mm 3mm; font-size: 80%;">Add to cart</button>
</div>
<div style="grid-area: 3 / 2 / 4 / 3;" v-else-if="instock!='yes'">
<span style="grid-area: 3 / 2 / 4 / 3;" class="outofstock">Out of Stock</span>
</div>
<div style="grid-area: 3 / 2 / 4 / 3;" class="qctrl" v-else>
<span class="icon" v-on:click="decrement">r</span>
<input v-bind:value="value" type="number" min="-0.00001" v-on:input="change">
<span class="icon" v-on:click="increment">a</span>
</div>
<span class="total"
style="grid-area: 3 / 3 / 4 / 4; justify-self: right; padding-right: 5mm;"
v-if="value>0">
{{$parent.settings.currency}}{{(value*unitprice).toFixed(2)}}
</span>
<details v-if="!compact && $root.settings.showDescription" style="grid-area: 4 / 1 / 5 / 4 ;">
<summary>Description</summary>
{{description}}
</details>
</div>
</script>
</body>
</html>