Open empiricompany opened 5 months ago
Configurable product PDP is broken.
If I reload the page with scroll, I have no errors, and the swatches do not have attached events.
If I reload the page with a scroll > 0, I get this error in the console:
Uncaught ReferenceError: spConfig is not defined <anonymous> https://openmage-latest.loc/default/test-configurable.html line 916 > eval:3 createResponderForCustomEvent https://openmage-latest.loc/js/prototype/prototype.js:7289 fireEvent_DOM https://openmage-latest.loc/js/prototype/prototype.js:7148 fire https://openmage-latest.loc/js/prototype/prototype.js:7137 _methodized https://openmage-latest.loc/js/prototype/prototype.js:456 fireContentLoadedEvent https://openmage-latest.loc/js/prototype/prototype.js:7324 createResponder https://openmage-latest.loc/js/prototype/prototype.js:7273 onload https://openmage-latest.loc/default/test-configurable.html:918 FbLoadScripts https://openmage-latest.loc/default/test-configurable.html:913 FbLoadScripts https://openmage-latest.loc/default/test-configurable.html:905 EventListener.handleEvent* https://openmage-latest.loc/default/test-configurable.html:928 <anonymous> https://openmage-latest.loc/default/test-configurable.html:928 [test-configurable.html line 916 > eval:3:67](https://openmage-latest.loc/default/test-configurable.html%20line%20916%20%3E%20eval)
Probably, scripts are not executed in the correct order or some events, like DOMContentLoaded, are not fired correctly.
I have encountered a similar problem in this proof of concept extension here:
https://github.com/empiricompany/openmage_pagespeed/blob/master/app/code/community/Pagespeed/Js/Model/Observer.php
Configurable product PDP is broken.
If I reload the page with scroll, I have no errors, and the swatches do not have attached events.
If I reload the page with a scroll > 0, I get this error in the console:
Probably, scripts are not executed in the correct order or some events, like DOMContentLoaded, are not fired correctly.
I have encountered a similar problem in this proof of concept extension here:
https://github.com/empiricompany/openmage_pagespeed/blob/master/app/code/community/Pagespeed/Js/Model/Observer.php