Personalized checkout and custom promotions with Shopify Scripts
I need to apply discount on cart items based on delivery method, is it possible to do this? if yes, how can i do it?
Solved! Go to the solution
This is an accepted solution.
It's a bit hacky, but you could create a product called "Pick up in store" (or whatever wording you prefer) that costs $0.
Create a Line Item script to apply a discount to the whole cart if the cart includes that product.
Create a Shipping script to show only the "Pick up in store" shipping method if that item is in cart, and hide that shipping method and show all others if the cart does not include the item.
Hi Igor,
Only shipping scripts have access to shipping rate names. And shipping scripts can only discount the shipping rate amount (not line item amounts).
Can it work to discount the shipping rate?
Matthew
unfortunately no, I need to discount a percentage of the value of the items in the cart, as the customer will get a discount when they pick it up at the store.
Is there another way to give a discount when picking up?
This is an accepted solution.
It's a bit hacky, but you could create a product called "Pick up in store" (or whatever wording you prefer) that costs $0.
Create a Line Item script to apply a discount to the whole cart if the cart includes that product.
Create a Shipping script to show only the "Pick up in store" shipping method if that item is in cart, and hide that shipping method and show all others if the cart does not include the item.
great solution, thank you very much
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023