Eutanasio Posted November 23, 2016 Share Posted November 23, 2016 Hi, I have a problem, the ISP in my country mostly gives IPs to mobile devices that are apparently not recognized by the Geolocation function and then get the redirection page, which happens quiet often and once it happens, the cache on that phone wont let them ever see again our website unless they use incognito mode.I think a good solution would be allowing mobile devices skip the Geolocation restriction, but not sure how to do so in PS 1.6.Thanks for helping! Link to comment Share on other sites More sharing options...
rocky Posted November 28, 2016 Share Posted November 28, 2016 I suggest overriding the FrontController::geolocationManagement($default_country) function and returning false if the customer is using a mobile device. For example, create override/classes/controller/FrontController.php with the following: <?php class FrontController extends FrontControllerCore { protected geolocationManagement($default_country) { if ($this->context->getMobileDevice()) { return false; } else { return parent::geolocationManagement($default_country); } } } Remember to go to Advanced Parameters > Performance and click the "Clear cache" button (or manually delete cache/class_index.php) so PrestaShop can find the override. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now