简体   繁体   English

未捕获的TypeError:无法读取null的属性'geoCountry'

[英]Uncaught TypeError: Cannot read property 'geoCountry' of null

In my magento one page checkout module throw error of jquery below error message. 在我的magento一页结帐模块中,在错误消息下方抛出jquery的错误。

Uncaught TypeError: Cannot read property ' geoCountry ' of null from checkout.js 未捕获的TypeError:无法从checkout.js读取null的属性' geoCountry '

Website url is http://ffoa.com.au/ 网站网址是http://ffoa.com.au/

I know its an old question but I just stumbled into the same problem, I used the mt-divas theme which uses also /iwd/opc/checkout.js like your site. 我知道这是一个老问题,但是我偶然遇到了一个同样的问题,我使用了mt-divas主题,该主题也使用/iwd/opc/checkout.js,就像您的网站一样。

The Error "Cannot read property 'geoCountry' of null" appeared when the user was not logged and checkout as guest is not allowed. 当用户未登录且不允许以访客身份签出时,出现错误“无法读取属性'geoCountry'为null”。 In this case when you trying to go to checkout without being logged in you'll see the loggin form on the /onestepcheckout site. 在这种情况下,当您尝试不登录而结帐时,将在/ onestepcheckout站点上看到loggin表单。 The opc.js is loaded but can't access some data. opc.js已加载,但无法访问某些数据。

solution remove the js from the site when user is not logged in: 当用户未登录时,解决方案从站点中删除js:

<customer_logged_out>
<reference name="head">
<!-- For a JS in the js folder -->
<action method="removeItem"><type>js</type><name>iwd/opc/checkout.js</name>       </action>
<action method="removeItem"><type>js</type><name>iwd/opc/extend.js</name>    </action>
</reference>
</customer_logged_out>

in iwd_opc.xml or local.xml 在iwd_opc.xml或local.xml中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM