0

I am working on a custom Magento extension. I have created already a page in the admin panel where you can save some settings for the extension.

The url of the page where you can edit the module settings is looking like this:

http://mymagento.com/index.php/admin/system_config/edit/section/vivasparser/

Here is my config.xml file:

<config>
 <modules>
 <VivasIndustries_Smartparser>
 <version>0.1.0</version>
 </VivasIndustries_Smartparser>
 </modules>
 <global>
 <models>
 <smartparser>
 <class>VivasIndustries_Smartparser_Model</class>
 </smartparser>
 </models>
 <helpers>
 <smartparser>
 <class>VivasIndustries_Smartparser_Helper</class>
 </smartparser>
 </helpers>
 </global>
 <adminhtml>
 <acl>
 <resources>
 <all>
 <title>Allow Everything</title>
 </all>
 <admin>
 <children>
 <system>
 <children>
 <config>
 <children>
 <vivasparser>
 <title>vivasparser - All</title>
 </vivasparser>
 </children>
 </config>
 </children>
 </system>
 </children>
 </admin>
 </resources>
 </acl>
 <layout>
 <updates>
 <smartparser>
 <file>smartparser.xml</file>
 </smartparser>
 </updates>
 </layout>
 </adminhtml> 
</config>

Here is my smartparser.xml file:

<layout>
 <adminhtml_catalog_product_edit
 <reference name="head">
 <action method="removeItem"><type>js</type><name>prototype/prototype.js</name></action>
 <action method="addJs"><script>my_extension/jquery.js</script></action>
 <action method="addJs"><script>my_extension/colorpicker.js</script></action>
 <action method="addJs"><script>prototype/prototype.js</script></action>
 </reference>
 </adminhtml_catalog_product_edit>
</layout>

Why the javascripts are not loaded ? I am trying to find colorpicker.js in the output HTML source of the page but there is no such thing loaded anywhere.

Can you help me out load these javascripts into my admin panel config page ?

Thanks in advance!

asked Sep 3, 2015 at 13:47

1 Answer 1

1

in smartparser.xml the layout handle should be adminhtml_system_config_edit instead of adminhtml_catalog_product_edit.
Also you forgot a > on the line <adminhtml_catalog_product_edit.

answered Sep 3, 2015 at 13:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.