Możliwe, że tak. Czy wszystko jest ok ? Może za dużo powiedziane. Po prostu wtedu uruchamia się strona i coś widzimy. Niektóre elementy na siebie nachodzą, brakuje slidera coś by się jeszcze znalazło ale nie mam teraz dostępu do komputera. Chce spróbować jeszcze na innym serwerze bo kurde bez przesady, że goły system z jednym szablonem od razu sypie błędami na lewo i prawo.
Fatal error: Call to undefined method Media::addJsDef() in /home/emgraf1/public_html/modules/tdajaxserach/tdajaxserach.php on line 47
Cały plik:
<?php
if (!defined('_PS_VERSION_'))
exit;
class TDajaxSerach extends Module
{
public function __construct()
{
$this->name = 'tdajaxserach';
$this->tab = 'search_filter';
$this->version = 1.3;
$this->author = 'ThemesDeveloper';
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->l('ThemesDeveloper Quick Ajax Product Search');
$this->description = $this->l('Adds a quick search field to your website.');
$this->ps_versions_compliancy = array('min' => '1.5', 'max' => _PS_VERSION_);
}
public function install()
{
if (!parent::install() || !$this->registerHook('top') || !$this->registerHook('header'))
return false;
return true;
}
public function hookHeader($params)
{
if (Configuration::get('PS_SEARCH_AJAX'))
$this->context->controller->addJqueryPlugin('autocomplete');
}
public function hookTop($params)
{
$key = $this->getCacheId('blocksearch-top');
if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $key))
{
$this->calculHookCommon($params);
$this->smarty->assign(array(
'blocksearch_type' => 'top',
'search_query' => (string)Tools::getValue('search_query')
)
);
}
Media::addJsDef(array('blocksearch_type' => 'top'));
return $this->display(__FILE__, 'tdajaxsearch_top.tpl', Tools::getValue('search_query') ? null : $key);
}
private function calculHookCommon($params)
{
$this->smarty->assign(array(
'ENT_QUOTES' => ENT_QUOTES,
'search_ssl' => Tools::usingSecureMode(),
'ajaxsearch' => Configuration::get('PS_SEARCH_AJAX'),
'instantsearch' => Configuration::get('PS_INSTANT_SEARCH'),
'self' => dirname(__FILE__),
'pbaseurl' => _PS_BASE_URL_ . _THEME_PROD_DIR_,
'tdajaxsearchmod' => __PS_BASE_URI__ . 'modules/tdajaxserach/tdajaxserachAjax.php'
));
return true;
}
}