Actions Documentation
Edit on
Codepen.io
Codepen.io
data-fsc-action=”Update”
Product-level action which instructs the Library to update the quantity of the product defined in data-fsc-item-path-value. Once this action is called, the Library will read the product path from data-fsc-item-path-value and find the ‘closest’ data-fsc-item-quantity-value from which to read the new quantity.
x
41
1
<!--
2
DEMO INFO
3
data-fsc-action="Update" Product-level action which instructs the Library to
4
update the quantity of the product defined in data-fsc-item-path-value. Once
5
this action is called, the Library will read the product path from
6
data-fsc-item-path-value and find the 'closest' data-fsc-item-quantity-value
7
from which to read the new quantity.
8
-->
9
10
<select id="quantity" data-fsc-item-path-value="phot-io-main-app" data-fsc-item-quantity-value>
11
<option value="1">1</option>
12
<option value="2">2</option>
13
<option value="3">3</option>
14
<option value="4">4</option>
15
<option value="5">5</option>
16
</select>
17
18
<button data-fsc-item-path-value="phot-io-main-app" data-fsc-action="Update">Update Quantity</button>
19
20
<!--
21
DEMO EFFECTS
22
-->
23
<br><br>
24
Quantity:
25
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-quantity></span>
26
27
<!--
28
DEMO SETUP
29
- Initialize the Store Builder Library
30
- Add item to cart
31
-->
32
<script
33
id="fsc-api"
34
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
35
type="text/javascript"
36
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
37
</script>
38
39
<script type="text/javascript">
40
fastspring.builder.add('phot-io-main-app');
41
</script>
1
1
1
1