Move product type definition to separate module

This commit is contained in:
Maikel Linke
2024-01-12 14:41:17 +11:00
parent 583ac65920
commit aa5c6f34f2
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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