好的,这已经太晚了,但我希望有人会觉得这很有用 . 我不知道你的系统如何工作以及你正在使用哪个版本的Magento,但是在模块GoogleCheckout中的1.5(我正在使用的那个)中,查找Model / Api / Xml / Abstract.php,这是基本模型对于GoogleCheckout XML API中的其他模型,它有一个名为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');
}
由于在PHP according to this中覆盖Abstract类并不是一个好主意,因此您需要将此类复制到本地文件夹并更改方法getCurrency(),以便将货币转换为GBP .
1 回答
好的,这已经太晚了,但我希望有人会觉得这很有用 . 我不知道你的系统如何工作以及你正在使用哪个版本的Magento,但是在模块GoogleCheckout中的1.5(我正在使用的那个)中,查找Model / Api / Xml / Abstract.php,这是基本模型对于GoogleCheckout XML API中的其他模型,它有一个名为getCurrency()的方法;
由于在PHP according to this中覆盖Abstract类并不是一个好主意,因此您需要将此类复制到本地文件夹并更改方法getCurrency(),以便将货币转换为GBP .