From d4f997c34552621a681d021ce486fee69d45deb3 Mon Sep 17 00:00:00 2001 From: Mira Weller Date: Wed, 2 Oct 2024 09:29:05 +0200 Subject: [PATCH] describe new category options in docs --- doc/api/resources/categories.rst | 40 ++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/doc/api/resources/categories.rst b/doc/api/resources/categories.rst index ec8613d87..950e7f5de 100644 --- a/doc/api/resources/categories.rst +++ b/doc/api/resources/categories.rst @@ -23,6 +23,21 @@ position integer An integer, use is_addon boolean If ``true``, items within this category are not on sale on their own but the category provides a source for defining add-ons for other products. +cross_selling_mode string If ``null``, cross-selling is disabled for this category. + If ``"only"``, it is only visible in the cross-selling + step. + If ``"both"``, it is visible on the normal index page + as well. +cross_selling_condition string Only relevant if ``cross_selling_mode`` is not ``null``. + If ``"always"``, Always show in cross-selling step. + If ``"products"``, Only if the cart contains one of + these products. + If ``"discounts"``, Only show products affected by + discount rules. +cross_selling_match_products list of integer Only relevant if ``cross_selling_condition`` is + ``"products"``. Internal ID of the items of which at + least one needs to be in the cart for this category to + be shown. ===================================== ========================== ======================================================= @@ -60,7 +75,10 @@ Endpoints "internal_name": "", "description": {"en": "Tickets are what you need to get in."}, "position": 1, - "is_addon": false + "is_addon": false, + "cross_selling_mode": null, + "cross_selling_condition": null, + "cross_selling_match_products": [] } ] } @@ -102,7 +120,10 @@ Endpoints "internal_name": "", "description": {"en": "Tickets are what you need to get in."}, "position": 1, - "is_addon": false + "is_addon": false, + "cross_selling_mode": null, + "cross_selling_condition": null, + "cross_selling_match_products": [] } :param organizer: The ``slug`` field of the organizer to fetch @@ -130,7 +151,10 @@ Endpoints "internal_name": "", "description": {"en": "Tickets are what you need to get in."}, "position": 1, - "is_addon": false + "is_addon": false, + "cross_selling_mode": null, + "cross_selling_condition": null, + "cross_selling_match_products": [] } **Example response**: @@ -147,7 +171,10 @@ Endpoints "internal_name": "", "description": {"en": "Tickets are what you need to get in."}, "position": 1, - "is_addon": false + "is_addon": false, + "cross_selling_mode": null, + "cross_selling_condition": null, + "cross_selling_match_products": [] } :param organizer: The ``slug`` field of the organizer of the event to create a category for @@ -193,7 +220,10 @@ Endpoints "internal_name": "", "description": {"en": "Tickets are what you need to get in."}, "position": 1, - "is_addon": true + "is_addon": true, + "cross_selling_mode": null, + "cross_selling_condition": null, + "cross_selling_match_products": [] } :param organizer: The ``slug`` field of the organizer to modify