Line item splitting and removal #261
BrandoCommando
started this conversation in
Feedback: Cart Transform API
Replies: 1 comment
-
Agree, this should be supported. Also think adding an item from a function should be made possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My proposition is simple: allow line item splitting/removal and attribute changes via Cart Transform functions. I realize the "migration guide" from scripts to functions says to use checkout extensions to apply attribute changes, but that would only work for very specific uses.
Here's my use case:
Both of these things are much simpler to manage if all line items have a quantity of 1. Our Line Item Script currently does the following:
When first implementing our upgrade/bundling logic, we did it all on the front-end use the cart Ajax API. However, this was prone to errors as well as client-side issues (timeouts probably?) resulting in floating upgrades and un-matched attributes. So then we switched over to Scripts, which solved those problems. Now that Scripts is going to be deprecated with Checkout.liquid, we need a suitable replacement. We need to be able to remove invalid line items, and split lines in order to ensure quantities of one.
Beta Was this translation helpful? Give feedback.
All reactions