Methods Documentation
Edit on
Codepen.io
Codepen.io
fastspring.builder.clean()
No input, resets the cart after redirecting to checkout.
x
41
1
<!--
2
fastspring.builder.clean() will clear the session for the visitor after redirecting
3
to checkout. This parameter only makes sense if "data-continuous" is set to
4
"true" when initializing the Library. The intention of this behavior is to
5
make sure that the customer will return to the "clean" cart after attempting a checkout.
6
7
The first time the checkout is started, the payment entry window will be displayed.
8
The second time, there is no session and the checkout will not happen.
9
-->
10
11
12
<button data-fsc-action="Checkout" >
13
Checkout
14
</button>
15
16
<!--
17
DEMO EFFECTS
18
-->
19
<br /><br />
20
<div>
21
Order Total: <span data-fsc-order-total></span>
22
</div>
23
24
<!--
25
DEMO SETUP
26
- Initialize the Store Builder Library
27
- fastspring.builder.clean();
28
- Add item to the cart
29
-->
30
<script
31
id="fsc-api"
32
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
33
type="text/javascript"
34
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples"
35
data-continuous="true">
36
</script>
37
38
<script type="text/javascript">
39
fastspring.builder.clean();
40
fastspring.builder.add('phot-io-main-app');
41
</script>
1
1
1
1