shop.shop¶
Classes¶
A ViUR module providing core shop functionality such as cart handling, |
Module Contents¶
- class shop.shop.Shop(*, name, article_skel, payment_providers, suppliers, admin_info_module_group='viur-shop', address_cls=Address, api_cls=Api, cart_cls=Cart, discount_cls=Discount, discount_condition_cls=DiscountCondition, order_cls=Order, shipping_cls=Shipping, shipping_config_cls=ShippingConfig, vat_rate_cls=VatRate, **kwargs)¶
Bases:
viur.core.prototypes.instanced_module.InstancedModule,viur.core.module.ModuleA ViUR module providing core shop functionality such as cart handling, order processing, and integration with shipping and payment providers.
This class serves as the central module for the viur-shop extension, offering routing and logic for managing shopping carts, creating and finalizing orders, and communicating with pluggable payment and shipping systems.
Currently, only one instance of this module is supported per project.
Note
This module assumes integration with the ViUR framework and is not intended to be used standalone.
- Parameters:
name (str)
article_skel (Type[viur.shop.skeletons.article.ArticleAbstractSkel])
payment_providers (list[shop.payment_providers.PaymentProviderAbstract])
suppliers (list[shop.types.Supplier])
admin_info_module_group (str | None)
address_cls (Type[shop.modules.Address])
api_cls (Type[shop.modules.Api])
cart_cls (Type[shop.modules.Cart])
discount_cls (Type[shop.modules.Discount])
discount_condition_cls (Type[shop.modules.DiscountCondition])
order_cls (Type[shop.modules.Order])
shipping_cls (Type[shop.modules.Shipping])
shipping_config_cls (Type[shop.modules.ShippingConfig])
vat_rate_cls (Type[shop.modules.VatRate])
kwargs (Any)
- hooks¶
- name: str¶
- article_skel: Type[viur.shop.skeletons.article.ArticleAbstractSkel]¶
- payment_providers: list[shop.payment_providers.PaymentProviderAbstract]¶
- suppliers: list[shop.types.Supplier]¶
- admin_info_module_group: str | None = 'viur-shop'¶
- address_cls¶
- api_cls¶
- cart_cls¶
- discount_cls¶
- discount_condition_cls¶
- order_cls¶
- shipping_cls¶
- shipping_config_cls¶
- vat_rate_cls¶
- additional_settings: dict[str, Any]¶
- __call__(*args, **kwargs)¶
- Return type:
Self
- register(target, render)¶
Overwritten to avoid loops. The modules have an shop root/parent reference, but this should not again be discovered by
register().- Parameters:
target (dict)
render (viur.core.render.abstract.AbstractRenderer)
- Return type:
None
- _set_kind_names()¶
Set kindname of bones where the kind name can be dynamically
At this point we are and must be before setSystemInitialized.
- Return type:
None
- _extend_user_skeleton()¶
Extend the UserSkel of the project
At this point we are and must be before setSystemInitialized.
- Return type:
None
- _extend_ref_keys()¶
Extend the refKeys of the implemented ArticleAbstractSkel
At this point we are and must be before setSystemInitialized.
- Return type:
None
- _add_translations()¶
Setup translations required for the viur-shop
- Return type:
None
- __repr__()¶
- Return type:
str