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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"getpaid-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---