Add new 'Checkout options' step to the edit order cycle form so people can attach shipping methods

This commit is contained in:
Cillian O'Ruanaidh
2022-06-08 21:15:38 +01:00
committed by Filipe
parent 1e817af5aa
commit 855ec1a708
16 changed files with 499 additions and 8 deletions

View File

@@ -0,0 +1,17 @@
# frozen_string_literal: true
module Admin
module OrderCyclesHelper
def order_cycle_shared_payment_methods(order_cycle)
order_cycle.attachable_payment_methods.select do |payment_method|
(payment_method.distributor_ids & order_cycle.distributor_ids).many?
end
end
def order_cycle_shared_shipping_methods(order_cycle)
order_cycle.attachable_shipping_methods.select do |shipping_method|
(shipping_method.distributor_ids & order_cycle.distributor_ids).many?
end
end
end
end