You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

methods.py 659B

12345678910111213141516171819202122232425262728293031
  1. class ShippingMethod(object):
  2. u"""
  3. Superclass for all shipping method objects
  4. """
  5. code = '__default__'
  6. name = 'Default shipping'
  7. description = ''
  8. def set_basket(self, basket):
  9. self.basket = basket
  10. def basket_charge_incl_tax(self):
  11. pass
  12. def basket_charge_excl_tax(self):
  13. pass
  14. class FreeShipping(ShippingMethod):
  15. u"""
  16. Simple method for free shipping
  17. """
  18. code = 'free-shipping'
  19. name = 'Free shipping'
  20. def basket_charge_incl_tax(self):
  21. return Decimal('0.00')
  22. def basket_charge_excl_tax(self):
  23. return Decimal('0.00')