magento / magento/community-features

Ability to give desired discounts to bundle product severely limited

Open
#348 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
46
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Tested in 2.4.6-p2.

I have a bundle product with the price of $70,990.00. I want to give the product a customer group price of $64,290.00. I calculate the desired discount percent that is needed for this which is 9.437949%. How ever, when the value is saved it ends up as 9.44 to the database and the product now has the price of $64,288.54.

This is caused by catalog_product_entity_tier_price table column percentage_value storing only two decimals after the decimal point: the https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Catalog/etc/db_schema.xml#L784 .

For special prices we allow 6 decimals of precision so why won't we do the same for the tier prices?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/code/Magento/Catalog/etc/db_schema.xml at the percentage_value definition and compare it with the precision used for special prices. Trace how catalog_product_entity_tier_price stores and applies bundle customer-group discounts, then verify that the requested discount retains sufficient precision and produces the intended final price.

Written by the indexing model from the issue text.

Assessment

Domain
database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.