peterjaap / magerun-addons

Addon modules for n98-magerun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

media:images:defaultimage

lewisvoncken opened this issue · comments

De value for entity_type_id is fixed but I think this variable should be checked before inserting the values.

$db->query('INSERT INTO '.$prefix_table.'catalog_product_entity_varchar SET entity_type_id = ?, attribute_id = ?, store_id = ?, entity_id = ?, value = ? ON DUPLICATE KEY UPDATE value = ?',
array(4, $imageAttrId, 0, $product['entity_id'], $defaultImage, $defaultImage));

That would be nicer, yes. Although I've never come across a Magento installation where product entity type ID isn't 4.

But I'll welcome a PR for it.

Although I've never come across a Magento installation where product entity type ID isn't 4

At least in Magento 1.5 entity_type_id was 10 by default .... but cant tell when it was changed.