core/app/models/spree/variant.rb
# Ensures a new variant takes the product master price when price is not supplied
Ensures a new variant takes the product master price when price is not supplied
Ensures a new variant takes the product master price when price is not supplied
def check_price
        if price.nil?
          raise 'Must supply price for variant or master.price for product.' if self == product.master
          self.price = product.master.price
        end
      end
def check_price if price . nil? raise 'Must supply price for variant or master.price for product.' if self == product . master self . price = product . master . price end end
Ensures a new variant takes the product master price when price is not supplied
Ensures a new variant takes the product master price when price is not supplied