shopify商店隐藏产品价格步骤
shopify商店隐藏产品价格步骤的核心内容
隐藏产品价格备注如果您使用Shopify 免费模板,您可以联系 Shopify 支持团队获得本教程的帮助。本教程设计时间为 15 分钟。详情请参考Support for themeshopify商店隐藏产品价格步骤的文本
隐藏产品价格
备注
如果您使用Shopify 免费模板,您可以联系 Shopify 支持团队获得本教程的帮助。本教程设计时间为 15 分钟。详情请参考Support for themes。
备注
本定义用于复古 Shopify 模板不适用于 模板Online Store 2.0”模板。
找到你的模板架构版本
探索“Online Store 2.0自定义模板
您可以通过编辑货币格式来隐藏所有产品的价格,并在未来再次显示价格。
提示:如果您想暂时阻止客户购买您的产品,您也可以禁止购物车。
PC:
在 Shopify 后台,转到设置。
点击商店的详细信息。
单击更改商店货币部分的格式。
把前两种格式放在一起span并在元素中设置一个类hidden。请勿使用引号。例如,对于使用美元货币的商店,包括货币 HTML格式如下:
<spanclass=hidden>${{amount}}USD</span>苹果系统:
在Shopify 应用中,转到商店>设置。
点击商店设置下的详细信息。
点击商店的详细信息。
单击更改商店货币部分的格式。
把前两种格式放在一起span并在元素中设置一个类hidden。请勿使用引号。例如,对于使用美元货币的商店,包括货币 HTML格式如下:
<spanclass=hidden>${{amount}}USD</span>安卓系统:
在Shopify 在应用中,转到商店>设置。
点击商店设置下的详细信息。
点击商店详细信息。
单击更改商店货币部分的格式。
把前两种格式放在一起span并在元素中设置一个类hidden。请勿使用引号。例如,对于使用美元货币的商店,包括货币 HTML格式如下:
<spanclass=hidden>${{amount}}USD</span>下面是无货币 HTML格式:
<spanclass=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 afree 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 toSupport 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 alsodisable your cart.
PC:
From your Shopify admin,go toSettings.
ClickStore details.
In theStore currencysection,clickChange formatting.
Wrap the first two formats in aspanelement with a class set tohidden. Don't use quotes. For example,below is theHTML with currencyformat for a store that uses USD as its currency:
<spanclass=hidden>${{amount}}USD</span>iPhone:
From theShopify app,go toStore>Settings.
UnderStore settings,tapStore details.
ClickStore details.
In theStore currencysection,clickChange formatting.
Wrap the first two formats in aspanelement with a class set tohidden. Don't use quotes. For example,below is theHTML with currencyformat for a store that uses USD as its currency:
<spanclass=hidden>${{amount}}USD</span>Android:
From theShopify app,go toStore>Settings.
UnderStore settings,tapStore details.
ClickStore details.
In theStore currencysection,clickChange formatting.
Wrap the first two formats in aspanelement with a class set tohidden. Don't use quotes. For example,below is theHTML with currencyformat for a store that uses USD as its currency:
<spanclass=hidden>${{amount}}USD</span>Below is theHTML without currencyformat:
<spanclass=hidden>${{amount}}</span>Caution
Do not place<span>${{ amount }}</span>into theEmail with CurrencyandEmail without Currencyfields.
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 toOnline Store>Themes.
Find the theme you want to edit,and then clickActions>Edit code.
iPhone:
From theShopify app,tapStore.
In theSales channelssection,tapOnline Store.
TapManage themes.
Find the theme you want to edit,and then clickActions>Edit code.
Android:
From theShopify app,tapStore.
In theSales channelssection,tapOnline Store.
TapManage themes.
Find the theme you want to edit,and then clickActions>Edit code.
In theAssetsdirectory,click to open yourtheme.scss.liquidfile.
The name of the stylesheet can vary theme to theme,so if you cannot findtheme.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;}ClickSave.
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官家官网