0

I have a Magento site setup and I did have Javascript bundling turned on.

This worked very well. Apart from one page - the PyaPal review page. A critical page. After a few days of slow sales, I saw a javascript error on this page. Turned off bundling and all works.

Is there any way I can turn off the bundling for this page only?

Thanks in advance!

dhardy
  • 993
  • 2
  • 11
  • 22

1 Answers1

0

It seems like the paypal page may included some js files also. So it may be jQuery conflict. Better you should fix this like adding "no conflict function"..And you dont want do that and as per question you can just simply prevent to load that js files that paypal page only. By simple condition you can achieve this. Check your url by if condition like this,

<?php
// for example
$file = '<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>';

$url = Mage::helper('core/url')->getCurrentUrl();  
// OR
$url = $_SERVER['REQUEST_URI'];

if($url != "paypla_review.php") {  //your paypal page
echo $file;
}

?>

If you try to include js lib files then Remember that you should include this code any header page. i.e. You should include js lib file first always.

Elavarasan
  • 2,579
  • 2
  • 25
  • 42