我想在购物车上的 Virto Commerce 中进行促销。在我的示例中,如果客户购买至少 800 瑞典克朗,我想以 200 瑞典克朗打折购物车,在我的示例中,增值税/消费税为 25%。
这是我正在寻找的效果:
Cart
subTotal: 640
subTotalWithTax: 800
discountAmount: 160
discountTotalWithTax: 200
total: 480
totalWithTax: 600
据我所知,营销模块仅支持在税前应用折扣的促销活动。Se 店面代码中的注释:
foreach (var reward in cartRewards)
{
//When a discount is applied to the cart subtotal, the tax calculation has already been applied, and is reflected in the tax subtotal.
//Therefore, a discount applying to the cart subtotal will occur after tax.
//For instance, if the cart subtotal is $100, and $15 is the tax subtotal, a cart - wide discount of 10 % will yield a total of $105($100 subtotal – $10 discount + $15 tax on the original $100).
if (reward.IsValid)
{
var discount = reward.ToDiscountModel(ExtendedPriceTotal);
Discounts.Add(discount);
DiscountAmount = discount.Amount;
}
}
我想这在某些市场上是一种常见的做法。但这是针对瑞典的 B2C 解决方案。在 800 瑞典克朗的购物车上宣传的 200 瑞典克朗折扣应使客户面临 600 瑞典克朗的总价(含税)。
这给了我关于购物车 JSON 的以下信息
Cart
subTotal: 640
subTotalWithTax: 800
discountAmount: 160
discountTotal: 160
discountTotalWithTax: 160
subTotalDiscount: 0
subTotalDiscountWithTax:0
discountTotalWithTax: 160
taxTotal: 160
total: 640
totalWithTax: 800 (Calculated. Not in standard JSON response)
因此,要么我错过了配置促销活动,要么我对促销活动的店面代码的实现在某种程度上缺乏。