Shopify / storefront-api-examples

Example custom storefront applications built on Shopify's Storefront API
https://help.shopify.com/api/storefront-api
MIT License
1.12k stars 329 forks source link

How to get compare_at_price #86

Closed dineshmaths1 closed 5 years ago

dineshmaths1 commented 5 years ago

Hii, Variants how to get compare_at_price? Let me know

jmignac commented 5 years ago

Hi, @dineshmaths1.

Please, check the Product Variant page of our StorefrontAPI Documentation.

Cheers!

jtmdrums commented 3 years ago

@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

swalkinshaw commented 3 years ago

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.