2012-07-16 110 views
0

我在前端和后端收到此消息:处理您的请求时出错。无法解决“Currency'USD'not found”错误

当我删除缓存文件夹(var/cache,/ tmp &/session)后,我再次访问前端,直到我访问存储中的任何页面并以此为价格。后端很难重新开始工作(现在不是这样)。

检查错误日志我收到了一大堆开头为“Currency'USD'not found”的邮件。这一切都发生在一些小的变化之后,包括通过编辑/lib/Zend/Locale/Data/es.xml(西班牙语言)将货币代码的顺序从“$ 100.00”更改为“100,00€”规格)在这里:

<currencyFormats> 
    <currencyFormatLength> 
    <currencyFormat> 
     <pattern>¤ #,##0.00</pattern> 
    </currencyFormat> 
    </currencyFormatLength> 
    <unitPattern count="other">{0} {1}</unitPattern> 
</currencyFormats> 

我试着回到以前的格式,然后复制原始文件回来。别的东西必须在某处破碎,我找不到它。

这是在错误日志的最后一个步骤摘要

一:5:{I:(你需要他们呢?)0; S:24: “货币 '美元' 未发现”; i:1; s:3740:“#0 /home/content/32/9343032/html/app/code/core/Mage/Core/Model/Locale.php(575):Zend_Currency - > __ construct('USD',对象(从Zend_Locale))

#1 /home/content/32/9343032/html/app/code/core/Mage/Directory/Model/Currency.php(233):Mage_Core_Model_Locale->货币( 'EUR')

#2 /home/content/32/9343032/html/app/code/core/Mage/Directory/Model/Currency.php(216):Mage_Directory_Model_Currency- > formatTxt(NULL,Array)

#3 /home/content/32/9343032/html/app/code/core/Mage/Directory/Model/Currency.php(197):Mage_Directory_Model_Currency-> formatPrecision(NULL, 2,阵列,TRUE,FALSE)

#4 /home/content/32/9343032/html/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82):Mage_Directory_Model_Currency->格式(NULL)

请帮我在这里...

感谢 米格尔

+0

BTW:忘了提的是,变化是¤Â#,## 0.00#,## 0.00¤Â。有趣的代码¤代表€符号。 – MiguelR 2012-07-16 22:03:16

+0

您是否真的在管理面板中更改过货币类型?它似乎在寻找美元货币。 – udjamaflip 2012-07-17 01:11:40

+0

udjamaflip,谢谢你的回应。是的,货币从一开始就正确地变成了欧元。那是我的一个变化(有毒的呢?我不知道)。无论如何,因为无论我做什么我都无法访问管理员,所以我决定更新到1702(我有1700)并刷新了所有内容。它现在正在运行好了,我必须逐一检查详细信息,以确保我对代码所做的所有小修改都是正确的(并且不会再次中断)。 – MiguelR 2012-07-18 09:03:50

回答

7

清除缓存,从var/session中删除所有会话文件并刷新。

1

首先检查您的语言环境的Magento管理面板 设置系统 - >配置 - >

常规 - >常规 - >区域设置选项 区域设置//检查选择哪一选项。

如果选择是英语(美国登)

请更新区域file..or检查是否有货币设置可用。

进入cPanel和开放Magento的文件: LIB /的Zend /区域设置/数据/ en.xml

 <currency type="USD"> 
      <displayName>US Dollar</displayName> 
      <displayName count="one">US dollar</displayName> 
      <displayName count="other">US dollars</displayName> 
      <symbol>$</symbol> 
     </currency> 

或全部更改后,您可以添加以下

<numbers> 

     <currencyFormats> 
      <currencyFormatLength> 
       <currencyFormat> 
        <pattern>¤#,##0.00;(¤#,##0.00)</pattern> 
       </currencyFormat> 
      </currencyFormatLength> 
      <unitPattern count="one">{0} {1}</unitPattern> 
      <unitPattern count="other">{0} {1}</unitPattern> 
     </currencyFormats> 

     add the below lines 

     <currencies> 
      <currency type="USD"> 
       <displayName>US Dollar</displayName> 
       <displayName count="one">US dollar</displayName> 
       <displayName count="other">US dollars</displayName> 
       <symbol>$</symbol> 
      </currency> 
      <currency type="USN"> 
       <displayName>US Dollar (Next day)</displayName> 
       <displayName count="one">US dollar (next day)</displayName> 
       <displayName count="other">US dollars (next day)</displayName> 
      </currency> 
     </currencies> 

    </numbers> 

的选项。 。请清除Magento的cache..to工作的所有变化适当