magento-2.3 - 将自定义属性添加到类别集合 - 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 集合上加载?
解决方案
我的坏...,我没有运行属性重新索引。现在工作正常。
推荐阅读
- jenkins - 在 Jenkins Pipeline 脚本上找不到 AWS CLI 和 SAM CLI(Jenkins 作为 Docker 实例运行)
- python - python函数可选参数并跳过或不跳过它们
- .htaccess - .htaccess 从非 www http 子文件夹重定向到 www https 子文件夹
- javascript - 在 JavaScript 中生成对象的随机矩阵的问题
- mysql - docker-compose,NodeJS 在 MYSQL 之前启动,即使使用 depends_on
- xcode - UISegmentedControl 不能再使用 IOS 13 Objective C 设置背景颜色
- laravel - Laravel 6 Backpack 4.0:如何在 FormRequest 类中获取当前页面 ID,或者我可以在不使用 FormRequest 类的情况下获得吗?
- visual-studio - 在 Visual Studio 2019 中将通用 Windows 应用程序导出为 EXE 文件
- git - 您是否应该提交 rc 和其他配置文件
- java - 在 libgdx 中保存和获取所有游戏对象