Skip to content

Commit 31f0add

Browse files
committed
Remove SEO functionality from free module
1 parent 747a857 commit 31f0add

File tree

4 files changed

+2
-96
lines changed

4 files changed

+2
-96
lines changed

src/app/code/community/IntegerNet/Solr/Model/Observer.php

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @category IntegerNet
66
* @package IntegerNet_Solr
7-
* @copyright Copyright (c) 2014 integer_net GmbH (http://www.integer-net.de/)
7+
* @copyright Copyright (c) 2014-2017 integer_net GmbH (http://www.integer-net.de/)
88
* @author Andreas von Studnitz <avs@integer-net.de>
99
*/
1010
class IntegerNet_Solr_Model_Observer
@@ -78,10 +78,6 @@ public function coreBlockAbstractToHtmlBefore(Varien_Event_Observer $observer)
7878
), 'is_comparable');
7979
}
8080

81-
if ($block instanceof Mage_Page_Block_Html_Head) {
82-
$this->_adjustRobots($block);
83-
}
84-
8581
if ($block instanceof Mage_Page_Block_Html) {
8682
$_class = 'solr-filter-'. Mage::helper('integernet_solr/filter')->getFilterPosition();
8783
$block->addBodyClass($_class);
@@ -247,7 +243,7 @@ protected function _getCategoryPageRedirectUrl($query)
247243
}
248244

249245
if (!sizeof($filters)) {
250-
return;
246+
return false;
251247
}
252248

253249
$store = Mage::app()->getStore();
@@ -270,45 +266,6 @@ protected function _getCategoryPageRedirectUrl($query)
270266
return false;
271267
}
272268

273-
/**
274-
* Set Robots to NOINDEX,NOFOLLOW depending on config
275-
*
276-
* @param Mage_Page_Block_Html_Head $block
277-
*/
278-
protected function _adjustRobots($block)
279-
{
280-
/** @var $helper IntegerNet_Solr_Helper_Data */
281-
$helper = Mage::helper('integernet_solr');
282-
if (!$helper->module()->isActive()) {
283-
return;
284-
}
285-
$stateBlock = null;
286-
$robotOptions = explode(',', Mage::getStoreConfig('integernet_solr/seo/hide_from_robots'));
287-
if ($helper->page()->isSearchPage()) {
288-
if (in_array('search_results_all', $robotOptions)) {
289-
$block->setData('robots', 'NOINDEX,NOFOLLOW');
290-
return;
291-
}
292-
if (!in_array('search_results_filtered', $robotOptions)) {
293-
return;
294-
}
295-
/** @var IntegerNet_Solr_Block_Result_Layer_State $stateBlock */
296-
$stateBlock = $block->getLayout()->getBlock('catalogsearch.solr.layer.state');
297-
} elseif ($helper->page()->isCategoryPage() && $helper->isCategoryDisplayActive()) {
298-
if (!in_array('categories_filtered', $robotOptions)) {
299-
return;
300-
}
301-
/** @var IntegerNet_Solr_Block_Result_Layer_State $stateBlock */
302-
$stateBlock = $block->getLayout()->getBlock('catalog.solr.layer.state');
303-
}
304-
if ($stateBlock instanceof IntegerNet_Solr_Block_Result_Layer_State) {
305-
$activeFilters = $stateBlock->getActiveFilters();
306-
if (is_array($activeFilters) && sizeof($activeFilters)) {
307-
$block->setData('robots', 'NOINDEX,NOFOLLOW');
308-
}
309-
}
310-
}
311-
312269
/**
313270
* @param Mage_Catalog_Model_Product $product
314271
* @return mixed

src/app/code/community/IntegerNet/Solr/Model/Source/RobotOptions.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/app/code/community/IntegerNet/Solr/etc/config.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,6 @@
268268
<product_attributes_redirect>name,sku</product_attributes_redirect>
269269
<category_attributes_redirect>name</category_attributes_redirect>
270270
</results>
271-
<seo>
272-
<hide_from_robots>search_results_all,search_results_filtered,categories_filtered</hide_from_robots>
273-
</seo>
274271
<dev>
275272
<register_autoloader>1</register_autoloader>
276273
<autoloader_basepath>lib/IntegerNet_Solr</autoloader_basepath>

src/app/locale/de_DE/IntegerNet_Solr.csv

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@
9393
"If the exact name / sku / ... is entered in the search field, the customer will be redirected to the product view page.","Wenn der exakte Name / SKU / ... in das Suchfeld eingetragen wird, wird der Kunde auf die entsprechende Produktseite weitergeleitet."
9494
"Redirect to category page on direct match in one of these attributes","Weiterleitung zur Kategorieseite bei 100% Übereinstimmung mit einem dieser Attribute"
9595
"If the exact name / ... is entered in the search field, the customer will be redirected to the category view page.","Wenn der exakte Name / ... in das Suchfeld eingetragen wird, wird der Kunde auf die entsprechende Kategorieseite weitergeleitet."
96-
"Search Result Page (always)","Suchergebnisseite (immer)"
97-
"Search Result Page with active Filters","Suchergebnisseite mit gesetzten Filtern"
98-
"Category Page with active Filters","Kategorieseite mit gesetzten Filtern"
99-
"Hide the following pages from robots:","Die folgenden Seiten vor Bots schützen:"
100-
"This will set NOINDEX,NOFOLLOW","Dadurch wird NOINDEX,NOFOLLOW gesetzt"
10196
"Position of Filters","Position der Filter"
10297
"Left column (Magento default)","Linke Spalte (Magento-Standard)"
10398
"Content column (above products)","Inhaltsspalte (oberhalb der Produkte)"

0 commit comments

Comments
 (0)