Shipping¶
See How to configure shipping for details on how shipping works in Oscar.
Methods¶
-
class
oscar.apps.shipping.methods.
Base
[source]¶ 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.
-
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
-
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)[source]¶ This shipping method indicates that shipping costs a fixed price and requires no special calculation.
-
class
oscar.apps.shipping.methods.
Free
[source]¶ This shipping method specifies that shipping is free.
-
class
oscar.apps.shipping.methods.
NoShippingRequired
[source]¶ 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)[source]¶ Wrapper class that applies a discount to an existing shipping method’s charges.
Models¶
Repository¶
-
class
oscar.apps.shipping.repository.
Repository
[source]¶ Repository class responsible for returning ShippingMethod objects for a given user, basket etc
-
apply_shipping_offer
(basket, method, offer)[source]¶ Wrap a shipping method with an offer discount wrapper (as long as the shipping charge is non-zero).
-
get_available_shipping_methods
(basket, shipping_addr=None, **kwargs)[source]¶ Return a list of all applicable shipping method instances for a given basket, address etc. This method is intended to be overridden.
-