Sha256: 37c8128d65cd5227f5ede0e4d2628305800b600f86e716399a37025b5dca7e96

Contents?: true

Size: 658 Bytes

Versions: 5

Compression:

Stored size: 658 Bytes

Contents

# frozen_string_literal: true

module SolidusPromotions
  module Conditions
    # A condition to apply to an order greater than (or greater than or equal to)
    # a specific amount after previous promotions have applied
    #
    # To add extra operators please override `self.operators_map` or any other helper method.
    # To customize the error message you can also override `ineligible_message`.
    class DiscountedItemTotal < ItemTotal
      def to_partial_path
        "solidus_promotions/admin/condition_fields/item_total"
      end

      private

      def total_for_order(order)
        order.discountable_item_total
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_promotions-4.5.1 app/models/solidus_promotions/conditions/discounted_item_total.rb
solidus_promotions-4.5.0 app/models/solidus_promotions/conditions/discounted_item_total.rb
solidus_promotions-4.4.2 app/models/solidus_promotions/conditions/discounted_item_total.rb
solidus_promotions-4.4.1 app/models/solidus_promotions/conditions/discounted_item_total.rb
solidus_promotions-4.4.0 app/models/solidus_promotions/conditions/discounted_item_total.rb