Example 1: Displaying HTML Code in Case Condition is Fulfilled¶
The example below demonstrates how to display the “Add to Cart” button if item has class “in-stock”:
<!--{if X.test('//span[@class="in-stock"]')}-->
<button onclick="addToCart()">Add to Cart</button>
<!--{/if}-->
See also