How is the «Used in Product Listing» handled?




The result of the $select->assemble():

SELECT 
	`main_table`.*
	, `additional_table`.*
	, IF(al.value IS NOT NULL, al.value, main_table.frontend_label) AS `store_label` 
FROM 
		`eav_attribute` AS `main_table`
	INNER JOIN 
			`catalog_eav_attribute` AS `additional_table` 
		ON 
			main_table.attribute_id = additional_table.attribute_id
	LEFT JOIN 
			`eav_attribute_label` AS `al` 
		ON 
				al.attribute_id = main_table.attribute_id 
			AND 
				al.store_id = 1 
WHERE 
		(main_table.entity_type_id = 4) 
	AND 
		(additional_table.used_in_product_listing = 1)







See also: