综合其技术特性、成本效益、扩展能力及运营挑战,其实woocommerce都是最值得选择的跨境电商方案

综合其技术特性、成本效益、扩展能力及运营挑战,其实woocommerce都是最值得选择的跨境电商方案。这么多系统最接近shopify的,从各方面挑战shopify的替代方案,其实没有了,就是woocommerce,而这个是开源的,全世界通用的,使用量巨大的,对于程序员和创业者的机会也是最大的。

核心优势:灵活性与成本控制

  1. 品牌自主性与数据掌控

    • 独立站优势:摆脱第三方平台(如亚马逊、eBay)的规则限制,可定制品牌视觉系统(VI)、讲述品牌故事,建立用户信任。
    • 数据私有化:直接获取用户行为、购物习惯等数据,用于精准营销和产品优化,避免平台数据垄断。
  2. 成本效益显著

    • 开源免费:WooCommerce作为WordPress插件免费使用,仅需支付域名、主机和部分插件费用,初始成本低于Shopify等订阅制平台。
    • 交易费用低:无平台佣金(如亚马逊的15%),支付网关手续费可自主选择(如PayPal、Stripe),长期运营成本更低。
  3. 全球市场适配能力

    • 多语言/多货币支持:通过插件(如WooCommerce Multilingual、WPML)快速实现多语言站点,自动切换货币和税率(如Price Based on Country插件)。
    • 本地化体验:支持智能测量单位(如美国用磅/英寸,欧洲用公制)、本地支付方式(如支付宝、巴西Boleto)。

挑战shopify,跨境电商场景下的竞争力对比:

维度 WooCommerce Shopify(主要竞品)
成本 低初始成本,无平台佣金 月费+交易佣金(0.5%-2%)
技术自由度 完全代码控制,深度定制 受限定制,依赖应用商店
多语言/货币 需插件扩展,灵活但配置复杂 内置多货币,但高级功能需付费
数据主权 用户数据完全自主 部分数据受限于平台

程序员关心:技术生态与扩展能力

  1. 插件生态丰富

    • 功能扩展:超59,000个WordPress插件覆盖SEO优化(Yoast SEO)、邮件营销(Mailchimp)、跨境物流(如ShipStation集成)等需求。
    • 关键工具示例
      • 多语言:WooCommerce Multilingual(一键翻译商品)
      • 支付:支持PayPal、Alipay甚至加密货币
      • 营销:Facebook广告集成、智能优惠券(Smart Coupons)。
  2. 深度定制化

    • 开发者可修改代码适配特殊业务逻辑(如定制库存管理、批发定价),满足B2B或DTC等复杂模型。

以下我简要的把woocommerce系统的功能大致介绍一次,其实懂的都懂,开发功能的系统容易,开发生态系统极难,学习一下人家的架构设计,不要太骄傲,我们暂时还没有很多这种世界级的生态系统,还是先融入世界生态,参与建设。

WooCommerce状态解读

  • [WooCommerce] → [Status]
    • WordPress environment : WordPress的环境变量
    • Server environment : 服务器的环境变量
    • Database : 数据库相关
    • Post Type Counts : 文章类型总数
    • Security : 安全相关
    • Active plugins : 激活的插件
    • Inactive plugins : 未激活的插件
    • Settings : 设置
    • WooCommerce pages : WCC的页面配置
    • Theme : 当前主题
    • Templates ?
    • Admin : 管理员功能
    • Action Scheduler : 操作调度
    • Status report information : 状态报告信息

WooCommerce固定链接设置

  • [设置] → [固定链接]
    • 在安装完 WooCommerce 后,在固定链接会多出一些选项
  • 可选
    • 分类前缀
    • 标签前缀
    • Product category base
    • Product tag base
    • Product attribute base
  • Product permalinks
    • Default
    • Shop base
    • Shop base with category
    • Custom base

WooCommerce常规设置

  • [WooCommerce] → [setting] → [General]
    • General options
      • Selling location(s): 销售位置
        • Sell to all countries : 销售到所有国家
        • Sell to all countries, except for : 销售到所有国家,除了某些国家
        • Sell to specific countries : 销售到指定国家
      • Shipping location(s) : 可配送位置
        • Ship to all countries you sell to : 配送到所有你销售地区
        • Ship to all countries : 配送到所有车窗
        • Ship to specific countries only : 只配送到指定国家
        • Disable shipping & shipping calculations : 禁用配送 & 运费计算功能
      • Default customer location : 默认顾客位置
        • No location by default : 无默认位置
        • Shop country/region : 店铺基本位置
        • Geolocate : 根据IP确定位置
        • Geolocate(with page caching support) : 根据IP确定位置(支持页面缓存)
      • Enable taxes : 启用纳税功能,开启后在 tab 会多一个关于税的选项
      • Enable coupons : 启用优惠券
        • Enable the use of coupon codes
        • Calculate coupon discounts sequentially : 按顺序计算优惠券折扣
    • Currency options
      • Currency : 货币
      • Currency position : 货币位置
      • Thousand separator : 千分位分隔符
      • Decimal separator : 小数点分隔符
      • Number of decimals : 小数点后的位数

b。 成功在线商店的基本设置和选项

WooCommerce产品常规设置

– [WooCommerce] → [setting] → [product]

– Measurements 尺寸

– Weight unit 重量单位

– Dimensions unit 尺寸单位

– Reviews

– Enable reviews

– Enable product reviews

– 开启产品评论

– Show “verified owner” label on customer reviews

– 用户评论时显示 “已经验证” 的标签

– Reviews can only be left by “verified owners”

– 仅已验证是用户可参数评价,表示已经购买的顾客才可以评论

WooCommerce产品库存设置

– [WooCommerce] → [setting] → [product]

– Inventory

– Manage stock 管理库存 : Enable stock management 开启管理库存

– Hold stock (minutes) 保存库存

– Notifications : 通知

– Enable low stock notifications : 开启库存不足通知,与 Low stock threshold 关联,低于值值则通知

– Enable out of stock notifications : 与 Out of stock threshold 关联,低于此值则通知

– Notification recipient(s) : 通知联系人

– Low stock threshold : 库存不足的最低值

– Out of stock threshold : 售罄的最低值

– Out of stock visibility 售罄可见性 : Hide out of stock items from the catalog 从分类隐藏库存脱销产品

– Stock display format : 库存显示格式

WooCommerce产品保留库存设置

– Hold stock (minutes) 保存库存

– 持有库存(未付订单)x分钟。当达到此限制时,未决订单将被取消。留空表示禁用。

WooCommerce配送区域设置 & WooCommerce配送方式详解

– [WooCommerce] → [Settings] → [Shipping] → [Shipping zones]

– [Add shipping zone] 添加配送区域

– 点击添加配送

– Zone name: 名称

– Zone regions: 地区

– Shipping methods:

– [Add shipping method]

– 选择要添加的配送方法,只列出支持区域的配送方法

– [Flat rate] 标准运费

– [Local pickup] 自行取货

– [Free shipping] 免费配送

– A valid free shipping coupon 需要免费送货卷

– A minimum order amount 最小订单金额

– A minimum order amount OR a coupon 最小订单金额和优惠卷

– A minimum order amount AND a coupon 最小订单金额和优惠卷

– Flat rate

e.g. : 10 * [qty] * 0.9 // [qyt] 表示产品数量

e.g. : 10 + 2 – 1 * 2 / 2 * [qty]

e.g. : [fee percent=”10″ min_fee=”20″ max_fee=”30″] // 参照购买产品的总价

– [WooCommerce] → [Coupons] → [Add coupon]

– Coupon code : 优惠卷代码

– Generate coupon code : 生成优惠卷

– Description (optional) : 优惠卷描述

– Allow free shipping : 允许免费配送

– [WooCommerce] → [Settings] → [Shipping] → [Shipping zones]

– Debug mode : Enable debug mode 开启调试模式

– 一般在开发时要开启,否则有缓存看不到效果

– 代码,如果配送符合免费,则仅展示免费

“`php

function my_hide_shipping_when_free_is_available($rates) {

$free = array();

foreach($rates as $rate_id => $rate) {

if ( ‘free_shipping’ === $rate->method_id ) {

$free[ $rate_id ] = $rate;

break;

}

}

return ! empty( $free ) ? $free : $rates;

}

add_filter(“woocommerce_package_rates”, “my_hide_shipping_when_free_is_available”, 100);

“`

WooCommerce配送选项详解

– [WooCommerce] → [Settings] → [Shipping] → [Shipping options]

– Calculations 计算 :

– Enable the shipping calculator on the cart page 开启购物车页上的配送计算器

– Hide Shipping costs until an address is entered 隐藏配送成本直到地址被输入

– Shipping destination 配送目的地:

– Default to customer shipping address 默认为顾客的配送地址

– Default to customerr billing address 默认为顾客账单地址

– Force shipping to the customer billing address 强制配送到顾客的账单地址

– Debug mode 调式模式:

– Enable debug mode : 开启调试模式

WooCommerce配送类型详解

– 需求

– 目的,我们所有设置的运费都是通用的

– 这样无法满足实际需求,比如我们希望进行促销,部分产品免运费,部分产品统一8元运费

– 我们可以使用配送类型来解决定制化问题 Shipping classes

– [WooCommerce] → [Settings] → [Shipping] → [Shipping classes]

– Shipping classes 配送类型

– [Add Shipping classed] 添加配送类型

– Shipping class 配送类别

– Slug 别名

– Description 描述

– Product count 产品数量

– 如果使用?要回到准备运费

– [WooCommerce] → [Settings] → [Shipping]

– → [Shipping zones] → [编辑] → [Shipping methods]

– → [Flat rate] → [edit] → [Flat rate Settings] → [Ship class costs]

– “一口价”

– 零运费

– No shipping class cost 无配送类型的费用

– Calculation type 计算方式

– Per class: Charge shipping for each shipping class individually

– 每个配送类型单独收费

– Per order: Charge shipping for the most expensive shipping class

– 每单收取运费最昂贵的配送类型

– 注意:如果设置了 No shipping class cost 即无运费类别, Cost 和 No shipping class cost 会累加

– [Products] → [Search products] → Edit product

– Shipping

– Shipping class 在这个选项框即可看到我们创建的 Shipping classes 选项

WooCommerce结算进度设置

– [WooCommerce] – [Accounts & Privacy]

– Guest checkout 客户结账

– Allow customers to place orders without an account

– 允许客户在没有帐户的情况下下订单

– Allow customers log into an existing acount during checkout

– 允许客户在结帐时登录到现有帐户

– Account creation 创建账户

– Allow customers to create an account during checkout

– 允许客户在结帐时创建帐户

– Allow customers to create an account on the “My account” page

– 允许客户在“我的帐户”页面上创建帐户

– When creating an account, automatically generate an account username for the customer based on their name, surname or email

– 在创建帐户时,根据客户的名字、姓氏或电子邮件自动为客户生成帐户用户名

– When creating an account, send the new userr a link to set their password

– 创建帐户时,向新用户发送一个设置密码的链接

WooCommerce默认支付网关讲解

– [WooCommerce] → [Settings] → [Payments]

– Payment Methods

– Method

– Enabled

– Description

– Direct bank transfer : 直接银行转账

– Check payments : 支票支付

– Cash on delivery : 货到付款

– [WooCommerce] → [Settings] → [Payments] → [Payment Methods] → [Direct bank transfer]

– Enable/Disable : 开启/关闭

