It is logical (to me) that for many user-based promotion rules, we need the
order to know about who the current user is to be able to determine
promotion eligibility when adding items to the cart. Without setting the
order's user before firing spree.order.contents_changed<https://github.com/spree/spree/blob/master/frontend/app/controllers/spree/orders_controller.rb#L48>,
user-based promotion rules yield unexpected results.
If there is some resistance to modifying the controller, perhaps it would
be best to allow Promotion#eligible?<https://github.com/spree/spree/blob/master/core/app/models/spree/promotion.rb#L60>to pass in spree_current_user by using the
This seems to be how some of the built in promotion rules were designed, ready
to accept options<https://github.com/spree/spree/blob/master/core/app/models/spree/promotion/rules/first_order.rb#L6>,
but they never get passed!
(Cross post from https://github.com/spree/spree/issues/2583)
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.