peterjaap / magerun-addons

Addon modules for n98-magerun
187 stars 41 forks source link

media:images:defaultimage #54

Closed lewisvoncken closed 4 years ago

lewisvoncken commented 7 years ago

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));

peterjaap commented 6 years ago

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.

sreichel commented 6 years ago

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.