shoop.front.checkout package¶
Submodules¶
shoop.front.checkout.addresses module¶
-
class
shoop.front.checkout.addresses.
AddressForm
(**kwargs)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
model
¶ alias of
MutableAddress
-
fields
= ('name', 'phone', 'email', 'street', 'street2', 'postal_code', 'city', 'region', 'country')¶
-
-
AddressForm.
base_fields
= OrderedDict([('name', <django.forms.fields.CharField object at 0x7f5300f15e10>), ('phone', <django.forms.fields.CharField object at 0x7f52ff647eb8>), ('email', <django.forms.fields.EmailField object at 0x7f5300ecd5f8>), ('street', <django.forms.fields.CharField object at 0x7f5300ecb2b0>), ('street2', <django.forms.fields.CharField object at 0x7f52ff72e5c0>), ('postal_code', <django.forms.fields.CharField object at 0x7f52ff18a240>), ('city', <django.forms.fields.CharField object at 0x7f52ffbabba8>), ('region', <django.forms.fields.CharField object at 0x7f5300e815f8>), ('country', <django_countries.fields.LazyTypedChoiceField object at 0x7f52ff4787f0>)])¶
-
AddressForm.
declared_fields
= OrderedDict()¶
-
AddressForm.
media
¶
-
class
-
class
shoop.front.checkout.addresses.
CompanyForm
(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, instance=None)[source]¶ Bases:
shoop.front.checkout._mixins.TaxNumberCleanMixin
,django.forms.models.ModelForm
-
company_name_field
= 'name'¶
-
CompanyForm.
base_fields
= OrderedDict([('name', <django.forms.fields.CharField object at 0x7f52ff62fda0>), ('tax_number', <django.forms.fields.CharField object at 0x7f5300ef2828>)])¶
-
CompanyForm.
declared_fields
= OrderedDict()¶
-
CompanyForm.
media
¶
-
-
class
shoop.front.checkout.addresses.
AddressesPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.CheckoutPhaseViewMixin
,django.views.generic.edit.FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'addresses'¶
-
title
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
template_name
= 'shoop/front/checkout/addresses.jinja'¶
-
address_kinds
= ('shipping', 'billing')¶
-
address_form_class
¶ alias of
AddressForm
-
address_form_classes
= {}¶
-
company_form_class
¶ alias of
CompanyForm
-
get_form
(form_class=None)¶
-
shoop.front.checkout.confirm module¶
-
class
shoop.front.checkout.confirm.
ConfirmForm
(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)[source]¶ Bases:
django.forms.forms.Form
-
base_fields
= OrderedDict([('accept_terms', <django.forms.fields.BooleanField object at 0x7f5300ee01d0>), ('marketing', <django.forms.fields.BooleanField object at 0x7f5300ee08d0>), ('comment', <django.forms.fields.CharField object at 0x7f52ff0c1a20>)])¶
-
declared_fields
= OrderedDict([('accept_terms', <django.forms.fields.BooleanField object at 0x7f5300ee01d0>), ('marketing', <django.forms.fields.BooleanField object at 0x7f5300ee08d0>), ('comment', <django.forms.fields.CharField object at 0x7f52ff0c1a20>)])¶
-
media
¶
-
-
class
shoop.front.checkout.confirm.
ConfirmPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.CheckoutPhaseViewMixin
,django.views.generic.edit.FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'confirm'¶
-
title
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
template_name
= 'shoop/front/checkout/confirm.jinja'¶
-
form_class
¶ alias of
ConfirmForm
-
shoop.front.checkout.empty module¶
-
class
shoop.front.checkout.empty.
EmptyPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.CheckoutPhaseViewMixin
,django.views.generic.base.TemplateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'empty'¶
-
title
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
template_name
= 'shoop/front/checkout/empty.jinja'¶
-
shoop.front.checkout.methods module¶
-
class
shoop.front.checkout.methods.
MethodWidget
(attrs=None, choices=())[source]¶ Bases:
django.forms.widgets.Widget
-
media
¶
-
-
class
shoop.front.checkout.methods.
MethodChoiceIterator
(field)[source]¶ Bases:
django.forms.models.ModelChoiceIterator
-
class
shoop.front.checkout.methods.
MethodsForm
(*args, **kwargs)[source]¶ Bases:
django.forms.forms.Form
-
base_fields
= OrderedDict([('shipping_method', <django.forms.models.ModelChoiceField object at 0x7f530066bc50>), ('payment_method', <django.forms.models.ModelChoiceField object at 0x7f5300589a90>)])¶
-
declared_fields
= OrderedDict([('shipping_method', <django.forms.models.ModelChoiceField object at 0x7f530066bc50>), ('payment_method', <django.forms.models.ModelChoiceField object at 0x7f5300589a90>)])¶
-
media
¶
-
-
class
shoop.front.checkout.methods.
MethodsPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.CheckoutPhaseViewMixin
,django.views.generic.edit.FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'methods'¶
-
title
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
template_name
= 'shoop/front/checkout/methods.jinja'¶
-
form_class
¶ alias of
MethodsForm
-
-
class
shoop.front.checkout.methods.
ShippingMethodPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.methods._MethodDependentCheckoutPhase
,django.views.generic.base.View
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'shipping'¶
-
-
class
shoop.front.checkout.methods.
PaymentMethodPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.methods._MethodDependentCheckoutPhase
,django.views.generic.base.View
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'payment'¶
-
shoop.front.checkout.single_page module¶
-
class
shoop.front.checkout.single_page.
OrderForm
(*args, **kwargs)[source]¶ Bases:
shoop.front.checkout._mixins.TaxNumberCleanMixin
,django.forms.forms.Form
-
base_fields
= OrderedDict([('company_name', <django.forms.fields.CharField object at 0x7f53020d2198>), ('tax_number', <django.forms.fields.CharField object at 0x7f5301ff09b0>), ('shipping_method', <shoop.utils.fields.RelaxedModelChoiceField object at 0x7f5301eac630>), ('payment_method', <shoop.utils.fields.RelaxedModelChoiceField object at 0x7f53016166d8>), ('accept_terms', <django.forms.fields.BooleanField object at 0x7f5301dcbb38>), ('marketing', <django.forms.fields.BooleanField object at 0x7f5301816470>), ('comment', <django.forms.fields.CharField object at 0x7f53018166d8>)])¶
-
declared_fields
= OrderedDict([('company_name', <django.forms.fields.CharField object at 0x7f53020d2198>), ('tax_number', <django.forms.fields.CharField object at 0x7f5301ff09b0>), ('shipping_method', <shoop.utils.fields.RelaxedModelChoiceField object at 0x7f5301eac630>), ('payment_method', <shoop.utils.fields.RelaxedModelChoiceField object at 0x7f53016166d8>), ('accept_terms', <django.forms.fields.BooleanField object at 0x7f5301dcbb38>), ('marketing', <django.forms.fields.BooleanField object at 0x7f5301816470>), ('comment', <django.forms.fields.CharField object at 0x7f53018166d8>)])¶
-
media
¶
-
-
class
shoop.front.checkout.single_page.
SingleCheckoutPhase
(**kwargs)[source]¶ Bases:
shoop.front.checkout.CheckoutPhaseViewMixin
,django.views.generic.edit.FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
identifier
= 'checkout'¶
-
final
= True¶
-
template_name
= 'shoop/front/checkout/single_phase.jinja'¶
-
billing_address_form_class
¶ alias of
AddressForm
-
shipping_address_form_class
¶ alias of
AddressForm
-
get_form
(form_class=None)¶
-
Module contents¶
-
class
shoop.front.checkout.
BasicServiceCheckoutPhaseProvider
¶ Bases:
shoop.front.checkout.ServiceCheckoutPhaseProvider
Helper 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: shoop.front.checkout.CheckoutPhaseViewMixin|None
-
phase_class
= None¶
-
service_provider_class
= None¶
-
-
class
shoop.front.checkout.
CheckoutPhaseViewMixin
¶ Bases:
object
-
checkout_process
= None¶
-
final
= False¶
-
identifier
= None¶
-
next_phase
= None¶
-
phases
= ()¶
-
previous_phase
= None¶
-
request
= None¶
-
storage
¶
-
title
= None¶
-
-
class
shoop.front.checkout.
CheckoutProcess
(phase_specs, phase_kwargs)¶ Bases:
object
-
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_phase
as 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.
-
complete
()[source]¶ To be called from a phase (
self.checkout_process.complete()
) when the checkout process is complete.
-
phases
¶ Return type: Iterable[CheckoutPhaseViewMixin]
-