Thank You Page

Thank You Page

Order information:

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

Order information & delivery:

HTML
<script>
  SP.go('thankYouPage', {
    order: {
      id: "ORDER_ID",
      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",
      total: ORDER_TOTAL  // float or string, ex. 123.00 or "123.00"
    },
    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 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.