Product Level Directive Documentation
Edit on
Codepen.io
Codepen.io
data-fsc-autoapply
When applied to quantity element, no submit button click event needed for xhr update, will xhr update on keyup and change events.
x
38
1
Quantity Currently In Cart:
2
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-quantity>
3
<!--This value will be replaced-->
4
</span>
5
6
<br /><br />
7
<!--
8
DEMO INFO
9
Define a select field with
10
- data-fsc-autoapply -- to use autoapply functionality
11
- data-fsc-item-quantity-value -- use to set new quantity
12
- data-fsc-item-quantity -- use to keep quantity set
13
- data-fsc-item-path-value -- needed to set quantity to product value
14
- data-fsc-item-path -- needed to get specific product
15
- data-fsc-action="Update" - needed to actually update
16
-->
17
<select data-fsc-autoapply data-fsc-item-quantity-value data-fsc-item-quantity data-fsc-item-path-value="phot-io-main-app" data-fsc-item-path="phot-io-main-app" data-fsc-action="Update">
18
<option value="1">1</option>
19
<option value="2">2</option>
20
<option value="3">3</option>
21
<option value="4">4</option>
22
<option value="5">5</option>
23
</select>
24
25
<!--
26
DEMO SETUP
27
- Initialize the Store Builder Library
28
-->
29
<script
30
id="fsc-api"
31
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
32
type="text/javascript"
33
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
34
</script>
35
36
<script type="text/javascript">
37
fastspring.builder.add("phot-io-main-app")
38
</script>
1
1
1
1