Skip to content

Bundle product price indexing not calculating tier prices correctly #30610

Open
@aligent-lturner

Description

@aligent-lturner

Preconditions (*)

  1. Magento version 2.x (appears to have been present in all versions)
  2. Magento 2.4-develop

Steps to reproduce (*)

  1. Create a bundle product with a fixed price - e.g. $100
  2. Apply a tier price discount for all websites and all customer groups of 10%
  3. Run bin/magento indexer:reindex catalog_product_price

Expected result (*)

  1. Final price (and min_price, max_price, tier_price) in catalog_product_index_price are set to 90 (100 - 10%)

Actual result (*)

  1. Final price (and others) in catalog_product_index_price are set to 100

Additional Information

#30610 (comment)
I have debugged this issue locally, and it appears to be caused by this line:


This is getting the minimum value of catalog_product_entity_tier_price.value, but due to:

There is no fixed price option for bundle products in the advanced pricing modal. Instead, all values are percentage discounts, which populates the catalog_product_entity_tier_price.percentage_value column.
I have patched \Magento\Bundle\Model\ResourceModel\Indexer\Price.php locally to change MIN(tp.value) to MIN(tp.percentage_value), and I then saw the expected values populated in catalog_product_index_price.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CatalogComponent: DBIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: ready for devReported on 2.3.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions