如何在Woocommerce中按项目设置运输成本 [英] How to set a shipping cost by item in Woocommerce

查看:82
本文介绍了如何在Woocommerce中按项目设置运输成本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Woocommerce中,当我在购物车中添加多个产品时,送货仅适用于1个产品。我应该如何更改以将成本应用于每个项目?

In Woocommerce, when I add multiple products in cart, the shipping only applies to to 1 product. How should I change that to apply the cost to each item?

就像下面的图片一样,打印机的运费适用,但LCD显示器没有。

Like in the following image, the shipping cost for printer is applied but the LCD monitor is not.

如何在Woocommerce中按商品设置运费?

How to set a shipping cost by item in Woocommerce?

推荐答案

固定费率 送货方式的Woocommerce送货设置中,有很多方法可以基于以下方式获取动态设置:

In the Woocommerce Shipping Settings for "Flat rate" Shipping Method, there is many ways to get dynamic settings based on:


  • 项目数量,使用 [数量] 自变量

  • 项目总数费用,使用 [cost] 参数

  • 费用,使用 [fee] 带有附加参数 percent min_fee max_fee

  • Item quantity, using [qty] argument
  • Total item cost, using [cost] argument
  • A fee, using [fee] argument with additional parameters percent, min_fee and max_fee

您还可以使用 + - * / 运算符和括号。

You can also use +, -, * and / operators and parenthesis.

这里有一些例子:


  1. [qty] * 2 -按项目成本

  2. 4 +([qty] * 2.5)-初始成本,按项目附加成本
  3. >
  4. [费用百分比= '10'min_fee =''max_fee = '20'] -费用上限为上限

  5. [费用百分比= '10'min_fee ='4'max_fee =''] -费用最小的百分比

  1. [qty]*2 - Cost by item
  2. 4+([qty]*2.5) - Initial cost with an additional cost by item
  3. [fee percentage='10' min_fee='' max_fee='20'] - Percentage fee limited to a max amount
  4. [fee percentage='10' min_fee='4' max_fee=''] - Percentage fee with a minimal cost

相关线程:在Woocommerce运送方式费率中设置最低商品费用

高级运费自定义:

使用以下方法可以自定义更多运输费用 woocommerce_package_rates 过滤器挂钩。

It's possible to customize even more shipping costs using woocommerce_package_rates filter hook.

请参见 所有与StackOverFlow相关的线程 ,使用 woocommerce_package_rates 过滤器挂钩。

See all StackOverFlow related threads using woocommerce_package_rates filter hook.

这篇关于如何在Woocommerce中按项目设置运输成本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