<?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <TM_ProLabels>
            <version>2.7.13</version>
        </TM_ProLabels>
    </modules>
    <global>
        <models>
            <prolabels>
                <class>TM_ProLabels_Model</class>
                <resourceModel>prolabels_mysql4</resourceModel>
            </prolabels>
            <prolabels_mysql4>
                <class>TM_ProLabels_Model_Mysql4</class>
                <entities>
                    <label>
                        <table>tm_prolabels_rules</table>
                    </label>
                    <store>
                        <table>tm_prolabels_rules_store</table>
                    </store>
                    <index>
                        <table>tm_prolabels_rules_index</table>
                    </index>
                    <system>
                        <table>tm_prolabels_rules_system</table>
                    </system>
                    <sysstore>
                        <table>tm_prolabels_system_store</table>
                    </sysstore>
                </entities>
            </prolabels_mysql4>
        </models>
        <blocks>
            <prolabels>
                <class>TM_ProLabels_Block</class>
            </prolabels>
        </blocks>
        <helpers>
            <prolabels>
                <class>TM_ProLabels_Helper</class>
            </prolabels>
        </helpers>
        <resources>
            <tm_prolabels_setup>
                <setup>
                    <module>TM_ProLabels</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </tm_prolabels_setup>
            <prolabels_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </prolabels_write>
            <prolabels_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </prolabels_read>
        </resources>
    </global>

    <frontend>
        <layout>
            <updates>
                <ProLabels>
                    <file>tm/prolabels.xml</file>
                </ProLabels>
            </updates>
        </layout>
        <routers>
            <prolabels>
                <use>standard</use>
                <args>
                    <module>TM_ProLabels</module>
                    <frontName>prolabels</frontName>
                </args>
            </prolabels>
        </routers>
        <translate>
            <modules>
                <TM_ProLabels>
                    <files>
                        <default>TM_ProLabels.csv</default>
                    </files>
                </TM_ProLabels>
            </modules>
        </translate>
        <events>
            <catalog_block_product_list_collection>
                <observers>
                    <tm_prolabels_load_catalog_labels>
                        <class>prolabels/observer</class>
                        <method>loadCatalogLabels</method>
                    </tm_prolabels_load_catalog_labels>
                </observers>
            </catalog_block_product_list_collection>
            <catalog_controller_product_view>
                <observers>
                    <tm_prolabels_load_product_labels>
                        <class>prolabels/observer</class>
                        <method>loadProductLabels</method>
                    </tm_prolabels_load_product_labels>
                </observers>
            </catalog_controller_product_view>
        </events>
    </frontend>

    <adminhtml>
        <translate>
            <modules>
                <TM_ProLabels>
                    <files>
                        <default>TM_ProLabels.csv</default>
                    </files>
                </TM_ProLabels>
            </modules>
        </translate>
    </adminhtml>

    <admin>
        <routers>
             <adminhtml>
                 <args>
                     <modules>
                         <prolabels before="Mage_Adminhtml">TM_ProLabels_Adminhtml</prolabels>
                     </modules>
                 </args>
             </adminhtml>
        </routers>
    </admin>

    <default>
        <prolabels>
            <general>
                <enabled>0</enabled>
                <mobile>1</mobile>
                <cron>1</cron>
            </general>
            <tooltip>
                <background>#000000</background>
                <color>#FFFFFF</color>
            </tooltip>
        </prolabels>
    </default>

    <crontab>
        <jobs>
            <tm_prolabels_reindex_all>
                <schedule>
                    <cron_expr>0 1 * * *</cron_expr>
                </schedule>
                <run>
                    <model>prolabels/observer::autoReindexLabels</model>
                </run>
            </tm_prolabels_reindex_all>
        </jobs>
    </crontab>
</config>
