Когда я экспортирую результаты следующего запроса в .csv из значений phpMyAdmin для «name», «wattage_field» и «price» отображаются как NULL? Значения для этих столбцов отображаются правильно в phpMyAdmin?
-- Product entity type ID
SET @etype = (SELECT
entity_type_id
FROM
eav_entity_type
WHERE
entity_type_code = 'catalog_product');
-- Product name attribute ID
SET @name = (SELECT
attribute_id
FROM
eav_attribute
WHERE
attribute_code = 'name'
AND entity_type_id = @etype);
-- Product wattage_field attribute ID
SET @wattage_field = (SELECT
attribute_id
FROM
eav_attribute
WHERE
attribute_code = 'wattage_field'
AND entity_type_id = @etype);
-- Admin store ID
SET @store = 0;
-- Query
SELECT
e.entity_id AS 'id',
e.sku,
v1.value AS 'name',
v2.value AS 'wattage_field',
d1.value AS 'price'
FROM
catalog_product_entity e
LEFT JOIN
cataloginventory_stock_item si ON e.entity_id = si.product_id
LEFT JOIN
catalog_product_entity_varchar v1 ON e.entity_id = v1.entity_id
AND v1.store_id = @store
AND v1.attribute_id = @name
LEFT JOIN
catalog_product_entity_varchar v2 ON e.entity_id = v2.entity_id
AND v2.store_id = @store
AND v2.attribute_id = @wattage_field