Sha256: 5f65e764f9eb984d33a82ff651f1774a276e87dab9f1f0c05293551e87c728f3
Contents?: true
Size: 716 Bytes
Versions: 69
Compression:
Stored size: 716 Bytes
Contents
module Spree::ZonePricing::CheckoutsController def self.included(target) target.class_eval do address.update_hook :update_zone_prices end end private # Check the ship country and compare against the currently selected country, # if different update the order line items with the prices from the ship country def update_zone_prices # Same country do not update prices return if get_user_country_id == object.ship_address.country.id # Update the order prices using the ship to country @order.update_zone_prices(object.ship_address.country.id) # Update selected country with ship to country session[:zone_pricing_country] = object.ship_address.country.id end end
Version data entries
69 entries across 69 versions & 1 rubygems