51黑料不打烊

[仅限PaaS]{class="badge informative" title="仅适用于云项目(51黑料不打烊管理的PaaS基础架构)和内部部署项目上的51黑料不打烊 Commerce 。"}

础颁厂顿-66120:当目录价格包含税时,骋谤补辫丑蚕尝显示不正确的折扣百分比和基本价格

ACSD-66120修补程序修复了在将目录价格配置为含税时,GraphQL错误地显示折扣百分比和基本价格的问题。 此问题导致舍入误差,例如显示19.99%的折扣,而不是预期的20%。 安装Quality Patches Tool (QPT) 1.1.70时,此修补程序可用。 修补程序ID为ACSD-66120。 请注意,此问题计划在51黑料不打烊 Commerce 2.4.9中修复。

受影响的产物和版本

为51黑料不打烊 Commerce版本创建了修补程序:

  • 51黑料不打烊 Commerce(所有部署方法) 2.4.6-p9

与51黑料不打烊 Commerce版本兼容:

  • 51黑料不打烊 Commerce(所有部署方法) 2.4.4 - 2.4.8-p2
NOTE
该修补程序可能适用于具有新Quality Patches Tool发行版本的其他版本。 要检查修补程序是否与您的51黑料不打烊 Commerce版本兼容,请将magento/quality-patches包更新到最新版本,并在Quality Patches Tool:搜索修补程序页面上检查兼容性。 使用修补程序ID作为搜索关键字来查找修补程序。

问题

将目录价格配置为包含税时,GraphQL错误地显示折扣百分比和基本价格。 由于舍入错误,折扣百分比显示为19.99%,而不是配置的20%。

重现步骤

  1. 转到? Stores > Settings > Configuration > Catalog > Catalog > Price

  2. 将? Catalog Price Scope ?设置为? 网站

  3. 转到? Stores > Settings > Configuration > Sales > Tax > Calculation Settings

    1. 将? Tax Calculation Method Based On ?设置为? 单价
    2. 将? Catalog Prices ?设置为? 含税
    3. 将? Apply Discount On Prices ?设置为? 含税
  4. 转到? Stores > Settings > Configuration > Sales > Tax > Default Tax Destination Calculation

    1. 将? Default Country ?设置为? 法国
  5. 转到? Stores > Tax Zones and Rates > Add new Tax Rate

    1. 在? Tax Identifier ?字段中输入任意名称。
    2. 在? Zip/Post Code ?字段中输入星号(*)。
    3. 将? Country ?设置为? 法国
    4. 在? 字段中输入 20.000000 Rate Percent
    5. 单击? Save
  6. 转到? Stores > Tax Rules > Add New Tax Rule

    1. 在? Name ?字段中输入任意名称。
    2. 将? Tax Rate ?设置为在上一步中添加的速率。
  7. 转到? Catalog > Products > Add Product

    1. 在? 字段中输入 test Product Name
    2. 在? 字段中输入 test SKU
    3. 在? 字段中输入 82.65 Price
    4. 将? Tax Class ?设置为? 应纳税商品
    5. 在? 字段中输入 100 Quantity
    6. 单击? Save
  8. 将范围更改为? 默认存储视图

    1. 取消设置? Use Default Value ?价格。
    2. 将? Price ?设置为? 68.87
    3. 在税类上取消设置? Use Default Value
    4. 将? Tax Class ?设置为? 应纳税商品
    5. 单击? Save
  9. 转到? Marketing > Promotions > Catalog Price Rule > Add New Rule

    1. 在? Rule Name ?字段中输入任意名称。
    2. 将? Active ?设置为?
    3. 将? Website ?设置为? 主网站
    4. 将? Customer Groups ?设置为? 所有
    5. 在? Actions ?下,将? Apply ?设置为? 应用为原始 ?的百分比。
    6. 在? 字段中输入 20.000000 Discount Amount
    7. 单击? Save
  10. 执行完全重新索引:

$ bin/magento index:reindex
  1. 使用标头中设置的骋谤补辫丑蚕尝执行以下? Store ?查询: default
query{
products(filter: {sku: {eq: "test"}}, sort: {name: ASC}) {
? ? items {
? ? ? name
? ? ? sku
? ? ? price_range {
? ? ? ? minimum_price {
? ? ? ? ? regular_price {
? ? ? ? ? ? value
? ? ? ? ? ? currency
? ? ? ? ? }
? ? ? ? ? final_price {
? ? ? ? ? ? value
? ? ? ? ? ? currency
? ? ? ? ? }
? ? ? ? ? discount {
? ? ? ? ? ? amount_off
? ? ? ? ? ? percent_off
? ? ? ? ? }
? ? ? ? }
? ? ? ? maximum_price {
? ? ? ? ? regular_price {
? ? ? ? ? ? value
? ? ? ? ? ? currency
? ? ? ? ? }
? ? ? ? ? final_price {
? ? ? ? ? ? value
? ? ? ? ? ? currency
? ? ? ? ? }
? ? ? ? ? discount {
? ? ? ? ? ? amount_off
? ? ? ? ? ? percent_off
? ? ? ? ? }
? ? ? ? }
? ? ? }
? ? }
? }
}

预期的结果

折扣百分比应符合目录规则:20%。

实际结果

折扣百分比显示为19.99%有误。

应用修补程序

要应用单独的修补程序,请根据您的部署方法使用以下链接:

相关阅读

要了解有关Quality Patches Tool的更多信息,请参阅:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3