【问题标题】:Magento: Paypal is taking shipping address as default instead of billing addressMagento:Paypal 将送货地址作为默认地址,而不是帐单地址
【发布时间】:2012-08-15 12:48:11
【问题描述】:

我在基于 magento 的电子商务网站中使用“PayPal 网站付款标准”。在结帐时,如果用户输入单独的帐单和送货地址并前往贝宝网站进行付款,那么贝宝会将送货地址与信用卡字段一起显示为默认值。我想在那里显示默认账单,而不是运费。

我已经从这个文件`/app/code/local/Mage/Paypal/Api/Standard.php 中删除了这个(行:238)$request['address_override'] = 1;

PayPal 始终默认发货,如果是,为什么?他们应该记帐,因为在贝宝页面上用户正在付款。

请告知,我如何才能通过默认结算而不是送货?

谢谢。

【问题讨论】:

    标签: php mysql magento paypal e-commerce


    【解决方案1】:
    find app/code/core/Mage/Paypal/Model/Standard.php
    
    change
    
    $address = $isOrderVirtual ? $order->getBillingAddress() : $order->getShippingAddress();
    if ($isOrderVirtual) {
    $api->setNoShipping(true);
    } elseif ($address->validate()) {
    $api->setAddress($address);
    }
    
    to
    
    $address =$order->getBillingAddress();
    if ($address->validate())
    {
    $api->setAddress($address);
    }
    
    http://blog.muabana2z.com/?p=70
    

    【讨论】:

    • 非常感谢您的解决方案,这已解决,但为什么它通过送货地址,不明白?代码中的 isOrderVirtual 是什么?你能帮我理解一下吗?
    • @Prashant: isOrderVirtual 是例如带有可下载产品的订单
    猜你喜欢
    • 2018-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-18
    • 2013-02-28
    相关资源
    最近更新 更多