Wild Keeper Spotlight: Chelsea Allen - Keep Nature Wild

What are you looking for?

Wild Keeper Spotlight: Chelsea Allen

  • 2 min read

Wild Keeper Spotlight: Chelsea Allen

Meet Fourth Term Wild Keeper, Chelsea! She is based in Colorado and was born and raised there. When we asked her how she got into getting outside she shared,

"I grew up on the western slope of Colorado in a small mountain town. My family's vacations were going up to our cabin or camping. My second home has always been the mountains and with animals. When you love something, you care for it and want to see it flourish. That’s why I clean up the outdoors."

She also said that her most memorable experience outdoors so far would have to be "all of the family camping trips I got to take while growing up. My husband and I are about to have our own baby boy and I’m excited to carry on those family camping traditions with our little one." Chelsea's favorite way to get outside is by going with her husband and pup for a hike and picnic in the mountains. "We always pick up any trash we find along the way as well as pack out what we pack in," she says.

 

  

Learn more about Chelsea and how she keeps nature wild below! 

Keep Nature Wild: Which would you choose between mountains, forests or desert?

Chelsea: Mountains!

KNW: What are 3 things you would take with you if you were going to be stranded in the forest? 

C: My husband, a tent and some matches to start a campfire. 

KNW: Cabin, tent or hotel? (or something else!)

C: I’d rather a camper just big enough to sleep my family. 

KNW: What is your favorite thing about being a Wild Keeper?

C: I would be picking up trash either way, but my favorite part of being a wild keeper is having a community of like minded people doing the same. We all have a love for the outdoors and encourage one another.

KNW: What has picking up trash outdoors done for you? 

C: Picking up trash has made me realize that just one piece of trash off the ground is a positive impact. Also, knowing how many people are out there doing the same makes a HUGE impact on our planet. We are making big steps in the right direction when we work together to clean up our earth.

KNW: Roughly how many pounds do you think you've picked up since you became a Wild Keeper?

C: Since being a wild keeper for the past 4 terms, my husband and I together have picked up roughly 400-500 pounds of trash.

KNW: What goals do you have for this year? (or beyond?)

C: My goals for this year and beyond is to continue to pick up all the trash I come across. I also plan to encourage others around me to do the same. We all live here and share this planet. Let’s all do our part to keep our home clean!

