Skip to content

SieCommerce Product Teaser Widget (JavaScript Library)

Load the JS widget on your page, by adding the following:

<script src="https://siecommerce.sfs.siemens.com/static/widget/widget-bundle.js"></script>

Initialize the widget by adding the following (after the JS above has been added):

<script id="sfs-teaser-script">
  window.onload = function () {
    window.sieCommerce.teaser({
        targetDiv: string,
        currency: string,
        country: string,
        locale: string,
        token: string,
        product: {
            iacCode: string,
            unitPrice: number,
            productName: string
        }
  )};
</script>
  • targetDiv: A string representing the ID of the HTML <div> element where you would like the teaser to appear. You can specify your own ID, or if left blank, the widget will look for the ID _sfs_checkout

    <div id="_sfs_checkout"></div>
    
  • currency: string representing the currency of the shop.

  • country: string representing the country where the order is coming from.
  • locale: string representing the locale. This is responsible for setting the language of the widget
  • token: string representing the widget token generated using the API
  • product: object representing the details of the product :
    • iacCode: string representing our unique asset code. This list of codes will be provided to you
    • unitPrice: number representing the unit price of the product. In minor units
    • productName: string representing the name of the product