codebaby / product-attachments
CodeBaby 产品附件 Magento 2 模块
v1.0.5
2021-04-06 18:18 UTC
Requires
- php: ~5.5.0|~5.6.0|~7.0.0|~7.2.0|~7.4.0
- magento/framework: *
- magento/magento-composer-installer: *
This package is auto-updated.
Last update: 2024-09-07 01:43:16 UTC
README
为产品添加附件字段,以便客户可以在产品页面上下载(Magento 2 模块)
安装说明
通过 composer 安装
composer require codebaby/product-attachments
安装后,运行以下命令
bin/magento s:up
bin/magento s:d:c
bin/magento s:s:d
(如果处于生产模式)
bin/magento s:s:d -f
(如果处于开发者模式)
bin/magento c:f
在产品页面上显示文件
要显示文件,请转到 商店 > 配置 > CodeBaby 设置 > 产品附件
并启用所需位置的显示
使用 xml 在自定义位置显示:向所需的 xml 节点添加此块
<block class="CodeBaby\ProductAttachments\Block\Product\View\Attachments" name="cb.product.files.tab" template="CodeBaby_ProductAttachments::product/view/product_attachments_tab.phtml"> <arguments> <argument translate="true" name="title" xsi:type="string">Product Attachments</argument> <argument name="sort_order" xsi:type="string">100</argument> </arguments> </block>