shuup.campaigns.utils package¶
Submodules¶
shuup.campaigns.utils.campaigns module¶
shuup.campaigns.utils.matcher module¶
-
shuup.campaigns.utils.matcher.
get_matching_for_product
(shop_product, provide_category, skippable_classes=None)[source]¶ Get matching ids for shop product based on provide category
For example: matching_ids = get_matching_for_product(shop_product, “campaign_catalog_filter”)
Parameters: - shop_product (shuup.core.models.ShopProduct) – A Shop Product
- provide_category (str) – Provide category name
- skip (None or list) – Classes to skip
Returns: list of collected item ids
Return type: list[int]
-
class
shuup.campaigns.utils.matcher.
ProductCampaignMatcher
(shop_product, **kwargs)[source]¶ Bases:
object
A class to match shop product to existing campaigns
Parameters: shop_product (shuup.core.models.ShopProduct) – a Shop Product to find matches for