Jump to content

help: anyone with an iPhone iOS 9 and mac computer


Scully

Recommended Posts

I am trying to figure out why some pages on PS 1.5.6. do not load completely with an iPhone loading mobile theme. According to my tests, a complete new prestashop 1.5.6. installation also fails to load the completely with an iOS device and mobile theme.

 

Since I don't own a Mac I would ask for a little help. Here is what I would ask you to help me in:

 

- Make sure you have an iPhone with iOS 9

- Make sure you have a Mac with up-to-date Safari browser

- Enable "Web inspector" in the Safari settings on your iPhone

- Enable "Show Develop menu in menu bar" on your macs Safari

- Plug the iPhone to your Mac desktop or notebook

- Visit the pages below with your iPhone and check if the fully load or not. If not, check the Web Inspector on your Mac for errors or messages and post  them here.

- If page loads correctly, empty the iPhones browser cache and make a 2nd attempt.

 

Details on how to enable Web Inspector can be found here:

http://appletoolbox.com/2014/05/use-web-inspector-debug-mobile-safari/

 

Visit one of theses pages

 

Prices Drop - usually shows only 2 products on initial load with iPhone. Reload is fine.

http://mit100wir.ch/wirshop/wir-aktionen

 

Manufacturers - this page usually shows only 3 manufactureres on the initial load. Reload does well.

http://mit100wir.ch/wirshop/hersteller-mit-wir

 

Sometimes also category pages do not load correctly. However, it seems to happen randomly.

 

20 dollars via Paypal for the first related error message posted here.

Thanks for your help.

Scully

Link to comment
Share on other sites

It looks like I have found the culprit:

 

With iOS 9 the problems seem to be caused by the links inside the navigation (categories, prices-drop etc). These are ajax links. How to solve?

Disable ajax calls for iOS 9. This must be done after loading the jquery javascript and BEFORE loading jquery mobile. So we decided to add this code at the very beginning to the file jquery-migrate-1.2.1.js which is loaded excactely between:

 

/* 31.10.2015 Scully Fix iOS 9 navigation problems - disable Ajax calls */
var device = navigator.userAgent;
// alert('Your device is: ' + device);
if (isAffectedDevice()) {
$( document ).on( "mobileinit", function() {
        $.extend( $.mobile , {
        ajaxEnabled: false,
        pushStateEnabled: false
        });
});
}
function isAffectedDevice() {
    if((navigator.userAgent.match(/iPhone/i)) && (navigator.userAgent.match(/OS 9/i))) {
        // alert('iPhone OS 9');
        return true;
} }

 

Explanation: isAffectedDevice checks on iPhones with iOS 9 Version. On mobileinit we disable ajax calls if this is the case. It works so far but needs further testing.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...