退出
Shopify新手指南
1998人已读
1、本指南旨在帮助您打开思路、理清方向,顺利开启跨境之路。(持续更新中) 2、内容来源于各个公开渠道整理汇总,版权归原作者所有。 3、使用建议:可使用快捷键 Ctrl +D/Command +D 的形式收藏至浏览器,方便下次访问。
收藏(1248)
目录导航
Shopify 简介
定价计划
概述
初始设置
商店设计清单
聘请帮助人员
迁移到 Shopify
开始使用
注意事项
Shopify 后台
Shopify 后台概述
支持的浏览器
备份和复制
搜索 Shopify 后台
Shopify Mobile
生产力工具
Shopify 主页
时间表
合规性
确保您的商店符合 Shopify 的政策
版权
在美国 (US) 的 Shopify 上销售大麻二酚
隐私和安全
账户安全
隐私
您的账户
员工
登陆
管理账单
管理账户
暂停或停用商店
已冻结的 Shopify 商店
选择您的账户语言和地区
与 Shopify 合作伙伴合作
推荐创业家使用 Shopify
在线商店
设置
模板
菜单和链接
博客
动态结账按钮
图片
因假期关闭商店
Shopify Search & Discovery
搜索您的商店
速度
POS
开始使用 Shopify POS
通过 Shopify POS 当面销售
QuickBooks POS
B2B
B2B 设置清单
产品目录
公司
客户
支付条款
信用卡储存
结账和账户
草稿订单
测试 B2B 设置
B2B 模板代码
销售渠道
Facebook and Instagram by Meta
Google & YouTube
Shop
Linkpop
Buy Button
Shopify Collective
Faire 批发市场
TikTok Shop
批发
Shopify Marketplace Connect 应用
Shopify 结账
结账样式
结账表单选项
自定义和编辑结账页面
小费选项
设置地址收集偏好设置
订单处理流程
结账页面语言
商店政策
机器人保护
结账自定义项
测试订单
Script Editor 应用
产品
产品套装
添加产品
管理库存
购买选项
产品详细信息
数字产品
多属性
产品媒体
产品系列
销售礼品卡
导入和导出
搜索和筛选
为您的产品定价
Product Reviews
Handshake 批发市场
代发货
暂时更改您的产品线
产品分析概述
域名
添加域名
更改域名类型和目标
移除域名
管理域名的所有权
电子邮件托管和转发
管理域名设置
域名术语
对域名问题进行故障排除
收款
获得收款
Shop Pay
Shopify Payments
PayPal Express
Shop Cash
Shop Pay 分期付款
快捷结账
第三方提供商
其他付款方式
线下付款
支付授权和获取款项
拒付和查询
欺诈预防
Advanced Cash on Delivery
问题排查
地点
设置您的地点
将库存分配给各个地点
设置您的地点发货
发货和配送
Shopify 发货网络
了解运输
设置和管理您的发货和配送
Shopify Shipping
碳中和运输
发货和代发货服务
Shop Promise
客户
管理客户
客户账户
搜索客户资料
客户细分
导入和导出客户
从 MailChimp 导入
Bulk Account Inviter
提供在线客户服务
解决客户 CSV 文件错误
Shopify Flow
创建工作流
监视工作流
管理工作流
手动运行工作流
高级工作流
Shopify Flow 参考信息
订单
订单状态页面
发货
处理订单
创建草稿订单
管理订单
订单状态
导出为 CSV 文件
搜索、查看和打印订单
自助退货
Order Printer
创建退货和退款
管理订阅订单
编辑订单商品
入账付款
延期付款
取消、存档和删除订单
欺诈风险分析
恢复弃单
转化跟踪
通知
联系 Shopify 商店以了解订单
Fraud Filter
管理增加的销售额
订单分析概述
折扣
折扣类型
组合折扣
管理折扣码
导出折扣码
设置促销价格
弃单电子邮件
礼品卡折扣
销售渠道折扣
常见问题解答
Shopify Inbox
安装和访问 Shopify Inbox
管理客户对话
配置 Shopify Inbox
聊天设置和外观
对话指标
自定义数据
Metafields
元对象
访问选项
功能
复制到订单
营销和促销
制定营销计划
内容营销
管理您的品牌资产
改进SEO
Shopify 中的营销
Shopify Audiences
分析在线营销
远程购物体验
为季节性销售做准备
Shopify Collabs
限时抢购
像素代码和客户活动
分析
Shopify 分析
Google Analytics
ShopifyQL Notebooks
分析差异
应用
应用类型
查找应用
选择应用
安装应用
卸载应用
管理应用
获取应用帮助
不受支持的应用
应用权限和个人信息
对第三方应用的支持
Shopify Markets
管理市场
以当地货币定价
自动重定向
国际域名
本地化和翻译
关税和进口税
收款
运输和市场
使用 Markets 发布产品
Shopify Markets Pro
专家市场
聘请帮助人员
与专家合作
向专家付款
处理争议
完成工作
合作伙伴目录
聘请帮助人员
税费
一般税款设置步骤
基于地点的税费设置
基于登记的税费设置
Shopify Tax
美国税费
加拿大税费
欧盟税费
英国税费
Shopify POS 税费
数字产品税
手动税费和免税
运费税
关税和进口税
印度的 GST
Avalara AvaTax 提供的税务服务
日本税费
Data Exporter
德国的 TSE 合规
税务报告
组织设置
访问“组织设置”
管理用户
账单
用户安全
管理商店
组织分析
Shopify Plus Academy
自定义购物体验
自定义购物体验
资金
财务概述
Shopify Balance
Shopify Capital
Shopify Credit
Shopify Bill Pay
显示数量规则和批量定价

用于 B2B 产品目录的数量规则在免费 Shopify 模板的版本 8.0.0 及更高版本中受支持,批量定价在版本 11.0.0 及更高版本中受支持。如果您想在商店中显示数量规则和批量定价,则可将商店模板更新为最新版本。

如果您不想更改或更新模板,则可以将以下代码添加到您的模板中以显示数量规则和批量定价。在更新您的模板文件之前,请确保复制您的模板以创建备份副本。

拓展您的业务

这属于高级教程。如果您不擅长查阅和编辑模板代码,则您可以与开发人员合作或聘请 Shopify 专家。


产品购物车数量

产品多属性的购物车数量值可能在产品页面或特色产品分区中显示。可使用 Liquid 获取该值。

添加 Liquid 产品购物车数量代码

您可以向模板中的以下文件中添加代码,以便为购物车数量提供支持:

main-product.liquid 或等效文件 featured-product.liquid 或等效文件

步骤:

在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开要编辑的文件。 在文件底部创建新行,然后添加以下代码: {%comment%}Cart quantity{%endcomment%}<span id="CartQuantity-{{section.id}}" data-product-url="{{product.url}}" data-section-id="{{section.id}}" data-variant-id="{{product.selected_or_first_available_variant.id}}">{{cart|line_items_for:product|sum:'quantity'}}{{-'products.product.quantity.in_cart'|t:quantity:cart_qty-}}</span> 点击保存。


添加 Javascript 购物车数量代码

当多属性的购物车数量发生变化时,则必须更新产品页面或特色产品分区中显示的值。可以使用 Javascript 代码获取更新后的值。

您可以向 theme.js 文件或等效文件中添加代码。

步骤:

在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开 theme.js 文件。 在文件底部创建新行,然后添加以下代码: letproductUrl=document.querySelector('[data-product-url]').dataset.productUrl;letsectionId=document.querySelector('[data-section-id]').dataset.sectionId;letvariantId=document.querySelector('[data-variant-id]').dataset.variantId;// Fetch updated HTML from Section Rendering APIfetch(`${productUrl}?section_id=${sectionId}&variant=${variantId}`).then((response)=>response.text()).then((responseText)=>{// Replace the current HTML in DOM with the updated HTMLconstupdatedHtml=newDOMParser().parseFromString(responseText,'text/html');// Update the cart quantityconstcurrentCartQuantity=document.querySelector(`#CartQuantity-${sectionId}`);constupdatedCartQuantity=updatedHtml.querySelector(`#CartQuantity-${sectionId}`);currentCartQuantity.innerHTML=updatedCartQuantity.innerHTML;}); 点击保存。


数量规则

产品多属性的数量规则可能在产品页面或特色产品分区中显示。可以使用 Liquid 提取规则。

添加 Liquid 数量规则代码

您可以向模板中的以下文件中添加代码,以便为数量规则提供支持:

main-product.liquid 或等效文件 featured-product.liquid 或等效文件 步骤: 在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开要编辑的文件。 在文件底部创建新行,然后添加以下代码: {%comment%}Quantity rules{%endcomment%}<div id="QuantityRules-{{section.id}}" data-product-url="{{product.url}}" data-section-id="{{section.id}}" data-variant-id="{{product.selected_or_first_available_variant.id}}">{%-ifproduct.selected_or_first_available_variant.quantity_rule.increment>1-%}<span>{{-'products.product.quantity.multiples_of'|t:quantity:product.selected_or_first_available_variant.quantity_rule.increment-}}</span>{%-endif-%}{%-ifproduct.selected_or_first_available_variant.quantity_rule.min>1-%}<span> &nbsp;-&nbsp;{{-'products.product.quantity.minimum_of'|t:quantity:product.selected_or_first_available_variant.quantity_rule.min-}}</span>{%-endif-%}{%-ifproduct.selected_or_first_available_variant.quantity_rule.max!=null-%}<span> &nbsp;-&nbsp;{{-'products.product.quantity.maximum_of'|t:quantity:product.selected_or_first_available_variant.quantity_rule.max-}}</span>{%-endif-%}</div> 点击保存。


添加 Javascript 数量规则代码

产品的每个多属性都可以有其自己的一组数量规则。选择不同的多属性后,则需要更新产品页面或特色产品分区中显示的数量规则。可以使用 Javascript 代码获取更新后的值。


