Out now! Check out the Poll results: Do you have a Shopify store?
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.

Passing preview theme parameters in the URL instead of cookies

Passing preview theme parameters in the URL instead of cookies

zach_h
Shopify Partner
2 0 0

Is there a setting that allows you to always pass preview theme ids as a url parameter instead of being saved as a cookie? 

In some circumstances, it would be easier with clients if the parameter was always in the URL.  

Replies 3 (3)

Liam
Community Manager
3108 344 889

Hi Zach - if you push the theme up to Shopify as an unpublished theme, you can generate a preview link in the format: https://123456789.shopifypreview.com/ - would sharing that URL with clients be easier?

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

zach_h
Shopify Partner
2 0 0

This refers to the "share preview" option. However, it doesn't resolve the issue. When I'm on a product page and click "share preview," it only links to the homepage. Therefore, we always have to instruct the client to click the preview link and then share a second link to the specific page we want them to see.

I've discovered that appending "?preview_theme_id=123456789" to any page seems to work. However, I'm looking for a more streamlined method than manually altering the URL for this.

Liam
Community Manager
3108 344 889

Hi again Zach - I see what you mean here, and it is a common issue that devs are experiencing that we're looking into improving. For the moment the best option is to manually add the preview theme parameter to the URL. This is not ideal, but I've connected with the product team to pass on the feedback for a more streamlined approach. 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog