App reviews, troubleshooting, and recommendations
Short explanation: I added 2 products to a cart, checked logs of my 2 extensions. Inside of the extensions which uses Discounts API function I got null value for the field compareAtAmountPerQuantity but logs for the extension which uses Cart Transform API it shows correct values.
But I received nulls in the input for Discounts API function:
{ "cart": { "buyerIdentity": { "email": "[email protected]", "customer": null }, "isCompareAtDiscount": { "value": "true" }, "lines": [ { "id": "gid://shopify/CartLine/0", "quantity": 1, "merchandise": { "__typename": "ProductVariant", "id": "gid://shopify/ProductVariant/42115752034358", "product": { "isEligibleForDiscounting": true, "productType": "Hydration Tub", "title": "Cranberry", "id": "gid://shopify/Product/7289090277430", "score": null } }, "cost": { "amountPerQuantity": { "amount": "39.99" }, "compareAtAmountPerQuantity": null, "subtotalAmount": { "amount": "39.99" }, "totalAmount": { "amount": "39.99" } } }, { "id": "gid://shopify/CartLine/1", "quantity": 1, "merchandise": { "__typename": "ProductVariant", "id": "gid://shopify/ProductVariant/43039432835126", "product": { "isEligibleForDiscounting": true, "productType": "Shaker", "title": "2024 Shaker", "id": "gid://shopify/Product/7658676944950", "score": null } }, "cost": { "amountPerQuantity": { "amount": "9.99" }, "compareAtAmountPerQuantity": null, "subtotalAmount": { "amount": "9.99" }, "totalAmount": { "amount": "9.99" } } } ] }, "shop": { "config": null } }
And correct values in the Cart Transform API function:
{ "cart": { "lines": [ { "id": "gid://shopify/CartLine/a0a735ab-a3db-41fe-bb6b-a63eda290890", "quantity": 1, "routineID": null, "setID": null, "giftsCreatorID": null, "merchandise": { "id": "gid://shopify/ProductVariant/42115752034358", "product": { "productType": "Hydration Tub" } }, "cost": { "amountPerQuantity": { "amount": "39.99" }, "compareAtAmountPerQuantity": { "amount": "50.0" }, "subtotalAmount": { "amount": "39.99" }, "totalAmount": { "amount": "39.99" } } }, { "id": "gid://shopify/CartLine/c7d70b81-8396-43ce-8b93-1b48d1c3a89b", "quantity": 1, "routineID": null, "setID": null, "giftsCreatorID": null, "merchandise": { "id": "gid://shopify/ProductVariant/43039432835126", "product": { "productType": "Shaker" } }, "cost": { "amountPerQuantity": { "amount": "9.99" }, "compareAtAmountPerQuantity": { "amount": "20.0" }, "subtotalAmount": { "amount": "9.99" }, "totalAmount": { "amount": "9.99" } } } ] }, "shop": { "bundlesConfig": { "value": "{\"setID\":{\"parentProductTitle\":\"Set Creator\",\"parentVariantId\":42928873111606,\"thresholdDiscounts\":{\"3\":10}},\"giftsCreatorID\":{\"parentProductTitle\":\"Gift Box Creator\",\"parentVariantId\":42928873111606,\"thresholdDiscounts\":{\"3\":10}},\"routineID\":{\"parentProductTitle\":\"Routine Generator\",\"parentVariantId\":42928873111606,\"thresholdDiscounts\":{\"3\":10}}}" } } }
Solved! Go to the solution
This is an accepted solution.
Hey @AncleMarvel I've heard back from Shopify and problably you have too. For anyone else it seems there is a setting in the markets which affect the display of the compareAtAmountPerQuantity. This is if you go to Settings>Markets>preferences and toggling off the Hide Compare at Pricing:
Deactivating this worked for us at least. We are still checking to see what sideeffects this might have though. So test and use with caution haha.
This is an accepted solution.
Hey @AncleMarvel I've heard back from Shopify and problably you have too. For anyone else it seems there is a setting in the markets which affect the display of the compareAtAmountPerQuantity. This is if you go to Settings>Markets>preferences and toggling off the Hide Compare at Pricing:
Deactivating this worked for us at least. We are still checking to see what sideeffects this might have though. So test and use with caution haha.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024