Base models¶
shopkit.shipping.basemodels
-
class
shopkit.shipping.basemodels.
ShippedCartBase
(*args, **kwargs)¶ Bases:
shopkit.shipping.basemodels.ShippedItemBase
Mixin class for shopping carts with shipping costs associated with them.
-
get_order_shipping_costs
(**kwargs)¶ Get the shipping costs for this order. Must be implemented in subclasses.
-
get_total_shipping_costs
(**kwargs)¶ Get the total shipping cost for this Cart, summing up the shipping costs for the whole order and those for individual items (where applicable).
-
-
class
shopkit.shipping.basemodels.
ShippedCartItemBase
(*args, **kwargs)¶ Bases:
shopkit.shipping.basemodels.ShippedItemBase
Mixin class for CartItemz‘s with a function get_shipping_costs().
-
class
shopkit.shipping.basemodels.
ShippedItemBase
(*args, **kwargs)¶ Bases:
shopkit.core.basemodels.AbstractPricedItemBase
Base class for shippable items.
-
get_price
(**kwargs)¶ Get the price with shipping costs applied.
-
get_price_without_shipping
(**kwargs)¶ Get the price without shipping costs.
-
get_shipping_costs
(**kwargs)¶ Return the most sensible shipping cost associated with this item. By default, it returns the total shipping cost as yielded by get_total_shipping_costs.
-
get_total_shipping_costs
(**kwargs)¶ Return the total shipping applicable for this item. Must be implemented in subclasses.
-
-
class
shopkit.shipping.basemodels.
ShippedOrderBase
(*args, **kwargs)¶ Bases:
shopkit.shipping.basemodels.ShippedItemBase
Mixin class for orders with shipping costs associated with them.
-
get_order_shipping_costs
(**kwargs)¶ Get the shipping costs for this order.
-
get_total_shipping_costs
(**kwargs)¶ Get the total shipping cost for this Cart, summing up the shipping costs for the whole order and those for individual items (where applicable).
-
update_shipping
()¶ Update the shipping costs for order and order items.
-
-
class
shopkit.shipping.basemodels.
ShippedOrderItemBase
(*args, **kwargs)¶ Bases:
shopkit.shipping.basemodels.ShippedItemBase
Mixin class for OrderItem‘s with shipping costs associated with them.
-
get_shipping_costs
(**kwargs)¶ Return the shipping costs for this item.
-
update_shipping
()¶ Update shipping costs - does not save the object.
-