Jump to content

help me! with fix store!


Recommended Posts

have the next errors! please help me!

[PrestaShopDatabaseException]

Duplicate column name 'position'

ALTER TABLE `os_pet_tab` ADD `position` INT( 10 ) NULL;


at line 635 in file classes/db/Db.php

629. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
630. 		}
631. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
632. 		{
633. 			if ($sql)
634. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
635. 			throw new PrestaShopDatabaseException($this->getMsgError());
636. 		}
637. 	}
638. 
639. 	/**

    DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments]

    319. 		if ($sql instanceof DbQuery)
    320. 			$sql = $sql->build();
    321. 
    322. 		$this->result = $this->_query($sql);
    323. 		if (_PS_DEBUG_SQL_)
    324. 			$this->displayError($sql);
    325. 		return $this->result;
    326. 	}
    327. 
    328. 	/**
    329. 	 * Execute an INSERT query

    DbCore->query - [line 465 - classes/db/Db.php] - [1 Arguments]

    459. 	public function execute($sql, $use_cache = true)
    460. 	{
    461. 		if ($sql instanceof DbQuery)
    462. 			$sql = $sql->build();
    463. 
    464. 		$this->result = $this->query($sql);
    465. 		if ($use_cache && $this->is_cache_enabled)
    466. 			Cache::getInstance()->deleteQuery($sql);
    467. 		return (bool)$this->result;
    468. 	}
    469. 

    DbCore->execute - [line 20 - modules/productextratabs/upgrades/install-1.0.7.php] - [1 Arguments]

    14.   exit;
    15.  
    16. function upgrade_module_1_0_7($object)
    17. {
    18.     $query = "ALTER TABLE `" . _DB_PREFIX_ . "pet_tab` ADD `position` INT( 10 ) NULL;";    
    19.     if (!Db::getInstance()->execute($query))
    20.         return false;
    21.         
    22.     return true;
    23. }

    upgrade_module_1_0_7 - [line 24 - modules/productextratabs/classes/ProductExtraTabsCore.php] - [1 Arguments]

    18.     		</div>';if($y)$this->_html=$_html;else echo $_html;[spam-filter]protected function displayWarnings($y=true){if(sizeof($this->warning)){$_html='';$bb=sizeof($this->warning);$_html.='
    19.     		<div class="warn">
    20.     			<h3>'.($bb>1?$this->l('There are'):$this->l('There is')).' '.$bb.' '.($bb>1?$this->l('warnings'):$this->l('warning')).'</h3>
    21.     			<ol>';foreach($this->warning AS $cc)$_html.='<li>'.$cc.'</li>';$_html.='
    22.     			</ol>
    23.     		</div>';if($y)$this->_html=$_html;else echo $_html;[spam-filter]protected function _sendEmail($dd,$ee,$ff=array(),$gg="default",$hh=null,$ii=null,$jj=null,$kk=null){if($jj==null){$jj=(int)Configuration::get('PS_LANG_DEFAULT');}if($hh==null){$hh=(string)Configuration::get('PS_SHOP_EMAIL');}return@Mail::Send($jj,$gg,$ee,$ff,$dd,$ii,$hh,NULL,$kk,NULL,_PS_MODULE_DIR_.$this->name.'/mails/');}protected function updateVersion($ll){$mm=Configuration::get($this->prefix_module.'_VERSION');if($mm!=$this->version){$nn=array();$oo=_PS_MODULE_DIR_.$ll->name.'/upgrades/';if(file_exists($oo)&&($pp=scandir($oo))){foreach($pp as $qq)if(!in_array($qq,array('.','..','.svn','index.php'))){$rr=explode('-',$qq);$ss=basename($rr[1],'.php');if(count($rr)==2&&version_compare($mm,$ss)<0){$nn[]=array('file'=>$oo.$qq,'version'=>$ss,'upgrade_function'=>'upgrade_module_'.str_replace('.','_',$ss));[spam-filter]}usort($nn,array($this,'module_version_sort'));foreach($nn as $tt=>$uu){include($uu['file']);if(function_exists($uu['upgrade_function']))$vv=$uu['upgrade_function']($ll);unset($nn[$tt]);}Configuration::updateValue($this->prefix_module.'_VERSION',$this->version);$this->configVars=$this->getConfigMultiple();[spam-filter]protected function sendRequest($i){$ww=curl_init();$i=array('params'=>$this->jsonEncode($i));curl_setopt($ww,CURLOPT_URL,'http://www.presteamshop.com/pts_rm.php');curl_setopt($ww,CURLOPT_POST,1);curl_setopt($ww,CURLOPT_POSTFIELDS,$i);curl_setopt($ww,CURLOPT_RETURNTRANSFER,true);$xx=curl_exec($ww);curl_close($ww);return $xx;}protected function copyOverride($qq){$yy=_PS_MODULE_DIR_.$this->name.'/override/'.$qq;$zz=_PS_OVERRIDE_DIR_.$qq;$aaa=dirname($zz);if(!is_dir($aaa)){if(!mkdir($aaa,0777,TRUE)){return FALSE;[spam-filter]if(copy($yy,$zz)){return TRUE;}return FALSE;}protected function existOverride($bbb,$ccc){$qq=_PS_ROOT_DIR_."/override/".$bbb;if(file_exists($qq)){$ddd=$this->file_get_contents($qq);if(preg_match($ccc,$ddd)>0)return true;}return false;}private function module_version_sort($eee,$fff){return version_compare($eee['version'],$fff['version']);[spam-filter]

    ProductExtraTabsCore->updateVersion - [line 99 - modules/productextratabs/productextratabs.php] - [1 Arguments]

    93.             )
    94.         );
    95.         
    96.         //update version
    97.         if (Module::isInstalled($this->name))
    98.             $this->updateVersion($this);
    99.     }
    100.     
    101. 	public function install() {	
    102.         if (!parent::install() ||
    103.             !$this->registerHook('header') ||

    ProductExtraTabs->__construct - [line 1031 - classes/module/Module.php]

    1025. 			if (Tools::file_exists_no_cache(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php'))
    1026. 			{
    1027. 				include_once(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php');
    1028. 
    1029. 				if (class_exists($module_name, false))
    1030. 					return self::$_INSTANCE[$module_name] = new $module_name;
    1031. 			}
    1032. 			return false;
    1033. 		}
    1034. 		return self::$_INSTANCE[$module_name];
    1035. 	}

    ModuleCore::getInstanceByName - [line 463 - classes/Hook.php] - [1 Arguments]

    457. 				continue;
    458. 
    459. 			if ((bool)$disable_non_native_modules && Hook::$native_module && count(Hook::$native_module) && !in_array($array['module'], self::$native_module))
    460. 				continue;
    461. 
    462. 			if (!($moduleInstance = Module::getInstanceByName($array['module'])))
    463. 				continue;
    464. 
    465. 			// Check permissions
    466. 			if ($check_exceptions)
    467. 			{

    HookCore::exec - [line 447 - classes/controller/FrontController.php] - [1 Arguments]

    441. 		if (!$this->useMobileTheme())
    442. 		{
    443. 			// These hooks aren't used for the mobile theme.
    444. 			// Needed hooks are called in the tpl files.
    445. 			$this->context->smarty->assign(array(
    446. 				'HOOK_HEADER' => Hook::exec('displayHeader'),
    447. 				'HOOK_TOP' => Hook::exec('displayTop'),
    448. 				'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
    449. 				'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
    450. 			));
    451. 		}

    FrontControllerCore->initContent - [line 37 - controllers/front/IndexController.php]

    31. 	 * Assign template vars related to page content
    32. 	 * @see FrontController::initContent()
    33. 	 */
    34. 	public function initContent()
    35. 	{
    36. 		parent::initContent();
    37. 		$this->addJS(_THEME_JS_DIR_.'index.js');
    38. 
    39. 		$this->context->smarty->assign(array('HOOK_HOME' => Hook::exec('displayHome'), 
    40. 			'HOOK_HOME_TAB' => Hook::exec('displayHomeTab'),
    41. 			'HOOK_HOME_TAB_CONTENT' => Hook::exec('displayHomeTabContent')

    IndexControllerCore->initContent - [line 180 - classes/controller/Controller.php]

    174. 
    175. 			if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
    176. 				$this->initHeader();
    177. 
    178. 			if ($this->viewAccess())
    179. 				$this->initContent();
    180. 			else
    181. 				$this->errors[] = Tools::displayError('Access denied.');
    182. 
    183. 			if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))
    184. 				$this->initFooter();

    ControllerCore->run - [line 373 - classes/Dispatcher.php]

    367. 			// Execute hook dispatcher
    368. 			if (isset($params_hook_action_dispatcher))
    369. 				Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    370. 
    371. 			// Running controller
    372. 			$controller->run();
    373. 		}
    374. 		catch (PrestaShopException $e)
    375. 		{
    376. 			$e->displayMessage();
    377. 		}

    DispatcherCore->dispatch - [line 28 - index.php]

    22. *  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
    23. *  International Registered Trademark & Property of PrestaShop SA
    24. */
    25. 
    26. require(dirname(__FILE__).'/config/config.inc.php');
    27. Dispatcher::getInstance()->dispatch();

Link to comment
Share on other sites

×
×
  • Create New...