magento collection错误:尝试添加的对象无效

magento collection错误:尝试添加的对象无效

 

打印collection发现_itemObjectClass类名不对。

但是程序都统一是CustomerStore,不知道这里为什么变为Customerstore。

为了避免这错误暂时把类名定为:Customerstore。

所以今后开发插件还是要注意这点:类名的骆驼型,避免一个名称中有多个大写字母。

  protected '_itemObjectClass' => 

string

 'Mage_CustomerStore_Model_Customerstore' (length=38)
  protected '_orders' => 
    array (size=0)
      empty
  protected '_filters' => 
    array (size=0)
      empty
  protected '_isFiltersRendered' => 

boolean

 false
  protected '_curPage' => 

int

 1
  protected '_pageSize' => 

boolean

 false
  protected '_totalRecords' => null
  protected '_isCollectionLoaded' => null
  protected '_cacheKey' => null
  protected '_cacheTags' => 
    array (size=0)
      empty
  protected '_cacheLifetime' => 

int

 86400
  protected '_flags' => 
    array (size=0)
posted @ 2014-03-19 13:27  lifeinearth  阅读(196)  评论(0编辑  收藏  举报