Product Level Directive Documentation
Edit on
Codepen.io
Codepen.io
data-fsc-item-selection-smartdisplay-inverse
data-fsc-item-selection-smartdisplay-inverse will hide the element it is attached to if the item is in the cart.
x
18
1
<!-- Define a tag that will have substitutable text, and another for its inverse -->
2
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-selection-smartdisplay>The Phot.io App is in the cart, so we can remove it below.</span>
3
<span data-fsc-item-path="phot-io-main-app" data-fsc-item-selection-smartdisplay-inverse>The Phot.io App is not in the cart, so we can add it below.</span>
4
5
<!-- Define a button and its inverse -->
6
<button data-fsc-item-path-value="phot-io-main-app" data-fsc-action="Add" data-fsc-item-path="phot-io-main-app" data-fsc-item-selection-smartdisplay-inverse>Add to Cart</button>
7
<button data-fsc-item-path-value="phot-io-main-app" data-fsc-action="Remove" data-fsc-item-path="phot-io-main-app" data-fsc-item-selection-smartdisplay>Remove from Cart</button>
8
9
<!--
10
DEMO SETUP
11
- Initialize the Store Builder Library
12
-->
13
<script
14
id="fsc-api"
15
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
16
type="text/javascript"
17
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
18
</script>
1
1
1
1