mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Move product type definition to separate module
This commit is contained in:
@@ -22,12 +22,6 @@ class DfcBuilder
|
||||
variant.on_demand ? nil : variant.total_on_hand
|
||||
end
|
||||
|
||||
# OFN product categories (taxons) are currently not standardised.
|
||||
# This is just a dummy value for demos.
|
||||
def self.product_type
|
||||
DfcLoader.connector.PRODUCT_TYPES.VEGETABLE.NON_LOCAL_VEGETABLE
|
||||
end
|
||||
|
||||
def self.urls
|
||||
DfcProvider::Engine.routes.url_helpers
|
||||
end
|
||||
|
||||
@@ -18,6 +18,12 @@ class SuppliedProductBuilder < DfcBuilder
|
||||
)
|
||||
end
|
||||
|
||||
# OFN product categories (taxons) are currently not standardised.
|
||||
# This is just a dummy value for demos.
|
||||
def self.product_type
|
||||
DfcLoader.connector.PRODUCT_TYPES.VEGETABLE.NON_LOCAL_VEGETABLE
|
||||
end
|
||||
|
||||
def self.import_variant(supplied_product)
|
||||
product_id = supplied_product.spree_product_id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user