Jump to content

How to show the total with tax in the order history? Any variables?


Fletsch

Recommended Posts

Maybe someone can help me? I set up my shop without tax in the catalog, because the owner wants it that way. In the checkout I manually added the total inclusive tax, mostly with the variable {$cart.totals.total_including_tax.value}. Now I would like to show the total with tax in the order history of the customer account as well. Unfortunately this is not possible with {$order.totals.total_including_tax.value}. The variable does not seem to exist. Or is it different written? Does anyone know if there is a total with tax for the completed orders to read into the template?

I have found a solution in the forum for older versions how to add the total with tax by add up. But then the rounding and the decimal places are not correct.

Thanks a lot for your help! 😃

Bildschirmfoto 2020-01-07 um 11.41.06.png

Link to comment
Share on other sites

In cace anyone has the same need: After a lot of trying and going threw files in /adapter I found a working variables for the templates files. (Prestashop 1.7.5)

in order_detail_no_return.tpl and order_detail_return.tpl change the variables to:

<tr class="text-xs-right line-{$order.totals.total.type}">
          <td colspan="3">{$cart.totals.total_including_tax.label}</td>
          <td>{$order.totals.total_paid.value}</td>
        </tr>

in history.tpl change the variables to:

<th scope="row">{$order.details.reference}</th>
            <td>{$order.details.order_date}</td>
            <td class="text-xs-right">{$order.totals.total_paid.value}</td>
            <td class="hidden-md-down">{$order.details.payment}</td>

Now it's the total including taxes. :)

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

  • 5 months later...
  • 1 year later...
  • 1 year later...
  • 7 months later...

We have a website with PS 8 and the warehouse theme and, after making the changes suggested by "thymus" in files, the taxes appear in the order details in the customer history, but with the value at zero. Only when the order status changes by admin, the tax amount is correctly shown.
Does anyone know the reason for this?
Did it happen to you too?

Link to comment
Share on other sites

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...