core/app/models/spree/variant.rb
def parse_price(price)
        return price unless price.is_a?(String)

        separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
        non_price_characters = /[^0-9\-#{separator}]/
        price.gsub!(non_price_characters, '') # strip everything else first
        price.gsub!(separator, '.') unless separator == '.' # then replace the locale-specific decimal separator with the standard separator if necessary

        price.to_d
      end
# strips all non-price-like characters from the price, taking into account locale settings
strips all non-price-like characters from the price, taking into account locale settings
strips all non - price - like characters from the price taking into account locale settings
def parse_price(price)
        return price unless price.is_a?(String)
        separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
        non_price_characters = /[^0-9\-#{separator}]/
        price.gsub!(non_price_characters, '') 
        price.gsub!(separator, '.') unless separator == '.' 
        price.to_d
      end
def parse_price ( price ) return price unless price . is_a? ( String ) separator , delimiter = I18n . t ( [ :' number.currency.format.separator ' , :' number.currency.format.delimiter ' ] ) non_price_characters = / [^0-9 \- #{ separator } ] / price . gsub! ( non_price_characters , '' ) price . gsub! ( separator , '.' ) unless separator == '.' price . to_d end
strips all non-price-like characters from the price, taking into account locale settings
strips all non - price - like characters from the price taking into account locale settings
# strip everything else first # then replace the locale-specific decimal separator with the standard separator if necessary
price