Update shipping_category usage in admin pages

This commit is contained in:
Matt-Yorkley
2023-07-15 15:52:22 +01:00
parent 0c634cf04f
commit eefc356472
4 changed files with 7 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ module Spree
end
def new
@object.shipping_category = DefaultShippingCategory.find_or_create
@object.shipping_category_id = DefaultShippingCategory.find_or_create.id
end
def edit

View File

@@ -19,6 +19,7 @@ module Spree
def edit
@url_filters = ::ProductFilters.new.extract(request.query_parameters)
@object.shipping_category = DefaultShippingCategory.find_or_create
end
def create
@@ -114,6 +115,7 @@ module Spree
def load_data
@tax_categories = TaxCategory.order(:name)
@shipping_categories = ShippingCategory.order(:name)
end
end
end