App reviews, troubleshooting, and recommendations
Hi everyone,
I'm working on a solution to manage voluntary donations in my Shopify store, and I have a specific requirement:
I would like to modify the cart total without adding a physical or virtual product to the cart. The idea is to allow customers to make a donation, but without creating a specific product (like a variant or an item in the cart).
I'm wondering if there's a way to directly modify the cart total through the API or any advanced Shopify settings, without necessarily adding a product.
Has anyone encountered a similar situation or has any suggestions on how to proceed?
Thanks in advance for your help! 🙏
Hi @gigimurgia
I'm not sure it can be done without putting *something* in the cart. Is the use case that you want to allow people to enter a donation amount and don't want to have to deal with tons of variants representing different donation amounts?
You might be able to have just a single "Donation" product with a base amount of 0. When a donation is made, if that product is not already in the cart, then add it, otherwise update a cart attribute that contains the donation amount. Then use the cart-transform api (update) to read the cart attribute and change the price of the donation product to match.
https://shopify.dev/docs/api/functions/reference/cart-transform#example-update-operation
-- Adam
Learn 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, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025