I am working on a plugin using the getCriteria function, but for every Element Type I put, I always get an error:
No element type exists by the type “Comerce_Group”.
$criteria = craft()->elements->getCriteria("Comerce_Group");
$criteria->number = $number;
return $criteria->first();
And here is the Comerce_Group code:
class Comerce_GroupModel extends BaseModel
{
protected function defineAttributes()
{
return array (
'id' => AttributeType::Number,
'number' => AttributeType::String,
'itemTotal' => AttributeType::Number,
);
}
}