See How to configure shipping for details on how shipping works in Oscar.
- class oscar.apps.shipping.methods.Base¶
Shipping method interface class
This is the superclass to the classes in methods.py, and a de-facto superclass to the classes in models.py. This allows using all shipping methods interchangeably (aka polymorphism).
The interface is all properties.
Return the shipping charge for the given basket
- code = '__default__'¶
Used to store this method in the session. Each shipping method should
- description = ''¶
A more detailed description of the shipping method shown to the customer
Return the discount on the standard shipping charge
- is_discounted = False¶
Whether the charge includes a discount
- name = 'Default shipping'¶
The name of the shipping method, shown to the customer during checkout
- class oscar.apps.shipping.methods.FixedPrice(charge_excl_tax=None, charge_incl_tax=None)¶
This shipping method indicates that shipping costs a fixed price and requires no special calculation.
- class oscar.apps.shipping.methods.Free¶
This shipping method specifies that shipping is free.
- class oscar.apps.shipping.methods.NoShippingRequired¶
This is a special shipping method that indicates that no shipping is actually required (eg for digital goods).
- class oscar.apps.shipping.methods.OfferDiscount(method, offer)¶
Wrapper class that applies a discount to an existing shipping method’s charges.
- class oscar.apps.shipping.methods.TaxExclusiveOfferDiscount(method, offer)¶
Wrapper class which extends OfferDiscount to be exclusive of tax.
- class oscar.apps.shipping.models.OrderAndItemCharges(*args, **kwargs)¶
OrderAndItemCharges(id, code, name, description, price_per_order, price_per_item, free_shipping_threshold)
- class oscar.apps.shipping.models.WeightBased(*args, **kwargs)¶
WeightBased(id, code, name, description, default_weight)
- class oscar.apps.shipping.models.WeightBand(*args, **kwargs)¶
WeightBand(id, method, upper_limit, charge)
- class oscar.apps.shipping.repository.Repository¶
Repository class responsible for returning ShippingMethod objects for a given user, basket etc
- apply_shipping_offer(basket, method, offer)¶
Wrap a shipping method with an offer discount wrapper (as long as the shipping charge is non-zero).
- apply_shipping_offers(basket, methods)¶
Apply shipping offers to the passed set of methods
- get_available_shipping_methods(basket, shipping_addr=None, **kwargs)¶
Return a list of all applicable shipping method instances for a given basket, address etc. This method is intended to be overridden.
- get_default_shipping_method(basket, shipping_addr=None, **kwargs)¶
Return a ‘default’ shipping method to show on the basket page to give the customer an indication of what their order will cost.
- get_shipping_methods(basket, shipping_addr=None, **kwargs)¶
Return a list of all applicable shipping method instances for a given basket, address etc.