Hi,
It sounds like the issue might be related to the session handling when switching languages or currencies. Instead of modifying the core files, which can cause issues during updates, try the following:
Check if the issue persists in the latest version of PrestaShop.
If the error still occurs, consider using a custom module or override to handle the cart context during the switch. This way, you can maintain core integrity and avoid potential issues later on.
This should provide a cleaner and more maintainable solution. Let me know if it helps!