-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
166 lines (145 loc) · 5.52 KB
/
index2.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
155
156
157
158
159
160
161
162
163
164
165
166
<html>
<head>
<title>FlashCart | WhatsApp shopping template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#1d201f">
<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/settings.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="#shop" v-if="page=='home'">
SHOP
</a>
<a href="#home" v-else>
HOME
</a>
</header>
<section id="home" class="hnav" hnav:start>
<h3>
FlashCart is a quick-setup and easy-use
website template for your online shop.
<br>
Manage your inventory
using familiar spreadsheet software such as MS Excel or Google Sheets.
Receive and manage orders via WhatsApp, Email or SMS.
</h3>
<a href="#shop" class="btn">Shop Now</a>
</section>
<section id="shop" class="hnav">
<p>
<input type="name" id="searchquery" v-on:input="filter_items" placeholder="Search">
<select v-model="activeCategory" v-on:change="filter_items">
<option value="all">All Categories</option>
<option v-for="category in categories" v-bind:value="category">
{{category}}
</option>
</select>
</p>
<div>
<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>
<p>
By ordering, your contact information will be shared with us,
and we promise not to sell/share your data to any third-parties.
<br><br>
Note: SMS option works only on Android devices
</p>
<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}">
<div
class="image-holder"
style="grid-area: 1 / 1 / 4 / 2;"
v-bind:style="'background:url('+'/inventory/images/onion.jpg'+'); background-size: cover; background-position: center center;'"
>
</div>
<span class="name" style="grid-area: 1 / 2 / 2 / 4;">{{name}}</span>
<span class="price" style="grid-area: 2 / 2 / 3 / 4;">{{$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">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" style="grid-area: 4 / 1 / 5 / 4 ;">
<summary>Description</summary>
{{description}}
</details>
</div>
</script>
</body>
</html>