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
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024