I have some simple products which are associated to a grouped product.
If I load the simple product separately, the attribute tax_class_id
is set, but if the product is contained in a grouped product (fetched in \Example_CatalogGrouped_Model_Product_Type_Grouped::getAssociatedProducts
), the tax_class_id
is empty.
In the backend, the value is present.
Logging the SQL queries revealed, that the data is loaded from the EAV.
The query contains the following part (attribute id of tax_class_id
is 85), but the value is not present in the result:
Checking the query which loaded the products, there is a the condition
UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_product_entity_int` AS `t_d` LEFT JOIN `catalog_product_entity_int` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_id IN (7497)) AND (t_d.attribute_id IN ( .... , '85', .... )) AND (t_d.store_id = 0)