Organizational Research By

Surprising Reserch Topic

eav entity type without quote at instalation

eav entity type without quote at instalation  using -'php,magento,installation,entity-attribute-value,quote'

the origin...

I have a module with a setup script (common mysql4-upgrade-0.1.0-0.1.1.php), adding an attribute to quote:

$eav = new Mage_Eav_Model_Entity_Setup('sales_setup');
$eav->addAttribute('quote', 'my_attribute', array('type' => 'varchar'));

If I run my magento store on an empty DB, setups scripts run and a 'Wrong entity ID' error breaks the process. Call stack points to my setup script.

...looking for...

If I go to database, I see eav_entity_type table filled but only with 8 types: the quote type is not registered!

That's why Mage_Eav_Model_Entity_Setup->getEntityTypeId() throws the exception.

The question:

I don't know why quote entity is not created with another entities. How can I force magento to register quote entity before my module setup? Is there any alternative?

There is a possibly related question

asked Oct 13, 2015 by ukohale
0 votes

Related Hot Questions

1 Answer

0 votes
answered Oct 13, 2015 by yogeshplv