free shipping with x item in shopify script

Kumar2573
Shopify Partner
151 8 21

FREE_TAG = 'freeship' PRODUCT_ID = 66854371656  if Input.cart.shipping_address.country_code == 'US' Input.cart.line_items.select do |line_item| product = line_item.variant.product if product.id == PRODUCT_ID PRODUCT_ID = true Input.shipping_rates.each do |shipping_rate| next unless shipping_rate.source == "shopify" shipping_rate.apply_discount(shipping_rate.price * 100, message: "Discounted shipping") end end end end Output.shipping_rates = Input.shipping_rates

Expert Shopify Plus & shopify Developer & Theme customizer
- If the problem is solved remember to click to Accept Solution
- Press Like ?? if the answer was helpful
- Still, Facing issue, Reach out to me Email :- jitendra3496@gmail.com | Skype :- jitendra2573_1
- Direct Hire me :- Direct Contact me
Replies 0 (0)