App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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.