Hey everyone, I was just wondering if you could apply discounts to customers who aren't registered with the site? We would like to apply free shipping for customers who shop with us through Ipsy. I figure we could do this through:
if Input.cart.customer Input.shipping_rates.each do |shipping_rate| next unless shipping_rate.source == "shopify" if Input.cart.customer.email.include? 'ipsy.com' shipping_rate.apply_discount(shipping_rate.price * 1.0, message: "Free shipping for Ipsy") end end end Output.shipping_rates = Input.shipping_rates
Now this works if I enter a customer that has ipsy.com in their email, but I can't tell if this would work for anyone who just buys through the site and doesnt register. Does anyone know if this can be done? Thanks for your time.
|06-21-2019 10:51 AM|
|06-21-2019 09:10 AM|
|06-21-2019 09:03 AM|
|06-16-2019 03:41 PM|
|06-11-2019 04:39 AM|