1

I read all the installer script not working threads and still can't figure it out.

I want to run a simple installer script for my module eg: community/Aquiver/Productslider1/

The install php file is:

sql/productslider1_setup/install-0.1.0.php

echo 'Running Script: '.get_class($this)."\n"; die("Exit for now");

and the config is:

<?xml version="1.0"?>
<config>
    <modules>
        <Aquiver_Productslider1>
            <version>0.1.0</version>
        </Aquiver_Productslider1>
    </modules>
    <frontend>
        <routers>
            <productslider1>
                <use>standard</use>
                <args>
                    <module>Aquiver_Productslider1</module>
                    <frontName>productslider1</frontName>
                </args>
            </productslider1>
        </routers>
    </frontend>
    <global>
        <blocks>
            <productslider1>
                <class>Aquiver_Productslider1_Block</class>
            </productslider1>
        </blocks>
         <helpers>
            <productslider1>
                <class>Aquiver_Productslider1_Helper</class>
            </productslider1>
        </helpers>
        <models>
            <productslider1>
                <class>Aquiver_Productslider1_Model</class>
                <resourceModel>productslider1_resource</resourceModel>
            </productslider1>
            <productslider1_resource>
                <class>Aquiver_Productslider1_Model_Resource</class>
                <entities>
                    <theproduct>
                        <table>theproduct</table>
                    </theproduct>
                </entities>
            </productslider1_resource>
        </models>
        <resources>
            <productslider1_setup>
                <setup>
                    <module>Aquiver_Productslider1</module>
                    <class>Aquiver_Productslider1_Model_Resource_Setup</class>
                </setup>
            </productslider1_setup>
        </resources>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <aquiver_productslider1 before="Mage_Adminhtml">Aquiver_Productslider1_Adminhtml</aquiver_productslider1>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

The install page never works.

1 Answer 1

1

For an installer try to follow this tutorial: http://inchoo.net/magento/magento-install-install-upgrade-data-and-data-upgrade-scripts/

Make sure you clear all caches (even if they're turned off) and try your config.xml without

<resources>
    <productslider1_setup>
        <setup>
            <module>Aquiver_Productslider1</module>
            <class>Aquiver_Productslider1_Model_Resource_Setup</class>
        </setup>
    </productslider1_setup>
</resources>

That should still work for a basic installer script

1
  • 1
    Many thanks.. The actual problem is that I forgot to delete the core_resource field with my version in order to run the script again! Commented Oct 27, 2015 at 15:02

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.