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 this module. 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 have a unique code.
-
description
= ''¶ A more detailed description of the shipping method shown to the customer during checkout. Can contain HTML.
-
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 (e.g. 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.
-
calculate_excl_discount
(basket)[source]¶ Returns the shipping charge for the given basket without discount applied.
-
property
description
¶ Returns the
description
of the wrapped shipping method.
-
property
discount_name
¶ Returns the
name
of the applied Offer.
-
-
class
oscar.apps.shipping.methods.
TaxExclusiveOfferDiscount
(method, offer)[source]¶ Wrapper class which extends OfferDiscount to be exclusive of tax.
Models¶
-
class
oscar.apps.shipping.models.
OrderAndItemCharges
(id, code, name, description, price_per_order, price_per_item, free_shipping_threshold)[source]¶ -
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
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.
-