shop.modules.shipping_config

Attributes

Classes

ShippingConfig

Abstract Class for all viur-shop sub/nested modules.

Module Contents

shop.modules.shipping_config.logger
class shop.modules.shipping_config.ShippingConfig(moduleName=None, modulePath=None, shop=None, *args, **kwargs)

Bases: shop.modules.abstract.ShopModuleAbstract, viur.core.prototypes.List

Abstract Class for all viur-shop sub/nested modules.

The implementations should set moduleName as class variable, so the final module name for routing it not affected by the name of custom classes.

Parameters:
  • moduleName (str)

  • modulePath (str)

  • shop (viur.shop.Shop)

moduleName = 'shipping_config'
kindName = '{{viur_shop_modulename}}_shipping_config'
adminInfo()
Return type:

dict

is_applicable(dest, rel, *, article_skel=None, cart_skel=None, country=None)

Check if a shipping configuration is applicable in the current context.

Provide eiter article_skel for single article context xor cart_skel for cart context.

Parameters:
  • country (str | None) – If provided, check if the shipping configuration is applicable for this country.

  • dest (viur.core.skeleton.RefSkel)

  • rel (viur.core.skeleton.RelSkel)

  • article_skel (viur.shop.types.SkeletonInstance_T[viur.shop.skeletons.ArticleAbstractSkel] | None)

  • cart_skel (viur.shop.types.SkeletonInstance_T[viur.shop.skeletons.CartNodeSkel] | None)

Return type:

tuple[bool, str]