When i Customers apply a discount to their order and they have items that are per pound pricing which can vary i need to update the price of the item for their order
It usually works but when a cutstomer applys a discount it dousnt work shopify locks it.
Anyone have a solution besides deleting item and creating custom item?
Topic summary
Issue: Per‑pound item prices need post‑selection adjustments, but once a customer applies a discount, Shopify locks line‑item prices, blocking edits.
Current behavior: Locking after discount is expected in Shopify’s checkout. There is no native way to modify line‑item prices after a discount is applied.
Workable paths suggested:
- Draft Orders: Create a draft order, adjust per‑pound price, then apply the discount and send the invoice. Full price editing is allowed before payment.
- Backend app/automation before checkout: Recalculate prices prior to discount application, since frontend JavaScript cannot securely change prices. Swapping items in the cart is possible; true price changes require backend APIs.
Constraints and extras:
- Modifying prices inside checkout (even without discounts) generally requires Shopify Plus.
- Post‑checkout workaround: Automation to re‑add items with corrected pricing and remove locked line‑items, via Shopify Flow or the Mechanic app (example link provided).
Open questions: The OP asked whether a custom script approach still shows the discount to the customer; no explicit confirmation yet. Discussion remains open with actionable options but no single confirmed resolution.
Shopify locks line-item prices after a discount is applied, which is why you can’t update the per-pound price anymore. This is expected behavior in Shopify’s checkout.
Two workable options (without deleting the item):
-
Use Draft Orders
Create a Draft Order → update the per-pound price → apply the discount → send the invoice.
Draft Orders allow full price editing before payment. -
Use a custom app/script before checkout
Have a small script/app recalculate the per-pound price before the discount is applied, so the final price is correct once Shopify locks the line-items.
There’s no native way to edit item prices after a discount is added — Shopify intentionally prevents it.
Hey! I saw your post and thought I’d reach out.
If you’re open to it, I can invite you to connect with a Shopify expert I personally work with — they helped me a lot with my store.
Hey, appreciate you responding
Have you ever dealt with the custom script doing this? Does it at least show the customer that the discount was applied?
Hi @Levi1
I’m @PaulNewton shopify partner and automation builder
The draft-orders and custom scripting would basically be one in the samethrough the backend apis.
You CANNOT modify product prices on the frontend with just javascript “custom scripting” you need a backend otherwise obviously customers could just edit prices however they want.
The most you could do before checkout is to swap items in an out of the basket but if there’s no discount yet there may be no point in doing that.
So for security and sanity changing “prices” pre checkout has to done with draft-orders & custom-items or specific discount logic applied to the draft-order, AND all that has to be done using either the api in a custom app , or an existing automation app like mechanic that can be customized.
e.g. https://tasks.mechanic.dev/create-a-draft-order-from-the-cart
Changing prices inside the checkout, without discounts, pretty much requires a shopify Plus plan.
A round about fix after checkout is an automation to pre-edit the order to re-add the items and remove the locked line-items. Which should be technical do-able in shopify-flow but can also be done with the mechanic app.
Reach out if you need to build this.