spree/spree — pull request #5729 by adaddeo (2014-12-08 23:06:33+00:00)
Title: general case competing promo pseudo

We have a [BulkDiscount] (https://github.com/darbs/Spree-Bulk-Discount) gem that creates adjustments on line_items based on the quantities.

The BulkDiscount "competes" with the traditional promotions (they don't stack, the best one is chosen) and there is no way to hook into the current Spree::ItemAdjustments update_adjustments method cleanly. This approach would allow adjustments created by other sources to compete for the spot of best_promotion_adjustment by registering themselves in the Spree::Adjustments.competing_discount_source_types.

Ex:
```
Spree::Adjustments.competing_discount_source_types << "MyOtherDiscountClass"
```

Another use cases where other people may desire the functionality is price books (blanket pricing modifications for different groups of users, "employee", "vip", "regular").