Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to not display the shipping cost under shipping method?

How to not display the shipping cost under shipping method?

Locked

Views: 1,324

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
13 Nov 2010, 7:14 AM
#1
welldone avatar

welldone

New Zenner

Join Date:
Nov 2010
Posts:
3
Plugin Contributions:
0

How to not display the shipping cost under shipping method?

Hello,

Due to unknown costs for a certain delivery option I need to be able to hide the cost for a shipping method in step 1 of the checkout process. I've edited the freeoptions module to display "We will call customer", however I can't seem to figure out how to keep the cost to $0.0 but not display it.

I would really appreciate any help on the issue. Thanks.

16 Nov 2010, 8:42 PM
#2
cheaperbyfar avatar

cheaperbyfar

New Zenner

Join Date:
Aug 2010
Posts:
26
Plugin Contributions:
0

Re: How to not display the shipping cost under shipping method?

You could just comment out the part where it is displayed. Without editing the files, I don't know if there is a way. If you need help, feel free to let me know and I'll find where it is for you.

17 Nov 2010, 12:14 AM
#3
welldone avatar

welldone

New Zenner

Join Date:
Nov 2010
Posts:
3
Plugin Contributions:
0

Re: How to not display the shipping cost under shipping method?

cheaperbyfar:

You could just comment out the part where it is displayed. Without editing the files, I don't know if there is a way. If you need help, feel free to let me know and I'll find where it is for you.

Thanks for the reply. The problem with commenting it out is that tpl_checkout_shipping_default.php uses a for loop to display the active shipping modules. So I'll have to make sure my module has the highest sort value and break out of the loop one itteration earlier and then just add the custom module separately. I was hoping that someone had already done it, zc code can be a little confusing at times if you don't have tons of programming experience. Oh well, let me know if you have any other ideas. I'll post a solution to this when I figure it out.

Thanks

17 Nov 2010, 8:03 AM
#4
welldone avatar

welldone

New Zenner

Join Date:
Nov 2010
Posts:
3
Plugin Contributions:
0

Re: How to not display the shipping cost under shipping method?

Just in case anyone else is interested, here's how I fixed it.

In tpl_checkout_shipping_default.php, line 179 - 188:

<div class="important forward"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></div>

<?php

            } else {

?>

<div class="important forward"><?php echo $currencies->format(zen_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . zen_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></div>

All you have to do is remove the echo for the important forward. This will affect all your shipping modules, if you want to do only one you can set its sort value so that it is the last and then change the for loop condition statement to ... $n2=sizeof($quotes[$i]['methods']) -1. I haven't tested it, I will probably do it as a side project soon.

For now this will do.

Cheers