shop.modules.abstract

Attributes

Classes

ShopModuleAbstract

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

Module Contents

shop.modules.abstract.logger
class shop.modules.abstract.ShopModuleAbstract(moduleName=None, modulePath=None, shop=None, *args, **kwargs)

Bases: viur.core.Module

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)

reference_user_created_skeletons_in_session: bool = False

If True, keys of skeletons that the current user has created will be stored in the session.

adminInfo()
Return type:

dict

shop: viur.shop.Shop = None
register(target, render)

Overwritten to avoid loops. The modules have an shop root/parent reference, but this should not again be discovered by register().

Furthermore, this creates a new renderer instance just for this module (with the parent reference), which does usually the viur-core in core.__build_app(). Otherwise, every module would use the same shop renderer.

Parameters:
  • target (dict)

  • render (viur.core.render.abstract.AbstractRenderer)

Return type:

None

property session: dict

Return a own session scope for this module

Return type:

dict

onAdded(*args)
Return type:

None