magento显示免费送货文本

I want to show the freeshipping price as text, like "Free shipping" but I can't get it to work. In app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php I found these lines:

$method->setPrice('0.00');
$method->setCost('0.00');

But if I change the 0.00 to "Free shipping", nothing happens. I did a LOT of research on the internet but nothing works. There are also much plugins that can set the price to "Free" but that only counts for the products.

So I am desperate and I hope someone can help me here. I am using Magento 1.7.0.2.

Many thanks

  1. Copy app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml to the respective theme folder you are using.

  2. In the available.phtml file, look for the following code (around line 56):

    <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
    <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
    <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
    <?php echo $_excl; ?>
    <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
        (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
    <?php endif; ?>
    </label>
    
  3. Replace it with the following:

    <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
    <?php if($_rate->getPrice() > 0) : ?>        
    <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
    <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
    <?php echo $_excl; ?>
    <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
        (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
    <?php endif; ?>
    <?php else : ?>
          (<?php echo $this->__('Free Shipping'); ?>)
    <?php endif; ?>
    </label>
    
  4. Save available.phtml, and clear your Magento caches. "Free Shipping" will now appear next to all methods containing a $0 amount on the One-Page-Checkout shipping section.