Sha256: 3323a8c4c433dda4ac28231aef78c188ce257d0bf5d84f1a17ccae631d6a420e
Contents?: true
Size: 1.15 KB
Versions: 28
Compression:
Stored size: 1.15 KB
Contents
module Workarea module Admin module Discounts class ProductViewModel < DiscountViewModel include Products def condition_options [ [ t('workarea.admin.pricing_discounts.options.for_everyone'), nil ], [ t('workarea.admin.pricing_discounts.options.when_order_total'), 'order_total' ], [ t('workarea.admin.pricing_discounts.options.when_item_quantity'), 'item_quantity' ], [ t('workarea.admin.pricing_discounts.options.when_user_is_tagged'), 'user_tag' ], [ t('workarea.admin.pricing_discounts.options.when_in_segment'), 'segments' ] ] end def selected_condition_option if order_total? 'order_total' elsif item_quantity? 'item_quantity' elsif user_tag? 'user_tag' elsif active_segment_ids.present? 'segments' end end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems