It's been awhile since I've used Cartridge in a project, but I have one
that I'm working on right now. I was pleased to see that Cartridge now has
tax support, but I'm running into some issues. Right now for my tax
handler I have:
total = request.cart.total_price()
if request.session.has_key('discount'):
discount =
request.cart.calculate_discount(request.session['discount'])
total -= discount
tax = total * Decimal('.0875')
set_tax(request, "Tax", tax)
For now I've hardcoded 8.75% as the tax rate. This always produces the
following error:
Decimal('1.7500') is not JSON serializable
In this case 1.75 is 8.75% of 20, the total in this particular case.
A few questions:
- What type of value should be passed into set_tax?
- Am I calculating the total appropriately?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.