• 首页
  • 获客
  • 店铺
    小红书店铺 让内容种草成为最佳导购 微信小程序 用社交电商抢占华人流量 主题模板 100+行业模版
  • 解决方案
    同城门店解决方案
    行业解决方案
    零售业电商解决方案 NEW

    实现全域经营,线上线下相互引流

    母婴行业解决方案

    面向母婴商家提供完善电商经营方案

    服务业预约解决方案 NEW

    数字化门店经营,翻倍到店客流

    鲜花礼品行业解决方案

    灵活自提与配送,解决交付难题

    同城配送解决方案

    突破时间和范围,实现订单增量

    服装首饰行业解决方案

    多渠道卖货,门店、电商同步做

    宠物行业解决方案

    轻松引流到店,提升拉新和复购

  • 价格
  • 活动
  • 调试按钮
登录
中文
English
  • 首页
  • 获客
  • 店铺
    • 小红书店铺
    • 微信小程序
    • 主题模板
  • 解决方案
    • 同城门店解决方案
    • 零售业电商解决方案
    • 服务业预约解决方案
    • 同城配送解决方案
    • 行业解决方案
    • 母婴行业解决方案
    • 鲜花礼品行业解决方案
    • 服装首饰行业解决方案
    • 宠物行业解决方案
  • 价格
  • 登录
  1. 头条博客
  2. 独立站
  3. 掩藏“添加到购物车”按键

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

2022-05-28 00: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 删除。

标签:

相关文章

  • Create your beautiful link in bio with AllValue
  • Facebook广告被定位在哪一群人?
  • 没有网站?不要担心,亚马逊允许你去创建一个店铺
  • Pinterest在网络营销领域里扮演着重要的角色
  • 如何在facebook上做企业的推广

热门标签

评论

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

评论提交成功

评论有以下违规词汇

删除成功

评论

确定删除此评论吗

  • 未读列表
  • 已读列表

消息类型标题

2021-08-24 12:45

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

做华人电商生意 找 AllValue

AllValue
AllValue
首页
商家服务
价格
产品
产品
AllValue 营销版
AllValue 店铺版
Tapget AI
关于我们
关于我们
博客
品牌故事
开发者中心
官方账号
官方账号
邮箱:info@AllValue.com

AllValue公众号

加入华人社群

中文
中文
English

做华人电商生意 找 AllValue

用户协议 隐私声明

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

Youzan Technology LLC. 200 Spectrum Center Drive, Suite 300, Office 4062, Irvine, CA 92618