News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

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

Miku

Hi,
I have a big issue with Virtuemart 3 (specifically product details page) on IE9. In my case I'm not able to use the Generic child variant - variants are simply not loading and not able to move between the products using product navigation (top of the product page). It seems that it has something to do with reloading of the productdetails by an ajax call. I'm not a programmer and waiting for a feedback from someone in the know. I know IE9 is a very old one, but people still use it.
https://www.netmarketshare.com/browser-market-share.aspx?qprid=2&qpcustomd=0

Is there any way to fix that?

VM 3.0.6
J! 3.4.0

GJC Web Design

a link to your page where this is happening perhaps?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation


GJC Web Design

#3
open file http://www.testowa2.asik.ogicom.pl/components/com_virtuemart/assets/js/dynupdate.js

and around line 28 & 79 comment out

console.log("UpdateContent URI "+url);

console.log('updateDynamicUpdateListeners '+nodeName, el);

so

//console.log("UpdateContent URI "+url);

//console.log('updateDynamicUpdateListeners '+nodeName, el);

this is only console logging but I know early IE's hate this and fail on it

I assume you have a IE9 to test on?

actually in vm3.0.6.2 this has already been done... you should update as there are other bug fixes in this release as well
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

GJC Web Design

also in IETester on IE9 I get a JS error

see screenshot

this isn't from VM
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Miku

#5
Thank you for indicating this JS error. I'll report the matter to the developer.

-------------------
It turned out that it's an issue with 3rd party extension - search module. Sorry that I had been bothering you.

Miku

Hmm...the solution is not so simple as I thought :(. Indeed the ploblem lay in 3rd party extension but only for IE 8. When it comes to IE9 it still exists. Looking into developer tool of IE I have the following issue

SCRIPT438: Object doesn't support property or method 'pushState'

in /components/com_virtuemart/assets/js/dynupdate.js?vmver=8740, line 102 character 9

Please for any advice.

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Miku

So do you mean it's only my personal issue, not general with VM (issue lies in Vm core file) on IE?

Studio 42

#9
I don't understand why tha ajax feature don't use https://github.com/browserstate/history.js, but it's own way, to handel browser history.
or perhaps this is a better solution
https://github.com/devote/HTML5-History-API

Studio 42

#10
Now the solution in same file as before(components/com_virtuemart/assets/js/dynupdate.js):
history.pushState(stateObj, "", url);
to
if (typeof history.pushState != 'undefined') {
    history.pushState(stateObj, "", url);
}


This is not the best solution, because this does not add page to browser history in ie 9 and before, but must work in all case.

Miku

#11
Hi,
Your solution resolved the problem with "frozen" child variants on IE9 - that's a good thing, thank you :) The bad thing is that now I have another issue with js. I mean that now I'm not able to use fancybox (enlarge image), 'recommend to a friend' and 'ask a question ' forms for example... :(
The following error appears:
SCRIPT5007: Unable to get property 'hide': object is null or undefined in /components/com_virtuemart/assets/js/fancybox
jquery.fancybox-1.3.4.pack.js?vmver=8740, line 18 character 282


Ehh...if it's not one thing it's another...
Could anyone help?

Studio 42

#12
Yes , sorry, i don't know which was writing this script, but this is very buggy.

it would be so simple when using triggers in the script and not so spagetti code.
add :
else Virtuemart.updateContent(url);
now the replacement code is:
if (typeof history.pushState != 'undefined') {
    history.pushState(stateObj, "", url);
} else Virtuemart.updateContent(url);


Hum, sorry, i'm not sure this resolve your problem. because window.onpopstate cannot be used for ie9

As i said, you have javascript library doing this for you, but in virtuemart 3.0, this is done internally without real fallback for old browsers.

Miku

Thank you for trying to help. Indeed the new code didn't help. Still the same issue. ..  The worst thing is there's no any feedback in that matter from VM team.  Maybe I'm (we) wrong... Maybe the ajax reloading works well for them in elderly releases of IE. Or maybe not...Would be nice if anyone from VM team expressed his opinion about that.

Miku

I know that now VM team has been struggling with numerous bugs related to new J! release but I'd like to ask once again for any feedback in the matter of ajax feature. Does the 'ajax reloading' work well in elderly releases of IE (8/9)? Do the child variants work fine for you in those browsers? Does anyone have the following errors trying to choose one of Generic child variants or using fancybox?

SCRIPT438: Object doesn't support property or method 'pushState'
in /components/com_virtuemart/assets/js/dynupdate.js?vmver=8740, line 102 character 9

SCRIPT5007: Unable to get property 'hide': object is null or undefined in /components/com_virtuemart/assets/js/fancybox
jquery.fancybox-1.3.4.pack.js?vmver=8740, line 18 character 282

It looks like the common issue for Virtuemart but I need someone to confirm (or deny) it. So if someone has an opportunity to check that I give any feedback I'll appreciate.