Quote:
Originally Posted by Giacomo Turbati1
Good evening and thank you for your response. my problem is that I wanted to do the redirect to my page, after the customer has made the purchase. I found a code on this forum but I can not do the redirect. I wanted to know which code is correct to be built in adobe muse.
thanks in advance
|
Hello!
Now I see what the issue is. Custom redirection scripts in Adobe Muse work the same way with Ecwid widgets and integration code as well. They need to be put straight below the Ecwid container.
So, to integrate a script which would redirect the customer from the “Thank you for your order” page to a custom one, you need to put this very code you found on our forum below the Ecwid widget or an HTML box with the Ecwid integration code:
Code:
<script>
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;
}
});
}
</script>
So, no matter if you are using one of the Ecwid widgets for Muse or an integration code, for proper redirection you need to:
1. Create another HTML box inside Adobe Muse (Object -> Insert HTML) and
2. Insert the script in it like this:
3. Change the
http://google.com in the code of the script to the link to your custom page.
4.Hit OK, resize the HTML box to take minimal space on your website.
4. Put that box straight below the Ecwid container like this:
In this case I’m using the MuseThemes Ecwid widget to integrate Ecwid with an Adobe Muse website, but this will work for any method of integration.
Try that and see that it works just fine.