-
Notifications
You must be signed in to change notification settings - Fork 42
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
Incorrect values for fields price and price_incl in feed for products with prices below 1 EUR #218
Comments
Hello @s-renz, thanks for bringing up this issue. We're currently looking into it, taking into account your detailed description and thorough review of the affected code lines and locations. I'll update you shortly, hopefully with a PR and/or a release where we've addressed this. |
Any news on this yet? |
Hello @s-renz, Yes, sorry for the delay but we have good news! We've addressed this issue with a fix that will be included in the upcoming release later this month. Thank you for your patience, and I've also ensured that the appropriate label has been added to this issue. |
Thanks! Looking forward to the new version |
Hi There @s-renz ! Thank you again for opening this issue. I'm happy to share that we have covered this issue in our new release. I'm marking this issue as resolved for now. Please don't hesitate to reopen it if necessary. Thank you again for opening this issue! |
Hi,
we recently got some notifications in Google Merchant Center for products that have prices differ in feed and on the page.
When we looked further into it we noticed that the common thing between these products is that they are all below 1 EUR. In this case the min_price and max_price correctly show the price without tax, however the fields "price" and "price_excl" already include the tax and as such the field "price_incl" will include the already taxed price including tax.
We traced the issue back to this line:
https://github.com/magmodules/magento2-channable/blob/master/Helper/Product.php#L1006
Since the price is below 1 and we're talking floats here the else-branch is executed. So instead of using
this code is used:
Which returns the price already taxed, which is then put into processPrice and taxed again due to how the store configuration is set. As far as I can see there are two changes that work, however I don't know enough about Magento's price calculation to know if this is indeed a bug in Magento or in the Channable Extension, which is why I didn't want to do a pull request directly.
As far as I can see it, the AmountInterface always returns the price with all things included, unless you explicitly tell getValue() what to exclude:
The correct price is also returned when not using the Amount interface but instead get the Value directly:
But again I am not qualified enough to know the difference or if that would break anything.
Could someone look into this please?
The text was updated successfully, but these errors were encountered: