-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Prices displayed without taxes when Set default country from browser language is enabled #34636
Comments
Hello @ChillCode , I've tested with 8.1.x, I can't reproduce your issue : Screen.Recording.2023-11-21.at.14.50.49.movAm I missing something ? |
Hi @florine2623 Some time I'm bad at communication. Just created a demo on prestashop.com, explore BO, added a B2B group without taxes and the rest is on the following video: Hummingbird.printed.t-shirt.Mozilla.Firefox.2023-11-21.21-25-39.mp4Thanks for testing. |
After some digging, the issue resides on PrestaShop/classes/controller/FrontController.php Lines 312 to 316 in 95475a2
Not sure which is the expected behavior but don't think should be this, since customers coming from search engines are getting a different price when reload. Just disabled |
Now I thought to search for term has_currency and found this: |
ping @PrestaShop/qa-functional can someone test this ? On my end, I can't reproduce it. |
As we can see I did not login at any time, just removed cookies to show how a customer sees a product price when first visits a PrestaShop site with It's worth a watch. |
Hi @ChillCode Thank you for your report, Despite my effort, I can't reproduce your issue as you can see : recording.38.webmrecording.39.webmIt seems that your issue is not a PrestaShop core bug but most likely a server configuration or customization problem. Maybe your issue is more related to the FR taxes and not for the taxes of the other country. Because this one 'll appear only with the cookie, as you said it. And we can't reproduce it. We will close this issue. Thank you |
Hi @AureRita If you came to visit the product from an external link and you never visited the site before you will never have a cookie so you will see the prices without taxes until you refresh. I just followed and even quoted the code where the issue resides... and the check @Progi1984 added while ago that is preventing to get the correct country, so I can tell you with all my short experience that there is an issue when |
@ChillCode hi
no B2B group is needed.
the first time visitor always receives the price he receives based on the country in the context... who set by browser detection.... Do you think it’s worth removing the price dependence on browser locale determination? |
Screencast.from.11.01.2024.21.53.05.webm |
@ChillCode tryed you #27903 ? |
Hi @metacreo I spend few hours with this and already got paid for it, so i understood how all this works, and my customer, a senior dev understood also why some people complain for viewing prices without taxes. I know we don't need the group, found it later, but also wanted to include the same settings as the site I was working on so it was sure to reproduce. I just wanted to show you where to look, and you found the changes between 1.7.8 and 8, I knew before my post you would find it, and for me that is ok, that site just set geolocation and that disabled the browser thingy. Nice you found has_address_type thingy. |
Also forgot to mention (was working with this a month ago) on your address issue that you will have different result if the cart is initialized or not, so if you don't have cookies, and go directly to your profile without initializing the cart you'll not have a different country... As stated, it's worth a watch. |
@ChillCode hello, I think this issue #34636 and PR #27903 must be re-opened. In #27903 only this part code confuses me Indeed, I agree that now it does not work logically and all because of the closure of normal PRs and the inability to repeat bugs. At the same moment, they accept the unfinished PR. All this violates the logic... This is nice work of the 🙄... Bugs #34636 #34080 #33991 come from accepted unfinished #27187 which violated part of controllers logic. Now we are trying to finish it. |
Dears @florine2623 and @AureRita can you please re-open issue #34636 and PR #27903 ? Or we must create new? |
Prerequisites
Describe the bug and add attachments
When a user visits a site that have a group to display prices without taxes and have no cookies already set, PS will display prices without taxes even to visitors, but if the same page is reloaded (we have cookies) prices are shown as configured in the group.
Expected behavior
Show prices as configured.
Steps to reproduce
Set default country from browser language
.PrestaShop version(s) where the bug happened
1.7.8.10
PHP version(s) where the bug happened
No response
If your bug is related to a module, specify its name and its version
No response
Your company or customer's name goes here (if applicable).
No response
The text was updated successfully, but these errors were encountered: