1

I am trying to create a Custom slider extension which has option of change settings and uploading images from admin panel I followed many tutorial available online but nothing has worked So can Anyone help in this problem to create admin option for my slider. Here is the file which I have coded now

Code for my app\etc\modules\Sequester_Custommodule.xml file
<?xml version="1.0"?>
<config>
    <modules>
        <Sequester_Custommodule>
        <active>true</active>
        <codePool>local</codePool>
        </Sequester_Custommodule>
    </modules>
</config>

And code in my app\code\local\Sequester\Custommodule\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Sequester_Custommodule>
            <version>0.1.0</version>    <!-- Version of module -->
        </Sequester_Custommodule>
    </modules>
    <frontend>
        <routers>
            <custommodule>
                <use>standard</use>
                <args>
                    <module>Sequester_Custommodule</module>
                    <frontName>custommodule</frontName>
                </args>
            </custommodule>
        </routers>
         <layout>
            <updates>
                <custommodule>
                    <file>custommodule.xml</file> <!-- Our layout file name-->
                </custommodule>
            </updates>
         </layout>
    </frontend>
    <global>
        <blocks>
            <custommodule>
                <class>Sequester_Custommodule_Block</class>
            </custommodule>
        </blocks>
    </global>
</config>

And code for app\code\local\Sequester\Custommodule\controllers\IndexController.php

<?php
class Sequester_Custommodule_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

}

And code in app\code\local\Sequester\Custommodule\Block\Custommodule.php

<?php
class Sequester_Custommodule_Block_Custommodule extends Mage_Core_Block_Template
{
    public function myfunction()
    {

        echo "hello World";

    }
}

And code for my app\design\frontend\rwd\default\layout\custommodule.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="head">
            <action method="addCss"><stylesheet>css/jquery.bxslider.css</stylesheet></action>
            <action method="addJs"><script>customslider/jquery.bxslider.js</script></action>
            <action method="addJs"><script>customslider/slider_custom_script.js</script></action>
        </reference>
    </default>
    <cms_index_index>
        <reference name="content">
            <block type="custommodule/custommodule" name="custommodule" template="custommodule/custommodule.phtml" />
        </reference>
    </cms_index_index>
</layout>

And in my Template file I called the slider images statically from skin folder but I want to give an option of uploading images from admin panel and this images will store in database table and then I want to fetch this images to used for slider .

I am first time trying to build a extension So please anyone can help me in any help will be appreciated

1 Answer 1

0
Firstly I will recommend you to use this blog.
It will make your base strong.
http://www.pierrefay.com/
 Secondly for reference purpose try this code in etc/system.xm
    <?xml version="1.0" ?>
    <config>
        <tabs>
            <namespace_Modulename translate="label">
                <label>namespace uniquename Request</label>
                <sort_order>100</sort_order>
            </namespace_Modulename>
        </tabs>
        <sections>
            <Modulename_options translate="label">
                <label>Settings</label>
                <sort_order>200</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <tab>namespace_Modulename</tab>
                 <groups>
                    <messages translate="label">
                        <label>Config Fields</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>                
                    </messages>
                    <messages translate="label">
                        <label>uniquename Request Options</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <fields>
                            <uniquename_owner>
                                <label>Sender Email</label>
                                <frontend_type>text</frontend_type>
                                <sort_order>1</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>1</show_in_store>
                            </uniquename_owner>
                            <Request_tag_line>
                                <label>Request tag line</label>
                                <frontend_type>text</frontend_type>
                                <sort_order>1</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>1</show_in_store>
                            </Request_tag_line>
                            <uniquename_option>
                                <label>Enable/Disable</label>
                                <frontend_type>select</frontend_type>
                                <source_model>adminhtml/system_config_source_enabledisable</source_model>
                                <sort_order>1</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>1</show_in_store>
                            </uniquename_option>
                        </fields>
                    </messages>
                 </groups>
            </Modulename_options>
        </sections> 
    </config>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.