Magento Community 1.7.0.2 を使用しています。
最近、ストアで「フラット カタログ カテゴリを使用する」オプションと「フラット カタログ カテゴリを使用する」オプションをオンにすることにしました。「画像」属性を使用していたフロントエンドのすべての画像が消えました(デフォルトの画像プレースホルダーに置き換えられました)。「small_image」または「thumbnail」属性で表示されるすべての画像が正しく表示されます。
catalog_product_flat_1 テーブルを調べたところ、そこに「画像」列はありません (ただし、「image_label」列はあります...)。フラット インデクサー コードを調べたところ、フラット テーブルに挿入されたすべての属性を取得するために使用している SQL ステートメントを出力できました。
SELECT `main_table`.*, `additional_table`.*
FROM `eav_attribute` AS `main_table`
INNER JOIN `catalog_eav_attribute` AS `additional_table`
ON additional_table.attribute_id = main_table.attribute_id
WHERE (main_table.entity_type_id = :entity_id) AND (main_table.backend_type = 'static'
OR additional_table.is_used_for_promo_rules = 1 OR additional_table.used_in_product_listing = 1 OR additional_table.used_for_sort_by = 1
OR main_table.attribute_code IN('sku', 'type_id', 'name', 'status', 'visibility', 'price', 'weight', 'url_path', 'url_key', 'thumbnail', 'small_image',
'tax_class_id', 'special_from_date', 'special_to_date', 'special_price', 'cost', 'is_recurring', 'recurring_profile', 'msrp_enabled', 'msrp',
'msrp_display_actual_price_type', 'enable_googlecheckout', 'gift_message_available', 'price_view', 'price_type', 'shipment_type', 'weight_type',
'sku_type', 'links_purchased_separately', 'links_title', 'short_description', 'image_label', 'thumbnail_label', 'small_image_label', 'news_from_date',
'news_to_date', 'created_at', 'updated_at', 'required_options'))
ご覧のとおり、リストに「画像」属性はありません。
'image' 属性は、デフォルトの Magento ディストリビューションのフロントエンドで使用されるため、これはバグでしょうか?