Jump to content

How to display discounts without tax ?


Welele

Recommended Posts

Hi,

 

I'm using Prestashop 1.6.0.14  and I'm facing the following issue:

 

I have activated the B2B mode and set up all parameters so that all the prices are displayed without VAT. So far so good. The problem is when I create a cart rule (excluding tax)

In resume cart before finish the order works fine:

 

Screenshot_1.thumb.jpg.fd653fbf9936c6bf1e7335f5ad0f49f4.jpg 

 

But this carts rule appears on the "order-confirmation" e-mail to customer and administrator with the VAT included (21%). I would like it to appear without tax as well.

 

Screenshot_2.jpg.8094a4a968497724eddbe85da072eafb.jpg

 

 

Maybe I have to change something in the "classes/PaymentModule.php" file but I don't know what precisely.

Can anyone help, please ?

 

Thank you.

Link to comment
Share on other sites

  • 2 months later...

Hola,

 

esto es para el emal del cliente.

busca en classes/PaymentModule.php

                        $cart_rules_list[] = array(
                            'voucher_name' => $cart_rule['obj']->name,
                            'voucher_reduction' => ($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $this->context->currency, false)
                        );

 

y cambialo así:

                        $cart_rules_list[] = array(
                            'voucher_name' => $cart_rule['obj']->name,
                            'voucher_reduction' => ($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $this->context->currency, false),
                            'voucher_reduction_tax_excl' => ($values['tax_excl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_excl'], $this->context->currency, false)
                        );

 

luego en la plantilla de email de mails/es/order_conf_cart_rules.tpl cambias

{$cart_rule['voucher_reduction']}

por

{$cart_rule['voucher_reduction_tax_excl']}

 

 

para el email del administrador es mas complicado,

se genera en modules/mailalerts/mailalerts.php

en el siguiente código:

        foreach ($params['order']->getCartRules() as $discount)
        {
            $items_table .=
                '<tr style="background-color:#EBECEE;">
                        <td colspan="4" style="padding:0.6em 0.4em; text-align:right;">'.$this->l('Voucher code:').' '.$discount['name'].'</td>
                    <td style="padding:0.6em 0.4em; text-align:right;">-'.Tools::displayPrice($discount['value'], $currency, false).'</td>
            </tr>';
        }
 

 

Edited by Ubiotex (see edit history)
Link to comment
Share on other sites

  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...