简体   繁体   English

来自GetResourceModel()的错误

[英]error from GetResourceModel()

I am getting the error listed below when the code reaches the line containing 当代码到达包含以下内容的行时,出现以下错误

$collection = Mage::getResourceModel(’sales/order_collection’)->addAttributeToSelect(’*’);

Fatal error: Call to a member function addAttributeToSelect() on boolean in.... 致命错误:在布尔输入中调用成员函数addAttributeToSelect()。

I got the code from an e-book ""php|architect's Guide to Programming Magento Commerce" by Mark Kimsel. 我从Mark Kimsel的电子书“ php |建筑师的Magento商业编程指南”中获得了代码。

I want to utilize the Magento data access Classes to get data for CRM and accounting. 我想利用Magento数据访问类来获取CRM和会计数据。 I need to know more about how Magento works and specifically more about the Class properties and methods and how to call them. 我需要更多地了解Magento的工作原理,尤其是有关Class属性和方法以及如何调用它们的更多信息。 I would appreciate suggestions for resources for learning how to do this.?? 我将不胜感激,建议您学习如何做的资源。

Kind Regards... 亲切的问候...

My question was answered via a comment. 我的问题通过评论得到了回答。 Thank you Mladen Ilic, My apostrophes do seem to be backticks. 谢谢Mladen Ilic,我的撇号似乎确实是引号。 And I did copy and paste from a .pdf. 我确实从.pdf复制并粘贴。

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

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