如何从产品页面中删除“标记”块?

时间:2021-05-26 05:27:10

I'm trying to remove the tagging feature from product pages in my Magento install.

我正在尝试从Magento安装中的产品页面中删除标签特性。

Here are the steps I followed to try to do that:

以下是我为实现这一目标所采取的步骤:

  1. Disabled caching in the Magento admin pages
  2. 在Magento管理页面中禁用缓存。
  3. Cleared my browser cache
  4. 清除浏览器缓存
  5. Disabled Tags in the admin pages both for default config and individual stores (Dashboard > System > Config > Advanced > Mage_Tag > Disable > Save was the method I used)
  6. 在管理页面中为默认配置和单独存储禁用标记(我使用的方法是仪表板>系统>配置>高级> Mage_Tag >禁用> Save)
  7. Commented out everything in tags.xml
  8. 注释掉了标签。xml中的所有内容。

That didn't work the way I expected it to, though. It appears that the tagging functionality no longer works, but the "Tags" tab and the form for adding tags are still displayed on product pages.

但这并不是我期望的那样。标签功能似乎不再起作用,但是“标签”选项卡和添加标签的表单仍然显示在产品页面上。

How can I remove the tagging feature entirely, including the displayed tags and the add-a-tag form?

如何完全删除标签特性,包括显示的标签和add-a-tag表单?

4 个解决方案

#1


17  

If you are using a local.xml then just use this code:

如果你使用的是本地的。然后使用以下代码:

<remove name="product_tag_list" />

Using local.xml is the easiest way to modify your page. Also the best way btw. Better then just disabling it via backend. Via xml it doesn't load so in the end performance of your shop is better.

使用本地。xml是修改页面的最简单方法。顺便说一句,这也是最好的方法。最好通过后端禁用它。通过xml,它不会加载,所以你的商店的最终性能更好。

#2


8  

Easy one :) Just add following in local.xml (inside layout tags).

简单一:)只要在本地添加追随。xml(内部布局标签)。

<catalog_product_view>
    <reference name="product.info.additional">
        <action method="unsetChild"><name>product_tag_list</name></action>
    </reference>
</catalog_product_view>

#3


2  

which tag.xml did you comment out? The one in your custom theme or the default? You need to do both, otherwise the default layout simply reinserts the values you omitted.

的标签。你把xml注释掉了吗?您的自定义主题中的那个还是默认的?您需要同时执行这两项操作,否则默认布局只会重新插入您忽略的值。

The <catalog_product_view> node in tag.xml is the one you are interested in.

标签中的 节点。xml是您感兴趣的。

I suggest that you read the article @Alan wrote on Magento XML Layout and install the LayoutViewer extension (or buy CommerceBug) to check that the layout updates are not being inserted then report back here if you still have questions.

我建议您阅读@Alan关于Magento XML布局的文章,并安装LayoutViewer扩展(或购买CommerceBug)以检查布局更新没有插入,如果您还有问题,请在这里报告。

HTH,
JD

HTH,JD

#4


0  

1) Copy "tag.xml" file from below location to your custom theme and remove below code. app\design\frontend\base\default\layout\tag.xml

1)复制”标签。从下面的位置到您的自定义主题的xml“文件,并删除下面的代码。app \设计\前端\ \默认布局\ \ tag.xml基地

    <catalog_product_view translate="label">
    <label>Catalog Product View</label>
     <!-- Mage_Tag -->
    <reference name="product.info.additional">
        <block type="tag/product_list" name="product_tag_list" before="-" template="tag/list.phtml">
            <block type="page/html_wrapper" name="product.tag.list.list.before" as="list_before" translate="label">
                <label>Tags List Before</label>
                <action method="setMayBeInvisible"><value>1</value></action>
            </block>
        </block>
    </reference>
</catalog_product_view>

OR 2) To disable tags from admin you need to follow below option. Admin: System > Configuration > Advanced > Advanced > Disable Modules Output > Mage_Tag = Disable.

或者2)禁用来自admin的标记,您需要遵循以下选项。管理员:系统>配置>高级> >禁用模块输出> Mage_Tag =禁用。

#1


17  

If you are using a local.xml then just use this code:

如果你使用的是本地的。然后使用以下代码:

<remove name="product_tag_list" />

Using local.xml is the easiest way to modify your page. Also the best way btw. Better then just disabling it via backend. Via xml it doesn't load so in the end performance of your shop is better.

使用本地。xml是修改页面的最简单方法。顺便说一句,这也是最好的方法。最好通过后端禁用它。通过xml,它不会加载,所以你的商店的最终性能更好。

#2


8  

Easy one :) Just add following in local.xml (inside layout tags).

简单一:)只要在本地添加追随。xml(内部布局标签)。

<catalog_product_view>
    <reference name="product.info.additional">
        <action method="unsetChild"><name>product_tag_list</name></action>
    </reference>
</catalog_product_view>

#3


2  

which tag.xml did you comment out? The one in your custom theme or the default? You need to do both, otherwise the default layout simply reinserts the values you omitted.

的标签。你把xml注释掉了吗?您的自定义主题中的那个还是默认的?您需要同时执行这两项操作,否则默认布局只会重新插入您忽略的值。

The <catalog_product_view> node in tag.xml is the one you are interested in.

标签中的 节点。xml是您感兴趣的。

I suggest that you read the article @Alan wrote on Magento XML Layout and install the LayoutViewer extension (or buy CommerceBug) to check that the layout updates are not being inserted then report back here if you still have questions.

我建议您阅读@Alan关于Magento XML布局的文章,并安装LayoutViewer扩展(或购买CommerceBug)以检查布局更新没有插入,如果您还有问题,请在这里报告。

HTH,
JD

HTH,JD

#4


0  

1) Copy "tag.xml" file from below location to your custom theme and remove below code. app\design\frontend\base\default\layout\tag.xml

1)复制”标签。从下面的位置到您的自定义主题的xml“文件,并删除下面的代码。app \设计\前端\ \默认布局\ \ tag.xml基地

    <catalog_product_view translate="label">
    <label>Catalog Product View</label>
     <!-- Mage_Tag -->
    <reference name="product.info.additional">
        <block type="tag/product_list" name="product_tag_list" before="-" template="tag/list.phtml">
            <block type="page/html_wrapper" name="product.tag.list.list.before" as="list_before" translate="label">
                <label>Tags List Before</label>
                <action method="setMayBeInvisible"><value>1</value></action>
            </block>
        </block>
    </reference>
</catalog_product_view>

OR 2) To disable tags from admin you need to follow below option. Admin: System > Configuration > Advanced > Advanced > Disable Modules Output > Mage_Tag = Disable.

或者2)禁用来自admin的标记,您需要遵循以下选项。管理员:系统>配置>高级> >禁用模块输出> Mage_Tag =禁用。