0

I am having a big problem with Merge Javascript files from Magento under System -> Configuration -> Advanced -> Developer. I need to enable the function to improve the loading of the site, as well as the reduction of requests, among others. When the function is disabled, everything works correctly. However, when the Magento function is activated, the site ends up having loading errors and its functionality on all pages per Merge account.

An example error that happens is that I use the variable $j for the code var $j = jQuery.noConflict(); in order to avoid conflicts with the Magento Prototype and in the browser console it returns me several errors like: Uncaught TypeError: $j(...) is not a function.

I'm having errors mainly with the OneStepCheckout module, they are:

OnestepcheckoutAddress is not defined
OnestepcheckoutShipment is not defined
OnestepcheckoutReviewCart is not defined
OnestepcheckoutPayment is not defined
OnestepcheckoutForm is not defined

This is something of extreme importance to me that I have been trying to solve for days, researching a lot and everything I found did not help me at all. I would like to know if there is any way to create exections for certain scripts so that they do not enter the Magento Merge or if someone also has some idea of ​​what I should do to resolve this case. Thanks in advance!

0

To solve this question I followed the following link:

https://fishpig.co.uk/magento/optimisation/advanced-javascript-merging/

From the link to create exceptions, joining common scripts to a certain page in order to avoid problems in execution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.