mathdex Posted February 27, 2019 Share Posted February 27, 2019 (edited) Hi everyone, I'm working on an existing module and I'm really new to PrestaShop. We want to display buttons bellow the carrier's we add with the our module. The way we do it for now is by loading a javascript file containing code to display those buttons. This all happens in the hook DisplayHeader. 1.7: $controller->registerJavascript( 'module-our-script', 'http://cdnForOurJavascript.js', array('server' => 'remote') ); 1.6: $controller->addJS('http://cdnForOurJavascript.js', false); The problem is if I run this function again, it "overrides" the previous added js-file. Is there a way to add multiple javascript files to the controller ? Thanks in advance for your responses, if some things don't seem clear it's because my understanding of the software is still limited, feel free to correct me if I say something wrong ! Have a nice day. Edited February 28, 2019 by mathdex (see edit history) Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted February 27, 2019 Share Posted February 27, 2019 Hi.. yes you can add multiple js file hookDisplayHeader please read here https://devdocs.prestashop.com/1.7/themes/getting-started/asset-management/ Thanks 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now