AllValue

中文

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

AllValue

中文

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

    • 经营场景

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

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

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

    • 品牌出海

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

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

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

    • 有料学堂

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

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

      • 跨境社区
  • 主题模板

    • 全部模板

    • 精选模板

  • 关于我们

    • 品牌故事

    • 联系我们

    • 合作伙伴

  1. 头条博客
  2. 独立站
  3. 轻触Managethemes(管理方法模板)

轻触Managethemes(管理方法模板)

2022-05-30 13:42:12

导航栏到代码编辑器

PC:

在Shopify后台管理中,转到在线商店模板。

寻找要编辑的模板,随后点一下实际操作编辑代码。

ios系统:

在Shopify运用中,轻触店铺。

在营销渠道一部分中,轻触在线商店。

轻触Managethemes(管理方法模板)。

寻找要编辑的模板,随后点一下实际操作编辑代码。

安卓手机系统:

在Shopify运用中,轻触店铺。

在营销渠道一部分中,轻触在线商店。

轻触Managethemes(管理方法模板)。

寻找要编辑的模板,随后点一下实际操作编辑代码。

挑选以下几点之一,随后建立规格数据图表代码精彩片段

Sitewide

Producttype

Productvendor

备注名称:挑选“网址总宽”会在具备规格选择项的任何设备网页页面上表明规格数据图表。

建立规格数据图表代码精彩片段

在Snippets文件目录中点一下加上新精彩片段。

将代码片段取名为size-chart,随后点一下建立代码精彩片段:

将以下几点拷贝到您的size-chart代码精彩片段中:

divclass=pop-up-modaldivclass=pop-up-contentspanclass=close-buttontimes;/spanspanclass=size-chart-content{{pages.size-chart.content}}/span/div/divscriptconstmodal=document.querySelector(.pop-up-modal);consttrigger=document.querySelector(.trigger-pop-up);constcloseButton=document.querySelector(.close-button);functiontoggleModal(){modal.classList.toggle(show-pop-up);}functionwindowOnClick(event){if(event.target===modal){toggleModal();}}trigger.addEventListener(click,toggleModal);closeButton.addEventListener(click,toggleModal);window.addEventListener(click,windowOnClick);/scriptstyle.pop-up-modal{position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);opacity:0;display:none;transform:scale(1.1);transition:visibility0slinear0.25s,opacity0.25s0s,transform0.25s;}.pop-up-content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:white;padding:1rem1.5rem;width:auto;border-radius:0.5rem;}.pop-up-contenttable{table-layout:auto;}.close-button{float:right;width:1.5rem;line-height:1.5rem;text-align:center;cursor:pointer;border-radius:0.25rem;background-color:lightgray;}.close-button:hover{background-color:darkgray;}.show-pop-up{z-index:12;opacity:1;display:block;transform:scale(1);transition:visibility0slinear0s,opacity0.25s0s,transform0.25s;}.trigger-pop-up{margin:10px010px0;width:100%;}@mediaonlyscreenand(max-width:749px){.pop-up-content,.size-chart-contenttable{width:100%;}.size-chart-contentth,.size-chart-contenttd{padding:10px;}}/style

备注名称:必须对于模板Simple和Minimal的CSS款式实行一些变更。

假如您采用的是Simple模板,请将从.trigger-pop-up直到/style上边的具体内容更换为下列代码:

.trigger-pop-up{margin:10px010px8px;width:50%;}@mediaonlyscreenand(max-width:749px){.pop-up-content,.size-chart-contenttable{width:100%;}.size-chart-contentth,.size-chart-contenttd{padding:10px;}.trigger-pop-up{width:100%;}}

假如您要应用Minimal模板,请在完毕/style标识上边加上下列代码:

@mediaonlyscreenand(min-width:750px){.trigger-pop-up{width:50%;}}

将规格数据图表代码精彩片段加上到您的theme.liquid中

在Layout文件目录中,点击打开您的theme.liquid文档。

寻找完毕/body标识。在完毕/body标识上方黏贴下列代码:

{%ifrequest.page_type==product%}{%ifproduct.optionscontainsSize%}{%rendersize-chart%}{%endif%}{%endif%}

加上规格数据图表按键

在Sections文件目录中,点击打开product-template.liquid文档,要是没有product-template.liquid文档,则点击打开product.liquid文件。

将下列代码黏贴到加上到加入购物车按键上边:

{%ifproduct.optionscontainsSize%}aclass=trigger-pop-upbtnSeeSizeChart/a{%endif%}

“加上到加入购物车”按键的代码通常以buttontype=submitname=add开始。假如您店铺的经营语言表达不是英语,请将SeeSizeChart更换为您优选应用的文字。

