Order Level Directive Documentation
Edit on
Codepen.io
Codepen.io
data-fsc-order-postalCode
Order postal code – string
x
36
1
<!--
2
DEMO INFO
3
postalCode() will apply the buyer supplied postal code to FastSpring. If FastSpring evaluates the code as valid it will apply this postal code to the order
4
-->
5
<!-- Define Input field to accept coupon code: -->
6
<input type="text" name="postalcode" id="postal-code">
7
8
<!--Define to grab coupon code and send to FastSpring -->
9
<button onclick="fastspring.builder.postalCode(document.getElementById('postal-code').value);">Apply Postal Code</button>
10
11
<!--
12
DEMO EXTRA INFO
13
-->
14
<br /><br />
15
<div>
16
Valid zip code for demo: 90210
17
</div>
18
19
<!--
20
DEMO EFFECTS
21
-->
22
<br /><br/>
23
<div>
24
Postal Code on order: <span data-fsc-order-postalCode></span>
25
</div>
26
27
<!--
28
DEMO SETUP
29
- Initialize the Store Builder Library
30
-->
31
<script
32
id="fsc-api"
33
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
34
type="text/javascript"
35
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
36
</script>
1
1
1
1