RajatShukla / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

settings.flatrate_option #259

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the condition   if(settings.flatrate_option == "Percentage") seems wrong
should it not be
=="Flat Rate" ?

def getCost( self, order ):
       settings = self.settings
       if(settings.flatrate_option == "Percentage"):
           return self.settings.flat_rate
       else: # we're calculating the percentage
           items = filter( IShippableLineItem.providedBy,
order.shopping_cart.values() )
           cost = 0
           for item in items:
               cost += item.cost
           shipcost = cost * (settings.flatrate_percentage / 100)
           if shipcost > settings.flatrate_max:
               shipcost = settings.flatrate_max
           return shipcost

Original issue reported on code.google.com by danielle...@gmail.com on 23 Apr 2009 at 5:58

GoogleCodeExporter commented 9 years ago

Original comment by cjj.ifpe...@gmail.com on 22 Feb 2010 at 5:10

GoogleCodeExporter commented 9 years ago
Committed revision 3337.

Original comment by danielle...@gmail.com on 27 Feb 2010 at 7:31