Magento结帐:自定义审核页面总计文本(装运和搬运(固定费率))

Magento结帐:自定义审核页面总计文本(装运和搬运(固定费率)),magento,checkout,shipping,summary,Magento,Checkout,Shipping,Summary,在magento的onepage checkout中的review order页面上,我想缩短“Shipping&Handling(统一费率-固定)”文本(请参阅)。 我希望它只是读“装运和搬运”,并删除括号中的承运人/交付类型 我该怎么做?它是用$this->renderTotals(null,$\u colspan)呈现的,这给了我运输成本+小计。我不知道从这里开始 提前感谢这里是我已经完成的一个实现。这是一个标准的覆盖(http://inchoo.net/ecommerce/magento

在magento的onepage checkout中的review order页面上,我想缩短“Shipping&Handling(统一费率-固定)”文本(请参阅)。 我希望它只是读“装运和搬运”,并删除括号中的承运人/交付类型

我该怎么做?它是用
$this->renderTotals(null,$\u colspan)呈现的,这给了我运输成本+小计。我不知道从这里开始


提前感谢

这里是我已经完成的一个实现。这是一个标准的覆盖(http://inchoo.net/ecommerce/magento/how_to_override_magento_model_classes/). 我这样做是为了不深入到覆盖系统中

class Your_Company_Model_Address_Total_Shipping extends Mage_Sales_Model_Quote_Address_Total_Shipping
{

    /**
     * Collect totals information about shipping
     *
     * @param   Mage_Sales_Model_Quote_Address $address
     * @return  Mage_Sales_Model_Quote_Address_Total_Shipping
     */
    public function collect(Mage_Sales_Model_Quote_Address $address)
    {
        parent::collect($address);

        $method = $address->getShippingMethod();

        if ($method) {
            foreach ($address->getAllShippingRates() as $rate) {
                if ($rate->getCode()==$method) {
                    $shippingDescription = $rate->getMethodTitle();
                    if (stripos($shippingDescription, ",") > -1)
                        $shippingDescription = substr($shippingDescription, 0, stripos($shippingDescription, ","));
                    $address->setShippingDescription(trim($shippingDescription, ' -'));
                    break;
                }
            }
        }

        return $this;
    }
}

我试图为此制作一个模块,但我试图覆盖fetch函数,并去掉将$address->getShippingDescription()添加到$title的部分。我以前从来没有这样做过,所以这是尝试&错误,但我想我几乎让它工作了。模块被调用(正如我在system.log中看到的),但是在进入查看页面之前,签出被卡住了。也许你可以看看,看看我做错了什么:谢谢!对我来说,你的代码看起来不错,尽管我没有试过。您是否有NetBeans或类似的工具来逐步完成代码?光标离开代码时会发生什么?您的代码几乎与之前的代码相同,只是没有几行代码(这些代码不会导致问题)。考虑到您的日志被调用,您可能在其他地方出错。对于过时的Inchoo链接: