shoop.discount_pricing package

Submodules

shoop.discount_pricing.admin_form_part module

class shoop.discount_pricing.admin_form_part.DiscountPricingForm(**kwargs)[source]

Bases: django.forms.forms.Form

save()[source]
get_shop_field(shop)[source]
base_fields = OrderedDict()
declared_fields = OrderedDict()
media
class shoop.discount_pricing.admin_form_part.DiscountPricingFormPart(request, object=None)[source]

Bases: shoop.admin.form_part.FormPart

priority = 10
get_form_defs()[source]
form_valid(form)[source]

shoop.discount_pricing.models module

class shoop.discount_pricing.models.DiscountedProductPrice(id, product, shop, price_value)[source]

Bases: shoop.utils.properties.MoneyPropped, django.db.models.base.Model

product
shop
price

Property for Price object.

Similar to MoneyProperty but also has includes_tax field.

Operaters with TaxfulPrice and TaxlessPrice objects.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception DiscountedProductPrice.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

DiscountedProductPrice.objects = <django.db.models.manager.Manager object>

shoop.discount_pricing.module module

Discount Pricing Module.

This module handles basic discounts for products.

If the discounted price is higher than the default_price, the lower will be used.

Example:

If default_price is 50 and discounted price is 20, the effective product price will be 20.
class shoop.discount_pricing.module.DiscountPricingContext(**kwargs)[source]

Bases: shoop.core.pricing.PricingContext

REQUIRED_VALUES = ['shop']
shop = None
class shoop.discount_pricing.module.DiscountPricingModule[source]

Bases: shoop.core.pricing.PricingModule

identifier = 'discount_pricing'
name = <django.utils.functional.lazy.<locals>.__proxy__ object>
pricing_context_class

alias of DiscountPricingContext

get_context_from_request(request)[source]
get_price_info(context, product, quantity=1)[source]

Module contents

class shoop.discount_pricing.DiscountPricingAppConfig(*args, **kwargs)[source]

Bases: shoop.apps.AppConfig

name = 'shoop.discount_pricing'
verbose_name = 'Shoop Discount Pricing'
label = 'discount_pricing'
provides = {'admin_product_form_part': ['shoop.discount_pricing.admin_form_part:DiscountPricingFormPart'], 'pricing_module': ['shoop.discount_pricing.module:DiscountPricingModule']}