AllValue

中文

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

AllValue

中文

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

    • 经营场景

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

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

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

    • 品牌出海

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

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

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

    • 有料学堂

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

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

      • 跨境社区
  • 主题模板

    • 全部模板

    • 精选模板

  • 关于我们

    • 品牌故事

    • 联系我们

    • 合作伙伴

  1. 头条博客
  2. 独立站
  3. Boundless流程

Boundless流程

2022-05-31 14:25:32

Boundless流程

依照下列流程将自定项运用于Boundless:

编辑模板的JavaScript文档

若要编辑模板的JavaScript文件,请实行下列实际操作:

PC:

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

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

在Assets文件目录中,点击theme.js或theme.js.liquid。

搜索代码initVariantSelectors。在该代码下边,搜索下列代码:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);

ios系统:

在Shopify运用中,轻触店铺。

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

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

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

在Assets文件目录中,点击theme.js或theme.js.liquid。

搜索代码initVariantSelectors。在该代码下边,搜索下列代码:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);

安卓手机系统:

在Shopify运用中,轻触店铺。

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

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

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

在Assets文件目录中,点击theme.js或theme.js.liquid。

搜索代码initVariantSelectors。在该代码下边,搜索下列代码:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);

在下面的新行中加上下列代码:

if(typeof(productOptions)!=undefined){for(i=0;iproductOptions.length;i ){constvowels=[a,e,i,o,u];constfirstOptionLetter=productOptions[i][i][0].toLowerCase();letindef=a;if(vowels.includes(firstOptionLetter)){indef=an;};constselect=document.querySelectorAll(.single-option-selector)[i];constoptions=select.querySelectorAll(option);if(options.length1){letoption=newOption(Pick indef productOptions[i][i],);select.add(option,select.firstChild);select.selectedIndex=0;}}}

代码应如下所示所显示:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);if(typeof(productOptions)!=undefined){for(i=0;iproductOptions.length;i ){constvowels=[a,e,i,o,u];constfirstOptionLetter=productOptions[i][i][0].toLowerCase();letindef=a;if(vowels.includes(firstOptionLetter)){indef=an;};constselect=document.querySelectorAll(.single-option-selector)[i];constoptions=select.querySelectorAll(option);if(options.length1){letoption=newOption(Pick indef productOptions[i][i],);select.add(option,select.firstChild);select.selectedIndex=0;}}}

搜索下列代码行:

$(selectors.addToCartText).html(theme.strings.soldOut);

此代码行有2个案例,均可在productVariantCallback函数公式中寻找。请仅将第二个案例更换为:

$(selectors.addToCartText).html(MakeaSelection);

备注名称:一些版本号的Boundless不包含此流程时要更换的代码行。假如您无法找到代码,则跳至下一步。

点击储存。

编辑商品网页页面模板

若要编辑商品网页页面模板,请实行下列实际操作:

在Sections文件目录中,点击product-template.liquid。

搜索下列代码:

liquid{%assigncurrent_variant=product.selected_or_first_available_variant%}

将其更换为:

liquid{%assigncurrent_variant=product.selected_variant%}

搜索下列代码并将其删掉:

liquid{%ifvariant==product.selected_or_first_available_variant%}selected=selected{%endif%}

搜索代码{%schema%}。将下边代码黏贴在其上面的一行中:

```liquid{%ifcurrent_variant==blank%}{%endif%}```代码应如下所示所显示:```liquid{%ifcurrent_variant==blank%}{%endif%}

{%schema%}```

变更Addtocart(加上到加入购物车)按键语言设置

您可以变更Addtocart(加上到加入购物车)按键的语言设置,使在都没有开展一切挑选以前商品不容易表明为“不能用”。

点击储存。

PC:

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

寻找要编辑的模板,随后点击实际操作编辑语言表达。

在筛选条件框中,逐渐输入unavailable以表明“不能用”翻泽。

将文字不能用更换为Makeaselection:

点击储存。

ios系统:

在Shopify运用中,轻触店铺。

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

轻触管理方法模板。

寻找要编辑的模板,随后点击实际操作编辑语言表达。

在筛选条件框中,逐渐输入unavailable以表明“不能用”翻泽。

将文字不能用更换为Makeaselection:

点击储存。

安卓手机系统:

在Shopify运用中,轻触店铺。

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

轻触管理方法模板。

寻找要编辑的模板,随后点击实际操作编辑语言表达。

在筛选条件框中,逐渐输入unavailable以表明“不能用”翻泽。

将文字不能用更换为Makeaselection:

点击储存。

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

StepsforBoundless

FollowthesestepstoapplythecustomizationtoBoundless:

EdityourthemesJavaScriptfile

ToedityourthemesJavaScriptfile:

PC:

FromyourShopifyadmin,gotoOnlineStoreThemes.

Findthethemeyouwanttoedit,andthenclickActionsEditcode.

IntheAssetsdirectory,clicktheme.jsortheme.js.liquid.

FindthecodeinitVariantSelectors.Belowthat,findthefollowingcode:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);

