Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Allow to export visible_in_listings products data

IKarbowiakc1f0b0495a6e
diff --git a/saleor/csv/tests/export/products_data/test_get_products_data.py b/saleor/csv/tests/export/products_data/test_get_products_data.py
index 2360ff609e..abbfa08337 100644
--- a/saleor/csv/tests/export/products_data/test_get_products_data.py
+++ b/saleor/csv/tests/export/products_data/test_get_products_data.py
@@ -57,6 +57,7 @@ def test_get_products_data(product, product_with_image, collection, image):
"name": product.name,
"is_published": product.is_published,
"available_for_purchase": product.available_for_purchase,
+ "visible_in_listings": product.visible_in_listings,
"description": product.description,
"category__slug": product.category.slug,
"product_type__name": product.product_type.name,
diff --git a/saleor/csv/utils/products_data.py b/saleor/csv/utils/products_data.py
index a3d8239607..1848add098 100644
--- a/saleor/csv/utils/products_data.py
+++ b/saleor/csv/utils/products_data.py
@@ -25,6 +25,7 @@ class ProductExportFields:
"description": "description",
"visible": "is_published",
"available for purchase": "available_for_purchase",
+ "searchable": "visible_in_listings",
"category": "category__slug",
"product type": "product_type__name",
"charge taxes": "charge_taxes",
diff --git a/saleor/graphql/csv/enums.py b/saleor/graphql/csv/enums.py
index 009eaf45f9..02c9c7ead3 100644
--- a/saleor/graphql/csv/enums.py
+++ b/saleor/graphql/csv/enums.py
@@ -32,6 +32,7 @@ class ProductFieldEnum(graphene.Enum):
CATEGORY = "category"
VISIBLE = "visible"
AVAILABLE_FOR_PURCHASE = "available for purchase"
+ SEARCHABLE = "searchable"
PRODUCT_WEIGHT = "product weight"
COLLECTIONS = "collections"
CHARGE_TAXES = "charge taxes"
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 12c55e1aad..d11ebeadad 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -3764,6 +3764,7 @@ enum ProductFieldEnum {
CATEGORY
VISIBLE
AVAILABLE_FOR_PURCHASE
+ SEARCHABLE
PRODUCT_WEIGHT
COLLECTIONS
CHARGE_TAXES