// Blocklayered: Add option no-index to filter category
This commit is contained in:
@@ -39,7 +39,7 @@ class BlockLayered extends Module
|
||||
{
|
||||
$this->name = 'blocklayered';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.8.8';
|
||||
$this->version = '1.8.9';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
@@ -71,6 +71,7 @@ class BlockLayered extends Module
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_QTY', 0);
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CDT', 0);
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_MNF', 0);
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CAT', 0);
|
||||
|
||||
$this->rebuildLayeredStructure();
|
||||
|
||||
@@ -112,6 +113,7 @@ class BlockLayered extends Module
|
||||
Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_QTY');
|
||||
Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_CDT');
|
||||
Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_MNF');
|
||||
Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_CAT');
|
||||
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_price_index');
|
||||
Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_friendly_url');
|
||||
@@ -1287,6 +1289,8 @@ class BlockLayered extends Module
|
||||
$blacklist[] = 'quantity';
|
||||
if (!Configuration::get('PS_LAYERED_FILTER_INDEX_MNF'))
|
||||
$blacklist[] = 'manufacturer';
|
||||
if (!Configuration::get('PS_LAYERED_FILTER_INDEX_CAT'))
|
||||
$blacklist[] = 'category';
|
||||
|
||||
foreach ($filters as $type => $val)
|
||||
{
|
||||
@@ -1508,6 +1512,7 @@ class BlockLayered extends Module
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_QTY', (int)Tools::getValue('ps_layered_filter_index_availability'));
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CDT', (int)Tools::getValue('ps_layered_filter_index_condition'));
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_MNF', (int)Tools::getValue('ps_layered_filter_index_manufacturer'));
|
||||
Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CAT', (int)Tools::getValue('ps_layered_filter_index_category'));
|
||||
|
||||
$html .= '
|
||||
<div class="conf">'.
|
||||
@@ -2198,6 +2203,15 @@ class BlockLayered extends Module
|
||||
'.$this->l('No').' <input type="radio" name="ps_layered_filter_index_manufacturer" value="0" '.(!Configuration::get('PS_LAYERED_FILTER_INDEX_MNF') ? 'checked="checked"' : '').' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="text-align: center;">
|
||||
<td style="text-align: right;">'.$this->l('Allow indexing robots (google, yahoo, bing, ...) to use category filter').'</td>
|
||||
<td>
|
||||
<img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" />
|
||||
'.$this->l('Yes').' <input type="radio" name="ps_layered_filter_index_category" value="1" '.(Configuration::get('PS_LAYERED_FILTER_INDEX_CAT') ? 'checked="checked"' : '').' />
|
||||
<img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" style="margin-left: 10px;" />
|
||||
'.$this->l('No').' <input type="radio" name="ps_layered_filter_index_category" value="0" '.(!Configuration::get('PS_LAYERED_FILTER_INDEX_CAT') ? 'checked="checked"' : '').' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="text-align: center;"><input type="submit" class="button" name="submitLayeredSettings" value="'.$this->l('Save configuration').'" /></p>
|
||||
</form>
|
||||
@@ -3211,6 +3225,8 @@ class BlockLayered extends Module
|
||||
$blacklist[] = 'quantity';
|
||||
if (!Configuration::get('PS_LAYERED_FILTER_INDEX_MNF'))
|
||||
$blacklist[] = 'manufacturer';
|
||||
if (!Configuration::get('PS_LAYERED_FILTER_INDEX_CAT'))
|
||||
$blacklist[] = 'category';
|
||||
|
||||
$nofollow = false; // true is in the blacklist
|
||||
foreach ($filter_blocks as &$type_filter)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>blocklayered</name>
|
||||
<displayName><![CDATA[Layered navigation block]]></displayName>
|
||||
<version><![CDATA[1.8.7]]></version>
|
||||
<version><![CDATA[1.8.9]]></version>
|
||||
<description><![CDATA[Displays a block with layered navigation filters.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
|
||||
@@ -94,6 +94,7 @@ $_MODULE['<{blocklayered}prestashop>blocklayered_3e652bd299bb3ee3d458c0dcc7fd706
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_cc787af9edec8ce947ada8ab5bbff6e5'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre d\'état';
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_ab28e5086d1dcb1474a4bd4951b148b9'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre de disponibilité';
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_1218da2abb1e88e7fe8855995def9fef'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre fabriquant';
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_c41e97692bc79531a51dfca4b7f6bee0'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre catégorie';
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_cf565402d32b79d33f626252949a6941'] = 'Enregistrer la configuration';
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix';
|
||||
$_MODULE['<{blocklayered}prestashop>blocklayered_8c489d0946f66d17d73f26366a4bf620'] = 'Poids';
|
||||
|
||||
Reference in New Issue
Block a user