Liquid > Get Variation by ID

Solved
Shopify Partner
63 3 10

Hiya,

i know that you can get any product in liquid via products["some handle"], but can you get a variations details by its ID? (For a product you're not currently looking at). Or is there another way to determine if a Variation ID is valid?

Any ideas?

Thanks,
Ceri.

0 Likes
Highlighted
Shopify Expert
10006 116 1818

This is an accepted solution.

With Liquid, no. You would need to grab the product by the handle, then loop over the variants and check if there's a matching ID in place.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
Highlighted
Shopify Partner
63 3 10

Hi Jason, Thanks for the response. I thought that would be the case - didn't know if there was anything undocumented thanks

0 Likes