Shopify/storefront-api-examples

How to get compare_at_price

dineshmaths1 opened this issue · 3 comments

Hii,
Variants how to get compare_at_price?
Let me know

@jmignac That link does not go to the StorefrontAPI documentation, that is the admin API documentation. I'm running into the same issue, where when trying to pull compare_at_price from the storefront api, it's returning this as an error:

"Field 'compare_at_price' doesn't exist on type 'ProductVariant'"

Please advise on how to get access to that on the front end through the storefront api, not the admin api

You can find the Storefront API documentation here: https://shopify.dev/docs/storefront-api/reference/products/productvariant?api%5Bversion%5D=2020-10

There's a compareAtPriceV2 field.