Page 1 of 1

no shipping costs in header minicart

Posted: Fri May 16, 2014 4:09 pm
by takahashi1973
Hi
We got the tweaks so far the shipping costs do not show inside the headers mini cart even when you have visited the checkout; if you go to some other page the header cars does not show shipping cost line nor calculates shipping costs in the total.

But now we are trying to NOT let it calculate the shipping costs in the total showing in the minicart even when we are on the checkout page.
It does not show shipping costs line BUT takes the shipping cost of the one and only shipping option we have into the total.
anyone knows the trick in this routine?
<?php
foreach ($totals as $total) { ?>
<?php
if ($total['code'] != 'shipping') { ?>
<tr>
<td class="right"><b><?php echo $total['title']; ?>:</b></td>
<td class="right"><?php echo $total['text']; ?></td>
</tr>
<?php } ?>
<?php } ?>

Re: no shipping costs in header minicart

Posted: Fri May 16, 2014 10:25 pm
by Johnathan
If you want to actually affect the *calculation* of the total, you'll need to modify it in the controller file, so it doesn't load the shipping cost at all. I haven't tested this, but try this edit:

Code: Select all

IN:
/catalog/controller/module/cart.php

AFTER:
foreach ($results as $result) {

ADD:
if ($result['code'] == 'shipping') continue; 

Re: no shipping costs in header minicart

Posted: Sun May 18, 2014 8:00 pm
by takahashi1973
Johnathan,

..... must have had my mind elsewhere. Thanks a lot that does the trick!