Accepting credit cards, warehouses, and shipping and fulfilling orders
All of the documentation I can find for sending users to a custom URL after checkout (either via redirect or a button) refers to the "additional scripts" functionality from Checkout.liquid, but given that this is already deprecated I'd prefer to do it in a more robust way. Can anyone point me in the right direction to get this working? Thanks.
Hey Ndsta,
Heddy from Gameball here.
With Shopify’s Checkout Extensibility API, there’s actually a built-in way to handle post-payment redirections. You’d want to use the Order Status Page extension, which allows you to customize what happens after a successful checkout, like adding a button or an automatic redirect to your website.
Here’s a general approach:
You’ll be working mostly with Shopify’s Checkout Extensibility API, and if you haven’t set up the Order Status Page extension yet, that’s the place to start.
If you want something as straightforward as a redirect, you can include a JavaScript snippet that redirects users based on certain criteria—like successful payment or order completion.
That should give you more flexibility and future-proof the process a bit better than using deprecated methods.
Thanks very much Heddy, I was able to get an app built and installed with the necessary extension, and I'm able to console.log the URL I need to redirect to on the Thank You screen (including some parameters from the api object). However, as far as I can tell, it's neither possible to change the text/URL of the "Continue Shopping" button:
…nor to redirect automatically:
(I've tried a simple window.location.href, but that fails with “ExtensionUsageError: ReferenceError: window is not defined”.)
Please let me know if you think I've missed or overlooked something, but based on what I've been able to determine it looks like it might not be possible to redirect users from the thank you screen (either manually or automatically) with Checkout Extensibility.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024