theme.js 或等效项 en.default.json

步骤:

在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开 theme.js 文件。 在文件底部创建新行,然后添加以下代码: letproductUrl=document.querySelector('[data-product-url]').dataset.productUrl;letsectionId=document.querySelector('[data-section-id]').dataset.sectionId;letvariantId=document.querySelector('[data-variant-id]').dataset.variantId;// `variantId` is set to the current variant's id. Replace this value with the updated variant's id// Fetch updated HTML from Section Rendering APIfetch(`${productUrl}?section_id=${sectionId}&variant=${variantId}`).then((response)=>response.text()).then((responseText)=>{// Replace the current HTML in DOM with the updated HTMLconstupdatedHtml=newDOMParser().parseFromString(responseText,'text/html');// Update the quantity rulesconstcurrentQuantityRules=document.querySelector(`#QuantityRules-${sectionId}`);constupdatedQuantityRules=updatedHtml.querySelector(`#QuantityRules-${sectionId}`);currentQuantityRules.innerHTML=updatedQuantityRules.innerHTML;}); 点击保存。


数量定价

添加 Liquid 批量定价代码

您可以向模板中的以下文件中添加代码,以显示批量定价:

main-product.liquid 或等效文件 featured-product.liquid 或等效文件

步骤:

在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开要编辑的文件。 在文件底部创建新行,然后添加以下代码: {%-ifproduct.quantity_price_breaks_configured?-%}<div class="volume-pricing-note"> <span>{{'products.product.volume_pricing.note'|t}}</span> </div> <volume-pricing class="parent-display" id="Volume-{{section.id}}">{%-ifproduct.selected_or_first_available_variant.quantity_price_breaks.size>0-%}<span class="caption-large">{{'products.product.volume_pricing.title'|t}}</span> <ul class="list-unstyled no-js-hidden"> <li> <span>{{product.selected_or_first_available_variant.quantity_rule.min}}+</span>{%-assignprice=product.selected_or_first_available_variant.price|money_with_currency-%}<span data-text="{{'products.product.volume_pricing.price_at_each'|t:price:variant_price}}">{{'sections.quick_order_list.each'|t:money:price-}}</span> </li>{%-forprice_breakinproduct.selected_or_first_available_variant.quantity_price_breaks-%}{%-assignprice_break_price=price_break.price|money_with_currency-%}<li class="{%-ifforloop.index>=3-%}show-more-item hidden{%-endif-%}"> <span>{{-price_break.minimum_quantity-}}<span aria-hidden="true">+</span></span >{%-assignprice=price_break.price|money_with_currency-%}<span data-text="{{'products.product.volume_pricing.price_at_each'|t:price:price_break_price}}">{{'sections.quick_order_list.each'|t:money:price-}}</span> </li>{%-endfor-%}</ul>{%-ifproduct.selected_or_first_available_variant.quantity_price_breaks.size>=3-%}<show-more-button> <button class="button-show-more link underlined-link no-js-hidden" id="Show-More-{{section.id}}" type="button" > <span class="label-show-more label-text" ><span aria-hidden="true">+ </span>{{'products.facets.show_more'|t}}</span> </button> </show-more-button>{%-endif-%}{%-endif-%}</volume-pricing> 点击保存。


添加 Javascript 批量定价代码

您可以向模板中的以下文件中添加代码,以显示批量定价:

theme.js

步骤:

在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开 theme.js 文件。 在文件底部创建新行,然后添加以下代码: if(!customElements.get('show-more-button')){customElements.define('show-more-button',classShowMoreButtonextendsHTMLElement{constructor(){super();constbutton=this.querySelector('button');button.addEventListener('click',(event)=>{this.expandShowMore(event);constnextElementToFocus=event.target.closest('.parent-display').querySelector('.show-more-item');if(nextElementToFocus&&!nextElementToFocus.classList.contains('hidden')&&nextElementToFocus.querySelector('input')){nextElementToFocus.querySelector('input').focus();}});}expandShowMore(event){constparentDisplay=event.target.closest('[id^="Show-More-"]').closest('.parent-display');constparentWrap=parentDisplay.querySelector('.parent-wrap');this.querySelectorAll('.label-text').forEach((element)=>element.classList.toggle('hidden'));parentDisplay.querySelectorAll('.show-more-item').forEach((item)=>item.classList.toggle('hidden'));if(!this.querySelector('.label-show-less')){this.classList.add('hidden');}}});} 点击保存。


添加区域设置

若要确保所有已翻译的在线商店版本中都显示数量规则和批量定价,您可以通过向 en.default.json 文件中添加以下 JSON 翻译字符串来添加区域设置。

步骤:

在 Shopify 后台中,转至在线商店 > 模板。 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。 打开 en.default.json 文件。 在文件底部创建新行,然后添加以下代码: "products":{"product":{"volume_pricing":{"title":"Volume Pricing","note":"Volume pricing available","price_at_each":"at /ea",}"facets":{"show_more":"Show more"}}} 点击保存。