Actions Documentation
Edit on
Codepen.io
Codepen.io
data-fsc-action=”Add”
Product-level action which instructs the Library to add to cart the product defined in data-fsc-item-path-value
x
27
1
<!--
2
DEMO INFO
3
data-fsc-action="Add" will change the selected attribute of a product from
4
false to true. It will not change the quantity of an item - an item's
5
default quantity is 1, whether selected or not.
6
-->
7
8
<!-- Configure an add button to add an item to the cart. -->
9
<button data-fsc-item-path-value="phot-io-main-app" data-fsc-action="Add">Add to Cart</button>
10
11
<!--
12
DEMO EFFECTS
13
-->
14
<br /><br />
15
In cart:
16
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-selected></span>
17
18
<!--
19
DEMO SETUP
20
- Initialize the Store Builder Library
21
-->
22
<script
23
id="fsc-api"
24
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
25
type="text/javascript"
26
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
27
</script>
1
1
1
1