备注名称:在Narrative模板中,您必须在Snippets文件目录中的product-form.liquid文档中插进以上代码

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

NavigatetotheCodeEditor

PC:

FromyourShopifyadmin,gotoOnlineStoreThemes.

Findthethemeyouwanttoedit,andthenclickActionsEditcode.

iPhone:

FromtheShopifyapp,tapStore.

IntheSaleschannelssection,tapOnlineStore.

TapManagethemes.

Findthethemeyouwanttoedit,andthenclickActionsEditcode.

Android:

FromtheShopifyapp,tapStore.

IntheSaleschannelssection,tapOnlineStore.

TapManagethemes.

Findthethemeyouwanttoedit,andthenclickActionsEditcode.

Chooseoneofthefollowingandcreateasizechartsnippet

Sitewide

Producttype

Productvendor

Note

ChoosingSitewidedisplaystheSizeChartonallproductpagesthathasaSizeoption.

Creatingasizechartsnippet

IntheSnippetsdirectory,clickAddanewsnippet.

Nameyoursnippetsize-chart,andclickCreatesnippet:

Copythefollowingintoyoursize-chartsnippet:

divclass=pop-up-modaldivclass=pop-up-contentspanclass=close-buttontimes;/spanspanclass=size-chart-content{{pages.size-chart.content}}/span/div/divscriptconstmodal=document.querySelector(.pop-up-modal);consttrigger=document.querySelector(.trigger-pop-up);constcloseButton=document.querySelector(.close-button);functiontoggleModal(){modal.classList.toggle(show-pop-up);}functionwindowOnClick(event){if(event.target===modal){toggleModal();}}trigger.addEventListener(click,toggleModal);closeButton.addEventListener(click,toggleModal);window.addEventListener(click,windowOnClick);/scriptstyle.pop-up-modal{position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);opacity:0;display:none;transform:scale(1.1);transition:visibility0slinear0.25s,opacity0.25s0s,transform0.25s;}.pop-up-content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:white;padding:1rem1.5rem;width:auto;border-radius:0.5rem;}.pop-up-contenttable{table-layout:auto;}.close-button{float:right;width:1.5rem;line-height:1.5rem;text-align:center;cursor:pointer;border-radius:0.25rem;background-color:lightgray;}.close-button:hover{background-color:darkgray;}.show-pop-up{z-index:12;opacity:1;display:block;transform:scale(1);transition:visibility0slinear0s,opacity0.25s0s,transform0.25s;}.trigger-pop-up{margin:10px010px0;width:100%;}@mediaonlyscreenand(max-width:749px){.pop-up-content,.size-chart-contenttable{width:100%;}.size-chart-contentth,.size-chart-contenttd{padding:10px;}}/style

Note

TherearesomechangesthatneedtobemadetotheCSSstylingforthethemesSimpleandMinimal.

IfyouareusingthethemeSimplereplacefrom.trigger-pop-uptorightabove/stylewiththiscode:

.trigger-pop-up{margin:10px010px8px;width:50%;}@mediaonlyscreenand(max-width:749px){.pop-up-content,.size-chart-contenttable{width:100%;}.size-chart-contentth,.size-chart-contenttd{padding:10px;}.trigger-pop-up{width:100%;}}

IfyouareusingthethemeMinimaladdthefollowingcodeabovetheclosing/styletag:

@mediaonlyscreenand(min-width:750px){.trigger-pop-up{width:50%;}}

Addthesizechartsnippetintoyourtheme.liquid

IntheLayoutdirectory,clicktoopenyourtheme.liquidfile.

Findtheclosing/bodytag.Rightabovetheclosing/bodytag,pastethefollowingcode:

{%ifrequest.page_type==product%}{%ifproduct.optionscontainsSize%}{%rendersize-chart%}{%endif%}{%endif%}

AddaSizechartbutton

IntheSectionsdirectory,clicktoopenyourproduct-template.liquidfileorproduct.liquidfileifyoudonothaveaproduct-template.liquidfile.

PastethefollowingcodeabovetheAddtocartbutton:

{%ifproduct.optionscontainsSize%}aclass=trigger-pop-upbtnSeeSizeChart/a{%endif%}

TheAddtocartbuttontypicallystartswithsomethinglikebuttontype=submitname=add.IfyourstoresoperatinglanguageisnotEnglish,thenreplaceSeeSizeChartwiththetextthatyouprefertouse.

Note

InthethemeNarrativeyouneedtoinserttheabovecodewithintheproduct-form.liquidfilethatislocatedintheSnippetsdirectory

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