Last active
March 27, 2018 07:59
-
-
Save ashukasma/a01df83ece9b869815965cf4bf6297b7 to your computer and use it in GitHub Desktop.
Shopify Scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[data-reduction-form="update"] { | |
display: none | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Reject Discount for few products | |
reject = false | |
Input.cart.line_items.select do |line_item| | |
product = line_item.variant.product | |
if product.tags.include?('reject_code') | |
reject = true | |
end | |
end | |
if reject and Input.cart.discount_code | |
Input.cart.discount_code.reject( | |
message: "discount can't applied! for this product." | |
) | |
end | |
Output.cart = Input.cart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment