I’m trying to write some code that bridges Magento with Drupal and I want a simple way of adding Magento’s frontend JavaScript to pages served by Drupal.
To this end: how do I return an array of URLs to JavaScript files used by Magento on the frontend? Specifically, I’m looking for the default layout handle and the individual product page.
Thanks!
This will get you pretty close:
The xpath argument could be refined to
//action[@method="addJs"]/scriptfor core code.Of course, there are other arguments which add JS files (e.g.
addItem) which will require additional handling.