Sha256: afb9ca5dbce082e89a9d1e57a1b822458b74df4d42ed2335621c23e351993453
Contents?: true
Size: 699 Bytes
Versions: 69
Compression:
Stored size: 699 Bytes
Contents
module Spree::ZonePricing::OrdersController def self.included(target) target.class_eval do alias_method :spree_create_before, :create_before unless method_defined?(:spree_create_before) alias_method :create_before, :site_create_before end end # The order object needs to know which country has been selected # by the user so that we can calculate the zone prices. This informations # may be stored in the session which we do not have access to in the model # so this method will get the currently selected country and provide it to # the Order model def site_create_before @order.country_id = get_user_country_id if @order spree_create_before end end
Version data entries
69 entries across 69 versions & 1 rubygems