CompareAtPrice correct on a ProductVariant, but not on Product

CompareAtPrice correct on a ProductVariant, but not on Product

Kieran-madefres
Tourist
9 0 2

We have some items on sale, with a `compareAtPrice` higher than the `price`, that are displaying correctly on our website. But when getting the product’s `minVariantPrice` inside both `priceRange` and `compareAtPriceRange` these values are always equal, the `compareAtPrice` never seems to be higher than the actual `price`. However, when accessing those variables inside a `productVariant` they’re different (which is correct). This is consistent on all products with a `compareAtPrice`.

 

Shouldn’t `minVariantPrice` inside `compareAtPriceRange` on a product relate to the cheapest `compareAtPrice` on a variant, whether that is the default variant or not?

Replies 10 (10)

vix
Shopify Staff
540 103 122

Hi @Kieran-madefres 

 

We are aware of this and will be putting out a fix. Keep an eye on the changelog! 

To learn more visit the Shopify Help Center or the Community Blog.

marissatraina
Visitor
2 0 0

@vix Querying compareAtPriceRange on the Product object does not work for me. I believe it should be a field on the Product object according to the docs. Could this be related and is shopify aware? 

vix
Shopify Staff
540 103 122

@Kieran-madefres We just released the fix that correctly returns the compare at price range vs. returning the product price in the range. 

To learn more visit the Shopify Help Center or the Community Blog.

Kieran-madefres
Tourist
9 0 2

Hi @vix , thanks for this, unfortunately a new larger issue seems to have been introduced with this release.

When requesting products via GraphQL (not just MobileBuySDK but using a GraphQL explorer too) we receive an error - see below.

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 1fcf74e0-e0a8-471b-8548-0343c410abf0 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "1fcf74e0-e0a8-471b-8548-0343c410abf0"
      }
    }
  ]
}

 

By removing fields from our query, we have narrowed the error down to 'currencyCode' on either of 'minVariantPrice' or 'maxVariantPrice' within 'compareAtPriceRange'. Requesting this field seems to cause the error.

Interestingly, if the query is only returning products that all have a different compare at prices to their actual price, e.g our sale collection, then we get no error. So it seems to only surface when requesting currency code for products that don't have a compare at price set.

This is actually breaking many areas of our app as 99% of our collections cannot load.

vix
Shopify Staff
540 103 122

@Kieran-madefres Looking into it

To learn more visit the Shopify Help Center or the Community Blog.

Kieran-madefres
Tourist
9 0 2

Hi @vix, what's the latest on this?

Also, can we mark this question as `not solved` as it's still not solved?

Cheers

vix
Shopify Staff
540 103 122

Hi @Kieran-madefres 

 

Still working on re-releasing the fix. We have everything tracked in Github so don't worry too much about the status of the forums - that being said i've marked it as unsolved for now. 

To learn more visit the Shopify Help Center or the Community Blog.

Kieran-madefres
Tourist
9 0 2

Hi @vix,

Are there any updates on when the fix will be released?

Cheers,

Kieran

Kieran-madefres
Tourist
9 0 2

Is there anyone else from Shopify available to update on this? Or @vix ? It's been quite a while since we last heard anything

Cheers,

Kieran

vix
Shopify Staff
540 103 122

@Kieran-madefres 

 

Are you still experiencing this? Can you provide some examples. 

 
 

To learn more visit the Shopify Help Center or the Community Blog.