【问题标题】:Magento Multi-flat shipping module and free shippingMagento Multi-flat 运输模块和免费送货
【发布时间】:2016-05-02 07:02:02
【问题描述】:

早安,

我目前正在处理一个重要的 magento 项目,如果此订单的价格高于 33 欧元,我需要为运输选项添加零价格选项。 我安装了这个模块: https://www.magentocommerce.com/magento-connect/multi-flat-shipping-1.html

图片解释我的问题:

谢谢。

【问题讨论】:

  • 我投票结束这个问题,因为 Stack Overflow 是一个programming-related 问答网站。您的问题与编程无关-实际上您实际上并没有问过问题。也许你应该把它发到magento.stackexchange.com 上?

标签: magento


【解决方案1】:

在位于app\code\community\MSP\FlatShipping5\Model\Carrier\Abstract.php的扩展抽象类MSP_FlatShipping5_Model_Carrier_Abstract中,您需要添加以下代码:

if ($request->getBaseSubtotalInclTax() > 33 ) {
    $shippingPrice = '0.00';
}

在这行代码下面的 collectRates 函数中,大约第 90 行:

if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) {
    $shippingPrice = '0.00';
}   

要使此代码更易于管理,您可以使用system.xml 创建免费送货金额字段并获取相同的字段。

【讨论】:

    猜你喜欢
    • 2014-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-15
    相关资源
    最近更新 更多