-
-
Save saidimu/1644288 to your computer and use it in GitHub Desktop.
FixedShippingCosts cart modifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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