This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spree::OrderUpdater.class_eval do | |
module BetterPromotions | |
# DD: called by 'update_adjustment_total' before setting totals on order | |
def recalculate_adjustments | |
# DD: first, calculate all_adjustments for Order, LineItem, and Shipment using Spree::ItemAdjustments | |
super | |
# DD: FYI: promo_totals are negative |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Reportable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Chain on a scope and specify the fields to extract. | |
# Example: | |
# User.enabled.report %{ | |
# :email_opt_in, | |
# 'created_at as sign_up_date' | |
# } |