Magento XML AddJs – Add Parameters before src

0
191

changes in /app/code/core/Mage/Page/Block/Html/Head.php . It’s wrong to make changes in core files so it would be better if you copy this file to /app/code/local/Mage/Page/Block/Html/Head.php and make all the changes in this new file.

Firstly, find line 210 (for Magento 1.9).

Then replace this:

$html .= $this->_prepareStaticAndSkinElements(” . “n”,
With this:

$html .= $this->_prepareStaticAndSkinElements(” . “n”,
Secondly, go to line 285 and replace this:

$html .= sprintf($format, $src, $params);
With this:

if (strpos($format, ‘text/javascript’)) {
$html .= sprintf($format, $params, $src);
} else {
$html .= sprintf($format, $src, $params);
}

refrence url

https://stackoverflow.com/questions/29820427/magento-xml-addjs-add-parameters-before-src/29822040?sfb=2#29822040

LEAVE A REPLY

Please enter your comment!
Please enter your name here