mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Remove extra unnecessary :display_on_checkout scope and reuse :frontend scope instead
This commit is contained in:
committed by
Filipe
parent
a5daee39e3
commit
94d71b8dce
@@ -16,7 +16,7 @@ module EnterprisesHelper
|
||||
def available_shipping_methods
|
||||
return [] if current_distributor.blank?
|
||||
|
||||
shipping_methods = current_distributor.shipping_methods.display_on_checkout.to_a
|
||||
shipping_methods = current_distributor.shipping_methods.frontend.to_a
|
||||
|
||||
applicator = OpenFoodNetwork::TagRuleApplicator.new(current_distributor,
|
||||
"FilterShippingMethods", current_customer&.tag_list)
|
||||
|
||||
@@ -55,9 +55,6 @@ module Spree
|
||||
}
|
||||
|
||||
scope :by_name, -> { order('spree_shipping_methods.name ASC') }
|
||||
scope :display_on_checkout, -> {
|
||||
where("spree_shipping_methods.display_on is null OR spree_shipping_methods.display_on = ''")
|
||||
}
|
||||
|
||||
# Here we allow checkout with shipping methods without zones (see issue #3928 for details)
|
||||
# and also checkout with addresses outside of the zones of the selected shipping method
|
||||
|
||||
Reference in New Issue
Block a user