// update preferences tab

This commit is contained in:
Sarah Lorenzini
2013-08-01 16:26:02 +02:00
parent 5defc39def
commit 680497f1e3
9 changed files with 129 additions and 156 deletions
+20 -26
View File
@@ -30,6 +30,7 @@ class AdminSearchConfControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
$this->table = 'alias';
$this->className = 'Alias';
$this->lang = false;
@@ -64,13 +65,13 @@ class AdminSearchConfControllerCore extends AdminController
'icon' => 'search',
'info' =>
$this->l('The "indexed" products have been analyzed by PrestaShop and will appear in the results of a Front Office search.').'<br />
'.$this->l('Indexed products').' <b>'.(int)$indexed.' / '.(int)$total.'</b>.
'.$this->l('Indexed products').' <strong>'.(int)$indexed.' / '.(int)$total.'</strong>.
</p>
<p>'.$this->l('Building the product index may take a few minutes.')
.$this->l('If your server stops before the process ends, you can resume the indexation by clicking "Add missing products."').'</p>
-&gt; <a href="searchcron.php?token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1" class="bold">'.
$this->l('Add missing products to the index.').'</a><br />
-&gt; <a href="searchcron.php?full=1&token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1" class="bold">'.
-&gt; <a href="searchcron.php?full=1&token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1">'.
$this->l('Re-build the entire index.').'</a><br /><br />
'.$this->l('You can set a cron job that will rebuild your index using the following URL:').' <a href="'.$cron_url.'">'.$cron_url.'</a>',
'fields' => array(
@@ -92,28 +93,32 @@ class AdminSearchConfControllerCore extends AdminController
'validation' => 'isBool',
'type' => 'bool',
'cast' => 'intval',
'desc' => $this->l('Enable ajax search for your visitors.').'<br />'.
$this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')),
'hint' => array(
$this->l('Enable ajax search for your visitors.'),
$this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')
)
),
'PS_INSTANT_SEARCH' => array(
'title' => $this->l('Instant search'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
'desc' => $this->l('Enable instant search for your visitors?').'<br />'.
$this->l('With instant search, the results will appear immediately as the user writes a query.')),
'hint' => array(
$this->l('Enable instant search for your visitors?'),
$this->l('With instant search, the results will appear immediately as the user writes a query.')
)
),
'PS_SEARCH_MINWORDLEN' => array(
'title' => $this->l('Minimum word length (in characters)'),
'desc' => $this->l('Only words this size or larger will be indexed.'),
'size' => 4,
'hint' => $this->l('Only words this size or larger will be indexed.'),
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_BLACKLIST' => array(
'title' => $this->l('Blacklisted words'),
'size' => 35,
'validation' => 'isGenericName',
'desc' => $this->l('Please enter the index words separated by a "|".'),
'hint' => $this->l('Please enter the index words separated by a "|".'),
'type' => 'textLang'
)
),
@@ -129,63 +134,54 @@ class AdminSearchConfControllerCore extends AdminController
'fields' => array(
'PS_SEARCH_WEIGHT_PNAME' => array(
'title' => $this->l('Product name weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_REF' => array(
'title' => $this->l('Reference weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_SHORTDESC' => array(
'title' => $this->l('Short description weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_DESC' => array(
'title' => $this->l('Description weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_CNAME' => array(
'title' => $this->l('Category weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_MNAME' => array(
'title' => $this->l('Manufacturer weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_TAG' => array(
'title' => $this->l('Tags weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_ATTRIBUTE' => array(
'title' => $this->l('Attributes weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_FEATURE' => array(
'title' => $this->l('Features weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
@@ -230,32 +226,30 @@ class AdminSearchConfControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Aliases'),
'image' => '../img/admin/search.gif'
'icon' => 'icon-search'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Alias:'),
'name' => 'alias',
'size' => 40,
'required' => true,
'desc' => array(
'hint' => array(
$this->l('Enter each alias separated by a comma (e.g. \'prestshop,preztashop,prestasohp\')'),
$this->l('Forbidden characters: <>;=#{}')
$this->l('Forbidden characters: &lt;&gt;;=#{}')
)
),
array(
'type' => 'text',
'label' => $this->l('Result:'),
'name' => 'search',
'size' => 15,
'required' => true,
'desc' => $this->l('Search this word instead.')
'hint' => $this->l('Search this word instead.')
)
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'button'
'class' => 'btn btn-default'
)
);