药盒 / 产品附件
Magento2 产品附件模块
此包的规范存储库似乎已不存在,因此已冻结该包。
1.0.2
2018-04-20 10:09 UTC
Requires
- php: ~7.0.2|~7.1.0
This package is auto-updated.
Last update: 2020-01-20 14:53:43 UTC
README
分支自: https://github.com/mageprince/magento2-productAttachment
Magento2 产品附件
Magento 2 的产品附件扩展为产品页面添加了特殊的附件区块,您可以在其中上传多种文档,例如用户手册、额外图像、PDF、证书、许可证等。
它还支持 API(SOAP)来创建/更新和删除附件。
安装说明
- 将存储库的内容复制到 app/code/Prince/Productattach
- 运行命令: php bin/magento setup:upgrade
- 运行命令: php bin/magento setup:static-content:deploy
- 现在清除缓存: php bin/magento cache:flush
贡献
想要为此扩展做出贡献?最快的方式是 在 GitHub 上发起一个拉取请求。
支持
如果您遇到任何问题或错误,请在 GitHub 上 发起一个问题。
截图
产品页面
附件管理员网格
添加/编辑附件
选择产品
附件设置
API(SOAP)示例
创建新的附件记录
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:all="http://magetest:8000/index.php/soap/all?services=princeProductattachV1">
<soap:Header/>
<soap:Body>
<all:princeProductattachV1UpdateInsertAttachmentRequest>
<productattachTable>
<productAttachId>0</productAttachId>
<name>testname</name>
<description>test desc</description>
<file>testfile.pdf</file>
<url></url>
<store>0,1</store>
<customerGroup>0,1,2,3</customerGroup>
<products>1</products>
<active>1</active>
</productattachTable>
<filename>testfile.pdf</filename>
<fileContent><![CDATA[JVBERi0xLjYNJeLjz9MN....CiUlRU9GDQo=]]></fileContent>
</all:princeProductattachV1UpdateInsertAttachmentRequest>
</soap:Body>
</soap:Envelope>
更新附件记录(与上一个相同,只是在 productAttachId 元素中给出了 id)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:all="http://magetest:8000/index.php/soap/all?services=princeProductattachV1">
<soap:Header/>
<soap:Body>
<all:princeProductattachV1UpdateInsertAttachmentRequest>
<productattachTable>
<productAttachId>9</productAttachId>
<name>testname</name>
<description>test desc</description>
<file>testfile.pdf</file>
<url></url>
<store>0,1</store>
<customerGroup>0,1,2,3</customerGroup>
<products>1</products>
<active>1</active>
</productattachTable>
<filename>testfile.pdf</filename>
<fileContent><![CDATA[JVBERi0xLjYNJeLjz9MN....CiUlRU9GDQo=]]></fileContent>
</all:princeProductattachV1UpdateInsertAttachmentRequest>
</soap:Body>
</soap:Envelope>
删除附件记录
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:all="http://magetest:8000/index.php/soap/all?services=princeProductattachV1">
<soap:Header/>
<soap:Body>
<all:princeProductattachV1DeleteAttachmentRequest>
<int>9</int>
</all:princeProductattachV1DeleteAttachmentRequest>
</soap:Body>
</soap:Envelope>