Post by Millvi » Wed Sep 19, 2012 8:37 pm

Hi!

I have searched the forum to find an answer to this problem but haven´t found one.

The thing is that I would like to hide the sub-total on the checkout-page (and also in the cart if it is possible).

I know the sub-total has to be calculated to show the Total, but isn´t there a way to just hide it and still keep it in the calculation?

I´m using 1.5.3.1

Regards
Melker
Last edited by Millvi on Thu Sep 20, 2012 1:43 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Nov 23, 2010 3:08 pm

Post by ecgod.com » Wed Sep 19, 2012 8:47 pm

Just remove the subtotal text and value in all the catalog/view/theme/your-theme/template/checkout/*.tpl

Please click here to donate us if my solutions help.
ECGOD Development Center
http://www.ecgod.com
sale@ecgod.com
Robert


User avatar
Active Member

Posts

Joined
Wed Sep 05, 2012 8:36 pm

Post by Millvi » Wed Sep 19, 2012 8:55 pm

I don´t follow you there.
There are no such text anywhere since the different totals like sub-total comes from this loop in confirm.tpl for example.
Right?

Code: Select all

   <tfoot>
      <?php foreach ($totals as $total) { ?>
      <tr>
        <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
        <td class="total"><?php echo $total['text']; ?></td>
      </tr>
      <?php } ?>
    </tfoot>

Newbie

Posts

Joined
Tue Nov 23, 2010 3:08 pm

Post by ecgod.com » Wed Sep 19, 2012 9:41 pm

Change the code to be:

Code: Select all

 <tfoot>
      <?php foreach ($totals as $total) { ?>
        <?php if($total['title'] != 'Sub-Total') { ?>
          <tr>
            <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
            <td class="total"><?php echo $total['text']; ?></td>
          </tr>
        <?php } ?>
      <?php } ?>
    </tfoot>
Millvi wrote:I don´t follow you there.
There are no such text anywhere since the different totals like sub-total comes from this loop in confirm.tpl for example.
Right?

Code: Select all

   <tfoot>
      <?php foreach ($totals as $total) { ?>
      <tr>
        <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
        <td class="total"><?php echo $total['text']; ?></td>
      </tr>
      <?php } ?>
    </tfoot>

Please click here to donate us if my solutions help.
ECGOD Development Center
http://www.ecgod.com
sale@ecgod.com
Robert


User avatar
Active Member

Posts

Joined
Wed Sep 05, 2012 8:36 pm

Post by Millvi » Wed Sep 19, 2012 9:48 pm

Beautiful!

It works in english but I also have swedish in the shop.
The title in swedish are Exkl. moms.
How do I change the code to make it work in swedish also?

/Melker

Newbie

Posts

Joined
Tue Nov 23, 2010 3:08 pm

Post by ecgod.com » Wed Sep 19, 2012 10:08 pm

Find this file:
catalog/language/swedish/total/sub_total.php
and see what is the value of $_['text_sub_total'].
If the value is "xxxxx"
Then the code will be:

Code: Select all

<tfoot>
      <?php foreach ($totals as $total) { ?>
        <?php if($total['title'] != 'xxxxx') { ?>
          <tr>
            <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
            <td class="total"><?php echo $total['text']; ?></td>
          </tr>
        <?php } ?>
      <?php } ?>
    </tfoot>

Millvi wrote:Beautiful!

It works in english but I also have swedish in the shop.
The title in swedish are Exkl. moms.
How do I change the code to make it work in swedish also?

/Melker

Please click here to donate us if my solutions help.
ECGOD Development Center
http://www.ecgod.com
sale@ecgod.com
Robert


User avatar
Active Member

Posts

Joined
Wed Sep 05, 2012 8:36 pm

Post by Millvi » Wed Sep 19, 2012 10:19 pm

That I understand but my shop is in swedish and in english

I tried this but it doesn´t work.

Code: Select all

<tfoot>
      <?php foreach ($totals as $total) { ?>
        <?php if(($total['title'] != 'Sub-Total') || ($total['title'] != 'Exkl. moms'))  { ?>
          <tr>
            <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
            <td class="total"><?php echo $total['text']; ?></td>
          </tr>
        <?php } ?>
      <?php } ?>
    </tfoot>

Newbie

Posts

Joined
Tue Nov 23, 2010 3:08 pm

Post by ecgod.com » Wed Sep 19, 2012 11:40 pm

Should be:

Code: Select all

<tfoot>
      <?php foreach ($totals as $total) { ?>
        <?php if($total['title'] != 'Sub-Total' && $total['title'] != 'Exkl. moms')  { ?>
          <tr>
            <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
            <td class="total"><?php echo $total['text']; ?></td>
          </tr>
        <?php } ?>
      <?php } ?>
    </tfoot>
Millvi wrote:That I understand but my shop is in swedish and in english

I tried this but it doesn´t work.

Code: Select all

<tfoot>
      <?php foreach ($totals as $total) { ?>
        <?php if(($total['title'] != 'Sub-Total') || ($total['title'] != 'Exkl. moms'))  { ?>
          <tr>
            <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
            <td class="total"><?php echo $total['text']; ?></td>
          </tr>
        <?php } ?>
      <?php } ?>
    </tfoot>

Please click here to donate us if my solutions help.
ECGOD Development Center
http://www.ecgod.com
sale@ecgod.com
Robert


User avatar
Active Member

Posts

Joined
Wed Sep 05, 2012 8:36 pm

Post by Millvi » Thu Sep 20, 2012 12:06 am

Great!

Thank you very much for the help!

/Melker

Newbie

Posts

Joined
Tue Nov 23, 2010 3:08 pm

Post by ecgod.com » Thu Sep 20, 2012 1:23 am

Please edit the title of this topic and add [SOLVED] ahead.
Millvi wrote:Great!

Thank you very much for the help!

/Melker

Please click here to donate us if my solutions help.
ECGOD Development Center
http://www.ecgod.com
sale@ecgod.com
Robert


User avatar
Active Member

Posts

Joined
Wed Sep 05, 2012 8:36 pm
Who is online

Users browsing this forum: Baidu [Spider] and 11 guests