def update(self):
subtotal = float(<NUM_LIT:0>)<EOL>total = float(<NUM_LIT:0>)<EOL>for product in self.items:<EOL><INDENT>subtotal += float(product["<STR_LIT>"])<EOL><DEDENT>if subtotal > <NUM_LIT:0>:<EOL><INDENT>total = subtotal + self.extra_amount<EOL><DEDENT>self.subtotal = subtotal<EOL>self.total = total<EOL>
Remove items in cart