shopify商店隐藏产品价格步骤
隐藏产品价格备注如果您使用Shopify 的免费模板,您可以联系 Shopify 支持团队获得关于此教程的帮助。此教程需要 15 分钟的设计时间。若要了解详情,请参阅Support for theme
目录
- 答案
- 文章目录
- shopify商店隐藏产品价格步骤详细回答
shopify商店隐藏产品价格步骤详细回答
隐藏产品价格
备注
如果您使用 Shopify 的免费模板,您可以联系 Shopify 支持团队获得关于此教程的帮助。此教程需要 15 分钟的设计时间。若要了解详情,请参阅 Support for themes。
备注
此自定义用于复古 Shopify 模板,不适用于“Online Store 2.0”模板。
找到您的模板架构版本
探索“Online Store 2.0”模板自定义
您可以通过编辑货币格式来隐藏所有产品价格,并在将来再次显示价格。
提示:如果您想暂时阻止客户购买您的产品,您还可以禁用购物车。
PC:
在 Shopify 后台中,转到设置。
点击商店详细信息。
在商店货币部分,点击更改格式。
将前两个格式放在
span
元素中并将一个类设置为hidden
。请勿使用引号。例如,对于使用美元货币的商店,含货币的 HTML 格式如下:
<span class=hidden>${{ amount }} USD</span>
苹果系统:
在 Shopify 应用中,转到商店 > 设置。
在商店设置下,点击商店详细信息。
点击商店详细信息。
在商店货币部分,点击更改格式。
将前两个格式放在
span
元素中并将一个类设置为hidden
。请勿使用引号。例如,对于使用美元货币的商店,含货币的 HTML 格式如下:
<span class=hidden>${{ amount }} USD</span>
安卓系统:
在 Shopify 应用中,转到商店 > 设置。
在商店设置下,点击商店详细信息。
点击商店详细信息。
在商店货币部分,点击更改格式。
将前两个格式放在
span
元素中并将一个类设置为hidden
。请勿使用引号。例如,对于使用美元货币的商店,含货币的 HTML 格式如下:
<span class=hidden>${{ amount }} USD</span>
下方是不含货币的 HTML 格式:
<span class=hidden>${{ amount }}</span>
注意
请勿将 <span>${{ amount }}</span>
放入含货币的电子邮件和不含货币的电子邮件字段中。
请勿向货币格式中添加引号,因为这样做可能会影响模板的 JavaScript 的功能。
这应该会隐藏店面中的所有价格。如果价格仍然显示,则您需要将一些代码添加到模板样式表的底部。然后继续按照后续步骤操作。
PC:
在 Shopify 后台中,转到在线商店 > 模板。
找到要编辑的模板,然后点击操作 > 编辑代码。
苹果系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分中,轻触在线商店。
轻触 Manage themes(管理模板)。
找到要编辑的模板,然后点击操作 > 编辑代码。
安卓系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分中,轻触在线商店。
轻触 Manage themes(管理模板)。
找到要编辑的模板,然后点击操作 > 编辑代码。
在 Assets 目录中,点击打开
theme.scss.liquid
文件。样式表的名称可能会因模板而异,因此,如果您找不到
theme.scss.liquid
,请查找以下其中一项:
- style.scss.liquid
- styles.scss.liquid
- theme.css.liquid
- timber.scss.liquid
在文件的最底部,添加以下代码:
.hidden { display: none; }
点击保存。
当您准备好再次显示价格时,请将商店的货币更改为任何其他货币,然后再更改回您自己的货币。这会将设置恢复为您商店货币的默认货币格式,并且店面中会再次显示价格。
Shopify商户官网原文详情:
Hide product prices
Note
If you use a free theme from Shopify, then you might be able to contact Shopify Support for help with this tutorial. It requires 15 minutes of design time. To learn more, refer to Support for themes.
Note
This customization is for vintage Shopify themes, and doesn't apply to Online Store 2.0 themes.
Find out your theme's architecture version
Explore Online Store 2.0 theme customizations
You can hide all of your product prices and reveal them again in the future by editing your currency formats.
Tip
If you want to prevent customers from purchasing your products temporarily, then you can also disable your cart.
PC:
From your Shopify admin, go to Settings.
Click Store details.
In the Store currency section, click Change formatting.
Wrap the first two formats in a
span
element with a class set tohidden
. Don't use quotes. For example, below is the HTML with currency format for a store that uses USD as its currency:<span class=hidden>${{ amount }} USD</span>iPhone:
From the Shopify app, go to Store > Settings.
Under Store settings, tap Store details.
Click Store details.
In the Store currency section, click Change formatting.
Wrap the first two formats in a
span
element with a class set tohidden
. Don't use quotes. For example, below is the HTML with currency format for a store that uses USD as its currency:<span class=hidden>${{ amount }} USD</span>Android:
From the Shopify app, go to Store > Settings.
Under Store settings, tap Store details.
Click Store details.
In the Store currency section, click Change formatting.
Wrap the first two formats in a
span
element with a class set tohidden
. Don't use quotes. For example, below is the HTML with currency format for a store that uses USD as its currency:<span class=hidden>${{ amount }} USD</span>Below is the HTML without currency format:
<span class=hidden>${{ amount }}</span>Caution
Do not place
<span>${{ amount }}</span>
into the Email with Currency and Email without Currency fields.It is important that you do not add quotes to your money formats, as doing so may interfere with the functionality of your theme's JavaScript.
This should hide all the prices on your storefront. If prices are still showing, then you need to add some code to the bottom of your theme's stylesheet. Continue to follow the next steps.
PC:
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
iPhone:
From the Shopify app, tap Store.
In the Sales channels section, tap Online Store.
Tap Manage themes.
Find the theme you want to edit, and then click Actions > Edit code.
Android:
From the Shopify app, tap Store.
In the Sales channels section, tap Online Store.
Tap Manage themes.
Find the theme you want to edit, and then click Actions > Edit code.
In the Assets directory, click to open your
theme.scss.liquid
file.The name of the stylesheet can vary theme to theme, so if you cannot find
theme.scss.liquid
, look for one of the following:
style.scss.liquid
styles.scss.liquid
theme.css.liquid
timber.scss.liquid
At the very bottom of the file, add the following code:
.hidden { display: none; }Click Save.
When you are ready to show your prices again, change your shop's currency to any other one, then change it back to your own currency. This reverts your settings to the default money formats for your shop's currency and shows the prices in your storefront again.
文章内容来源:Shopify商户官方网站