shuup.front.basket package

Submodules

shuup.front.basket.command_dispatcher module

shuup.front.basket.commands module

shuup.front.basket.objects module

class shuup.front.basket.objects.BaseBasket(request, basket_name='basket', shop=None, **kwargs)[source]

Bases: BaseBasket

__init__(request, basket_name='basket', shop=None, **kwargs)[source]
get_methods_validation_errors()[source]

shuup.front.basket.order_creator module

shuup.front.basket.storage module

class shuup.front.basket.storage.DirectSessionBasketStorage[source]

Bases: BasketStorage

__init__()[source]
save(basket, data)[source]

Save the given data dictionary into the storage for the given basket.

Rtype str:

Returns:

The unique identifier of the basket just created

delete(basket)[source]

Delete the basket from storage.

class shuup.front.basket.storage.DictStoredBasket(id, shop_id, currency, prices_include_tax, data)[source]

Bases: object

__init__(id, shop_id, currency, prices_include_tax, data)[source]
classmethod from_basket_and_data(basket, data)[source]
classmethod from_dict(mapping)[source]
as_dict()[source]
class shuup.front.basket.storage.DatabaseBasketStorage[source]

Bases: BaseDatabaseBasketStorage

model

alias of StoredBasket

get_basket_kwargs(basket)[source]
save(basket, data)[source]
delete(basket)[source]

Delete the basket from storage.

finalize(basket)[source]

Mark the basket as “finalized” (i.e. completed) in the storage.

The actual semantics of what finalization does are up to each backend.

basket_exists(key, shop)[source]

Check if basket exists in the storage.

For example this is used from API to check whether the basket actually exists for certain shop when accessed with key.

add_log_entry(basket, message, extra=None, kind=LogEntryKind.NOTE)[source]
get_log_entries(basket)[source]

shuup.front.basket.update_methods module

class shuup.front.basket.update_methods.BasketUpdateMethods(request, basket)[source]

Bases: BasketUpdateMethods

Initialize.

Module contents