CompareAtPrice correct on a ProductVariant, but not on Product

Highlighted
Tourist
5 0 0

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?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
502 98 90

Hi @Kieran-madefres 

 

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

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


1 Like
Highlighted
New Member
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? 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
502 98 90

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

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes
Highlighted
Tourist
5 0 0

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.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
502 98 90

@Kieran-madefres Looking into it

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


1 Like
Highlighted
Tourist
5 0 0

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

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

Cheers

0 Likes
Highlighted
Shopify Staff
Shopify Staff
502 98 90

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. 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes