shopify平台将“添加到购物车”替换为联系链接步骤
将“添加到购物车”替换为联系链接备注如果您使用Shopify 的免费模板,您可以联系 Shopify 支持团队获得关于此教程的帮助。此教程需要 15 分钟的设计时间。若要了解详情,请参阅Support
目录
- 答案
- 文章目录
- shopify平台将“添加到购物车”替换为联系链接步骤详细回答
shopify平台将“添加到购物车”替换为联系链接步骤详细回答
将“添加到购物车”替换为联系链接
备注
如果您使用 Shopify 的免费模板,您可以联系 Shopify 支持团队获得关于此教程的帮助。此教程需要 15 分钟的设计时间。若要了解详情,请参阅 Support for themes。
备注
此自定义用于复古 Shopify 模板,不适用于“Online Store 2.0”模板。
找到您的模板架构版本
探索“Online Store 2.0”模板自定义
您可以将添加到购物车按钮替换为电子邮件链接或联系表。例如,您可能想替换当前未销售的产品或定制产品的添加到购物车按钮。
分区模板和未分区模板
备注:本教程的步骤将根据您使用的是分区模板还是未分区模板而有所不同。分区模板支持通过拖放来安排主页的布局,未分区模板则不支持。
如果想了解您的模板是否支持分区,请转到模板的编辑代码页面。如果 Sections 目录中有文件,您则正在使用已分区模板。未分区模板是在 2016 年 10 月之前发布的,并且 Sections 目录中没有文件。
如果您使用已分区模板,请点击 Sectioned themes(已分区模板)按钮并按照说明进行操作。如果您使用较旧的未分区模板,请点击 Non-sectioned themes(未分区模板)按钮并按照说明进行操作。
创建新的产品模板
若要替换产品的添加到购物车按钮,您需要为该产品创建自定义产品模板。
PC:
在 Shopify 后台中,转到在线商店 > 模板。
找到要编辑的模板,然后点击操作 > 编辑代码。
在 Templates 目录中,点击添加新模板。
创建产品模板:a. 在下拉菜单中,选择产品。b. 将模板命名为
requires-contact
。c. 点击创建模板。
苹果系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分中,轻触在线商店。
轻触 Manage themes(管理模板)。
找到要编辑的模板,然后点击操作 > 编辑代码。
在 Templates 目录中,点击添加新模板。
创建产品模板:a. 在下拉菜单中,选择产品。b. 将模板命名为
requires-contact
。c. 点击创建模板。
安卓系统:
在 Shopify 应用中,轻触商店。
在销售渠道部分中,轻触在线商店。
轻触 Manage themes(管理模板)。
找到要编辑的模板,然后点击操作 > 编辑代码。
在 Templates 目录中,点击添加新模板。
创建产品模板:a. 在下拉菜单中,选择产品。b. 将模板命名为
requires-contact
。c. 点击创建模板。
Shopify商户官网原文详情:
Replace “Add to cart” with a contact link
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 replace the Add to cart button with an email link or a contact form. For example, you might want to replace the Add to cart button for products that are not currently for sale, or for products that are made to order.
Sectioned and non-sectioned themes
Note
The steps for this tutorial differ depending on whether you are using a sectioned or a non-sectioned theme. A sectioned theme lets you drag and drop to arrange the layout of your home page, and a non-sectioned theme doesn't.
To figure out whether your theme supports sections, go to the theme's Edit code page. If there are files in the Sections directory, you are using a sectioned theme. Non-sectioned themes were released before October 2016, and do not have files in the Sections directory.
If you are using a sectioned theme, click the Sectioned themes button and follow the instructions. If you are using an older, non-sectioned theme, click the Non-sectioned themes button and follow the instructions.
Create a new product template in Narrative
To replace the Add to cart button for a product, you will need to create a custom product template for that product.
PC:
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
In the Templates directory, click Add a new template.
Create the product template:
From the drop-down menu, select product.
Name your template
requires-contact
.Click Create template.
Find the following code:
{% section 'product-template' %}Replace it with:
{% section 'product-template-requires-contact' %}This code links your new template with a new product section that you will create in the next steps.
Click Save.
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.
In the Templates directory, click Add a new template.
Create the product template:
From the drop-down menu, select product.
Name your template
requires-contact
.Click Create template.
Find the following code:
{% section 'product-template' %}Replace it with:
{% section 'product-template-requires-contact' %}This code links your new template with a new product section that you will create in the next steps.
Click Save.
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 Templates directory, click Add a new template.
Create the product template:
From the drop-down menu, select product.
Name your template
requires-contact
.Click Create template.
Find the following code:
{% section 'product-template' %}Replace it with:
{% section 'product-template-requires-contact' %}This code links your new template with a new product section that you will create in the next steps.
Click Save.
文章内容来源:Shopify商户官方网站