shopify商店选择要显示的付款图标步骤
shopify商店选择要显示的付款图标步骤的核心内容
如果您使用,请选择要显示的付款图标Shopify 免费模板,您可以联系 Shopify 支持团队获得本教程的帮助。本教程设计时间为 15 分钟。详情请参考Support for tshopify商店选择要显示的付款图标步骤正文
选择要显示的付款图标
备注
如果您使用Shopify 免费模板,您可以联系 Shopify 支持团队获得本教程的帮助。本教程设计时间为 15 分钟。详情请参考Support for themes。
备注
本定义用于复古 Shopify 模板不适用于 模板Online Store 2.0”模板。
找到你的模板架构版本
探索“Online Store 2.0自定义模板
所有免费的 Shopify 模板包含在页脚中显示支付图标的选项。显示的图标由商店的支付设置、客户的区域和货币决定。您可以在模板编辑器中使用支付图标。如果您想添加或删除支付图标而不更改支付设置,您可以编辑您的模板代码。
付款图标在页脚中使用
本定义设置的第一步是在页脚中使用付款图标:
转向模板编辑器。
点击页脚。
选择显示支付图标的复选框。
点击保存。
注意
假如使用Shopify 免费模板,您的模板不包括在页脚中使用付款图标的选项,这个自定义将不会影响您的模板。
编辑付款图标代码
在此步骤中,您将更改向页脚分配付款图标的方式。默认情况下,您的模板将显示与支付网关相关的图标(在后台的支付设置分区中使用),并可用于当前客户区域和语言。您可以手动添加或删除您想要显示的付款图标。
如需编辑付款图标代码,请执行以下操作:
PC:
在 Shopify 后台,转到网店>模板。
找到要编辑的模板,然后点击操作>编辑代码。
在Sections点击目录footer.liquid。如果此文件不包含在您的模板中,请单击Layout目录中的theme.liquid。
苹果系统:
在Shopify 在应用中,轻触商店。
在销售渠道部分,触摸在线商店。
轻触Manage themes(管理模板)。
找到要编辑的模板,然后点击操作>编辑代码。
在Sections点击目录footer.liquid。如果此文件不包含在您的模板中,请单击Layout目录中的theme.liquid。
安卓系统:
在Shopify 在应用中,轻触商店。
在销售渠道部分,触摸在线商店。
轻触Manage themes(管理模板)。
找到要编辑的模板,然后点击操作>编辑代码。
在Sections点击目录footer.liquid。如果此文件不包含在您的模板中,请单击Layout目录中的theme.liquid。
在本文件中找到以下代码:
{%fortypeinshop.enabled_payment_types%}将其替换为:
{%assignenabled_payment_types='visa,master,american_express,paypal'|remove:'' |split:','%}{%fortypeinenabled_payment_types%}在您刚刚粘贴的代码中,有一个用逗号分隔的支付服务提供商列表:visa,master,american_express,paypal。您所包含的支付服务提供商将决定在网上商店上显示的支付图标。您可以根据需要编辑支付服务提供商列表。
如下所示:
-`afterpay`-`american_express`-`apple_pay`-`bitcoin`-`dankort`-`diners_club`-`discover`-`dogecoin`-`dwolla`-`facebook_pay`-`forbrugsforeningen`-`google_pay`-`ideal`-`jcb`-`klarna`-`klarna-pay-later`-`litecoin`-`maestro`-`master`-`paypal`-`shopify_pay`-`sofort`-`visa`点击保存。
Shopify商户官网原文详情:
Choose which payment icons to display
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
All free Shopify themes include the option to display payment icons in your footer. The icons that show are determined by your store'spayment settingsand the customer's region and currency. You can enable payment icons in thetheme editor. If you want to add or remove payment icons without changing your payment settings,then you can do so by editing your theme code.
Enable payment icons in your footer
The first step of the customization is to enable the payment icons in your footer:
Go to thetheme editor.
ClickFooter.
Check theShow payment iconscheckbox.
ClickSave.
Caution
If you do not use afree theme from Shopify,and your theme doesn't include the option to enable payment icons in the footer,then this customization won't work for your theme.
Edit the code for your payment icons
In this step,you will change the way that payment icons are assigned to your footer. By default,your theme shows the icons that are associated with the payment gateway you have enabled in thepayment settingssection of your admin and that are available for the current customer's region and currency. With this customization,you will manually add or remove the payment icons that you want to display.
To edit the code for your payment icons:
PC:
From your Shopify admin,go toOnline Store>Themes.
Find the theme you want to edit,and then clickActions>Edit code.
In theSectionsdirectory,clickfooter.liquid. If your theme doesn't include this file,then clicktheme.liquidin theLayoutdirectory.
iPhone:
From theShopify app,tapStore.
In theSales channelssection,tapOnline Store.
TapManage themes.
Find the theme you want to edit,and then clickActions>Edit code.
In theSectionsdirectory,clickfooter.liquid. If your theme doesn't include this file,then clicktheme.liquidin theLayoutdirectory.
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 theSectionsdirectory,clickfooter.liquid. If your theme doesn't include this file,then clicktheme.liquidin theLayoutdirectory.
Findthe following code in the file:
{%fortypeinshop.enabled_payment_types%}Replace it with:
{%assignenabled_payment_types='visa,master,american_express,paypal'|remove:'' |split:','%}{%fortypeinenabled_payment_types%}In the code that you just pasted,there is a list of payment providers separated by commas:visa,master,american_express,paypal. The payment providers that you include in this list will determine which payment icons display on your online store. You can edit the list of payment providers to suit your needs.
The values that you can use are listed below:
-afterpay-american_express-apple_pay-bitcoin-dankort-diners_club-discover-dogecoin-dwolla-facebook_pay-forbrugsforeningen-google_pay-ideal-jcb-klarna-klarna-pay-later-litecoin-maestro-master-paypal-shopify_pay-sofort-visa
ClickSave.
文章内容来源:Shopify官家官网