We've recently migrated Recharge to native Shopify checkout.
Previously, using Recharge's checkout for any orders with subscriptions in them allowed us to give free shipping using a 0 weight shipping rule as Recharge was using duplicate products for the order.
After the migration, all the products are unified now and this 0 weight rule can no longer be applied.
So I need to make any orders with a subscription in them to have free shipping. This is just on the first order as I have shipping turned off in Recharge for subsequent orders.
It seems like this can be handled with Scripts but I'm not exactly sure on the syntax.
Just on first guess:
Took a stab at it but not working.
hasSub = 0 Input.cart.line_items.each do |item| if (item.selling_plan_id > 0) hasSub = 1 end end if (hasSub && Input.cart.shipping_address.country_code == 'US') Input.shipping_rates.each do |shipping_rate| next unless shipping_rate.source == "USPS First Class" shipping_rate.apply_discount(shipping_rate.price * 1, message: "Free Subscriber Shipping") end end Output.shipping_rates = Input.shipping_rates
Happy to help! Feel free to shoot me an email at firstname.lastname@example.org. It is pretty easy to take care of with a script.
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...By Arno Nov 27, 2023
You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...By Skye Nov 8, 2023