Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A script for Ecwid to redirect a customer after placing an order to a custom 'thank you' page
var confirmationPageURL = "";
// Add handler for Ecwid's OnPageLoad event
if (
typeof(Ecwid) == 'object'
&& typeof(Ecwid.OnPageLoad) == 'object'
) {
Ecwid.OnPageLoad.add(function(page) {
// Redirect user if needed
if (
typeof(page) == 'object'
&& 'ORDER_CONFIRMATION' == page.type
) {
window.location = confirmationPageURL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.