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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024