Edit on
Codepen.io
Codepen.io
Recognize User
x
40
1
<!--
2
Initialize the Store Builder Library
3
-->
4
<script
5
id="fsc-api"
6
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
7
type="text/javascript"
8
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
9
</script>
10
11
<!--
12
On load, recognize the customer information.
13
-->
14
<script>
15
document.addEventListener("DOMContentLoaded", function() {
16
fastspring.builder.recognize({
17
'email':'john@doe.com',
18
'firstName':'John',
19
'lastName':'Doe',
20
'company': 'Company Name', //optional
21
'phone': '555-555-5555', //optional
22
'addressLine1': '123 Main Street', //optional
23
'addressLine2': 'Apartment 1', //optional
24
'city': 'Lincoln', //optional
25
'region': 'Nebraska', //optional
26
'country': 'US', //optional
27
'postalCode': '68510' //optional
28
});
29
});
30
</script>
31
32
<!--
33
To add a product to the purchase session we need to define the
34
data-fsc-item-path-value with the product path and also define
35
the data-fsc-action where we first Add this item to the session
36
and then initiate Checkout
37
-->
38
<button data-fsc-item-path-value='phot-io-main-app' data-fsc-action="Add, Checkout" >
39
Add to cart
40
</button>
1
1
1
1