Liquid > Get Variation by ID

Solved
Ceri-Waters
Shopify Partner
68 4 11

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
Jason
Shopify Expert
10035 119 1871

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
Ceri-Waters
Shopify Partner
68 4 11

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

0 Likes