Maybe this filter or at least code within would be useful to get a
price with tax for specific product:
from satchmo.product.utils import get_tax
@register.filter
def price_with_tax(product):
taxer = get_tax_processor()
price_with_tax = product.unit_price
price_with_tax += taxer.by_product(product, 1)
return (price_with_tax)
I use it where need to show price with tax and without tax.
Bojan
On Nov 13, 12:26 pm, Alessandro <[EMAIL PROTECTED]> wrote:
> I'm trying to set a paypal express checkout module.
>
> giving a cart, I need to know for every product the price with or
> without taxes, like it does on template tags with
>
> {% if default_view_tax %}{% cartitem_line_taxed_total cartitem 1 %}{%
> else %}{{ cartitem.line_total|currency }}
>
> and the same for the cart total:
> {% if default_view_tax %}{% cart_taxed_total cart 1 %}{% else
> %}{{cart.total|currency}}{% endif %}
>
> I need to translate this code from templates' to python view. Is it
> possible and simple, or I need to rewrite templatetags to output the
> same values to python?
> What does return cartitem.unit_price (taxed or not?)
>
> Thanks in advance.
>
> --
> Alessandro Ronchi
> Skype: aronchihttp://www.alessandroronchi.net
>
> SOASI Soc.Coop. -www.soasi.com
> Sviluppo Software e Sistemi Open Source
> Sede: Via Poggiali 2/bis, 47100 Forlì (FC)
> Tel.: +39 0543 798985 - Fax: +39 0543 579928
>
> Rispetta l'ambiente: se non ti è necessario, non stampare questa mail
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" 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/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---