Methods Documentation
Edit on
Codepen.io
Codepen.io
fastspring.builder.remove(productId)
Takes product ID as input, removes product from the cart.
x
32
1
<!--
2
DEMO INFO:
3
remove() will remove a single product type from the cart - this does two things:
4
It changes the 'selected' attribute from true to false and it also resets the
5
quantity to the default value of 1. It will leave other items in the cart alone.
6
-->
7
<button onclick="fastspring.builder.remove('phot-io-main-app');">Remove</button>
8
9
<!--
10
DEMO EFFECTS
11
-->
12
<br /><br />
13
<div>
14
Product in cart:
15
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-selected></span>
16
</div>
17
18
<!--
19
DEMO SETUP
20
- Initialize the Store Builder Library
21
- Add item to the cart
22
-->
23
<script
24
id="fsc-api"
25
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
26
type="text/javascript"
27
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
28
</script>
29
30
<script type="text/javascript">
31
fastspring.builder.add('phot-io-main-app');
32
</script>
1
1
1
1