Не отображаеться модуль
greenplanet
Новичок
: 6
: 15-01-2013


15-01-2013 19:47
Доброго времени суток.
Создал модуль но никак не могу ево установить не отображаеться в админке в модулях в чем проблема ?
tpl :
Код:
<div id="headerPhoneContact" class="block">
    <div class="leftBlockHeaderPhoneContact">
        {if $telnumber != ''}<p class="tel">{$telnumber|escape:'htmlall':'UTF-8'}</p>{/if}
        {if $telnumber2 != ''}<p class="tel">{$telnumber2|escape:'htmlall':'UTF-8'}</p>{/if}
    </div>
    <div class="rightBlockHeaderPhoneContact">
        <p>Минимальный заказ</p><br/>
        {if $minOrder != ''}<p class="minOrder">{l mod='headerPhoneContact'}</p>{/if}
    </div>
</div>

php :

Код:
<?php
if (!defined('_CAN_LOAD_FILES_'))
    exit;
class HeaderPhoneContact extends Module
{
        function __construct()
        {
                $this->name = 'HeaderPhoneContact';
                $this->tab = 'front_office_features';
                $this->version = 1.0;


                parent::__construct(); // The parent construct is required for translations


                $this->displayName = $this->l('HeaderPhoneContact');
                $this->description = $this->l('Top contacts');
        }


        function install()
        {
            return parent::install()
                && Configuration::updateValue('HeaderPhoneContact_telnumber', '')
                && Configuration::updateValue('HeaderPhoneContact_telnumber2', '')
                && Configuration::updateValue('HeaderPhoneContact_minOrder', '')
                && $this->registerHook('displayTop');
                
        }
        
        public function getContent()
        {
            $html = '';
            // If we try to update the settings
            if (Tools::isSubmit('submitModule'))
            {                
                Configuration::updateValue('HeaderPhoneContact_telnumber', Tools::getValue('telnumber'));
                Configuration::updateValue('HeaderPhoneContact_telnumber2', Tools::getValue('telnumber2'));
                Configuration::updateValue('HeaderPhoneContact_minOrder', Tools::getValue('minOrder'));
                $html .= '<div class="confirm">'.$this->l('Configuration updated').'</div>';
            }

            $html .= '
            <h2>'.$this->displayName.'</h2>
            <form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
                <fieldset>            
                    <label for="telnumber">'.$this->l('Phone number:').'</label>
                    <input type="text" id="telnumber" name="telnumber" value="'.((Configuration::get('HeaderPhoneContact_telnumber') != '') ? Tools::safeOutput(Configuration::get('HeaderPhoneContact_telnumber')) : '').'" />
                    <div class="clear">&nbsp;</div>
                    <label for="telnumber2">'.$this->l('Phone number 2:').'</label>
                    <input type="text" id="telnumber2" name="telnumber2" value="'.((Configuration::get('HeaderPhoneContact_telnumber2') != '') ? Tools::safeOutput(Configuration::get('HeaderPhoneContact_telnumber2')) : '').'" />
                    <div class="clear">&nbsp;</div>
                    <label for="minOrder">'.$this->l('Minimum Order:').'</label>
                    <input type="text" id="minOrder" name="minOrder" value="'.((Configuration::get('HeaderPhoneContact_minOrder') != '') ? Tools::safeOutput(Configuration::get('HeaderPhoneContact_minOrder')) : '').'" />
                    <div class="clear">&nbsp;</div>
                    <div class="margin-form">
                        <input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
                    </div>
                </fieldset>
            </form>';

            return $html;
        }
        
        public function hookDisplayHeader()
        {
            $this->context->controller->addCSS(($this->_path).'headerPhoneContact.css', 'all');
        }
        
       public function hookDisplayTop()
        {
                global $smarty;

                $smarty->assign(array(
                    'telnumber' => Configuration::get('HeaderPhoneContact_telnumber'),
                    'telnumber2' => Configuration::get('HeaderPhoneContact_telnumber2'),
                    'minOrder' => Configuration::get('HeaderPhoneContact_minOrder')
                ));
                return $this->display(__FILE__, 'headerPhoneContact.tpl');
        }


}
?>
 
  
Rafael
Новичок
: 5
: 14-01-2013


15-01-2013 20:57
ну по крайней мере в админке в списке модулей у меня отобразился, дальше не проверял
 
  
greenplanet
Новичок
: 6
: 15-01-2013


15-01-2013 22:34
у меня не видно (