AllValue

中文

  • 中文
  • 繁体中文
  • English
  • 日本語

AllValue

中文

  • 中文
  • 繁体中文
  • English
  • 日本語
  • 首页
  • 产品特性
  • 解决方案

    • 经营场景

      • 国货品牌DTC出海解决方案
      • 国际版微信小程序解决方案
      • B2B解决方案
      • 品牌区域多站点解决方案
    • 运营与营销

      • 分销联盟解决方案
      • 社群营销解决方案
      • 极致移动解决方案
    • 出海国家

      • 北美出海解决方案
  • 商家服务

    • 品牌出海

      • 装修与建站服务
      • 选品指导服务
      • 中国100品牌出海计划
    • 社交营销

      • 网红营销服务
      • 北美社群营销服务
    • 广告投放

      • Google广告投放服务
      • Facebook广告投放服务
  • 套餐价格
  • 跨境学堂

    • 有料学堂

      • 有料学堂
      • 有料公开课
      • 系列专业课
    • 头条博客

      • 头条博客
      • 公司动态
    • 跨境社区

      • 跨境社区
  • 主题模板

    • 全部模板

    • 精选模板

  • 关于我们

    • 品牌故事

    • 联系我们

    • 合作伙伴

  1. 头条博客
  2. 独立站
  3. 掩藏“添加到购物车”按键

掩藏“添加到购物车”按键

2022-05-27 16:49:07

掩藏“添加到购物车”按键

在新的product.requires-contact.liquid文档中,搜索添加到购物车按键的HTML代码。您可以检索cart一词。

添加到购物车按键的代码因模板而异。搜索包括Addtocart、AddToCart或add-to-cart等相近文字的input或button标记。

针对Debut,添加到购物车按键的代码如下所示所显示:

buttontype=submitname=addid=AddToCart-{{section.id}}{%unlesscurrent_variant.available%}disabled=disabled{%endunless%}class=btnproduct-form._cart-submit{%ifproduct.options.size==1andproduct.variants[0].title==DefaultTitle%}product-form__cart-submit--small{%endif%}spanid=AddToCartText-{{section.id}}{%unlesscurrent_variant.available%}{{products.product.sold_out|t}}{%else%}{{products.product.add_to_cart|t}}{%endunless%}/span/button

寻找代码后,将它放进Liquid{%comment%}和{%endcomment%}标记中间。这可能阻拦该代码在您的门店中表明,但假如您想稍候变更您的新模板,您可以简单将其修复。

针对Debut,改动后的代码将与下边相近:

```liquid{%comment%}buttontype=submitname=addid=AddToCart-{{section.id}}{%unlesscurrent_variant.available%}disabled=disabled{%endunless%}class=btnproduct-form._cart-submit{%ifproduct.options.size==1andproduct.variants[0].title==DefaultTitle%}product-form__cart-submit--small{%endif%}spanid=AddToCartText-{{section.id}}{%unlesscurrent_variant.available%}{{products.product.sold_out|t}}{%else%}{{products.product.add_to_cart|t}}{%endunless%}/span/button{%endcomment%}

留意

Makesurethatyoudontcommentouttheformtagsforyourproductpage.Yourcommenttagsshouldnotsurroundanyformor/formtags,otherwisecustomersmightexperienceerrorswhenviewingyourproductpage.```2.点一下储存。

添加电子邮箱连接或联络表

您目前已掩藏了添加到购物车按键,可以改成添加要展现的具体内容。

电子邮箱连接

在您上一步中添加的Liquid{%endcomment%}标记下边的新行中,添加电子邮箱连接的HTML代码:

Pleaseahref=mailto:{{shop.email}}contactus/aifyouareinterestedinthisproduct.

点一下储存。

联络表

假如要向新品模板中添加联络表,您可以拷贝模板的联络网页页面模板中的代码。若要添加联络表,请实行下列实际操作:

在Templates文件目录中,点一下page.contact.liquid。

在该文件中搜索Liquid{%formcontact%}标记。

拷贝从Liquid{%formcontact%}标记往下到Liquid{%endform%}标记的全部代码。在拷贝的代码中包括Liquid表格标记。

回到到Templates文件目录中的新product.requires-contact.liquid文档。

在该文件中搜索完毕/form标记。在结束/form标记下边的新行中,黏贴联络表的代码。

下一步是将您刚黏贴的代码放进HTMLdiv标记中。div标记代码中包括的类特性将保证您的联络表可在界面上恰当展现。

在{%formcontact%}上边的新行中,黏贴下列代码:

divclass=form-vertical/div

在{%endform%}下边的新行中,黏贴下列代码:

/div

点一下储存。

将新模板分派给商品

模板现在已经进行,您可以将它分派给要对其掩藏添加到购物车按键的任何商品。

在Shopify后台管理中,转到商品。

点一下您要对其掩藏添加到购物车按键的企业产品的名字。

在Shopify后台管理的商品网页页面上的在线商店下,从模板款式下拉列表中挑选新的requires-contact模板。

点一下储存。

对您要向其添加新模板的每一个商品反复这种流程。

Shopify商家官方网站全文详细信息:

