shuup.front.checkout package¶
Submodules¶
shuup.front.checkout.addresses module¶
-
class
shuup.front.checkout.addresses.CompanyForm(**kwargs)[source]¶ Bases:
shuup.front.utils.companies.TaxNumberCleanMixin,django.forms.models.ModelForm-
base_fields= OrderedDict([('name', <django.forms.fields.CharField object>), ('tax_number', <django.forms.fields.CharField object>)])¶
-
declared_fields= OrderedDict()¶
-
media¶
-
-
class
shuup.front.checkout.addresses.SavedAddressForm(owner, kind, **kwargs)[source]¶ Bases:
django.forms.forms.Form-
kind_to_role_map= {'shipping': <SavedAddressRole.SHIPPING: 1>, 'billing': <SavedAddressRole.BILLING: 2>}¶
-
base_fields= OrderedDict([('addresses', <django.forms.fields.ChoiceField object>)])¶
-
declared_fields= OrderedDict([('addresses', <django.forms.fields.ChoiceField object>)])¶
-
media¶
-
-
class
shuup.front.checkout.addresses.AddressesPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.CheckoutPhaseViewMixin,django.views.generic.edit.FormViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'addresses'¶
-
title= 'Addresses'¶
-
template_name= 'shuup/front/checkout/addresses.jinja'¶
-
address_form_classes= {}¶
-
company_form_class¶ alias of
CompanyForm
-
saved_address_form_class¶ alias of
SavedAddressForm
-
address_kinds¶
shuup.front.checkout.checkout_method module¶
-
class
shuup.front.checkout.checkout_method.CheckoutMethodChoices[source]¶ Bases:
enumfields.enums.EnumAn enumeration.
-
CHECKOUT_AS_GUEST= 0¶
-
REGISTER= 1¶
-
-
class
shuup.front.checkout.checkout_method.ChooseToRegisterForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form-
base_fields= OrderedDict([('register', <django.forms.fields.ChoiceField object>)])¶
-
declared_fields= OrderedDict([('register', <django.forms.fields.ChoiceField object>)])¶
-
media¶
-
-
class
shuup.front.checkout.checkout_method.CheckoutMethodPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.CheckoutPhaseViewMixin,shuup.front.apps.auth.views.LoginViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'checkout_method'¶
-
title= 'Checkout Method Choice'¶
-
template_name= 'shuup/front/checkout/checkout_method.jinja'¶
-
login_form_key= 'login'¶
-
checkout_method_choice_key= 'checkout_method_choice'¶
-
class
shuup.front.checkout.checkout_method.RegisterPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.CheckoutPhaseViewMixin,shuup.front.apps.registration.views.RegistrationNoActivationViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'register'¶
-
title= 'Register'¶
-
template_name= 'shuup/front/checkout/register.jinja'¶
shuup.front.checkout.confirm module¶
-
class
shuup.front.checkout.confirm.ConfirmForm(*args, **kwargs)[source]¶ Bases:
django.forms.forms.Form-
base_fields= OrderedDict([('product_ids', <django.forms.fields.CharField object>), ('accept_terms', <django.forms.fields.BooleanField object>), ('marketing', <django.forms.fields.BooleanField object>), ('comment', <django.forms.fields.CharField object>)])¶
-
declared_fields= OrderedDict([('product_ids', <django.forms.fields.CharField object>), ('accept_terms', <django.forms.fields.BooleanField object>), ('marketing', <django.forms.fields.BooleanField object>), ('comment', <django.forms.fields.CharField object>)])¶
-
media¶
-
-
class
shuup.front.checkout.confirm.ConfirmPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.CheckoutPhaseViewMixin,django.views.generic.edit.FormViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'confirm'¶
-
title= 'Confirmation'¶
-
template_name= 'shuup/front/checkout/confirm.jinja'¶
-
form_class¶ alias of
ConfirmForm
shuup.front.checkout.empty module¶
-
class
shuup.front.checkout.empty.EmptyPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.CheckoutPhaseViewMixin,django.views.generic.base.TemplateViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'empty'¶
-
title= 'Empty Basket'¶
-
template_name= 'shuup/front/checkout/empty.jinja'¶
shuup.front.checkout.methods module¶
-
class
shuup.front.checkout.methods.MethodWidget(attrs=None, choices=())[source]¶ Bases:
django.forms.widgets.Widget-
media¶
-
-
class
shuup.front.checkout.methods.MethodChoiceIterator(field)[source]¶ Bases:
django.forms.models.ModelChoiceIterator
-
class
shuup.front.checkout.methods.MethodsForm(*args, **kwargs)[source]¶ Bases:
django.forms.forms.Form-
base_fields= OrderedDict()¶
-
declared_fields= OrderedDict()¶
-
media¶
-
-
class
shuup.front.checkout.methods.MethodsPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.CheckoutPhaseViewMixin,django.views.generic.edit.FormViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'methods'¶
-
title= 'Shipping & Payment'¶
-
template_name= 'shuup/front/checkout/methods.jinja'¶
-
form_class¶ alias of
MethodsForm
-
class
shuup.front.checkout.methods.ShippingMethodPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.methods._MethodDependentCheckoutPhase,django.views.generic.base.ViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'shipping'¶
-
class
shuup.front.checkout.methods.PaymentMethodPhase(checkout_process=None, horizontal_template=True, *args, **kwargs)[source]¶ Bases:
shuup.front.checkout.methods._MethodDependentCheckoutPhase,django.views.generic.base.ViewInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
identifier= 'payment'¶
Module contents¶
-
class
shuup.front.checkout.BasicServiceCheckoutPhaseProvider¶ Bases:
shuup.front.checkout.ServiceCheckoutPhaseProviderHelper for implementing basic ServiceCheckoutPhaseProvider.
This helper should be useful for most cases, where one only has to provide a checkout phase for certain service provider type just by initializing some predefined class.
-
get_checkout_phase(checkout_process, service)[source]¶ Get checkout phase for given service.
Return type: shuup.front.checkout.CheckoutPhaseViewMixin|None
-
phase_class= None¶
-
service_provider_class= None¶
-
-
class
shuup.front.checkout.CheckoutPhaseViewMixin(checkout_process=None, horizontal_template=True, *args, **kwargs)¶ Bases:
objectInitialize a checkout phase view.
Parameters: - checkout_process (shuup.front.checkout.CheckoutProcess|None) – The checkout process of this phase.
- horizontal_template (bool) – Set this to False if you want to use single page checkout.
-
basket¶ The basket used in this checkout phase.
Return type: shuup.front.basket.objects.BaseBasket
-
checkout_process¶ Get the checkout process of this phase.
Return type: shuup.front.checkout.CheckoutProcess
-
final= False¶
-
identifier= None¶
-
next_phase= None¶
-
phases= ()¶
-
previous_phase= None¶
-
request= None¶
-
classmethod
spawn_phases(checkout_process)[source]¶ Returns an iterator of new phases generated by this phase for the given checkout process
Parameters: checkout_process (shuup.front.checkout.CheckoutProcess) – The checkout process to check for new phases.
-
storage¶
-
title= None¶
-
class
shuup.front.checkout.CheckoutProcess(phase_specs, phase_kwargs, view=None)¶ Bases:
objectInitialize this checkout process.
-
add_phase_attributes(target_phase, current_phase=None)[source]¶ Add phase instance attributes (previous, next, etc) to the given target phase, using the optional
current_phaseas the current phase for previous and next.This is exposed as a public API for the benefit of phases that need to do sub-phase initialization and dispatching, such as method phases.
-
basket¶ The basket used in this checkout process.
Return type: shuup.front.basket.objects.BaseBasket
-
complete()[source]¶ To be called from a phase (
self.checkout_process.complete()) when the checkout process is complete.
-
horizontal_template= True¶
-
phases¶ Return type: Iterable[CheckoutPhaseViewMixin]
-
-
class
shuup.front.checkout.ServiceCheckoutPhaseProvider¶ Bases:
objectInterface for providing checkout phase for a service.
Items specified in
front_service_checkout_phase_providerprovide category should implement this interface.
-
class
shuup.front.checkout.VerticalCheckoutProcess(phase_specs, phase_kwargs, view=None)¶ Bases:
shuup.front.checkout.CheckoutProcessInitialize this checkout process.
-
horizontal_template= False¶
-