我在本教程中创建了一个新属性: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集合上?
答案 0 :(得分:0)
我的问题……,我没有运行属性重新索引编制。现在工作正常。