This repository has been archived by the owner on Feb 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cart.html
92 lines (89 loc) · 3.42 KB
/
cart.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
<script type="text/javascript">
RED.nodes.registerType('add to cart',{
category: 'yaas',
color: '#1b91e2',
defaults: {
yaasCustomerCredentials: {type:"yaas-customer-credentials"},
yaasCredentials: {type:"yaas-credentials", required:true},
quantity : {value:"1", required:true},
siteCode : {value:"main", required:true},
currency : {value:"USD", required:true}
},
inputs: 1,
outputs: 1,
icon: "yaas.png",
paletteLabel: 'add to cart',
label: function() {
return 'add to cart';
}
});
</script>
<script type="text/x-red" data-template-name="add to cart">
<div class="form-row">
<label for="node-input-yaasCustomerCredentials"><i class="fa fa-user"></i> Customer</label>
<input type="text" id="node-input-yaasCustomerCredentials">
</div>
<div class="form-row">
<label for="node-input-yaasCredentials"><i class="fa fa-user-secret"></i> Credentials</label>
<input type="text" id="node-input-yaasCredentials">
</div>
<div class="form-row">
<label for="node-input-quantity"><i class="fa fa-plus"></i> Quantity</label>
<input type="text" id="node-input-quantity">
</div>
<div class="form-row">
<label for="node-input-siteCode"><i class="fa fa-globe"></i> Site code</label>
<input type="text" id="node-input-siteCode">
</div>
<div class="form-row">
<label for="node-input-currency"><i class="fa fa-money"></i> Currency</label>
<input type="text" id="node-input-currency">
</div>
</script>
<script type="text/x-red" data-help-name="add to cart">
<p>
Add a product (<code>body</code> object in <code>msg.payload</code> to a cart. The "product by ID" or "product by query" response with a product object in <code>msg.payload.body</code>.
</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('apply discount',{
category: 'yaas',
color: '#1b91e2',
defaults: {
yaasCustomerCredentials: {type:"yaas-customer-credentials", required:true},
yaasCredentials: {type:"yaas-credentials", required:true},
siteCode : {value:"main", required:true},
currency : {value:"USD", required:true}
},
inputs: 1,
outputs: 1,
icon: "yaas.png",
paletteLabel: 'apply discount',
label: function() {
return 'apply discount';
}
});
</script>
<script type="text/x-red" data-template-name="apply discount">
<div class="form-row">
<label for="node-input-yaasCustomerCredentials"><i class="fa fa-user"></i> Customer</label>
<input type="text" id="node-input-yaasCustomerCredentials">
</div>
<div class="form-row">
<label for="node-input-yaasCredentials"><i class="fa fa-user-secret"></i> Credentials</label>
<input type="text" id="node-input-yaasCredentials">
</div>
<div class="form-row">
<label for="node-input-siteCode"><i class="fa fa-globe"></i> Site code</label>
<input type="text" id="node-input-siteCode">
</div>
<div class="form-row">
<label for="node-input-currency"><i class="fa fa-money"></i> Currency</label>
<input type="text" id="node-input-currency">
</div>
</script>
<script type="text/x-red" data-help-name="apply discount">
<p>
Apply Discount
</p>
</script>