Personalized checkout and custom promotions with Shopify Scripts
Hi all
I'm hoping someone can help with this one! When using .first with the below shipping script to attempt to isolate the cheapest expedited rate, the shipping rate name is not returned, but rather "#<ShippingRate:0x7XXXXXXXXX0>" so I cannot isolate which expedited rate is the cheapest (or at least not to my knowledge).
ELIGIBLE_RATE = Input.shipping_rates.each do |shipping_rate| if shipping_rate.name.include?("Expedited") end end ELIGIBLE_RATE = ELIGIBLE_RATE.sort_by!(&:price) LOWESTRATE = ELIGIBLE_RATE.first
Does anyone have any tips or examples for this or maybe has a better suggestion on isolating the cheapest expedited rate? The rates are live carrier rates so they change each time. Using something fixed is unfortunately not an option.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024