mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Find current_customer via current_distributor and current_user rather than current_order
Moving available_payment_methods to enterprises_helper, as per available_shipping_methods
This commit is contained in:
@@ -21,8 +21,7 @@ class BaseController < ApplicationController
|
||||
@order_cycles = OrderCycle.with_distributor(@distributor).active
|
||||
.order(@distributor.preferred_shopfront_order_cycle_order)
|
||||
|
||||
customer_tags = current_order.andand.customer.andand.tag_list
|
||||
applicator = OpenFoodNetwork::TagRuleApplicator.new(@distributor, "FilterOrderCycles", customer_tags)
|
||||
applicator = OpenFoodNetwork::TagRuleApplicator.new(@distributor, "FilterOrderCycles", current_customer.andand.tag_list)
|
||||
applicator.filter!(@order_cycles)
|
||||
|
||||
# And default to the only order cycle if there's only the one
|
||||
|
||||
Reference in New Issue
Block a user