Way to include js library using magento admin

Is there any way to include js library on all magento product view and list pages using magento admin ?


There is a textarea where you can put JS/CSS which is rendered into every page:

Admin > Configuration > Design >  Head HTML, Header and Footer

one way you can add js library

1) add field dropdown with (yes/no) in magento configuration with your js file name;

2) then add js file into your xml file like this

<reference name="head" ifconfig="your/config/value/yes">
        <action method="addJs"><script>folder/file.js</script></action>
Tags: Magento 1.x / Xml

Similar questions

How to include third party library files to custom module without composer
I need to include Youtube API library files for my custom module. Without composer, it should be done. Any suggestions?
Magento2: How to include js library + assets into static cms page via template?
i have a static page which was created via cms -> page. I include a custom phtml template within the cms page Now i want to include a masonry gallery for example (https://vodkabears.github.io/galereya/) How can i include css, jss files from within the phtml file to the bottom of the theme where all the other assets like jquery, etc are? I tried sev...
What is the simplest way to use an external php library in a custom magento 2 module?
I am new on magento I am currently working on a custom module for magento2 and I want to use an external php library (PHPMailer) within a Block file. my project files structure: ModuleFolder ---etc . . ---Block ------- Main.php ---lib ------- PHPMailer . . I tried to include the PHPMailer class within my block main.php using: and for the class decl...
*Solved* Warning: include(/public_html/includes/src/addon.php) [function.include]: failed to open stream: No such file or directory
Here's my site: http://wholesale.navajomfg.com/ Yesterday I started receiving this error, it seems to happen whenever an addon module is called: If I delete the Clever_CMS.xml from the /modules folder (disabling it) the site works but the error reoccurs whenever I visit a page that calls another module. Furthermore, the Product pages are completely...
using library with namespaces in magento
Im using eBay SDK for PHP from David Sadler https://github.com/davidtsadler/ebay-sdk-examples. That library request to use Composer's autoloader. Code display information like: There are two main files in magento for auto loading “Varien_Autoload” class located at “lib\Varien\Autoload.php”. Mage.php file located at ‘app/Mage.php’ anyone know the wa...
Magento 2: Cannot load my library using composer
Sorry for the lengthy message. I just wanted to provide as much information as possible. I am writing a new module. I have a custom library that I need to load to use in my module. I have the library classes in vendor/easyask/easyask_search/lib/EasyAsk/Impl. The module is in app/code/EasyAsk/Search. When I try to invoke EasyAsk\Impl\RemoteFactory, ...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.