– Title : 标题

– Description : 描述

– Instructions : 说明

– Account details:

– Account name

– Account number

– Bank name

– Sort code

– IBAN

– BIC/Swift

– [WooCommerce] → [Settings] → [Payments] → [Payment Methods] → [Cash on delivery]

– Enable/Disable : 开启/关闭

– Title : 标题

– Description : 描述

– Instructions : 说明

– Enable for shipping methods: 选择配送方式

WooCommerce账户和电子邮件设置

– [WooCommerce] → [Settings] → [Accounts & Privacy]

– Account creation

– Allow customers to create an account during checkout

– 允许客户在结帐期间创建帐户

– 勾选后在 http://wordpress-local.kit.com/checkout/ 结算页出现创建用户的按钮

– Allow customers to create an account on the “My account” page

– 允许客户在“我的帐户”页面上创建帐户

– When creating an account, automatically generate an account username for the customer based on their name, surname or email

– 在创建帐户时,根据客户的姓名、姓氏或电子邮件自动为客户生成帐户用户名

– When creating an account, send the new user a link to set their password

– 在创建帐户时,向新用户发送一个设置密码的链接

– [WooCommerce] → [Settings] → [Emails]

– Email notifications 邮件通知

– Order on-hold : 订单保留

– Enable/Disable : Enable this email notifications 开启此邮箱通知

– Sbuject 主题

– Email heading 邮件内容标题

– Additional content

– Email type 邮箱类型

– HTML template

– 为覆盖和编辑电邮模板,请复制 woocommerce/templates/emails/customer-on-hold-order.php 到您主题的目录 : storefront/woocommerce/emails/customer-on-hold-order.php

– Email Sender options

– “From” name : 来自名称

– “From” address : 来自哪个邮件地址

– Email Template

– Header image : 顶部图像

– Footer text : 底部文本

– Base color: 基本颜色

– Background color: 背景颜色

– Body background color: 背景颜色

– Body text color: 字体颜色

WooCommerce开启Rest API

– [WooCommerce] → [Settings] → [Advanced]

– Rest API

– Add key

– Generaet API key

– Consumer key : ck_994106d0efe4acf06fd46d76aa780b1f811c4715

– Consumer secret : cs_cddef8e52e9d412e2a9ef1d23937e5c073f62ceb

如何使用 REST API

  1. 使用 POSTMAN, Authorization Type 选择 OAuth 1.0,如果是 HTTPS 使用 Basic Auth

  2. 填入 Consumer Key 和 Consumer Secret

  3. 使用 GET 发送请求: http://wordpress-local.kit.com/wp-json/wc/v2/products/54/

– github 的教程

Getting started with the REST API · woocommerce/woocommerce Wiki · GitHub

WooCommerce中webhook作用

– 查看所有网址 http://wordpress-local.kit.com/wp-json/wc/v2/

– [WooCommerce] → [Settings] → [Webhooks]

– 让 WCC 向一个指定的页面发送 POST 请求。

– Add

– Webhook data

– Name : 名称

– Status : 状态

– Topic : 主题

– Delivery URL : 链接

– Secret : 密钥

– API VERSIONo : API 版本

例如: 当创建一张优惠卷时,向URL发送请求

c。 优惠券代码、折扣类型详解

WCC优惠券代码、折扣类型详解:

  • 菜单位置
    • Coupons can now be managed from Marketing > Coupons. Click the button below to remove the legacy WooCommerce > Coupons menu items.
  • [Marketing] → [Coupons] 原位置 [WooCommerce] → [Coupons]
  • Coupon data
    • General
      • Discount type :
        • Fixed cart discount 固定购物车优惠
        • Percentage discount 百分比优惠
        • Fixed product discount 固定产品优惠 (每买一件产品就减指定优惠)
      • Couponn amount 优惠卷金额
      • Allow free shipping
      • Coupon expiry data : YYY-MM-DD 优惠卷过期时间

