I'm building a custom storefront. Everything works so far on my storefront side. I can add products to cart. Send the user to the shopify checkout etc...
But as soon as the customer leaves my storefront, and goes to the shopify checkout, how do they get back to my storefront? I'd like them to land on my website with a "thank you message" after completed checkout. Also if there is a cart error, such as sold out items, the user is currently being send back to the regular shopify theme. How do I send them to my custom storefront on error — preferably with an error message?
It's super confusing for the user, if they land on totally different page efter checkout, and I think the Storefront API is incomplete if there's no way around this.
Documentations is lacking a little in this regard it seems, so I hope there is a solution to this.
there's also testing whether the undocumented return_to param applies here, or the fd param accepts a url or is only for no forwarding.
If you using https://github.com/Shopify/js-buy-sdk consider opening a ticket.
return_to is just used throughout the years in various templates, never really properly documented. Basically give it a relative url.
Do a google search on the forum