Skip to content

Instantly share code, notes, and snippets.

@mbrochh
Created June 30, 2011 01:23
Show Gist options
  • Save mbrochh/1055440 to your computer and use it in GitHub Desktop.
Save mbrochh/1055440 to your computer and use it in GitHub Desktop.
FixedShippingCosts cart modifier
class FixedShippingCosts(BaseCartModifier):
"""
This will add a fixed amount of money for shipping costs.
"""
def add_extra_cart_price_field(self, cart):
cart.extra_price_fields.append(
('Shipping costs', decimal.Decimal(
settings.SHOP_SHIPPING_FLAT_RATE)))
return cart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment