Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2018 17:22
What would you like to do?
A shopify script to give porducts with a quantity of 2 or more 10% off
Input.cart.line_items.each do |line_item|
next if line_item.variant.product.gift_card? || line_item.quantity <= 1
line_item.change_line_price(line_item.line_price * 0.90, message: "10% 2 or more")
Output.cart = Input.cart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment