Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I would like to use shopify function cart transform api to limit the free gift quantity to always be 1, due to previously some people are able to modify the free gift quantity and get extra free gift. For now, we are using shopify script to do the same function, but since it is going to be deprecated, we try to revamp it to use shopify function.
However, in the cart transform api documentation, it seems the update operation does not support a quantity update. Please help to advise what I can do to achieve the same result using shopify function or else. Thanks!
Solved! Go to the solution
This is an accepted solution.
A workaround is using right now:
Use checkout ui extension useApplyCartLinesChange hook to change the quantity of the line item
This is an accepted solution.
A workaround is using right now:
Use checkout ui extension useApplyCartLinesChange hook to change the quantity of the line item
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