shuup.campaigns.utils package

Submodules

shuup.campaigns.utils.campaigns module

shuup.campaigns.utils.campaigns.get_product_ids_and_quantities(basket)[source]

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:
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
matches(obj)[source]

Tries to match filters, conditions, effects etc to shop product

Returns:True or False based on the match
Return type:bool
product_type_matcher(field, obj)[source]
category_matcher(field, obj)[source]
product_matcher(field, obj)[source]

Module contents