Get preview URL have preview key for published product.

stephenrakun
Shopify Partner
5 0 0

I need to get a preview URL for the published product. However, I only got a preview URL for the "Draft" product status. How can I get this URL for "Active" product status? This URL has this format I got from onlineStorePreviewURL

"https://{hash}.shopifypreview.com/products_preview?preview_key={hash}"

Thank you for your support.

 

Replies 5 (5)

Jason
Shopify Expert
11185 224 2281

If it's published why do you need a preview url? 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
stephenrakun
Shopify Partner
5 0 0

Thank you for your replies to me, I need it for my work. I need to get this preview URL for published products according to my work.

Jason
Shopify Expert
11185 224 2281

But a published product is live on the site, so use the url for the product.
It doesn't need a preview url since it's published and accessible.

 

You might have an interesting use case so if you have more details on they why that could give us clues for other suggestions.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
stephenrakun
Shopify Partner
5 0 0

Yeah, I know it works like that but I need 1 more preview URL for it. As you can see in this case. His response is "Active" but he always gets the preview_key in the preview link for his product. I need to do that for my work. How can I do that, thank you so much.

stephenrakun
Shopify Partner
5 0 0

Yeah, I get product information from product list API and then I save it into my local database. My site will get data from my local database. when I update for product, my local database is not synchro automation, I can preview all changes of my product before updating it to my site. It looks like a Preview post in WordPress.