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
User | RANK |
---|---|
2 | |
2 | |
2 | |
2 | |
2 |
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023