iPhone:

FromtheShopifyapp,tapStore.

IntheSaleschannelssection,tapOnlineStore.

TapManagethemes.

Findthethemeyouwanttoedit,andthenclickActionsEditcode.

IntheAssetsdirectory,clicktheme.jsortheme.js.liquid.

FindthecodeinitVariantSelectors.Belowthat,findthefollowingcode:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);

Android:

FromtheShopifyapp,tapStore.

IntheSaleschannelssection,tapOnlineStore.

TapManagethemes.

Findthethemeyouwanttoedit,andthenclickActionsEditcode.

IntheAssetsdirectory,clicktheme.jsortheme.js.liquid.

FindthecodeinitVariantSelectors.Belowthat,findthefollowingcode:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);

Addthefollowingcodeonanewlinebelow:

if(typeof(productOptions)!=undefined){for(i=0;iproductOptions.length;i ){constvowels=[a,e,i,o,u];constfirstOptionLetter=productOptions[i][i][0].toLowerCase();letindef=a;if(vowels.includes(firstOptionLetter)){indef=an;};constselect=document.querySelectorAll(.single-option-selector)[i];constoptions=select.querySelectorAll(option);if(options.length1){letoption=newOption(Pick indef productOptions[i][i],);select.add(option,select.firstChild);select.selectedIndex=0;}}}

Itshouldlooksomethinglikethis:

//CleanupvariantlabelsiftheShopify-defined//defaultsaretheonlyonesleftthis.simplifyVariantLabels(this.productSingleObject,this.$container);if(typeof(productOptions)!=undefined){for(i=0;iproductOptions.length;i ){constvowels=[a,e,i,o,u];constfirstOptionLetter=productOptions[i][i][0].toLowerCase();letindef=a;if(vowels.includes(firstOptionLetter)){indef=an;};constselect=document.querySelectorAll(.single-option-selector)[i];constoptions=select.querySelectorAll(option);if(options.length1){letoption=newOption(Pick indef productOptions[i][i],);select.add(option,select.firstChild);select.selectedIndex=0;}}}

Findthefollowinglineofcode:

$(selectors.addToCartText).html(theme.strings.soldOut);

Therearetwoinstancesofthislineofcode,bothfoundwithintheproductVariantCallbackfunction.Replaceonlythesecondinstancewith:

$(selectors.addToCartText).html(MakeaSelection);

Note

SomeversionsofBoundlessdonotincludethelineofcodetobereplacedinthisstep.Ifyoucantfindthecode,thenskiptothenextstep.

ClickSave.


Edityourproductpagetemplate

Toedityourproductpagetemplate:

IntheSectionsdirectory,clickproduct-template.liquid.

Findthefollowingcode:

{%assigncurrent_variant=product.selected_or_first_available_variant%}

Replaceitwith:

{%assigncurrent_variant=product.selected_variant%}

Findthefollowingcodeanddeleteit:

{%ifvariant==product.selected_or_first_available_variant%}selected=selected{%endif%}

Findthecode{%schema%}.Pastethefollowingcodeonitsownlineabovethat:

{%ifcurrent_variant==blank%}scriptvarproductOptions=[];{%foroptioninproduct.options-%}varoptionObj={};optionObj[{{forloop.index0}}]={{product.options[forloop.index0]}};productOptions.push(optionObj);{%-endfor%}/script{%endif%}

Itshouldlooksomethinglikethis:

{%ifcurrent_variant==blank%}scriptvarproductOptions=[];{%foroptioninproduct.options-%}varoptionObj={};optionObj[{{forloop.index0}}]={{product.options[forloop.index0]}};productOptions.push(optionObj);{%-endfor%}/script{%endif%}{%schema%}

ClickSave.


ChangetheAddtocartbuttonlanguagesettings

YoucanchangethelanguagesettingsfortheAddtocartbuttonsothatproductsdonotappearasUnavailablebeforeaselectionismade.

PC:

FromyourShopifyadmin,gotoOnlineStoreThemes.

Findthethemethatyouwanttoedit,andthenclickActionsEditlanguages.

IntheFilterbox,starttypingunavailabletoshowtheUnavailabletranslation.

ReplacethetextUnavailabletoMakeaselection.

ClickSave.

iPhone:

FromtheShopifyapp,tapStore.

IntheSaleschannelssection,tapOnlineStore.

TapManagethemes.

Findthethemethatyouwanttoedit,andthenclickActionsEditlanguages.

IntheFilterbox,starttypingunavailabletoshowtheUnavailabletranslation.

ReplacethetextUnavailabletoMakeaselection.

ClickSave.

Android:

FromtheShopifyapp,tapStore.

IntheSaleschannelssection,tapOnlineStore.

TapManagethemes.

Findthethemethatyouwanttoedit,andthenclickActionsEditlanguages.

IntheFilterbox,starttypingunavailabletoshowtheUnavailabletranslation.

ReplacethetextUnavailabletoMakeaselection.

ClickSave.

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