Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to redirect users to an external website once they checkout successfully. Adding additional scripts on the Post-purchase page didn't work
here is my script but it didn't work. Even a console log doesn't work.
<script>
document.addEventListener('DOMContentLoaded', function() {
if (window.location.href.indexOf('/thank_you') > -1) {
var orderId = Shopify.checkout.order_id;
var redirectUrl = 'http://example.com/?order_id=' + orderId;
window.location.href = redirectUrl;
}});
</script>
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024