Thank You Page

Thank You Page

Order information:

HTML
<script>
  SP.go('thankYouPage', {
    order: {
      id: "ORDER_ID", // optional, but recommended
      total: "ORDER_TOTAL"  // float ex. 123.00
    }
  });
</script>

Order information & delivery:

HTML
<script>
  SP.go('thankYouPage', {
    order: {
      id: "ORDER_ID", // optional, but recommended
      total: "ORDER_TOTAL"  // float ex. 123.00
    },
    client: {
      firstname: "CUSTOMER-NAME",
      city: "CUSTOMER-CITY",
      email: "CUSTOMER-EMAIL"
    }
  });
</script>

Full version:

HTML
<script>
  SP.go('thankYouPage', {
    order: {
      id: "ORDER_ID", // optional, but recommended
      total: ORDER_TOTAL, // float or string, ex. 123.00 or "123.00"
      couponCode: "COUPON_CODE" // optional
    },
    client: {
      firstname: "CUSTOMER-NAME",
      city: "CUSTOMER-CITY",
      email: "CUSTOMER-EMAIL"
    },
    basket: [{
      productId: "PRODUCT_1_ID",
      product: "PRODUCT_1_NAME",
      link: "PRODUCT_1_URL",
      image: "PRODUCT_1_IMAGE_URL",
      quantity: PRODUCT_1_QUANTITY, // integer or string
      price: PRODUCT_1_SINGLE_PRICE, // float or string
      sum: SUM // float or string, sum = quantity * price
    }, {
      productId: "PRODUCT_2_ID",
      product: "PRODUCT_2_NAME",
      link: "PRODUCT_2_URL",
      image: "PRODUCT_2_IMAGE_URL",
      quantity: PRODUCT_2_QUANTITY, // integer or string
      price: PRODUCT_2_SINGLE_PRICE, // float or string
      sum: SUM // float or string, sum = quantity * price
    }]
  });
</script>

Make sure to replace PRODUCT_* fields with real data.

This snippet should be called on purchase confirmation page.

Order fields

  • id - your order ID. Optional, but recommended: when it is missing, Trustisto generates one from the date and the visitor ID, so all orders of the same visitor placed on the same day get the same ID.
  • total - order value. When it is missing, it is calculated as the sum of the basket products.
  • couponCode - the coupon used in the order. When it is missing and the client has a couponCode saved with Save Client, that one is used. See Coupon Codes.

Order information

You should use this version when you have been using “Add To Basket” or “Full Basket Page Snippet”, and “Save Client” Page Events. So all products & delivery information have been saved in Local Cache, and we can now get them.

Order information & delivery

You should use this version when you have been using “Add To Basket” or “Full Basket Page Snippet”, but NOT “Save Client” Page Events. So all products information have been saved in Local Cache, and we can now get them.

Full version

You should use this version when you have been NOT using “Add To Basket” or “Full Basket Page Snippet”, and NOT using “Save Client” Page Events.