隐藏你Shopify网站的热销产品Best Selling页面

之前我们介绍过两个方式来Spy你的竞争对手的热销产品,而且现在也是很多人选品的重要参考。

如果你的shopify网站里面有那么几款产品做的还不错,那这几款产品你肯定不想被你的竞争对手抄走,尤其是Dropshipping的产品
其实使用几行代码就可以轻松隐藏热销产品页面,方法如下:

打开你的Shopify网站后台,Theme – Edit Code
打开文件 Templates > Collection.liquid

文件代码原文为

<!-- /templates/collection.liquid -->
{% comment %}
The contents of the collection.liquid template can be found in /sections/collection-template.liquid
{% endcomment %}
{% section 'collection-template' %}

现在只需要在这段代码的基础上进行修改:

在上面的代码前面加上

{% if collection.sort_by == 'best-selling' %}<div align="center">Nothing here</div>
{% else %}

在上面代码后面加上

{% endif %}

修改之后的整段代码如下。

<!-- /templates/collection.liquid -->
{% if collection.sort_by == 'best-selling' %}
<div align="center">Nothing here</div>
{% else %}
{% comment %}
The contents of the collection.liquid template can be found in /sections/collection-template.liquid
{% endcomment %}
{% section 'collection-template' %}
{% endif %}

然后点击右上角的保存按钮保存文件就可以了。

其中的Nothing here可以修改为任意你想要显示在网站页面的文字或者图片。

请登录后发表评论

    没有回复内容