Magento查找签出方法

Magento查找签出方法,magento,Magento,如何找到方法是“来宾”还是“注册” getCheckoutMethod已弃用。因此建议使用它。在哪里弃用?最新的magento 1.7.0.2似乎在使用它并对其进行定义,但并没有提及任何关于此方法的弃用 Mage::getSingleton('checkout/type_onepage')->getCheckoutMethod(); 此方法在多个位置定义 grep ' getCheckoutMethod' app/code -rsn app/code/core/Mage/Checkout

如何找到方法是“来宾”还是“注册”


getCheckoutMethod
已弃用。因此建议使用它。

在哪里弃用?最新的magento 1.7.0.2似乎在使用它并对其进行定义,但并没有提及任何关于此方法的弃用

Mage::getSingleton('checkout/type_onepage')->getCheckoutMethod();
此方法在多个位置定义

grep ' getCheckoutMethod' app/code -rsn
app/code/core/Mage/Checkout/Model/Type/Onepage.php:165:    public function getCheckoutMethod()
app/code/core/Mage/Paypal/Model/Express/Checkout.php:661:    public function getCheckoutMethod() 

getCheckoutMethod通过quote模型不推荐使用,因此通过checkout\u onepage模型不推荐使用

/**
 * Return quote checkout method code
 *
 * @deprecated after 1.4 beta1 it is checkout module responsibility
 * @param boolean $originalMethod if true return defined method from begining
 * @return string
 */
public function getCheckoutMethod($originalMethod = false)
{
    if ($this->getCustomerId() && !$originalMethod) {
        return self::CHECKOUT_METHOD_LOGIN_IN;
    }
    return $this->_getData('checkout_method');
}

显示在magento1.4beta1之后弃用的
getCheckoutMethod()
因此,请从未弃用的位置询问它。奇怪的是,签出本身在类Mage/checkout/Model/Type/Onepage.php中使用了折旧方法(至少在MagentoEE 1.13.1中是如此)。