应用折扣时,Magento 管理订单视图中可能存在错误

发布于 2024-11-27 17:09:04 字数 568 浏览 0 评论 0原文

最近我发现一个问题,我无法解决。我制定了购物车价格规则,使用优惠券时可以降低 20% 的价格。折扣适用于购物车中产品的含税价格。运输没有税收规则。一切都很好,客户会看到带有正确价格的通知,甚至订单列表也显示正确的价格。只有一个地方我认为是错误的 - 在订单视图中有一个字段“订购的商品”,而在行总计中它给出了错误的价格。订单总计没问题。

示例:

  • 价格包含在内。税费:159.00
  • 折扣 (20%):31.80
  • 含税价格折扣后税费:127.20
  • 税费 (23%):23.79
  • 总计(含运费):147.20

  • 订购商品的行总计:121.26 (???)

我已经检查了所有税务设置,但不知道可能出了什么问题以及 Magento 如何计算此值。有什么想法吗?

顺便说一句,我的 Magento 版本是 1.5.0.1

Recently I've found one problem which I can't solve out. I've made shopping cart price rule, which reduces price by 20% when coupon applied. Discount is applied to price of products in cart INCLUDING tax. Shipping has no tax rule. Everything is fine, customer sees notice with correct price, even orders list shows correct price. There's only one place where I see it wrong - in Order View there's a field "Items Ordered" and here in Row Total it gives wrong price. It's ok with Order Totals.

Example:

  • Price inc. tax: 159.00
  • Discount (20%): 31.80
  • Price inc. tax after discount: 127.20
  • Tax (23%): 23.79
  • Total (with shipping): 147.20

  • Row total in Items Ordered: 121.26 (???)

I've checked all the tax settings and have no idea what might be wrong and how Magento calculates this. Any ideas?

Btw, my Magento version is 1.5.0.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烂人 2024-12-04 17:09:04

仅供参考,计算这些值的位置位于:

app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

此文件已在 1.6.1 中修复,第 242/243 行是

$_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount(),
$_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount()

现在是

$_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(),
$_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount()

FYI, the place these values are calculated is in:

app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

This file was fixed in 1.6.1, lines 242/243 were

$_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount(),
$_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount()

and are now

$_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(),
$_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文