Personalized checkout and custom promotions with Shopify Scripts
I need help editing this script
If shipping_rate.price is greater than 75 make it 75
because we have 3 different locations that have 3 different shipping rate = 75
but we are in a small country and we want to make our shipping rate flat 75 no matter if customer picked items from different locations
but what is happening now that if the customer picked items from 3 location
he will pay 75+75+75
We want him to pay only 75
I tried to use this code
input.shipping_rates.each do |shipping_rate|
next unless shipping_rate.source == "shopify"
if shipping_rate.price > 75
shipping_rate.price = 75
end
output.shipping_rates = input.shipping_rates
but it didn't work
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025