What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Back link on checkout page that was generated by Storefront API

Solved

Back link on checkout page that was generated by Storefront API

andrenaught
Shopify Partner
17 0 3

When generating a checkout webUrl through the storefront API - The logo / name of the store on the top left of the checkout page doesn't actually link back to the home page. The "back to cart" option is also not shown. I feel like there should be a way for customers to press a link to atleast go back to the main shopify store (cause then we can atleast redirect back to the main site). I know we probably won't be able to add in our own link cause checkout page should be untouchable, but atleast give us an option to display the original links (the back links that disappear when it's generated through the storefront API).

Accepted Solution (1)
Josh
Shopify Staff
1134 84 235

This is an accepted solution.

If that's something that you prefer it's definitely a viable option, which option is better to use really just comes down to the the use-case I suppose. I'd absolutely recommend giving permalinks a shot, since it goes through the cart it should behave like any other checkout if memory serves. I admittedly have not tinkered with them in quite some time though. 

 

Lots of people are using the Storefront API to build a completely external storefront solution, in which case they don't want functionality that can potentially point people back to the online storefront that they didn't want people knowing existed.

 

If I'm understanding your scenario correctly though, permalinks should do the trick. If you've got a development shop set up (or a trial, even) I would fully recommend a test run! 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 4 (4)

Josh
Shopify Staff
1134 84 235

Hey there, 

 

Since the original links in the checkout go back to the online storefront, and people are often using the Storefront API to build an entire standalone storefront where people don't interact with the online store at all, I'm not sure that everyone would actually want those checkout links to work. 

 

With that being said though, I can still definitely understand what you're after here. Maybe there's a happy middle ground that can be found where this is available as an option, or you're able to configure where the links go, or even both. I'll log a feature request and see what people think. 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

andrenaught
Shopify Partner
17 0 3

Hi, thanks for responding. I've come across this: https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart.

If I generate the checkout link using that, it acts as if it came from the store itself, and not the API. This would also solve my other issue where the abandoned checkout emailing doesn't work when the checkout is coming from the Storefront API. (it also means less worrying about API versioning) Would this be a good alternative to do? I almost question the point of using Storefront API's checkoutCreate unless you want to login the user first or something. (or if you want to purposely hide those links I want to show)

Josh
Shopify Staff
1134 84 235

This is an accepted solution.

If that's something that you prefer it's definitely a viable option, which option is better to use really just comes down to the the use-case I suppose. I'd absolutely recommend giving permalinks a shot, since it goes through the cart it should behave like any other checkout if memory serves. I admittedly have not tinkered with them in quite some time though. 

 

Lots of people are using the Storefront API to build a completely external storefront solution, in which case they don't want functionality that can potentially point people back to the online storefront that they didn't want people knowing existed.

 

If I'm understanding your scenario correctly though, permalinks should do the trick. If you've got a development shop set up (or a trial, even) I would fully recommend a test run! 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

andrenaught
Shopify Partner
17 0 3

I guess it would be nice for it to be an option since what I noticed other shops do is they use the storefront API on their custom website as their only way of selling their products online. Essentially practicing Headless Ecommerce like these websites: https://headless.page/. I will try using permalinks in conjunction with the Storefront API, thank you for your response.