`compareAtAmountPerQuantity` incorrect in Product Discount function input

`compareAtAmountPerQuantity` incorrect in Product Discount function input

optizio
Shopify Partner
13 0 6

Hello!

A couple of months ago we ran into an odd issue where it looked like the `compareAtAmountPerQuantity` was not being set correctly in the input to a product discount function. Apologies for the terrible screenshot, I'd be happy to provide more specific information via DM.

CleanShot 2023-11-08 at 23.05.18@2x.png

Because we could not see the input logs when this issue occurred for the merchant, we hard coded checks to panic! when specific `variantIds` did not have the `compareAtAmountPerQuantity` field filled that we knew should have them filled.

The other important note is that this is for the non-default shop currency, which makes me believe this is an issue with markets/functions. If not, it feels very random and does not happen a lot at all for these specific products. Of course, the way we're measuring this is specifically for 2 product variants, so we don't know the potential scope of the issue.

Reply 1 (1)

SBD_
Shopify Staff
1830 273 417

Hey @optizio 

 

Thanks for the screenshots. I'll take you up on the specifics vs DM and pass it along to the Functions team.

Scott | Developer Advocate @ Shopify