Personalized checkout and custom promotions with Shopify Scripts
Hi. I have line-item promo script (shopify plus line-item script) with bulk discounts. But also have b2b customers with discounts codes.
It is possible to change the script so that if the user enters a discount code on the checkout page, the code will work. and the action of the script was canceled?
Can I set the value of the discount code in the script at which the script is not executed?
Thank you. Hope for help.
Solved! Go to the solution
This is an accepted solution.
I think you just need to add the condition before execution
if Input.cart.discount_code == nil
//line script run
end
This is an accepted solution.
I think you just need to add the condition before execution
if Input.cart.discount_code == nil
//line script run
end
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025