Automatically add variant ID to permalink?

Highlighted
Tourist
8 0 1

Hi there,

I've seen this useful tutorial - https://community.shopify.com/c/Shopify-Design/Cart-Use-permalinks-to-pre-load-the-cart/m-p/613702

However, I would like to automatically add the variant ID to the link rather than go to the .xml page every time, that way I can use this feature in my product.liquid so it can pull this automatically. Could someone give me some insight on how to do this please?

Thanks!

0 Likes