Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable product old price with taxes displayed wrong #6729

Closed
kandrejevs opened this issue Sep 23, 2016 · 20 comments
Closed

Configurable product old price with taxes displayed wrong #6729

kandrejevs opened this issue Sep 23, 2016 · 20 comments
Assignees
Labels
bug report Component: Tax Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@kandrejevs
Copy link

kandrejevs commented Sep 23, 2016

I have a store for EU, by law we need to show all prices with VAT included. In the admin we enter prices without tax, we have tax rule to add 20% VAT, in configuration everything es set up properly, so all prices include tax.

When we apply catalogue rule for category to have 20% discount all prices are shown correctly except configurable product old price- it is old price without tax.

Steps to reproduce

  1. create configurable product without tax, price is defined for each sku
  2. create tax rule 20%
  3. apply this tax rule to product
  4. in tax settings set all values to display prices with tax

Expected result

  1. Configurable product old price should be child price without discount and with tax

Actual result

  1. for simple product old price is correct, if it is 100£ in admin and tax is 20%, on front end it is displayed as 96$ (regular price 120£) - 20% catalog rule discount applied
  2. for configurable product that has prices for child products final price is correct, but old price is old price without VAT applied.

here is simple product and configurable, both has price 100$, 20% tax and 20% catalog rule discount. final price is correct for both, old price is not:
http://i.imgur.com/qP8etV6.png

@yangsystem
Copy link

I have the same problem but I figured a workaround.
If you set the product as a virtual product you have this problem: price with tax is the same as price without tax. The code does not apply tax on it.
BUT:
if you make the same product as a simple product (just check this item has weight and fill 0 as weight) all work's out. And weight 0 is the same as virtual product for us human's.

I think the problem is somewhere in virtual product's logic.

@veloraven
Copy link
Contributor

@kandrejevs thank you for your report.
Please identify which version of Magento you are running.

@kandrejevs
Copy link
Author

@veloraven this bug is present on 2.1.1 CE and EE editions.

here is my tax configuration, tax rule is 20%

INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`)
VALUES
    ('default', 0, 'tax/classes/wrapping_tax_class', '0'),
    ('default', 0, 'tax/calculation/apply_after_discount', '0'),
    ('default', 0, 'tax/notification/ignore_discount', '1'),
    ('default', 0, 'tax/notification/ignore_price_display', '0'),
    ('default', 0, 'tax/calculation/discount_tax', '1'),
    ('default', 0, 'tax/calculation/cross_border_trade_enabled', '0'),
    ('default', 0, 'tax/defaults/country', 'GB'),
    ('default', 0, 'tax/defaults/postcode', NULL),
    ('default', 0, 'tax/display/type', '2'),
    ('default', 0, 'tax/display/shipping', '2'),
    ('default', 0, 'tax/cart_display/price', '2'),
    ('default', 0, 'tax/cart_display/subtotal', '2'),
    ('default', 0, 'tax/cart_display/gift_wrapping', '1'),
    ('default', 0, 'tax/cart_display/printed_card', '1'),
    ('default', 0, 'tax/cart_display/grandtotal', '1'),
    ('default', 0, 'tax/sales_display/gift_wrapping', '1'),
    ('default', 0, 'tax/sales_display/printed_card', '1');

@bordeo
Copy link

bordeo commented Dec 19, 2016

@veloraven we find this bug on last magento version 2.1.3 CE.
Like @kandrejevs I used catalog promo with 20% discount and old-price show price without tax.

@firstred
Copy link

I managed to show the correct prices by editing the file /vendor/magento/module-configurable-product/Pricing/Price/ConfigurableRegularPrice.php.
Replace (line ~89):

    public function getAmount()
    {
        return $this->getMinRegularAmount();
    }

with

    public function getAmount()
    {
        return $this->getMaxRegularAmount();
    }

At this moment I have no idea why it works for me and whether it will help in your case, but...

@6ui11em
Copy link

6ui11em commented Feb 13, 2017

Following the suggestion of @firstred I fixed it changing the loop of doGetMinRegularAmount function from:

foreach ($this->lowestPriceOptionsProvider->getProducts($this->product) as $product) {

to

foreach ($this->getUsedProducts() as $product) {

Hope this quick fix helps someone else.

@choukalos choukalos removed their assignment Feb 21, 2017
@PierAlex
Copy link

PierAlex commented Mar 8, 2017

Same problem for me on Magento 2.1.2 CE, the workarounds above do not take effects.

@jghaanstra
Copy link

Any news concerning this issue, it's still present in Magento 2.1.5. For me this is a pretty nasty bug. By law I'm obligated to show prices including tax in my country. Due to this bug I'm not able to and I'm violating the law.

@Turv
Copy link

Turv commented Apr 11, 2017

@jghaanstra I'm in the same boat, and this is a pretty serious bug to have been in the core for 7 months with no workarounds (The above don't work for me). I believe this worked in 2.0.6 so something has changed..

@Turv
Copy link

Turv commented Apr 25, 2017

@kandrejevs A fix has been put together by @jghaanstra and @maderlock here that resolves this issue until a permanent fix is available in the core on a future release.

https://github.com/jghaanstra/magento-grouped-product-tax-fix

@zamocom
Copy link

zamocom commented May 1, 2017

Works properly, but now I enter the price of the product and this takes into account the fees, if I insert 100 eur and the 20% fee the product result is not 120 eur but 100, practically the price I insert I already takes into account the fee And is not added after based on the percentage of the tax itself, is it correct?

@oleg-onufer
Copy link
Contributor

Hi @kandrejevs.
Program logic for the regular price of the configurable product was changed:
"Regular price for Configurable product should be shown for product page, but not be for list of products"

@korostii
Copy link
Contributor

Program logic for the regular price of the configurable product was changed:
"Regular price for Configurable product should be shown for product page, but not be for list of products"

Hi @oleg-onufer,
I wasn't able find any info about such a change in the devdocs. Is it on the release notes somewhere?

To be perfectly clear, I'm interested to know when was this change introduced and whether this new behavior can be reverted via settings, so a link to a certain commit would also do.

It seems to be a breaking change, is it not?

@korostii
Copy link
Contributor

Hi @veloraven, I can see that you've added a "needs update" label.
Could you please clarify what kind of additional information do you require?

@RishabhRkRai
Copy link

I still facing this issue in 2.1.7

@magento-team magento-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Jul 31, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-70491

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Progress: needs update Component: Tax labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Sep 18, 2017
@magento-engcom-team magento-engcom-team self-assigned this Sep 18, 2017
@magento-engcom-team
Copy link
Contributor

@kandrejevs, thank you for your report.
The issue is already fixed in develop branch
But we will consider to backport the fix to patch releases

1 similar comment
@magento-engcom-team
Copy link
Contributor

@kandrejevs, thank you for your report.
The issue is already fixed in develop branch
But we will consider to backport the fix to patch releases

@magento-engcom-team
Copy link
Contributor

Hi @yangsystem the issue has been fixed in 2.2-develop branch and will be available with release 2.2.1 soon

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 11, 2017
@magento-engcom-team magento-engcom-team added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Feb 28, 2018
@magento-engcom-team
Copy link
Contributor

Hi @kandrejevs. Thank you for your report.
The issue has been fixed in #13490 by @simpleadm in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.13 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Tax Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests