AllValue

中文

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

AllValue

中文

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

    • 经营场景

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

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

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

    • 品牌出海

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

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

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

    • 有料学堂

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

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

      • 跨境社区
  • 主题模板

    • 全部模板

    • 精选模板

  • 关于我们

    • 品牌故事

    • 联系我们

    • 合作伙伴

  1. 头条博客
  2. 独立站
  3. Includethesnippetinyourcartpag

Includethesnippetinyourcartpag

2022-05-31 14:25:31

为配备加上模板设置

在Config文件目录中,点击settings_schema.json。

在源代码中搜索第一个右中括号},。在右大括号},下边的新行中,黏贴下列编码:

{name:HearAboutUs,settings:[{type:text,id:hau_form_options,label:Formoptions,default:Facebook,Twitter,Google,Instagram,Youtube,info:Separateeachoptionwithacomma},{type:header,content:Formvalidation},{type:checkbox,id:hau_form_validation,label:Enableformvalidation,default:true},{type:text,id:hau_error_message,label:Errormessage,info:Theerrormessagethatisdisplayedwhennoselectionismade,default:Pleaseselectanoptionbelow},{type:text,id:hau_error_message_other,label:Otherfielderrormessage,info:TheerrormessagethatisdisplayedwhenthereisnoinputintheOtherfield,default:Pleasefillthetextfieldbelow},{type:header,content:Errorstyling},{type:color,id:hau_error_color,label:Color,default:#ff0000}]},

点击储存。

将表格字段设置为必录字段

若要避免顾客在没有挑选您是怎样掌握到大家店铺的?表格字段中选择项的情形下再次付款,您可以将该字段设置为必录字段。

在Sections文件目录中,点击cart-template.liquid。假如您的模板中不包含cart-template.liquid,请点击Templates文件目录中的cart.liquid。

在加入购物车表格字段中搜索下列novalidate属性:

novalidate

将novalidate属性更换为下列编码:

{%unlesssettings.hau_form_validation%}novalidate{%endunless%}

点击储存。

在模板编辑软件中,点击侧栏上的模板设置。

点击掌握大家菜单栏。

在表单验证下,保证已开启启用表单验证设置。

备注名称:您可以根据改动不正确信息和别的字段不正确信息文字字段设置来源于界定表明的不正确信息。您可以根据变更不正确款式下的颜色设置来源于界定不正确颜色。

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

Includethesnippetinyourcartpage

ToincludetheHowdidyouhearaboutus?snippetinyourcartpage:

IntheSectionsdirectory,clickcart-template.liquid.Ifyourthemedoesntincludeacart-template.liquid,thenclickcart.liquidintheTemplatesdirectory.

Findtheclosing/formtaginthecode.Onanewlineabovetheclosing/formtag,pastethefollowingcode:

{%renderhear-about-us%}

ClickSave.

Addthemesettingsforconfiguration

IntheConfigdirectory,clicksettings_schema.json.

Findthefirstclosingcurlybracket},inthecode.Onanewlinebelowtheclosingcurlybracket},,pastethefollowingcode:

{name:HearAboutUs,settings:[{type:text,id:hau_form_options,label:Formoptions,default:Facebook,Twitter,Google,Instagram,Youtube,info:Separateeachoptionwithacomma},{type:header,content:Formvalidation},{type:checkbox,id:hau_form_validation,label:Enableformvalidation,default:true},{type:text,id:hau_error_message,label:Errormessage,info:Theerrormessagethatisdisplayedwhennoselectionismade,default:Pleaseselectanoptionbelow},{type:text,id:hau_error_message_other,label:Otherfielderrormessage,info:TheerrormessagethatisdisplayedwhenthereisnoinputintheOtherfield,default:Pleasefillthetextfieldbelow},{type:header,content:Errorstyling},{type:color,id:hau_error_color,label:Color,default:#ff0000}]},

ClickSave.

Maketheformfieldrequired

TopreventcustomersfromproceedingtothecheckoutwithoutselectinganoptionintheHowdidyouhearaboutus?formfield,youcanmakethefieldrequired.

IntheSectionsdirectory,clickcart-template.liquid.Ifyourthemedoesntincludeacart-template.liquid,thenclickcart.liquidintheTemplatesdirectory.

Findthefollowingnovalidateattributeinthecartformcode:

novalidate

Replacethenovalidateattributewiththefollowingcode:

{%unlesssettings.hau_form_validation%}novalidate{%endunless%}

ClickSave.

Inthethemeeditor,clickThemesettingsonthesidebar.

ClicktheHearAboutUstab.

UnderFormValidation,makesuretheEnableformvalidationsettingisenabled.

Note

YoucancustomisetheerrormessagesdisplayedbymodifyingtheErrormessageandOtherfielderrormessagetextfieldsettings.YoucanalsocustomisetheerrorcolorbychangingtheColorsettingunderErrorStyling.

文章由来: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号