Created
December 20, 2011 10:37
-
-
Save makfruit/1501134 to your computer and use it in GitHub Desktop.
A script for Ecwid to redirect a customer after placing an order to a custom 'thank you' page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var confirmationPageURL = "http://google.com"; | |
| // 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