【发布时间】:2023-03-05 17:11:02
【问题描述】:
我需要在我的产品页面中添加徽标图像。为此,我想创建一个属性以在产品页面管理员中上传图像。如何创建属性以在产品页面中上传图像并使其显示在前端?
【问题讨论】:
标签: magento
我需要在我的产品页面中添加徽标图像。为此,我想创建一个属性以在产品页面管理员中上传图像。如何创建属性以在产品页面中上传图像并使其显示在前端?
【问题讨论】:
标签: magento
您可以为每个产品添加新的产品图像类型,而不是使用简单的属性。
这里有一个非常简单的例子:
希望对你有帮助
更新
你只需要在 helper('catalog/image')->init($_product, 'brandimage')->resize(400,300); ?>">
【讨论】:
我认为下面的链接可以帮助你。
http://www.magentocommerce.com/magento-connect/file-attributes.html
此扩展使我们能够为产品上传文件。我想这也可以用来上传图片。
希望对你有所帮助...
【讨论】:
如果您需要上传产品页面选项卡中的文件,则无需创建产品自定义属性。只需安装以下扩展程序
然后 php bin/magento setup:upgrade php bin/magento setup:static-content:deploy en_GB php bin/magento indexer:reindex php bin/magento cache:clean
完美运行。
https://github.com/Sebwite/Magento2-Product-Downloads/tree/2.1-dev
【讨论】: