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

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

    母婴行业解决方案

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

    服务业预约解决方案 NEW

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

    鲜花礼品行业解决方案

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

    同城配送解决方案

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

    服装首饰行业解决方案

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

    宠物行业解决方案

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

  • 价格
  • 活动
  • 调试按钮
登录
中文
English
  • 首页
  • 获客
  • 店铺
    • 小红书店铺
    • 微信小程序
    • 主题模板
  • 解决方案
    • 同城门店解决方案
    • 零售业电商解决方案
    • 服务业预约解决方案
    • 同城配送解决方案
    • 行业解决方案
    • 母婴行业解决方案
    • 鲜花礼品行业解决方案
    • 服装首饰行业解决方案
    • 宠物行业解决方案
  • 价格
  • 登录
  1. 头条博客
  2. 独立站
  3. 轻触Managethemes(管理方法模板)

轻触Managethemes(管理方法模板)

2022-05-30 21: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 删除。

标签:

相关文章

  • 国内物流与购置委员会生何黎明:钢铁的货运物流进出口贸易管理体
  • 揭密全布氏漏斗营销推广解决方法,防止重合对策有四招
  • 45个邮件文章标题模板,用之后必将为你高峰期爆单
  • 白五到来,FBS也进到闭仓情况,对大家展鸿供应链管理
  • 2016本年度跨境电商领域人才管理发展趋势调查报告发布

热门标签

评论

    添加优质配图将会得到更多人回答,媒体大小小于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