Oli*_*ams 4 magento categories
看起来这应该是一个可以找到的问题,但我无法找到它.
存储在magento数据库中的NAME类别在哪里?我可以看到catalog_category_entity有密钥ID,然后还有其他EAV表.但我找不到存储在任何表格前缀的类别的实际名称catalog_category.
至少对于产品,catalog_products_entity表中包含SKU(某些人类可读的值).
类别名称在表中 catalog_category_entity_varchar
您正在寻找的请求:
select cat.*, cv.value as `category_name` from `catalog_category_entity` as cat
join `catalog_category_entity_varchar` as cv on cat.entity_id = cv.`entity_id`
join `eav_attribute` as att on att.`attribute_id` = cv.`attribute_id`
join `eav_entity_type` as aty on att.`entity_type_id` = aty.`entity_type_id`
where aty.`entity_model` = 'catalog/category' and att.`attribute_code` = 'name' and cv.`store_id` = 0
Run Code Online (Sandbox Code Playgroud)
请注意,这是默认商店视图的类别名称.
如果您的magento中有多个商店或商店视图,则只需调整条件即可cv.`store_id` = 0.
您可以在表格中找到商店列表core_store