如何在Woocommerce中按项目设置运输成本 [英] How to set a shipping cost by item in 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 parameterspercent
,min_fee
andmax_fee
您还可以使用 +
,-
, *
和 /
运算符和括号。
You can also use +
, -
, *
and /
operators and parenthesis.
这里有一些例子:
-
[qty] * 2
-按项目成本 -
4 +([qty] * 2.5)
-初始成本,按项目附加成本 > -
[费用百分比= '10'min_fee =''max_fee = '20']
-费用上限为上限 -
[费用百分比= '10'min_fee ='4'max_fee ='']
-费用最小的百分比
[qty]*2
- Cost by item4+([qty]*2.5)
- Initial cost with an additional cost by item[fee percentage='10' min_fee='' max_fee='20']
- Percentage fee limited to a max amount[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屋!