Last row at totals

This topic has been marked as not a support question.

Hello,

I have to put TAXes total at the end.

How to change the last CSS formatting applied to VAT (23%)
and apply it only to Total not to VAT (23%)?

Thanks & Br,
Tomek

March 16, 2013 at 6:35 pm #20456

Hi;

First The formatting is applied for the last amount;

Second you need to reorder your totals, because if you see the Sub-total and the Total are equal, for this you must make the last the “Total” not VAT (23%)

For you example it’s better to get like this:
- Sub-total : 110.12
- Kurier : 0.00
- Vat (23%) : 25.33
- Total : 135.45
its is the amount that the customer will pay.

To do this; from the admin panel go to: Extensions->Orders Totals then change the sort order of total and the VAT.

When you make the reorder you get the Total with the the formatting that you went.

Best regards.

 samdz
March 18, 2013 at 10:45 am #20528

Hi Samdz

I have requirement to have VAT in the last position and total as penultimate.

Br, Tomek

March 18, 2013 at 10:54 am #20529

Hi;

Do this :
- Open this file : catalog/view/theme/shoppica2/template/account/order_info.tpl
- Find this code:

<tfoot>
            <?php foreach ($totals as $total): ?>
            <tr<?php if($i == $j-1) echo ' class="last"'; ?>>
              <td class="align_right" colspan="<?php if ($tbData->common['returns_enabled']): ?><?php if ($tbData->is_mobile == "1") { echo '2'; } else { echo '5'; } ?><?php else: ?><?php if ($tbData->is_mobile == "1") { echo '1'; } else { echo '4'; } ?><?php endif; ?>"><strong><?php echo $total['title']; ?></strong></td>
              <td<?php if($i == $j-1) echo ' class="s_secondary_color"'; ?>><?php echo $total['text']; ?></td>
            </tr>
            <?php $i++; endforeach; ?>
          </tfoot>

- Then change it to:

<tfoot>
            <?php foreach ($totals as $total): ?>
            <tr<?php if($i == $j-2) echo ' class="last"'; ?>>
              <td class="align_right" colspan="<?php if ($tbData->common['returns_enabled']): ?><?php if ($tbData->is_mobile == "1") { echo '2'; } else { echo '5'; } ?><?php else: ?><?php if ($tbData->is_mobile == "1") { echo '1'; } else { echo '4'; } ?><?php endif; ?>"><strong><?php echo $total['title']; ?></strong></td>
              <td<?php if($i == $j-2) echo ' class="s_secondary_color"'; ?>><?php echo $total['text']; ?></td>
            </tr>
            <?php $i++; endforeach; ?>
          </tfoot>

Or in the file in above find $j-1 (in 2 place) then change it to : $j-2

Best regards
Sam

 samdz
March 18, 2013 at 1:32 pm #20541

Hi Sam,

The solution is partially OK.

The line:


<td<?php if($i == $j-2) echo ' class="s_secondary_color"'; ?>><?php echo $total['text']; ?></td>

change only colour not font size, and it does not work when I have two VAT rates e.g. 23% and 8%

Br, Tomek

March 18, 2013 at 8:05 pm #20571

Hi;

You need to change $j-1 two times it’s on two lines.

this line change the font:

<tr<?php if($i == $j-2) echo ' class="last"'; ?>>

and this line change the color:

<td<?php if($i == $j-2) echo ' class="s_secondary_color"'; ?>><?php echo $total['text']; ?></td>

When use two VAT change the number 2 by 3,
the two will be like this:

<tr<?php if($i == $j-3) echo ' class="last"'; ?>>

<td<?php if($i == $j-3) echo ' class="s_secondary_color"'; ?>><?php echo $total['text']; ?></td>

Best regards.
Sam

 samdz
March 18, 2013 at 8:40 pm #20573

Hi Sami,

the products with VAT could change means sometime it could be two VAT rates sometimes only ones.

Br, Tomek

March 18, 2013 at 10:36 pm #20577

Hi,

Ok, but you need to change same code for these files:

- catalog/view/theme/shoppica2/template/account/order_info.tpl
- catalog/view/theme/shoppica2/template/checkout/cart.tpl
- catalog/view/theme/shoppica2/template/checkout/confirm.tpl

I can do it for you using vqmod,
if you interesting contact me via email: issamoc@gmail.com

Best regards.
Sam

 samdz
March 22, 2013 at 12:19 pm #20843
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.