首页 > 解决方案 > 将自定义属性添加到类别集合 - magento 2.3

问题描述

我在本教程中创建了一个新属性:https ://devdocs.magento.com/guides/v2.3/ui_comp_guide/howto/add_category_attribute.html 。

这工作正常,但该属性不存在于前端的类别集合中。

$block is \Magento\Catalog\Block\Category\View

$block->getCurrentCategory()->getData(), does not contain my attribute.

必须在哪里指定此属性才能在 init 集合上加载?

标签: magento-2.3

解决方案


我的坏...,我没有运行属性重新索引。现在工作正常。


推荐阅读