News:

Looking for documentation? Take a look on our wiki

Main Menu

Product reloading seems to doesn't work on IE9

Started by Miku, March 06, 2015, 08:40:03 AM

Previous topic - Next topic

Studio 42

Hi miku,
You have many solution for this problem.
one is (remove ajax and go to page)  after :
QuoteVirtuemart.updateContent = function(url) {
add
Quoteif (document.all && !window.atob) window.location.href = url;
to detect IE9 and lower
See here for more possibility :
http://stackoverflow.com/questions/10964966/detect-ie-version-prior-to-v9-in-javascript

Miku

Thanks for a hint but it looks like I'm not able to make use of it - it doesn't work for me. Should the code look like below after the modification? It's not that I'm too lazy to make some effort to do something by myself, it's simply because I'm not a programmer at all  :-[
Virtuemart.updateContent = function(url) {
if (document.all && !window.atob) window.location.href = url;
        if(Virtuemart.isUpdatingContent) return false;
        Virtuemart.isUpdatingContent = true;
        url += url.indexOf('&') == -1 ? '?tmpl=component' : '&tmpl=component';
        console.log("UpdateContent URI "+url);
        $.ajax({
            url: url,
            dataType: 'html',
            success: function(data) {
                var el = $(data).find(Virtuemart.containerSelector);
if (! el.length) el = $(data).filter(Virtuemart.containerSelector);
if (el.length) {
Virtuemart.container.html(el.html());
                    Virtuemart.updateCartListener();
                    Virtuemart.updateDynamicUpdateListeners();
                    //Virtuemart.updateCartListener();

if (Virtuemart.updateImageEventListeners) Virtuemart.updateImageEventListeners();
if (Virtuemart.updateChosenDropdownLayout) Virtuemart.updateChosenDropdownLayout();
}
Virtuemart.isUpdatingContent = false;
            }
        });
        Virtuemart.isUpdatingContent = false;
    }

By the way indeed the best solution for me would be complete getting rid of the 'ajax reloading for product details', but how to do this?

Milbo

Miku, I think Patrick meant it that way. Our problem is that there are not a lot people with an IE9. My personal statistic is that there are 2% developers with a real IE9, the rest tries with emulations, which have their own problems.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

I have look for statistic. IE8+9. Usage is +/- 7%, depending the stat counters you look.
Milbo, I think, it would be nice that your developpers do something.

Miku

Quote from: Studio 42 on March 26, 2015, 02:25:06 AM
Milbo, I think, it would be nice that your developpers do something.
I agree, if not just for IE then maybe some option to completely disable the ajax reloading...

Milbo

Quote from: Studio 42 on March 26, 2015, 02:25:06 AM
I have look for statistic. IE8+9. Usage is +/- 7%, depending the stat counters you look.
Milbo, I think, it would be nice that your developpers do something.
I did already something and tested your ideas, but without luck. So my solution is a try/catch now.


        try {
            history.pushState(stateObj, "", url);
        }
        catch(err) {
            // Fallback for IE
            window.location.href = url;
            return false;
        }


and a config to disable the dynupdate (hmm should be called reload, actually) is already there. jdynupdate, and here the tutorial how to set http://forum.virtuemart.net/index.php?topic=128956.0

But others asked also for an option, not any developer for customplugins or joomla content plugins knows how to add the right js.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: Studio 42 on March 26, 2015, 02:25:06 AM
I have look for statistic. IE8+9. Usage is +/- 7%, depending the stat counters you look.
Milbo, I think, it would be nice that your developpers do something.

You did not read correctly, I did not say that there are only 2% using it. What I said is, that I asked 50 people and only ONE has a real IE9. So the statistic within this forum is 2% and the reason that it is so hard to check for it, because there is no developer using such an old browser.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42


Milbo

Paatrick, wake up. I am NOT talking about the percentages in the wild.

I talk about developers! in special VirtueMart developers!
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Miku

Quote from: Milbo on March 26, 2015, 08:50:44 AM
I did already something and tested your ideas, but without luck. So my solution is a try/catch now.

        try {
            history.pushState(stateObj, "", url);
        }
        catch(err) {
            // Fallback for IE
            window.location.href = url;
            return false;
        }

Indeed, it seems to work ;)
Quote from: Milbo on March 26, 2015, 08:50:44 AM
and a config to disable the dynupdate (hmm should be called reload, actually) is already there. jdynupdate, and here the tutorial how to set http://forum.virtuemart.net/index.php?topic=128956.0
Yes, jdynupdate helps but it causes another problem - facybox doesn't work :(

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Miku

#26
Quote from: Milbo on March 26, 2015, 15:25:27 PM
what about the facebox?
When we use jdynupdate in config there's an issue with 'Recommend to a friend', 'Print' and 'Ask a question' forms
They are loaded in the new page instead of the pop-up window, respectively:
/recommend?tmpl=component
?tmpl=component&print=1
/askquestion?tmpl=component

Miku

#27
Quote from: Milbo on March 26, 2015, 15:25:27 PM
what about the facebox?
And of course, above all, there is an issue with images which load itself  in a new page instead of pop-up...So we have something like /images/stories/virtuemart/product/image.jpg in the url.

Miku

#28
Now when the reload works thanks to your 'try/catch' solution I see another issue - issue with sub-menu items (rolling out items). The menu levels are distorted after we choose some of the variant of a product. By distorted I mean the sub-menu is in the same line as the main one (it's not rolling out outside)  When I took a look at the case thoroughly it looks like issue appears only for central variants of a product - when we choose the first one or the last one of the variants everything works fine... Very strange but it works that way...

AH

MOVE ON please !

Yes there are stats out there on users with IE8

Stick a banner up like the very well visited BBC.co.uk does if a visitor uses an outdated browser -

If they are still using XP or IE8 then it is time they progressed into the 21st century, they can always stick firefox on their machine and have an updated browser.

Why on Earth should the team waste time looking back at a browser that should be dead?



Regards
A

Joomla 4.4.5
php 8.1