Author Topic: Product reloading seems to doesn't work on IE9  (Read 5304 times)

Miku

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Product reloading seems to doesn't work on IE9
« on: March 06, 2015, 08:40:03 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Ajax call seems to doesn't work on IE9
« Reply #1 on: March 06, 2015, 09:28:53 am »
a link to your page where this is happening perhaps?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Miku

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Ajax call seems to doesn't work on IE9
« Reply #2 on: March 06, 2015, 09:42:34 am »
Here you go
Link to the page

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Ajax call seems to doesn't work on IE9
« Reply #3 on: March 06, 2015, 10:19:33 am »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Ajax call seems to doesn't work on IE9
« Reply #4 on: March 06, 2015, 10:25:07 am »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Miku

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Ajax call seems to doesn't work on IE9
« Reply #5 on: March 06, 2015, 10:31:27 am »
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

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Product reloading seems to doesn't work on IE9
« Reply #6 on: March 06, 2015, 19:33:11 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Product reloading seems to doesn't work on IE9
« Reply #7 on: March 07, 2015, 01:18:15 am »
http://stackoverflow.com/questions/19634513/using-history-js-with-ie9

plus a lot of linked answers using history in <IE10

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Miku

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Product reloading seems to doesn't work on IE9
« Reply #8 on: March 18, 2015, 11:40:02 am »
So do you mean it's only my personal issue, not general with VM (issue lies in Vm core file) on IE?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Product reloading seems to doesn't work on IE9
« Reply #9 on: March 18, 2015, 14:55:29 pm »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Product reloading seems to doesn't work on IE9
« Reply #10 on: March 18, 2015, 15:27:02 pm »
Now the solution in same file as before(components/com_virtuemart/assets/js/dynupdate.js):
Code: [Select]
history.pushState(stateObj, "", url);to
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Product reloading seems to doesn't work on IE9
« Reply #11 on: March 18, 2015, 19:08:52 pm »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Product reloading seems to doesn't work on IE9
« Reply #12 on: March 18, 2015, 22:52:03 pm »
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 :
Code: [Select]
else Virtuemart.updateContent(url);now the replacement code is:
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Product reloading seems to doesn't work on IE9
« Reply #13 on: March 19, 2015, 14:28:33 pm »
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

  • Jr. Member
  • **
  • Posts: 79
  • A beginner
  • VirtueMart Version: 3.0.18, J!3.6.4
Re: Product reloading seems to doesn't work on IE9
« Reply #14 on: March 24, 2015, 12:25:48 pm »
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.