spc Posted February 21, 2013 Share Posted February 21, 2013 hello... I have just modified a modules, It works on my server, but when i uppload ti to the real server i get: This module is already installed When i try to install it.. all i have is the ( X ) and delete. I have search the internet and find that some of the error is small and large number. This is the php file..If there is any error please help me.. <?php if (!defined('_PS_VERSION_')) exit; class pricedrop extends Module { private $_html = ''; function __construct() { $this->name = 'pricedrop'; $this->tab = 'front_office_features'; $this->version = '0.1'; $this->author = 'xxxxx'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Pricedrop Products on the homepage'); $this->description = $this->l('Displays Pricedrop Products in the middle of your homepage.'); } public function install() { return (parent::install() AND $this->registerHook('rightColumn')); } public function getContent() { $output = '<h2>'.$this->displayName.'</h2>'; if (Tools::isSubmit('submitSpecials')) { Configuration::updateValue('PS_BLOCK_SPECIALS_DISPLAY', (int)(Tools::getValue('always_display'))); $output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>'; } return $output.$this->displayForm(); } public function displayForm() { return ' <form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post"> <fieldset> <legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend> <label>'.$this->l('Always display block').'</label> <div class="margin-form"> <input type="radio" name="always_display" id="display_on" value="1" '.(Tools::getValue('always_display', Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) ? 'checked="checked" ' : '').'/> <label class="t" for="display_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label> <input type="radio" name="always_display" id="display_off" value="0" '.(!Tools::getValue('always_display', Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) ? 'checked="checked" ' : '').'/> <label class="t" for="display_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label> <p class="clear">'.$this->l('Show the block even if no product is available.').'</p> </div> <center><input type="submit" name="submitSpecials" value="'.$this->l('Save').'" class="button" /></center> </fieldset> </form>'; } public function hookHome($params) { if (Configuration::get('PS_CATALOG_MODE')) return ; global $smarty; if (!$specials = Product::getRandomSpecial((int)($params['cookie']->id_lang)) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) return; $smarty->assign(array( 'specials' => $specials, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'mediumSize' => Image::getSize('home') )); return $this->display(__FILE__, 'pricedrop.tpl'); } } Link to comment Share on other sites More sharing options...
El Patron Posted February 21, 2013 Share Posted February 21, 2013 try this, turn off file cache... Link to comment Share on other sites More sharing options...
spc Posted February 22, 2013 Author Share Posted February 22, 2013 (edited) hello Try this, but it doesent work.... I only get : This module is already installed: pricedrop but i cant acces config for the modules. I only see delete.... P.S I rewrite the modules and i got it to work..... Thanks anyway for the help..... Edited February 22, 2013 by spc (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now