Order level directives are markers on a DOM element that allow you to interact with the FastSpring Store Builder Library through HTML. They are used to retrieve information about the current order session. These directives typically require two parts:
- The Store Builder Library Script
- The attribute you are wanting to retrieve – “data-fsc-order-…”
These fill the element that the directive is applied to. In the opening tag you will provide the path and the attribute you want to retrieve. An example will look like this:
<span data-fsc-order-total>
<-- Text here will be filled -->
</span>
Order Level Directives
- data-fsc-order-currency – Gives the 3 digit currency code
- data-fsc-taxid-value – Allows you to add a TaxId to the order to exlude VAT Requires a input for data-fsc-order-taxId and a button action of data-fsc-action=”TaxId”
- data-fsc-order-tax – Gives a beautified string of the tax amount
- data-fsc-order-taxRate – Gives a percentage value of what the tax amounts to
- data-fsc-order-taxValue – Gives the numerical return for the amount of tax
- data-fsc-order-totalWithTax – Gives string version of the total amount of the order including tax
- data-fsc-order-totalWithTaxValue – Gives numerical version of the total amount of the order including tax
- data-fsc-order-discountTotal – Gives string version of the total amount of any discounts
- data-fsc-order-discountTotalValue – Gives numerical version of the total amount of any discounts
- data-fsc-order-total – Gives string version of the total order amount
- data-fsc-order-totalValue – Gives numerical version of the total order amount
- data-fsc-order-taxType – Gives the type of tax currently being charged for the order – eg: US, VAT, GST…
- data-fsc-order-country – Gives the current location which will be either based of geo-location or user set
- data-fsc-order-language – Gives the current language which will be either based of the user’s browser settings or set through FastSpring by the user
- data-fsc-order-promocode – Shows the promocode that was added if one is currently in use
- data-fsc-promocode-value – Is the HTML directive to be able to set an input as the promocode