shoop.campaigns.models package¶
Submodules¶
shoop.campaigns.models.basket_conditions module¶
-
class
shoop.campaigns.models.basket_conditions.
BasketCondition
(id, polymorphic_ctype, active)[source]¶ Bases:
polymorphic.models.PolymorphicModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
= None¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
exception
DoesNotExist
¶
-
exception
BasketCondition.
MultipleObjectsReturned
¶
-
BasketCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketCondition.
basketmaxtotalamountcondition
¶
-
BasketCondition.
basketmaxtotalproductamountcondition
¶
-
BasketCondition.
baskettotalamountcondition
¶
-
BasketCondition.
baskettotalproductamountcondition
¶
-
BasketCondition.
campaign
¶
-
BasketCondition.
contactbasketcondition
¶
-
BasketCondition.
contactgroupbasketcondition
¶
-
BasketCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketCondition.
polymorphic_ctype
¶
-
BasketCondition.
polymorphic_primary_key_name
= 'id'¶
-
BasketCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
BasketCondition.
productsinbasketcondition
¶
-
-
class
shoop.campaigns.models.basket_conditions.
BasketTotalProductAmountCondition
(id, polymorphic_ctype, active, basketcondition_ptr, product_count)[source]¶ Bases:
shoop.campaigns.models.basket_conditions.BasketCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'basket_product_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
description
¶
-
value
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
BasketTotalProductAmountCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
BasketTotalProductAmountCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketTotalProductAmountCondition.
basketcondition_ptr
¶
-
BasketTotalProductAmountCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketTotalProductAmountCondition.
polymorphic_primary_key_name
= 'id'¶
-
BasketTotalProductAmountCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_conditions.
BasketTotalAmountCondition
(id, polymorphic_ctype, active, basketcondition_ptr, amount_value)[source]¶ Bases:
shoop.utils.properties.MoneyPropped
,shoop.campaigns.models.basket_conditions.BasketCondition
-
identifier
= 'basket_amount_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
amount
¶ Property for Price object.
Similar to
MoneyProperty
but also hasincludes_tax
field.Operaters with
TaxfulPrice
andTaxlessPrice
objects.
-
description
¶
-
value
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
BasketTotalAmountCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
BasketTotalAmountCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketTotalAmountCondition.
basketcondition_ptr
¶
-
BasketTotalAmountCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketTotalAmountCondition.
polymorphic_primary_key_name
= 'id'¶
-
BasketTotalAmountCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_conditions.
BasketMaxTotalProductAmountCondition
(id, polymorphic_ctype, active, basketcondition_ptr, product_count)[source]¶ Bases:
shoop.campaigns.models.basket_conditions.BasketCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'basket_max_product_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
description
¶
-
value
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
BasketMaxTotalProductAmountCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
BasketMaxTotalProductAmountCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketMaxTotalProductAmountCondition.
basketcondition_ptr
¶
-
BasketMaxTotalProductAmountCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketMaxTotalProductAmountCondition.
polymorphic_primary_key_name
= 'id'¶
-
BasketMaxTotalProductAmountCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_conditions.
BasketMaxTotalAmountCondition
(id, polymorphic_ctype, active, basketcondition_ptr, amount_value)[source]¶ Bases:
shoop.utils.properties.MoneyPropped
,shoop.campaigns.models.basket_conditions.BasketCondition
-
identifier
= 'basket_max_amount_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
amount
¶ Property for Price object.
Similar to
MoneyProperty
but also hasincludes_tax
field.Operaters with
TaxfulPrice
andTaxlessPrice
objects.
-
description
¶
-
value
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
BasketMaxTotalAmountCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
BasketMaxTotalAmountCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketMaxTotalAmountCondition.
basketcondition_ptr
¶
-
BasketMaxTotalAmountCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketMaxTotalAmountCondition.
polymorphic_primary_key_name
= 'id'¶
-
BasketMaxTotalAmountCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_conditions.
ProductsInBasketCondition
(id, polymorphic_ctype, active, basketcondition_ptr, quantity)[source]¶ Bases:
shoop.campaigns.models.basket_conditions.BasketCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'basket_products_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
model
¶ alias of
Product
-
products
¶
-
description
¶
-
values
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
ProductsInBasketCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
ProductsInBasketCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductsInBasketCondition.
basketcondition_ptr
¶
-
ProductsInBasketCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductsInBasketCondition.
polymorphic_primary_key_name
= 'id'¶
-
ProductsInBasketCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_conditions.
ContactGroupBasketCondition
(id, polymorphic_ctype, active, basketcondition_ptr)[source]¶ Bases:
shoop.campaigns.models.basket_conditions.BasketCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
ContactGroup
-
identifier
= 'basket_contact_group_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
contact_groups
¶
-
description
¶
-
values
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
ContactGroupBasketCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
ContactGroupBasketCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ContactGroupBasketCondition.
basketcondition_ptr
¶
-
ContactGroupBasketCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ContactGroupBasketCondition.
polymorphic_primary_key_name
= 'id'¶
-
ContactGroupBasketCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_conditions.
ContactBasketCondition
(id, polymorphic_ctype, active, basketcondition_ptr)[source]¶ Bases:
shoop.campaigns.models.basket_conditions.BasketCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
Contact
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_conditions.DoesNotExist
-
exception
ContactBasketCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_conditions.MultipleObjectsReturned
-
ContactBasketCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ContactBasketCondition.
basketcondition_ptr
¶
-
ContactBasketCondition.
identifier
= 'basket_contact_condition'¶
-
ContactBasketCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ContactBasketCondition.
polymorphic_primary_key_name
= 'id'¶
-
ContactBasketCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
ContactBasketCondition.
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
ContactBasketCondition.
contacts
¶
-
ContactBasketCondition.
description
¶
-
ContactBasketCondition.
values
¶
-
shoop.campaigns.models.basket_effects module¶
-
class
shoop.campaigns.models.basket_effects.
BasketDiscountEffect
(id, polymorphic_ctype, campaign)[source]¶ Bases:
shoop.core.models.PolymorphicShoopModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= None¶
-
model
= None¶
-
admin_form_class
= None¶
-
campaign
¶
-
apply_for_basket
(order_source)[source]¶ Applies the effect based on given
order_source
Returns: amount of discount to accumulate for the product Return type: Price
-
exception
DoesNotExist
¶
-
exception
BasketDiscountEffect.
MultipleObjectsReturned
¶
-
BasketDiscountEffect.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketDiscountEffect.
basketdiscountamount
¶
-
BasketDiscountEffect.
basketdiscountpercentage
¶
-
BasketDiscountEffect.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketDiscountEffect.
polymorphic_ctype
¶
-
BasketDiscountEffect.
polymorphic_primary_key_name
= 'id'¶
-
BasketDiscountEffect.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_effects.
BasketDiscountAmount
(id, polymorphic_ctype, campaign, basketdiscounteffect_ptr, discount_amount)[source]¶ Bases:
shoop.campaigns.models.basket_effects.BasketDiscountEffect
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'discount_amount_effect'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
description
¶
-
value
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_effects.DoesNotExist
-
exception
BasketDiscountAmount.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_effects.MultipleObjectsReturned
-
BasketDiscountAmount.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketDiscountAmount.
basketdiscounteffect_ptr
¶
-
BasketDiscountAmount.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketDiscountAmount.
polymorphic_primary_key_name
= 'id'¶
-
BasketDiscountAmount.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_effects.
BasketDiscountPercentage
(id, polymorphic_ctype, campaign, basketdiscounteffect_ptr, discount_percentage)[source]¶ Bases:
shoop.campaigns.models.basket_effects.BasketDiscountEffect
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'discount_percentage_effect'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
admin_form_class
¶ alias of
PercentageField
-
description
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_effects.DoesNotExist
-
exception
BasketDiscountPercentage.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_effects.MultipleObjectsReturned
-
BasketDiscountPercentage.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketDiscountPercentage.
basketdiscounteffect_ptr
¶
-
BasketDiscountPercentage.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketDiscountPercentage.
polymorphic_primary_key_name
= 'id'¶
-
BasketDiscountPercentage.
polymorphic_super_sub_accessors_replaced
= False¶
-
BasketDiscountPercentage.
value
¶
-
shoop.campaigns.models.basket_line_effects module¶
-
class
shoop.campaigns.models.basket_line_effects.
BasketLineEffect
(id, polymorphic_ctype, campaign)[source]¶ Bases:
shoop.core.models.PolymorphicShoopModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= None¶
-
model
= None¶
-
admin_form_class
= None¶
-
campaign
¶
-
get_discount_lines
(order_source, original_lines)[source]¶ Applies the effect based on given
order_source
Returns: amount of discount to accumulate for the product Return type: Iterable[shoop.core.order_creator.SourceLine]
-
exception
DoesNotExist
¶
-
exception
BasketLineEffect.
MultipleObjectsReturned
¶
-
BasketLineEffect.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketLineEffect.
discountfromproduct
¶
-
BasketLineEffect.
freeproductline
¶
-
BasketLineEffect.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketLineEffect.
polymorphic_ctype
¶
-
BasketLineEffect.
polymorphic_primary_key_name
= 'id'¶
-
BasketLineEffect.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_line_effects.
FreeProductLine
(id, polymorphic_ctype, campaign, basketlineeffect_ptr, quantity)[source]¶ Bases:
shoop.campaigns.models.basket_line_effects.BasketLineEffect
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'free_product_line_effect'¶
-
model
¶ alias of
Product
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
products
¶
-
description
¶
-
values
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_line_effects.DoesNotExist
-
exception
FreeProductLine.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_line_effects.MultipleObjectsReturned
-
FreeProductLine.
base_objects
= <django.db.models.manager.Manager object>¶
-
FreeProductLine.
basketlineeffect_ptr
¶
-
FreeProductLine.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
FreeProductLine.
polymorphic_primary_key_name
= 'id'¶
-
FreeProductLine.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.basket_line_effects.
DiscountFromProduct
(id, polymorphic_ctype, campaign, basketlineeffect_ptr, per_line_discount, discount_amount)[source]¶ Bases:
shoop.campaigns.models.basket_line_effects.BasketLineEffect
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'discount_from_product_line_effect'¶
-
model
¶ alias of
Product
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
products
¶
-
description
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.basket_line_effects.DoesNotExist
-
exception
DiscountFromProduct.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.basket_line_effects.MultipleObjectsReturned
-
DiscountFromProduct.
base_objects
= <django.db.models.manager.Manager object>¶
-
DiscountFromProduct.
basketlineeffect_ptr
¶
-
DiscountFromProduct.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
DiscountFromProduct.
polymorphic_primary_key_name
= 'id'¶
-
DiscountFromProduct.
polymorphic_super_sub_accessors_replaced
= False¶
-
shoop.campaigns.models.campaigns module¶
-
class
shoop.campaigns.models.campaigns.
CampaignType
[source]¶ Bases:
enumfields.enums.Enum
An enumeration.
-
CATALOG
= <CampaignType.CATALOG: 1>¶
-
BASKET
= <CampaignType.BASKET: 2>¶
-
-
class
shoop.campaigns.models.campaigns.
Campaign
(*args, **kwargs)[source]¶ Bases:
shoop.utils.properties.MoneyPropped
,parler.models.TranslatableModel
-
admin_url_suffix
= None¶
-
shop
¶
-
created_by
¶
-
modified_by
¶
-
class
Meta
[source]¶ Bases:
object
-
abstract
= False¶
-
verbose_name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
verbose_name_plural
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
-
Campaign.
type
¶
-
Campaign.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
Campaign.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
Campaign.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
Campaign.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
Campaign.
objects
¶
-
-
class
shoop.campaigns.models.campaigns.
CatalogCampaign
(id, shop, name, identifier, active, start_datetime, end_datetime, created_by, modified_by, created_on, modified_on)[source]¶ Bases:
shoop.campaigns.models.campaigns.Campaign
-
admin_url_suffix
= 'catalog_campaigns'¶
-
conditions
¶
-
filters
¶
-
translations
¶
-
exception
DoesNotExist
¶
-
exception
CatalogCampaign.
MultipleObjectsReturned
¶
-
CatalogCampaign.
created_by
¶
-
CatalogCampaign.
effects
¶
-
CatalogCampaign.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
modified_by
¶
-
CatalogCampaign.
objects
= <parler.managers.TranslatableManager object>¶
-
CatalogCampaign.
public_name
¶ Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
-
CatalogCampaign.
shop
¶
-
-
class
shoop.campaigns.models.campaigns.
BasketCampaign
(id, shop, name, identifier, active, start_datetime, end_datetime, created_by, modified_by, created_on, modified_on, basket_line_text, coupon)[source]¶ Bases:
shoop.campaigns.models.campaigns.Campaign
-
admin_url_suffix
= 'basket_campaigns'¶
-
conditions
¶
-
coupon
¶
-
translations
¶
-
rules_match
(basket, lines)[source]¶ Check if basket rules match.
They will not match if 1) The campaign is not active 2) The campaign has attached coupon
which doesn’t match or is not active- Any of the attached rules doesn’t match
-
exception
DoesNotExist
¶
-
exception
BasketCampaign.
MultipleObjectsReturned
¶
-
BasketCampaign.
created_by
¶
-
BasketCampaign.
discount_effects
¶
-
BasketCampaign.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
line_effects
¶
-
BasketCampaign.
modified_by
¶
-
BasketCampaign.
objects
= <parler.managers.TranslatableManager object>¶
-
BasketCampaign.
public_name
¶ Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
-
BasketCampaign.
shop
¶
-
-
class
shoop.campaigns.models.campaigns.
CouponUsage
(id, coupon, order, created_by, modified_by, created_on, modified_on)[source]¶ Bases:
django.db.models.base.Model
-
coupon
¶
-
order
¶
-
created_by
¶
-
modified_by
¶
-
exception
DoesNotExist
¶
-
exception
CouponUsage.
MultipleObjectsReturned
¶
-
CouponUsage.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
CouponUsage.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
CouponUsage.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
CouponUsage.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
CouponUsage.
objects
= <django.db.models.manager.Manager object>¶
-
-
class
shoop.campaigns.models.campaigns.
Coupon
(id, code, usage_limit_customer, usage_limit, active, created_by, modified_by, created_on, modified_on)[source]¶ Bases:
django.db.models.base.Model
-
admin_url_suffix
= 'coupons'¶
-
created_by
¶
-
modified_by
¶
-
exhausted
¶
-
attached
¶
-
can_use_code
(customer)[source]¶ Check if customer can use the code
Parameters: customer ( Contact
or None) –Return type: True|False
-
exception
DoesNotExist
¶
-
exception
Coupon.
MultipleObjectsReturned
¶
-
Coupon.
campaign
¶
-
Coupon.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
Coupon.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
Coupon.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
Coupon.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
Coupon.
objects
= <django.db.models.manager.Manager object>¶
-
Coupon.
usages
¶
-
-
class
shoop.campaigns.models.campaigns.
BasketCampaignTranslation
(id, language_code, public_name, master)¶ Bases:
parler.models.TranslatedFieldsModel
-
exception
DoesNotExist
¶ Bases:
parler.models.TranslationDoesNotExist
,shoop.campaigns.models.campaigns.DoesNotExist
,shoop.campaigns.models.campaigns.DoesNotExist
-
exception
BasketCampaignTranslation.
MultipleObjectsReturned
¶
-
BasketCampaignTranslation.
get_language_code_display
(*moreargs, **morekwargs)¶
-
BasketCampaignTranslation.
master
¶
-
BasketCampaignTranslation.
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
shoop.campaigns.models.campaigns.
CatalogCampaignTranslation
(id, language_code, public_name, master)¶ Bases:
parler.models.TranslatedFieldsModel
-
exception
DoesNotExist
¶ Bases:
parler.models.TranslationDoesNotExist
,shoop.campaigns.models.campaigns.DoesNotExist
,shoop.campaigns.models.campaigns.DoesNotExist
-
exception
CatalogCampaignTranslation.
MultipleObjectsReturned
¶
-
CatalogCampaignTranslation.
get_language_code_display
(*moreargs, **morekwargs)¶
-
CatalogCampaignTranslation.
master
¶
-
CatalogCampaignTranslation.
objects
= <django.db.models.manager.Manager object>¶
-
exception
shoop.campaigns.models.catalog_filters module¶
-
class
shoop.campaigns.models.catalog_filters.
CatalogFilter
(id, polymorphic_ctype, active)[source]¶ Bases:
polymorphic.models.PolymorphicModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
= None¶
-
identifier
= 'base_catalog_filter'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
exception
DoesNotExist
¶
-
exception
CatalogFilter.
MultipleObjectsReturned
¶
-
CatalogFilter.
base_objects
= <django.db.models.manager.Manager object>¶
-
CatalogFilter.
campaign
¶
-
CatalogFilter.
categoryfilter
¶
-
CatalogFilter.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
CatalogFilter.
polymorphic_ctype
¶
-
CatalogFilter.
polymorphic_primary_key_name
= 'id'¶
-
CatalogFilter.
polymorphic_super_sub_accessors_replaced
= False¶
-
CatalogFilter.
productfilter
¶
-
CatalogFilter.
producttypefilter
¶
-
-
class
shoop.campaigns.models.catalog_filters.
ProductTypeFilter
(id, polymorphic_ctype, active, catalogfilter_ptr)[source]¶ Bases:
shoop.campaigns.models.catalog_filters.CatalogFilter
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
ProductType
-
identifier
= 'product_type_filter'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
product_types
¶
-
description
¶
-
values
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.catalog_filters.DoesNotExist
-
exception
ProductTypeFilter.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.catalog_filters.MultipleObjectsReturned
-
ProductTypeFilter.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductTypeFilter.
catalogfilter_ptr
¶
-
ProductTypeFilter.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductTypeFilter.
polymorphic_primary_key_name
= 'id'¶
-
ProductTypeFilter.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.catalog_filters.
ProductFilter
(id, polymorphic_ctype, active, catalogfilter_ptr)[source]¶ Bases:
shoop.campaigns.models.catalog_filters.CatalogFilter
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
Product
-
identifier
= 'product_filter'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
products
¶
-
description
¶
-
values
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.catalog_filters.DoesNotExist
-
exception
ProductFilter.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.catalog_filters.MultipleObjectsReturned
-
ProductFilter.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductFilter.
catalogfilter_ptr
¶
-
ProductFilter.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductFilter.
polymorphic_primary_key_name
= 'id'¶
-
ProductFilter.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.catalog_filters.
CategoryFilter
(id, polymorphic_ctype, active, catalogfilter_ptr)[source]¶ Bases:
shoop.campaigns.models.catalog_filters.CatalogFilter
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
Category
-
identifier
= 'category_filter'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
categories
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.catalog_filters.DoesNotExist
-
exception
CategoryFilter.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.catalog_filters.MultipleObjectsReturned
-
CategoryFilter.
base_objects
= <django.db.models.manager.Manager object>¶
-
CategoryFilter.
catalogfilter_ptr
¶
-
CategoryFilter.
description
¶
-
CategoryFilter.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
CategoryFilter.
polymorphic_primary_key_name
= 'id'¶
-
CategoryFilter.
polymorphic_super_sub_accessors_replaced
= False¶
-
CategoryFilter.
values
¶
-
shoop.campaigns.models.contact_group_sales_ranges module¶
-
class
shoop.campaigns.models.contact_group_sales_ranges.
SalesRangeQuerySet
(model=None, query=None, using=None, hints=None)[source]¶
-
class
shoop.campaigns.models.contact_group_sales_ranges.
ContactGroupSalesRange
(id, group, shop, min_value, max_value)[source]¶ Bases:
django.db.models.base.Model
-
group
¶
-
shop
¶
-
objects
= <django.db.models.manager.ManagerFromSalesRangeQuerySet object>¶
-
exception
DoesNotExist
¶
-
exception
ContactGroupSalesRange.
MultipleObjectsReturned
¶
-
shoop.campaigns.models.context_conditions module¶
-
class
shoop.campaigns.models.context_conditions.
ContextCondition
(id, polymorphic_ctype, active)[source]¶ Bases:
polymorphic.models.PolymorphicModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
= None¶
-
identifier
= 'context_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
description
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
exception
DoesNotExist
¶
-
exception
ContextCondition.
MultipleObjectsReturned
¶
-
ContextCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ContextCondition.
campaign
¶
-
ContextCondition.
contactcondition
¶
-
ContextCondition.
contactgroupcondition
¶
-
ContextCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ContextCondition.
polymorphic_ctype
¶
-
ContextCondition.
polymorphic_primary_key_name
= 'id'¶
-
ContextCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.context_conditions.
ContactGroupCondition
(id, polymorphic_ctype, active, contextcondition_ptr)[source]¶ Bases:
shoop.campaigns.models.context_conditions.ContextCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
ContactGroup
-
identifier
= 'contact_group_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
contact_groups
¶
-
description
¶
-
values
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.context_conditions.DoesNotExist
-
exception
ContactGroupCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.context_conditions.MultipleObjectsReturned
-
ContactGroupCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ContactGroupCondition.
contextcondition_ptr
¶
-
ContactGroupCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ContactGroupCondition.
polymorphic_primary_key_name
= 'id'¶
-
ContactGroupCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
-
class
shoop.campaigns.models.context_conditions.
ContactCondition
(id, polymorphic_ctype, active, contextcondition_ptr)[source]¶ Bases:
shoop.campaigns.models.context_conditions.ContextCondition
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
model
¶ alias of
Contact
-
identifier
= 'contact_condition'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
contacts
¶
-
description
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.context_conditions.DoesNotExist
-
exception
ContactCondition.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.context_conditions.MultipleObjectsReturned
-
ContactCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ContactCondition.
contextcondition_ptr
¶
-
ContactCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ContactCondition.
polymorphic_primary_key_name
= 'id'¶
-
ContactCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
ContactCondition.
values
¶
-
shoop.campaigns.models.product_effects module¶
-
class
shoop.campaigns.models.product_effects.
ProductDiscountEffect
(id, polymorphic_ctype, campaign)[source]¶ Bases:
shoop.core.models.PolymorphicShoopModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= None¶
-
model
= None¶
-
admin_form_class
= None¶
-
campaign
¶
-
apply_for_product
(context, product, price_info)[source]¶ Applies the effect for product
Returns: amount of discount to accumulate for the product Return type: Price
-
exception
DoesNotExist
¶
-
exception
ProductDiscountEffect.
MultipleObjectsReturned
¶
-
ProductDiscountEffect.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductDiscountEffect.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductDiscountEffect.
polymorphic_ctype
¶
-
ProductDiscountEffect.
polymorphic_primary_key_name
= 'id'¶
-
ProductDiscountEffect.
polymorphic_super_sub_accessors_replaced
= False¶
-
ProductDiscountEffect.
productdiscountamount
¶
-
ProductDiscountEffect.
productdiscountpercentage
¶
-
-
class
shoop.campaigns.models.product_effects.
ProductDiscountAmount
(id, polymorphic_ctype, campaign, productdiscounteffect_ptr, discount_amount)[source]¶ Bases:
shoop.campaigns.models.product_effects.ProductDiscountEffect
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'discount_amount_effect'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
description
¶
-
value
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.product_effects.DoesNotExist
-
exception
ProductDiscountAmount.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.product_effects.MultipleObjectsReturned
-
ProductDiscountAmount.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductDiscountAmount.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductDiscountAmount.
polymorphic_primary_key_name
= 'id'¶
-
ProductDiscountAmount.
polymorphic_super_sub_accessors_replaced
= False¶
-
ProductDiscountAmount.
productdiscounteffect_ptr
¶
-
-
class
shoop.campaigns.models.product_effects.
ProductDiscountPercentage
(id, polymorphic_ctype, campaign, productdiscounteffect_ptr, discount_percentage)[source]¶ Bases:
shoop.campaigns.models.product_effects.ProductDiscountEffect
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
identifier
= 'discount_percentage_effect'¶
-
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
admin_form_class
¶ alias of
PercentageField
-
description
¶
-
exception
DoesNotExist
¶ Bases:
shoop.campaigns.models.product_effects.DoesNotExist
-
exception
ProductDiscountPercentage.
MultipleObjectsReturned
¶ Bases:
shoop.campaigns.models.product_effects.MultipleObjectsReturned
-
ProductDiscountPercentage.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductDiscountPercentage.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductDiscountPercentage.
polymorphic_primary_key_name
= 'id'¶
-
ProductDiscountPercentage.
polymorphic_super_sub_accessors_replaced
= False¶
-
ProductDiscountPercentage.
productdiscounteffect_ptr
¶
-
ProductDiscountPercentage.
value
¶
-
Module contents¶
-
class
shoop.campaigns.models.
BasketLineEffect
(id, polymorphic_ctype, campaign)[source]¶ Bases:
shoop.core.models.PolymorphicShoopModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
exception
DoesNotExist
¶
-
exception
BasketLineEffect.
MultipleObjectsReturned
¶
-
BasketLineEffect.
admin_form_class
= None¶
-
BasketLineEffect.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketLineEffect.
campaign
¶
-
BasketLineEffect.
discountfromproduct
¶
-
BasketLineEffect.
freeproductline
¶
-
BasketLineEffect.
get_discount_lines
(order_source, original_lines)[source]¶ Applies the effect based on given
order_source
Returns: amount of discount to accumulate for the product Return type: Iterable[shoop.core.order_creator.SourceLine]
-
BasketLineEffect.
identifier
= None¶
-
BasketLineEffect.
model
= None¶
-
BasketLineEffect.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketLineEffect.
polymorphic_ctype
¶
-
BasketLineEffect.
polymorphic_primary_key_name
= 'id'¶
-
BasketLineEffect.
polymorphic_super_sub_accessors_replaced
= False¶
-
exception
-
class
shoop.campaigns.models.
BasketCampaign
(id, shop, name, identifier, active, start_datetime, end_datetime, created_by, modified_by, created_on, modified_on, basket_line_text, coupon)[source]¶ Bases:
shoop.campaigns.models.campaigns.Campaign
-
exception
DoesNotExist
¶
-
exception
BasketCampaign.
MultipleObjectsReturned
¶
-
BasketCampaign.
admin_url_suffix
= 'basket_campaigns'¶
-
BasketCampaign.
conditions
¶
-
BasketCampaign.
coupon
¶
-
BasketCampaign.
created_by
¶
-
BasketCampaign.
discount_effects
¶
-
BasketCampaign.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
BasketCampaign.
line_effects
¶
-
BasketCampaign.
modified_by
¶
-
BasketCampaign.
objects
= <parler.managers.TranslatableManager object>¶
-
BasketCampaign.
public_name
¶ Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
-
BasketCampaign.
rules_match
(basket, lines)[source]¶ Check if basket rules match.
They will not match if 1) The campaign is not active 2) The campaign has attached coupon
which doesn’t match or is not active- Any of the attached rules doesn’t match
-
BasketCampaign.
shop
¶
-
BasketCampaign.
translations
¶
-
exception
-
class
shoop.campaigns.models.
BasketDiscountEffect
(id, polymorphic_ctype, campaign)[source]¶ Bases:
shoop.core.models.PolymorphicShoopModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
exception
DoesNotExist
¶
-
exception
BasketDiscountEffect.
MultipleObjectsReturned
¶
-
BasketDiscountEffect.
admin_form_class
= None¶
-
BasketDiscountEffect.
apply_for_basket
(order_source)[source]¶ Applies the effect based on given
order_source
Returns: amount of discount to accumulate for the product Return type: Price
-
BasketDiscountEffect.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketDiscountEffect.
basketdiscountamount
¶
-
BasketDiscountEffect.
basketdiscountpercentage
¶
-
BasketDiscountEffect.
campaign
¶
-
BasketDiscountEffect.
identifier
= None¶
-
BasketDiscountEffect.
model
= None¶
-
BasketDiscountEffect.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketDiscountEffect.
polymorphic_ctype
¶
-
BasketDiscountEffect.
polymorphic_primary_key_name
= 'id'¶
-
BasketDiscountEffect.
polymorphic_super_sub_accessors_replaced
= False¶
-
exception
-
class
shoop.campaigns.models.
BasketCondition
(id, polymorphic_ctype, active)[source]¶ Bases:
polymorphic.models.PolymorphicModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
exception
DoesNotExist
¶
-
exception
BasketCondition.
MultipleObjectsReturned
¶
-
BasketCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
BasketCondition.
basketmaxtotalamountcondition
¶
-
BasketCondition.
basketmaxtotalproductamountcondition
¶
-
BasketCondition.
baskettotalamountcondition
¶
-
BasketCondition.
baskettotalproductamountcondition
¶
-
BasketCondition.
campaign
¶
-
BasketCondition.
contactbasketcondition
¶
-
BasketCondition.
contactgroupbasketcondition
¶
-
BasketCondition.
model
= None¶
-
BasketCondition.
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
BasketCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
BasketCondition.
polymorphic_ctype
¶
-
BasketCondition.
polymorphic_primary_key_name
= 'id'¶
-
BasketCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
BasketCondition.
productsinbasketcondition
¶
-
exception
-
class
shoop.campaigns.models.
Campaign
(*args, **kwargs)[source]¶ Bases:
shoop.utils.properties.MoneyPropped
,parler.models.TranslatableModel
-
class
Meta
[source]¶ Bases:
object
-
abstract
= False¶
-
verbose_name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
verbose_name_plural
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
-
Campaign.
admin_url_suffix
= None¶
-
Campaign.
created_by
¶
-
Campaign.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
Campaign.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
Campaign.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
Campaign.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
Campaign.
modified_by
¶
-
Campaign.
objects
¶
-
Campaign.
shop
¶
-
Campaign.
type
¶
-
class
-
class
shoop.campaigns.models.
ProductDiscountEffect
(id, polymorphic_ctype, campaign)[source]¶ Bases:
shoop.core.models.PolymorphicShoopModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
exception
DoesNotExist
¶
-
exception
ProductDiscountEffect.
MultipleObjectsReturned
¶
-
ProductDiscountEffect.
admin_form_class
= None¶
-
ProductDiscountEffect.
apply_for_product
(context, product, price_info)[source]¶ Applies the effect for product
Returns: amount of discount to accumulate for the product Return type: Price
-
ProductDiscountEffect.
base_objects
= <django.db.models.manager.Manager object>¶
-
ProductDiscountEffect.
campaign
¶
-
ProductDiscountEffect.
identifier
= None¶
-
ProductDiscountEffect.
model
= None¶
-
ProductDiscountEffect.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ProductDiscountEffect.
polymorphic_ctype
¶
-
ProductDiscountEffect.
polymorphic_primary_key_name
= 'id'¶
-
ProductDiscountEffect.
polymorphic_super_sub_accessors_replaced
= False¶
-
ProductDiscountEffect.
productdiscountamount
¶
-
ProductDiscountEffect.
productdiscountpercentage
¶
-
exception
-
class
shoop.campaigns.models.
CatalogCampaign
(id, shop, name, identifier, active, start_datetime, end_datetime, created_by, modified_by, created_on, modified_on)[source]¶ Bases:
shoop.campaigns.models.campaigns.Campaign
-
exception
DoesNotExist
¶
-
exception
CatalogCampaign.
MultipleObjectsReturned
¶
-
CatalogCampaign.
admin_url_suffix
= 'catalog_campaigns'¶
-
CatalogCampaign.
conditions
¶
-
CatalogCampaign.
created_by
¶
-
CatalogCampaign.
effects
¶
-
CatalogCampaign.
filters
¶
-
CatalogCampaign.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
CatalogCampaign.
modified_by
¶
-
CatalogCampaign.
objects
= <parler.managers.TranslatableManager object>¶
-
CatalogCampaign.
public_name
¶ Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
-
CatalogCampaign.
shop
¶
-
CatalogCampaign.
translations
¶
-
exception
-
class
shoop.campaigns.models.
CatalogFilter
(id, polymorphic_ctype, active)[source]¶ Bases:
polymorphic.models.PolymorphicModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
exception
DoesNotExist
¶
-
exception
CatalogFilter.
MultipleObjectsReturned
¶
-
CatalogFilter.
base_objects
= <django.db.models.manager.Manager object>¶
-
CatalogFilter.
campaign
¶
-
CatalogFilter.
categoryfilter
¶
-
CatalogFilter.
identifier
= 'base_catalog_filter'¶
-
CatalogFilter.
model
= None¶
-
CatalogFilter.
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
CatalogFilter.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
CatalogFilter.
polymorphic_ctype
¶
-
CatalogFilter.
polymorphic_primary_key_name
= 'id'¶
-
CatalogFilter.
polymorphic_super_sub_accessors_replaced
= False¶
-
CatalogFilter.
productfilter
¶
-
CatalogFilter.
producttypefilter
¶
-
exception
-
class
shoop.campaigns.models.
ContactGroupSalesRange
(id, group, shop, min_value, max_value)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
ContactGroupSalesRange.
MultipleObjectsReturned
¶
-
ContactGroupSalesRange.
group
¶
-
ContactGroupSalesRange.
objects
= <django.db.models.manager.ManagerFromSalesRangeQuerySet object>¶
-
ContactGroupSalesRange.
shop
¶
-
exception
-
class
shoop.campaigns.models.
ContextCondition
(id, polymorphic_ctype, active)[source]¶ Bases:
polymorphic.models.PolymorphicModel
Replace Django’s inheritance accessor member functions for our model (self.__class__) with our own versions. We monkey patch them until a patch can be added to Django (which would probably be very small and make all of this obsolete).
If we have inheritance of the form ModelA -> ModelB ->ModelC then Django creates accessors like this: - ModelA: modelb - ModelB: modela_ptr, modelb, modelc - ModelC: modela_ptr, modelb, modelb_ptr, modelc
These accessors allow Django (and everyone else) to travel up and down the inheritance tree for the db object at hand.
The original Django accessors use our polymorphic manager. But they should not. So we replace them with our own accessors that use our appropriate base_objects manager.
-
exception
DoesNotExist
¶
-
exception
ContextCondition.
MultipleObjectsReturned
¶
-
ContextCondition.
base_objects
= <django.db.models.manager.Manager object>¶
-
ContextCondition.
campaign
¶
-
ContextCondition.
contactcondition
¶
-
ContextCondition.
contactgroupcondition
¶
-
ContextCondition.
description
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
ContextCondition.
identifier
= 'context_condition'¶
-
ContextCondition.
model
= None¶
-
ContextCondition.
name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
ContextCondition.
objects
= <polymorphic.managers.PolymorphicManager object>¶
-
ContextCondition.
polymorphic_ctype
¶
-
ContextCondition.
polymorphic_primary_key_name
= 'id'¶
-
ContextCondition.
polymorphic_super_sub_accessors_replaced
= False¶
-
exception
-
class
shoop.campaigns.models.
Coupon
(id, code, usage_limit_customer, usage_limit, active, created_by, modified_by, created_on, modified_on)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
Coupon.
MultipleObjectsReturned
¶
-
Coupon.
admin_url_suffix
= 'coupons'¶
-
Coupon.
attached
¶
-
Coupon.
campaign
¶
-
Coupon.
can_use_code
(customer)[source]¶ Check if customer can use the code
Parameters: customer ( Contact
or None) –Return type: True|False
-
Coupon.
created_by
¶
-
Coupon.
exhausted
¶
-
Coupon.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
Coupon.
get_next_by_modified_on
(*moreargs, **morekwargs)¶
-
Coupon.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
Coupon.
get_previous_by_modified_on
(*moreargs, **morekwargs)¶
-
Coupon.
modified_by
¶
-
Coupon.
objects
= <django.db.models.manager.Manager object>¶
-
Coupon.
usages
¶
-
exception