class Campaign def initialize(condition, *qualifiers) @condition = (condition.to_s + '?').to_sym @qualifiers = PostCartAmountQualifier ? [] : [] rescue qualifiers.compact @line_item_selector = qualifiers.last unless @line_item_selector qualifiers.compact.each do |qualifier| is_multi_select = qualifier.instance_variable_get(:@conditions).is_a?(Array) if is_multi_select qualifier.instance_variable_get(:@conditions).each do |nested_q| @post_amount_qualifier = nested_q if nested_q.is_a?(PostCartAmountQualifier) @qualifiers << qualifier end else @post_amount_qualifier = qualifier if qualifier.is_a?(PostCartAmountQualifier) @qualifiers << qualifier end end if @qualifiers.empty? end def qualifies?(cart) return true if @qualifiers.empty? @unmodified_line_items = cart.line_items.map do |item| new_item = item.dup new_item.instance_variables.each do |var| val = item.instance_variable_get(var) new_item.instance_variable_set(var, val.dup) if val.respond_to?(:dup) end new_item end if @post_amount_qualifier @qualifiers.send(@condition) do |qualifier| is_selector = false if qualifier.is_a?(Selector) || qualifier.instance_variable_get(:@conditions).any? { |q| q.is_a?(Selector) } is_selector = true end rescue nil if is_selector raise "Missing line item match type" if @li_match_type.nil? cart.line_items.send(@li_match_type) { |item| qualifier.match?(item) } else qualifier.match?(cart, @line_item_selector) end end end def run_with_hooks(cart) before_run(cart) if respond_to?(:before_run) run(cart) after_run(cart) end def after_run(cart) @discount.apply_final_discount if @discount && @discount.respond_to?(:apply_final_discount) revert_changes(cart) unless @post_amount_qualifier.nil? || @post_amount_qualifier.match?(cart) end def revert_changes(cart) cart.instance_variable_set(:@line_items, @unmodified_line_items) end end class ConditionalDiscount < Campaign def initialize(condition, customer_qualifier, cart_qualifier, line_item_selector, discount, max_discounts) super(condition, customer_qualifier, cart_qualifier) @line_item_selector = line_item_selector @discount = discount @items_to_discount = max_discounts == 0 ? nil : max_discounts end def run(cart) raise "Campaign requires a discount" unless @discount return unless qualifies?(cart) applicable_items = cart.line_items.select { |item| @line_item_selector.nil? || @line_item_selector.match?(item) } applicable_items = applicable_items.sort_by { |item| item.variant.price } applicable_items.each do |item| break if @items_to_discount == 0 if (!@items_to_discount.nil? && item.quantity > @items_to_discount) discounted_items = item.split(take: @items_to_discount) @discount.apply(discounted_items) cart.line_items << discounted_items @items_to_discount = 0 else @discount.apply(item) @items_to_discount -= item.quantity if !@items_to_discount.nil? end end end end class Qualifier def partial_match(match_type, item_info, possible_matches) match_type = (match_type.to_s + '?').to_sym if item_info.kind_of?(Array) possible_matches.any? do |possibility| item_info.any? do |search| search.send(match_type, possibility) end end else possible_matches.any? do |possibility| item_info.send(match_type, possibility) end end end def compare_amounts(compare, comparison_type, compare_to) case comparison_type when :greater_than return compare > compare_to when :greater_than_or_equal return compare >= compare_to when :less_than return compare < compare_to when :less_than_or_equal return compare <= compare_to when :equal_to return compare == compare_to else raise "Invalid comparison type" end end end class CountryCodeQualifier < Qualifier def initialize(match_type, country_codes) @invert = match_type == :not_one @country_codes = country_codes.map(&:upcase) end def match?(cart, selector = nil) shipping_address = cart.shipping_address return false if shipping_address&.country_code.nil? @invert ^ @country_codes.include?(shipping_address.country_code.upcase) end end class CartAmountQualifier < Qualifier def initialize(behaviour, comparison_type, amount) @behaviour = behaviour @comparison_type = comparison_type @amount = Money.new(cents: amount * 100) end def match?(cart, selector = nil) total = cart.subtotal_price if @behaviour == :item || @behaviour == :diff_item total = cart.line_items.reduce(Money.zero) do |total, item| total + (selector&.match?(item) ? item.line_price : Money.zero) end end case @behaviour when :cart, :item compare_amounts(total, @comparison_type, @amount) when :diff_cart compare_amounts(cart.subtotal_price_was - @amount, @comparison_type, total) when :diff_item original_line_total = cart.line_items.reduce(Money.zero) do |total, item| total + (selector&.match?(item) ? item.original_line_price : Money.zero) end compare_amounts(original_line_total - @amount, @comparison_type, total) end end end class AndSelector def initialize(*conditions) @conditions = conditions.compact end def match?(item, selector = nil) @conditions.all? do |condition| if selector condition.match?(item, selector) else condition.match?(item) end end end end class Selector def partial_match(match_type, item_info, possible_matches) match_type = (match_type.to_s + '?').to_sym if item_info.kind_of?(Array) possible_matches.any? do |possibility| item_info.any? do |search| search.send(match_type, possibility) end end else possible_matches.any? do |possibility| item_info.send(match_type, possibility) end end end end class LineItemPropertiesSelector < Selector def initialize(target_properties) @target_properties = target_properties end def match?(line_item) line_item_props = line_item.properties @target_properties.all? do |key, value| next unless line_item_props.has_key?(key) true if line_item_props[key].downcase == value.downcase end end end class VariantIdSelector < Selector def initialize(match_type, variant_ids) @invert = match_type == :not_one @variant_ids = variant_ids.map { |id| id.to_i } end def match?(line_item) @invert ^ @variant_ids.include?(line_item.variant.id) end end class PercentageDiscount def initialize(percent, message) @discount = (100 - percent) / 100.0 @message = message end def apply(line_item) line_item.change_line_price(line_item.line_price * @discount, message: @message) end end CAMPAIGNS = [ ConditionalDiscount.new( :all, nil, AndSelector.new( CountryCodeQualifier.new( :is_one, ["US"] ), CartAmountQualifier.new( :cart, :greater_than_or_equal, 50 ), nil ), AndSelector.new( LineItemPropertiesSelector.new( {"_attribution" => "Rebuy Tiered Progress Bar"} ), VariantIdSelector.new( :is_one, ["37457563648191"] ), nil ), PercentageDiscount.new( 100, "Free Gift for spending 50 ".gsub("", Input.cart.presentment_currency) ), 1 ), ConditionalDiscount.new( :all, nil, AndSelector.new( CountryCodeQualifier.new( :not_one, ["US"] ), CartAmountQualifier.new( :cart, :greater_than_or_equal, 50 ), nil ), AndSelector.new( LineItemPropertiesSelector.new( {"_attribution" => "Rebuy Tiered Progress Bar"} ), VariantIdSelector.new( :is_one, ["37457563648191"] ), nil ), PercentageDiscount.new( 100, "Free Gift for spending 50 ".gsub("", Input.cart.presentment_currency) ), 1 ) ].freeze CAMPAIGNS.each do |campaign| campaign.run_with_hooks(Input.cart) end Output.cart = Input.cart