WCC优惠券时间、金额等限制条件:

  • [Marketing] → [Coupons] 原位置 [WooCommerce] → [Coupons]
    • Usage restriction 使用限制
      • Minmum spend : 最低花费
      • Maximum spend : 最高花费
      • Individual use only : 仅限单独使用
        • Check this box if the coupon cannot be used in conjunction with other coupons.
        • 如此优惠券不能与其他优惠券同时使用,请勾选此框。
      • Ezclude sale items : 不含促销产品
        • Check this box if the coupon should not apply to items on sale. Per-item coupons will only work if the item is not on sale. Per-cart coupons will only work if there are items in the cart that are not on sale.
        • 如果优惠券不适用于打折商品,请勾选此选项。每件商品的优惠券只有在该商品不打折的情况下才有效。每车优惠券只有在购物车中有非特价商品时才有效。

WCC优惠券限定产品和排除产品:

  • [Marketing] → [Coupons] 原位置 [WooCommerce] → [Coupons]
    • Usage restriction 使用限制
      • Products : 产品;限定你创建的优惠卷只作用于哪些产品
      • Exclude products : 排除产品;除了你指定的产品
      • Product categories : 产品类别
      • Exclude categories : 排除分类
      • Allowed email : 允许邮箱

WCC优惠券的使用次数限制:

  • 当使用固定购物车优惠时,购物车又包含了排除的产品,那么它将不能使用。
  • [Marketing] → [Coupons] 原位置 [WooCommerce] → [Coupons]
    • Usage limits 使用次数限制
      • Usage limit per coupon : 每个优惠卷的使用次数限制
        • Unlimited usage 无限使用
      • Limit usage to X items : 限制X个物品使用
        • 假如购物车中有3个产品满足优惠卷减免,而目前 X=2,那么表示选其中两个产品进行减免,而优先级是选择数量多的产品,然后选择价格更高的产品,进行减免。
      • Usage limit per user : 每个用户的使用次数限制
        • Unlimited usage 无限使用

d。 WooCommerce订单/订单列表注意

WooCommerce订单状态详解:

  • 订单状态 WCC 有7种订单状态

    • Pending payment 待付款
    • Processing 正在处理
    • On hold 保留
    • Completed 已完成
    • Cancelled 已取消
    • Refunded 已退款
    • Failed 失败订单
  • [WooCommerce] → [Orders]

    • Orders
      • Order 订单
      • Date 日期
      • Status 状态
      • Ship to 配送至
      • Total 总金额
  • 不同的支付方式,下单后的状态是不同的

    • Direct bank transfer 银行转账 → Status = Processing 正在处理 → 库存已分配
    • Cash on delivery 货到付款 → Status = Processing 正在处理 → 库存已分配
    • Check payments 支票付款 → Status = On hold 保留 → 库存已分配
    • PayPal 支付 → Status = Pending payment 待付款 → 库存未分配
  • Processing 处理中

  • 用户已经付款,但还没有收到货的中间状态。此时,库存已分配。

  • 线下付款的情况

    • 当你已经确认顾客已经按照约定的线下支付方式付款后,而且你的销售产品还需要后续的处理,比如需要物流发货,那么你可以将订单状态从 “保留” 改为 “处理中”。
  • 货到付款的情况

    • 下单成功后,订单的状态 就为此状态。货到付款比较特殊,它是收货和付款同时进行的。
  • 线上付款的情况

    • 下单后,支付平台方(比如 PayPal)会通知 WCC 该笔订单已经支付,WCC在接到通知后,可将 “待付款” 状态自动变更为 “处理中” 状态。
    • 如果客户购买的是虚拟产品,WCC在接到支付成功的通知后,可将 “待付款” 状态变为 “已完成”
  • Failed 失败订单

    • 当客户采取在线支付时,并且付款失败时,WCC会得到来自第三方支付平台(比如 PayPal)的通知。得到通知后,WCC 会将订单信息设置成 “失败订单”
  • Cancelled 已取消

    • 管理可以在后台取消某个订单
    • 客户在没有付款的情况下,自己取消订单,在 “我的账户 > 订单”
    • 另外,在取消订单时,WCC 不会补充处理库存。如果你的库存,已经在其他环节减扣了库存,你需要额外注意并手动修改库存。

