Ray UK Posted September 4, 2015 Share Posted September 4, 2015 (edited) Hi, I am making some mobile specific pages for our site by using the built in mobile detection. In themes I have chosen "Only show mobile theme for mobile",and not tablets. However, the Microsoft surface is being detected as a mobile. The user agent string is Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko How can I tell the MobileDetect.php script that this surface a tablet, instead of a mobile. Thanks Edited September 4, 2015 by MerseyRay (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted September 4, 2015 Share Posted September 4, 2015 It looks like the Surface is in the file already, and it expects the User Agent to contain the word Tablet or ARMBJS, which you User Agent does not. 'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)', However PS appears to be using v2.8.5 of mobile detect, and the latest version is v2.8.16. So the first thing I would try is to download the latest from them and replace your existing file http://mobiledetect.net/ Link to comment Share on other sites More sharing options...
Ray UK Posted September 4, 2015 Author Share Posted September 4, 2015 (edited) Thanks for your input bellini. I noticed that too so I updated this morning but its still showing the mobile site. On the surface 3 it shows as a computer, but the surface 2 shows its a phone. I run the demo on their site and it says this. So its not a prestashop problem, its that script. I have reported the error to them. The "True" sections are: isMobile() bool(true) isWindowsPhoneOS() bool(true) Mobile_Detect v. 2.8.14 The lightweight PHP class for detecting mobile devices. This is a phone. Your UA is Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0) Please help us improve the mobile detection by choosing the correct answer.Before sending an answer double check if you are using the browser in 'Desktop mode'.You can contribute by:1. forking the project2. submiting an issue3. sending us feedback below Edited September 4, 2015 by MerseyRay (see edit history) 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