将“添加到购物车”替换为联系链接

您可以将添加到购物车按钮替换为电子邮件链接或联系表。例如,您可能想替换当前未销售的产品或定制产品的添加到购物车按钮。

分区模板和未分区模板

备注:本教程的步骤将根据您使用的是分区模板还是未分区模板而有所不同。分区模板支持通过拖放来安排主页的布局,未分区模板则不支持。

如果想了解您的模板是否支持分区,请转到模板的编辑代码页面。如果 Sections 目录中有文件,您则正在使用已分区模板。未分区模板是在 2016 年 10 月之前发布的,并且 Sections 目录中没有文件。

如果您使用已分区模板,请点击 Sectioned themes(已分区模板)按钮并按照说明进行操作。如果您使用较旧的未分区模板,请点击 Non-sectioned themes(未分区模板)按钮并按照说明进行操作。

创建新的产品模板

若要替换产品的添加到购物车按钮,您需要为该产品创建自定义产品模板。

PC:

  1. Shopify 后台中,转到在线商店 > 模板

  2. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 在 Templates 目录中,点击添加新模板

  2. 创建产品模板:a. 在下拉菜单中,选择产品。b. 将模板命名为 requires-contact。c. 点击创建模板

苹果系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分中,轻触在线商店

  3. 轻触 Manage themes(管理模板)。

  4. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 在 Templates 目录中,点击添加新模板

  2. 创建产品模板:a. 在下拉菜单中,选择产品。b. 将模板命名为 requires-contact。c. 点击创建模板

安卓系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分中,轻触在线商店

  3. 轻触 Manage themes(管理模板)。

  4. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 在 Templates 目录中,点击添加新模板

  2. 创建产品模板:a. 在下拉菜单中,选择产品。b. 将模板命名为 requires-contact。c. 点击创建模板

Shopify商户官网原文详情:

Replace “Add to cart” with a contact link

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

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:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you want to edit, and then click Actions > Edit code.

  1. In the Templates directory, click Add a new template.

  2. Create the product template:

    1. From the drop-down menu, select product.

    2. Name your template requires-contact.

    3. Click Create template.

  1. 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.

  2. Click Save.

iPhone:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. In the Templates directory, click Add a new template.

  2. Create the product template:

    1. From the drop-down menu, select product.

    2. Name your template requires-contact.

    3. Click Create template.

  1. 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.

  2. Click Save.

Android:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. In the Templates directory, click Add a new template.

  2. Create the product template:

    1. From the drop-down menu, select product.

    2. Name your template requires-contact.

    3. Click Create template.

  1. 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.

  2. Click Save.

文章内容来源:Shopify商户官方网站


(本文内容根据网络资料整理,出于传递更多信息之目的,不代表连连国际赞同其观点和立场)