Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I would like to create a direct link to the live product on my Shopify store which will be created from the variant or product ID. This can be done through the API or URL redirect?
The variant/product ID is the only variable I have to work with, is this possible?
Thank you
You can use
https://<shopify_domain>/variants/<variant_id> for product detail page
or
https://<shopify_domain>/cart/<variant_id>:<quantity>?storefront=true for adding the product to the cart and showing the cart page
I have exactly the same question, but for the products without variants. Is it possible to access products without variants via URL containing just product id number?
I am not aware of such an option. But shopify creates a default variant for products where you have not explicitly created a variant. You can use that variant's ID for generating the link.
Where can I get this number of default variant for products without variants?
You can either use the Admin API or login to admin dashboard of your store and go to https://admin.shopify.com/store/<STORE_SLUG>/products/<PRODUCT_ID>.json
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025