1

我有一个 magento 网站,其基础货币为美元,Google Checkout 为英镑。

Google Checkout:购物车中使用的货币必须与卖家账户的货币一致。您提供了一个带有美元的购物车,并且卖家账户与英镑相关联。

在发送到 Google Checkout 之前,magento 有没有办法将金额转换为英镑?我想可以编写一个模块来实现这一点,但是还有其他解决方法吗?

4

1 回答 1

0

Okay, this is far too late, but I hope someone will find this useful. I don't know how your system works and which version of Magento you are using, but in 1.5 (the one that I am using) in the module GoogleCheckout, look for Model/Api/Xml/Abstract.php, this is base Model for the others models in the GoogleCheckout XML API and it has a method called getCurrency();

public function getCurrency()
{
    if (!$this->hasData('currency')) {
       $this->setData('currency', Mage::app()->getStore()->getBaseCurrencyCode());
        //$this->setData('currency', $this->getLocale()=='en_US' ? 'USD' : 'GBP');
    }
    return $this->getData('currency');
}

Since it is not good idea to override Abstract class in PHP according to this you will need to copy this class to the local folder and change the method getCurrency() so it transforms the currency to GBP.

于 2011-03-06T19:46:59.977 回答