Product Level Directive Documentation
Edit on
Codepen.io
Codepen.io
data-fsc-item-quantity
Quantity of product in Order? Will default to 1 if not in order – numeric
x
35
1
Quantity:
2
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-quantity>
3
<!--This value will be replaced-->
4
</span>
5
<br /><br />
6
<!--
7
DEMO SETUP
8
- Initialize the Store Builder Library
9
- Add an input or select to take a user defined quantity
10
- Add a button to show updatedable quantity
11
- Define a function to update quantity
12
-->
13
<script
14
id="fsc-api"
15
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
16
type="text/javascript"
17
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
18
</script>
19
20
<select id="qty">
21
<option value="1">1</option>
22
<option value="2">2</option>
23
<option value="3">3</option>
24
<option value="4">4</option>
25
<option value="5">5</option>
26
</select>
27
28
<button onclick="addQty();">Update Quantity</button>
29
30
<script type="text/javascript">
31
function addQty() {
32
var qty = document.getElementById("qty").value;
33
fastspring.builder.update('phot-io-main-app', qty)
34
}
35
</script>
1
1
1
1