WooCommerce订单编辑详解1:

<pre>
                            失败订单
                              ^
                              否
                              |
订单 -> 在线支付 -> 待付款  -> 是否支付成功
                              |
                              是
                              v
订单 -> 货到付款 ------------> 处理中 ------------> 已完成、已退款、已取消
                              ^
                              是
                              |
订单 -> 线下支付  -> 保留 -->   是否支付
</pre>

WooCommerce订单编辑详解2:

  • [WooCommerce] → [Orders] → [Edit order]
  • 仅在 On hold 保留、Pending payment 待付款,两种状态下,才允许修改 Item (订单的项目) 和 Shipping (配送)。
  • [Refund] 退款
    • Restock refunded items : 恢复已退款库存
    • Amount already refunded : 部分退还
    • Total available to refund : 全部退还
    • Refund amount: 退款金额
    • Reason for refund (optional) : 退款原因(可选)
  • [Order actions] 订单操作
    • Email invoice / order details to customer 发给客户的邮箱收据/订单详情
    • Resend new order notification 重新发送新订单通知
    • Regenerate download permissions 重新生成下载权限
  • [Order notes] 订单通知
    • Add note
      • Private note 给自己的通知
      • Note to customer 给客户的通知

WooCommerce创建手工订单:

  • 某些客户没有直接在网站下单,而是向你下单,直接跟你转账购买,这时我们可以手工创建订单
  • [WooCommerce] → [Report]
    • Export CSV

e。 product产品介绍

  • [Products] 类型
    • Product data 产品数据
    • Simple product 简单产品
    • Grouped product 成组产品
      • 组合售卖,也可独立选择,价格可能是指定范围的
      • 例如,盗墓笔记是一系列的产品,可以使用成组产品设定
    • External/Affiliate product 外接/关联产品
      • 推广的产品,跳转到第三方购买
    • Variable product 可变产品
      • 例如服装的尺码、颜色等,可变可选的
  • Attributes [Products] 属性
    • 产品具备的特征和参数
    • Custom product attribute [Add]
      • 自定义产品属性
      • Name : 属性名
      • Value(s) : 属性值
      • Visible on the product page : 在产品页面上可见
      • Used for variations : 用于变量
  • 添加后,在产品详情页 → Additional information 其他属性 出现
  • Advanced 高级
    • Purchase note 购物备注
    • Menu order 菜单排序
    • Enable reviews 开启评论
  • General : 常规
    • Regular price : 常规售价
    • Sale price : 促销价格
    • Sale price dates : 促销日期
  • Inventory : 库存
    • SKU : 货号
    • Manage stock : 管理库存
      • Stock quantity : 库存数量
      • Allow backorders? : 允许缺货超售?
        • 当库存为 0 时,是否还允许销售
        • Allow, but notify customer 允许,但通知客户
      • Low stock threshold : 低库存阈值
    • Stock status : 库存状态
      • In stock : 有货
      • Out of stock : 无货
      • On backorder : 预售
    • Sold individually : 单独出售
      • 勾选后,无法输入数量

如何在WooCommerce中创建一个变体产品?

操作指南: How To Create a Variable Product in WooCommerce

参考: 安装和配置WooCommerce – 大湾区梁工-跨境电商

4 Likes

你在干什么

什么意思,请问什么问题

wp吗?有意思

不知道什么意思。而我的意思就是,php语言最好的礼物就是laravel和wordpress,特别是wordpress,其他语言没有这个,差距非常远。这是最大的最好的礼物