HidetheAddtocartbutton

Inyourproduct-template-requires-contact.liquidsectionfile,findtheHTMLcodefortheProductformofyourproductpage.Youcanfinditbysearchingforthewordforminthefile.

Whenyoufindthecode,wrapitinLiquid{%comment%}and{%endcomment%}tags.Thiswillstopthecodefrombeingshownonyourstore,butwillletyoueasilyputitbackifyouwanttochangeyournewtemplatelater.

ForNarrative,themodifiedcodewouldlooklikethis:

{%comment%}{%includeproduct-form%}{%endcomment%}

ClickSave.

Addanemaillinkorcontactform

NowthatyouhavehiddentheAddtocartbutton,youcanaddthecontentyouwanttoshowinstead.

EMAILLINK

Youcanaddanemaillinkthatwillopenthecustomersdefaultemailprogramandenteryourstorescustomer-facingemailaddressastherecipient.Toaddanemaillink:

OnanewlinebelowtheLiquid{%endcomment%}tagthatyouaddedinthelaststep,addtheHTMLcodeforanemaillink:

pPleaseahref=mailto:{{shop.email}}contactus/aifyouareinterestedinthisproduct./p

ClickSave.

Contactform

Youcanaddacontactformtoyournewproducttemplatebycopyingthecodefromyourthemescontactpagetemplate.Toaddacontactform:

IntheTemplatesdirectory,clickpage.contact.liquid.

FindtheLiquid{%formcontact%}taginthefile.

CopyallofthecodefromtheLiquid{%formcontact%}tagdowntotheLiquid{%endform%}tag.IncludetheLiquidformtagsinthecodethatyoucopy.

Returntoyournewproduct.requires-contact.liquidfileintheTemplatesdirectory.


OnanewlinebelowtheLiquid{%endcomment%}tagthatyouadded,pastethecodeforthecontactform.

ThenextstepistowrapthecodethatyoujustpastedinHTMLdivtags.Theclassattributeincludedinthedivtagcodewillensurethatyourcontactformrenderscorrectlyonthepage.

Onanewlineabove{%formcontact%},pastethefollowingcode:

divclass=form-vertical/div

Onanewlinebelow{%endform%},pastethefollowingcode:

/div

ClickSave.

Assignyournewtemplatetoaproduct

Nowthatthetemplateisfinished,youcanassignittoalloftheproductsforwhichyouwanttohidetheAddtocartbutton.

FromyourShopifyadmin,gotoProducts.

ClickthenameofaproductthatyouwanttohidetheAddtocartbuttonon.

OntheproductpageofyourShopifyadmin,underOnlinestore,chooseyournewrequires-contacttemplatefromtheThemetemplatedrop-downmenu.

ClickSave.

Repeatthesestepsforeachproducttowhichyouwanttoaddyournewtemplate.

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


部分文章来源于网络,如有侵权,请联系 caihong@youzan.com 删除。

标签:

相关文章

  • Facebook广告被定位在哪一群人?
  • 没有网站?不要担心,亚马逊允许你去创建一个店铺
  • Pinterest在网络营销领域里扮演着重要的角色
  • 如何在facebook上做企业的推广
  • pinterest引流技巧分享

热门标签

评论

    添加优质配图将会得到更多人回答,媒体大小小于2M,建议尺寸:200x200

评论提交成功

评论有以下违规词汇

删除成功

评论

确定删除此评论吗

  • 未读列表
  • 已读列表

消息类型标题

2021-08-24 12:45

消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容消息详细内容

  • 产品与服务
  • 产品特性
  • 商家服务
  • 主题模板
  • 套餐价格
  • 帮助中心
  • 解决方案
  • 品牌DTC解决方案
  • B2B解决方案
  • 极致移动解决方案
  • 分销联盟解决方案
  • 北美出海解决方案
  • 关于我们
  • 品牌故事
  • 开发者中心
  • 用户协议
  • 隐私政策
  • 跨境学堂
  • 有料学堂
  • 博客头条
  • 跨境社区
  • 联系方式
  • 商家服务: 15814458155
  • 渠道专线: 15814458155
  • 市场合作: 15814458155
  • 官方账号
  • 邮箱: info@allvalue.com
  • AllValue公众号

    加入华人社群

©2024 allvalue.com Rights Reserved|浙ICP备2020040621号

  • 产品与服务

    • 产品特性

    • 商家服务

    • 主题模板

    • 套餐价格

    • 帮助中心

  • 解决方案

    • 品牌DTC解决方案

    • B2B解决方案

    • 极致移动解决方案

    • 分销联盟解决方案

    • 北美出海解决方案

  • 关于我们

    • 品牌故事

    • 开发者中心

    • 用户协议

    • 隐私政策

  • 跨境学堂

    • 有料学堂

    • 博客头条

    • 跨境社区

  • 联系方式

    商家服务: 15814458155

    渠道专线: 15814458155

    市场合作: 15814458155

  • 官方账号

    邮箱: info@allvalue.com

    • AllValue公众号

    • 加入华人社群

  • ©2024 allvalue.com Rights Reserved|浙ICP备2020040621号