【问题标题】:How can we change size of an attribute Swatch image in Magento2我们如何在 Magento2 中更改属性 Swatch 图像的大小
【发布时间】:2016-08-29 11:06:09
【问题描述】:

如何更改Magento2中的product swatch image size

是否有任何选项可以更改文件/etc/view.xml的大小?

【问题讨论】:

  • @David Henry for magento 2.1 with the Porto Theme 你在 /vendor/magento/module-swatch/etc/module.xmlfile 中改变了什么

标签: product magento2


【解决方案1】:

我得到了解决方案:

在 /etc/view.xml 文件中添加以下代码

<image id="swatch_image" type="swatch_image">
                 <width>38</width>
                 <height>38</height>
</image>

清除所有缓存类型并检查。

【讨论】:

    【解决方案2】:

    对我来说这不起作用,但编辑以下文件确实有效:

    /vendor/magento/module-swatch/etc/module.xml

    我正在使用带有波尔图主题的 M2.1.2。

    【讨论】:

      【解决方案3】:

      这是在 magento 2.3 https://github.com/magento/magento2/issues/2978#issuecomment-171610891 中修复的。

      更新到 Magento 2.3 将解决此问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-01-01
        • 1970-01-01
        • 2014-09-01
        • 2014-10-31
        • 2021-12-16
        • 2019-12-05
        • 2021-12-19
        相关资源
        最近更新 更多