App reviews, troubleshooting, and recommendations
Hi,
I'm building a donation app which allows the customer to choose from three donation options on a post-checkout extension. I am using product variants for each of these donation options, prices set from the admin dashboard.
I would like to add a 'custom amount' field, as I have seen other post-purchase apps doing. However I am unsure how to achieve this. From the docs it seems like I can only add a product variant, but can't change the price of this variant.
Requests a variant to be added to the initial purchase.
type | "add_variant" | A fixed value of "add_variant". |
variantId | number | The product variant to add. |
quantity | number | The quantity of the specified variant. |
discount? | ExplicitDiscount | Refer to ExplicitDiscount. |
Ah we actually checked this out a while back @grantmalone , what they basically do is create three variants in the common currency denominations.
When the customer enters a custom value like 1.5$ or something like that, they then break it down into the relevant variants and quantities and then add it to cart.
This is the most common approach that we've seen. The other approach that would work here is to use a cart transform and update the price (but this is supported only for Shopify plus) - the advantage here is that it would look cleaner and nicer on the user's cart.
It was a while back so I don't really remember which app this was, but the product still seems to be on the store 🙂
Hope you come across something better than our limited knowledge here.
Founder
• Dollarlabs: Ultimate Discounts (5★) – If you can think of a discount, you can build it
• Dollarback: Cashback & Loyalty (5★) – Simple cashback. Powerful loyalty.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025