Version Notes
- fixed layout issues for the Magento 1.9 theme
- minimum PHP version 5.3.0
Download this release
Release Info
Developer | Catalin Ciobanu |
Extension | Catalin_Seo |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- app/code/community/Catalin/SEO/Block/CatalogSearch/Layer/Filter/Attribute.php +30 -30
- app/code/community/Catalin/SEO/Model/Catalog/Layer.php +37 -37
- app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Price.php +78 -78
- app/code/community/Catalin/SEO/Model/CatalogSearch/Layer.php +115 -115
- app/code/community/Catalin/SEO/Model/CatalogSearch/Layer/Filter/Attribute.php +30 -30
- app/code/community/Catalin/SEO/Model/Indexer/Attribute.php +74 -74
- app/code/community/Catalin/SEO/Model/Resource/Indexer/Attribute.php +214 -214
- app/code/community/Catalin/SEO/controllers/ResultController.php +92 -92
- package.xml +6 -11
- skin/frontend/base/default/js/catalin_seo/handler.js +174 -0
app/code/community/Catalin/SEO/Block/CatalogSearch/Layer/Filter/Attribute.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Block_CatalogSearch_Layer_Filter_Attribute extends Catalin_SEO_Block_Catalog_Layer_Filter_Attribute
|
18 |
-
{
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Set filter model name
|
22 |
-
*
|
23 |
-
*/
|
24 |
-
public function __construct()
|
25 |
-
{
|
26 |
-
parent::__construct();
|
27 |
-
$this->_filterModelName = 'catalogsearch/layer_filter_attribute';
|
28 |
-
}
|
29 |
-
|
30 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Block_CatalogSearch_Layer_Filter_Attribute extends Catalin_SEO_Block_Catalog_Layer_Filter_Attribute
|
18 |
+
{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Set filter model name
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
public function __construct()
|
25 |
+
{
|
26 |
+
parent::__construct();
|
27 |
+
$this->_filterModelName = 'catalogsearch/layer_filter_attribute';
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Catalin/SEO/Model/Catalog/Layer.php
CHANGED
@@ -1,38 +1,38 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
|
18 |
-
{
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get collection of all filterable attributes for layer products set
|
22 |
-
*
|
23 |
-
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Attribute_Collection
|
24 |
-
*/
|
25 |
-
public function getFilterableAttributes()
|
26 |
-
{
|
27 |
-
$collection = parent::getFilterableAttributes();
|
28 |
-
|
29 |
-
if ($collection instanceof Mage_Catalog_Model_Resource_Product_Attribute_Collection) {
|
30 |
-
// Prealoads all needed attributes at once
|
31 |
-
$attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
|
32 |
-
$attrUrlKeyModel->preloadAttributesOptions($collection);
|
33 |
-
}
|
34 |
-
|
35 |
-
return $collection;
|
36 |
-
}
|
37 |
-
|
38 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
|
18 |
+
{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get collection of all filterable attributes for layer products set
|
22 |
+
*
|
23 |
+
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Attribute_Collection
|
24 |
+
*/
|
25 |
+
public function getFilterableAttributes()
|
26 |
+
{
|
27 |
+
$collection = parent::getFilterableAttributes();
|
28 |
+
|
29 |
+
if ($collection instanceof Mage_Catalog_Model_Resource_Product_Attribute_Collection) {
|
30 |
+
// Prealoads all needed attributes at once
|
31 |
+
$attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
|
32 |
+
$attrUrlKeyModel->preloadAttributesOptions($collection);
|
33 |
+
}
|
34 |
+
|
35 |
+
return $collection;
|
36 |
+
}
|
37 |
+
|
38 |
}
|
app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Price.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Model_Catalog_Layer_Filter_Price extends Mage_Catalog_Model_Layer_Filter_Price
|
18 |
-
{
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get maximum price from layer products set
|
22 |
-
*
|
23 |
-
* @return float
|
24 |
-
*/
|
25 |
-
public function getMaxPriceFloat()
|
26 |
-
{
|
27 |
-
if (!$this->hasData('max_price_float')) {
|
28 |
-
$this->_collectPriceRange();
|
29 |
-
}
|
30 |
-
|
31 |
-
return $this->getData('max_price_float');
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Get minimum price from layer products set
|
36 |
-
*
|
37 |
-
* @return float
|
38 |
-
*/
|
39 |
-
public function getMinPriceFloat()
|
40 |
-
{
|
41 |
-
if (!$this->hasData('min_price_float')) {
|
42 |
-
$this->_collectPriceRange();
|
43 |
-
}
|
44 |
-
|
45 |
-
return $this->getData('min_price_float');
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Collect useful information - max and min price
|
50 |
-
*
|
51 |
-
* @return Catalin_SEO_Model_Catalog_Layer_Filter_Price
|
52 |
-
*/
|
53 |
-
protected function _collectPriceRange()
|
54 |
-
{
|
55 |
-
$collection = $this->getLayer()->getProductCollection();
|
56 |
-
$select = $collection->getSelect();
|
57 |
-
$conditions = $select->getPart(Zend_Db_Select::WHERE);
|
58 |
-
|
59 |
-
// Remove price sql conditions
|
60 |
-
$conditionsNoPrice = array();
|
61 |
-
foreach ($conditions as $key => $condition) {
|
62 |
-
if (stripos($condition, 'price_index') !== false) {
|
63 |
-
continue;
|
64 |
-
}
|
65 |
-
$conditionsNoPrice[] = $condition;
|
66 |
-
}
|
67 |
-
$select->setPart(Zend_Db_Select::WHERE, $conditionsNoPrice);
|
68 |
-
|
69 |
-
$this->setData('min_price_float', floor($collection->getMinPrice()));
|
70 |
-
$this->setData('max_price_float', round($collection->getMaxPrice()));
|
71 |
-
|
72 |
-
// Restore all sql conditions
|
73 |
-
$select->setPart(Zend_Db_Select::WHERE, $conditions);
|
74 |
-
|
75 |
-
return $this;
|
76 |
-
}
|
77 |
-
|
78 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Model_Catalog_Layer_Filter_Price extends Mage_Catalog_Model_Layer_Filter_Price
|
18 |
+
{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get maximum price from layer products set
|
22 |
+
*
|
23 |
+
* @return float
|
24 |
+
*/
|
25 |
+
public function getMaxPriceFloat()
|
26 |
+
{
|
27 |
+
if (!$this->hasData('max_price_float')) {
|
28 |
+
$this->_collectPriceRange();
|
29 |
+
}
|
30 |
+
|
31 |
+
return $this->getData('max_price_float');
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get minimum price from layer products set
|
36 |
+
*
|
37 |
+
* @return float
|
38 |
+
*/
|
39 |
+
public function getMinPriceFloat()
|
40 |
+
{
|
41 |
+
if (!$this->hasData('min_price_float')) {
|
42 |
+
$this->_collectPriceRange();
|
43 |
+
}
|
44 |
+
|
45 |
+
return $this->getData('min_price_float');
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Collect useful information - max and min price
|
50 |
+
*
|
51 |
+
* @return Catalin_SEO_Model_Catalog_Layer_Filter_Price
|
52 |
+
*/
|
53 |
+
protected function _collectPriceRange()
|
54 |
+
{
|
55 |
+
$collection = $this->getLayer()->getProductCollection();
|
56 |
+
$select = $collection->getSelect();
|
57 |
+
$conditions = $select->getPart(Zend_Db_Select::WHERE);
|
58 |
+
|
59 |
+
// Remove price sql conditions
|
60 |
+
$conditionsNoPrice = array();
|
61 |
+
foreach ($conditions as $key => $condition) {
|
62 |
+
if (stripos($condition, 'price_index') !== false) {
|
63 |
+
continue;
|
64 |
+
}
|
65 |
+
$conditionsNoPrice[] = $condition;
|
66 |
+
}
|
67 |
+
$select->setPart(Zend_Db_Select::WHERE, $conditionsNoPrice);
|
68 |
+
|
69 |
+
$this->setData('min_price_float', floor($collection->getMinPrice()));
|
70 |
+
$this->setData('max_price_float', round($collection->getMaxPrice()));
|
71 |
+
|
72 |
+
// Restore all sql conditions
|
73 |
+
$select->setPart(Zend_Db_Select::WHERE, $conditions);
|
74 |
+
|
75 |
+
return $this;
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
app/code/community/Catalin/SEO/Model/CatalogSearch/Layer.php
CHANGED
@@ -1,116 +1,116 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Model_CatalogSearch_Layer extends Catalin_SEO_Model_Catalog_Layer
|
18 |
-
{
|
19 |
-
|
20 |
-
const XML_PATH_DISPLAY_LAYER_COUNT = 'catalog/search/use_layered_navigation_count';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Get current layer product collection
|
24 |
-
*
|
25 |
-
* @return Mage_Catalog_Model_Resource_Eav_Resource_Product_Collection
|
26 |
-
*/
|
27 |
-
public function getProductCollection()
|
28 |
-
{
|
29 |
-
if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
|
30 |
-
$collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
|
31 |
-
} else {
|
32 |
-
$collection = Mage::getResourceModel('catalogsearch/fulltext_collection');
|
33 |
-
$this->prepareProductCollection($collection);
|
34 |
-
$this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
|
35 |
-
}
|
36 |
-
return $collection;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Prepare product collection
|
41 |
-
*
|
42 |
-
* @param Mage_Catalog_Model_Resource_Eav_Resource_Product_Collection $collection
|
43 |
-
* @return Mage_Catalog_Model_Layer
|
44 |
-
*/
|
45 |
-
public function prepareProductCollection($collection)
|
46 |
-
{
|
47 |
-
$collection
|
48 |
-
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
49 |
-
->addSearchFilter(Mage::helper('catalogsearch')->getQuery()->getQueryText())
|
50 |
-
->setStore(Mage::app()->getStore())
|
51 |
-
->addMinimalPrice()
|
52 |
-
->addFinalPrice()
|
53 |
-
->addTaxPercents()
|
54 |
-
->addStoreFilter()
|
55 |
-
->addUrlRewrite();
|
56 |
-
|
57 |
-
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
58 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
|
59 |
-
|
60 |
-
return $this;
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Get layer state key
|
65 |
-
*
|
66 |
-
* @return string
|
67 |
-
*/
|
68 |
-
public function getStateKey()
|
69 |
-
{
|
70 |
-
if ($this->_stateKey === null) {
|
71 |
-
$this->_stateKey = 'Q_' . Mage::helper('catalogsearch')->getQuery()->getId()
|
72 |
-
. '_' . parent::getStateKey();
|
73 |
-
}
|
74 |
-
return $this->_stateKey;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Get default tags for current layer state
|
79 |
-
*
|
80 |
-
* @param array $additionalTags
|
81 |
-
* @return array
|
82 |
-
*/
|
83 |
-
public function getStateTags(array $additionalTags = array())
|
84 |
-
{
|
85 |
-
$additionalTags = parent::getStateTags($additionalTags);
|
86 |
-
$additionalTags[] = Mage_CatalogSearch_Model_Query::CACHE_TAG;
|
87 |
-
return $additionalTags;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Add filters to attribute collection
|
92 |
-
*
|
93 |
-
* @param Mage_Catalog_Model_Resource_Eav_Resource_Product_Attribute_Collection $collection
|
94 |
-
* @return Mage_Catalog_Model_Resource_Eav_Resource_Product_Attribute_Collection
|
95 |
-
*/
|
96 |
-
protected function _prepareAttributeCollection($collection)
|
97 |
-
{
|
98 |
-
$collection->addIsFilterableInSearchFilter()
|
99 |
-
->addVisibleFilter();
|
100 |
-
return $collection;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Prepare attribute for use in layered navigation
|
105 |
-
*
|
106 |
-
* @param Mage_Eav_Model_Entity_Attribute $attribute
|
107 |
-
* @return Mage_Eav_Model_Entity_Attribute
|
108 |
-
*/
|
109 |
-
protected function _prepareAttribute($attribute)
|
110 |
-
{
|
111 |
-
$attribute = parent::_prepareAttribute($attribute);
|
112 |
-
$attribute->setIsFilterable(Mage_Catalog_Model_Layer_Filter_Attribute::OPTIONS_ONLY_WITH_RESULTS);
|
113 |
-
return $attribute;
|
114 |
-
}
|
115 |
-
|
116 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Model_CatalogSearch_Layer extends Catalin_SEO_Model_Catalog_Layer
|
18 |
+
{
|
19 |
+
|
20 |
+
const XML_PATH_DISPLAY_LAYER_COUNT = 'catalog/search/use_layered_navigation_count';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get current layer product collection
|
24 |
+
*
|
25 |
+
* @return Mage_Catalog_Model_Resource_Eav_Resource_Product_Collection
|
26 |
+
*/
|
27 |
+
public function getProductCollection()
|
28 |
+
{
|
29 |
+
if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
|
30 |
+
$collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
|
31 |
+
} else {
|
32 |
+
$collection = Mage::getResourceModel('catalogsearch/fulltext_collection');
|
33 |
+
$this->prepareProductCollection($collection);
|
34 |
+
$this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
|
35 |
+
}
|
36 |
+
return $collection;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Prepare product collection
|
41 |
+
*
|
42 |
+
* @param Mage_Catalog_Model_Resource_Eav_Resource_Product_Collection $collection
|
43 |
+
* @return Mage_Catalog_Model_Layer
|
44 |
+
*/
|
45 |
+
public function prepareProductCollection($collection)
|
46 |
+
{
|
47 |
+
$collection
|
48 |
+
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
49 |
+
->addSearchFilter(Mage::helper('catalogsearch')->getQuery()->getQueryText())
|
50 |
+
->setStore(Mage::app()->getStore())
|
51 |
+
->addMinimalPrice()
|
52 |
+
->addFinalPrice()
|
53 |
+
->addTaxPercents()
|
54 |
+
->addStoreFilter()
|
55 |
+
->addUrlRewrite();
|
56 |
+
|
57 |
+
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
58 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
|
59 |
+
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get layer state key
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public function getStateKey()
|
69 |
+
{
|
70 |
+
if ($this->_stateKey === null) {
|
71 |
+
$this->_stateKey = 'Q_' . Mage::helper('catalogsearch')->getQuery()->getId()
|
72 |
+
. '_' . parent::getStateKey();
|
73 |
+
}
|
74 |
+
return $this->_stateKey;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get default tags for current layer state
|
79 |
+
*
|
80 |
+
* @param array $additionalTags
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function getStateTags(array $additionalTags = array())
|
84 |
+
{
|
85 |
+
$additionalTags = parent::getStateTags($additionalTags);
|
86 |
+
$additionalTags[] = Mage_CatalogSearch_Model_Query::CACHE_TAG;
|
87 |
+
return $additionalTags;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Add filters to attribute collection
|
92 |
+
*
|
93 |
+
* @param Mage_Catalog_Model_Resource_Eav_Resource_Product_Attribute_Collection $collection
|
94 |
+
* @return Mage_Catalog_Model_Resource_Eav_Resource_Product_Attribute_Collection
|
95 |
+
*/
|
96 |
+
protected function _prepareAttributeCollection($collection)
|
97 |
+
{
|
98 |
+
$collection->addIsFilterableInSearchFilter()
|
99 |
+
->addVisibleFilter();
|
100 |
+
return $collection;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Prepare attribute for use in layered navigation
|
105 |
+
*
|
106 |
+
* @param Mage_Eav_Model_Entity_Attribute $attribute
|
107 |
+
* @return Mage_Eav_Model_Entity_Attribute
|
108 |
+
*/
|
109 |
+
protected function _prepareAttribute($attribute)
|
110 |
+
{
|
111 |
+
$attribute = parent::_prepareAttribute($attribute);
|
112 |
+
$attribute->setIsFilterable(Mage_Catalog_Model_Layer_Filter_Attribute::OPTIONS_ONLY_WITH_RESULTS);
|
113 |
+
return $attribute;
|
114 |
+
}
|
115 |
+
|
116 |
}
|
app/code/community/Catalin/SEO/Model/CatalogSearch/Layer/Filter/Attribute.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Model_CatalogSearch_Layer_Filter_Attribute extends Catalin_SEO_Model_Catalog_Layer_Filter_Attribute
|
18 |
-
{
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Check whether specified attribute can be used in LN
|
22 |
-
*
|
23 |
-
* @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
|
24 |
-
* @return bool
|
25 |
-
*/
|
26 |
-
protected function _getIsFilterableAttribute($attribute)
|
27 |
-
{
|
28 |
-
return $attribute->getIsFilterableInSearch();
|
29 |
-
}
|
30 |
-
|
31 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Model_CatalogSearch_Layer_Filter_Attribute extends Catalin_SEO_Model_Catalog_Layer_Filter_Attribute
|
18 |
+
{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Check whether specified attribute can be used in LN
|
22 |
+
*
|
23 |
+
* @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
|
24 |
+
* @return bool
|
25 |
+
*/
|
26 |
+
protected function _getIsFilterableAttribute($attribute)
|
27 |
+
{
|
28 |
+
return $attribute->getIsFilterableInSearch();
|
29 |
+
}
|
30 |
+
|
31 |
}
|
app/code/community/Catalin/SEO/Model/Indexer/Attribute.php
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Model_Indexer_Attribute extends Mage_Index_Model_Indexer_Abstract
|
18 |
-
{
|
19 |
-
|
20 |
-
protected $_matchedEntities = array(
|
21 |
-
Mage_Catalog_Model_Resource_Eav_Attribute::ENTITY => array(
|
22 |
-
Mage_Index_Model_Event::TYPE_SAVE,
|
23 |
-
),
|
24 |
-
);
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Initialize model
|
28 |
-
*
|
29 |
-
*/
|
30 |
-
protected function _construct()
|
31 |
-
{
|
32 |
-
$this->_init('catalin_seo/indexer_attribute');
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Process event based on event state data
|
37 |
-
*
|
38 |
-
* @param Mage_Index_Model_Event $event
|
39 |
-
*/
|
40 |
-
protected function _processEvent(Mage_Index_Model_Event $event)
|
41 |
-
{
|
42 |
-
$this->callEventHandler($event);
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Register indexer required data inside event object
|
47 |
-
*
|
48 |
-
* @param Mage_Index_Model_Event $event
|
49 |
-
*/
|
50 |
-
protected function _registerEvent(Mage_Index_Model_Event $event)
|
51 |
-
{
|
52 |
-
return $this;
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Get Indexer name
|
57 |
-
*
|
58 |
-
* @return string
|
59 |
-
*/
|
60 |
-
public function getName()
|
61 |
-
{
|
62 |
-
return Mage::helper('catalin_seo')->__('Catalin SEO');
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Get Indexer description
|
67 |
-
*
|
68 |
-
* @return string
|
69 |
-
*/
|
70 |
-
public function getDescription()
|
71 |
-
{
|
72 |
-
return Mage::helper('catalin_seo')->__('Index attribute options for layered navigation filters');
|
73 |
-
}
|
74 |
-
|
75 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Model_Indexer_Attribute extends Mage_Index_Model_Indexer_Abstract
|
18 |
+
{
|
19 |
+
|
20 |
+
protected $_matchedEntities = array(
|
21 |
+
Mage_Catalog_Model_Resource_Eav_Attribute::ENTITY => array(
|
22 |
+
Mage_Index_Model_Event::TYPE_SAVE,
|
23 |
+
),
|
24 |
+
);
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Initialize model
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
$this->_init('catalin_seo/indexer_attribute');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Process event based on event state data
|
37 |
+
*
|
38 |
+
* @param Mage_Index_Model_Event $event
|
39 |
+
*/
|
40 |
+
protected function _processEvent(Mage_Index_Model_Event $event)
|
41 |
+
{
|
42 |
+
$this->callEventHandler($event);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Register indexer required data inside event object
|
47 |
+
*
|
48 |
+
* @param Mage_Index_Model_Event $event
|
49 |
+
*/
|
50 |
+
protected function _registerEvent(Mage_Index_Model_Event $event)
|
51 |
+
{
|
52 |
+
return $this;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get Indexer name
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function getName()
|
61 |
+
{
|
62 |
+
return Mage::helper('catalin_seo')->__('Catalin SEO');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get Indexer description
|
67 |
+
*
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
public function getDescription()
|
71 |
+
{
|
72 |
+
return Mage::helper('catalin_seo')->__('Index attribute options for layered navigation filters');
|
73 |
+
}
|
74 |
+
|
75 |
}
|
app/code/community/Catalin/SEO/Model/Resource/Indexer/Attribute.php
CHANGED
@@ -1,215 +1,215 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Resource_Abstract
|
18 |
-
{
|
19 |
-
|
20 |
-
protected $_storesIds;
|
21 |
-
protected $_helper;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Initialize resource model
|
25 |
-
*
|
26 |
-
*/
|
27 |
-
protected function _construct()
|
28 |
-
{
|
29 |
-
$this->_init('catalin_seo/attribute_url_key', 'id');
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Reindex all
|
34 |
-
*
|
35 |
-
* @return Catalin_SEO_Model_Resource_Indexer_Attribute
|
36 |
-
*/
|
37 |
-
public function reindexAll()
|
38 |
-
{
|
39 |
-
$this->reindexSeoUrlKeys();
|
40 |
-
return $this;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Generate SEO values for catalog product attributes options
|
45 |
-
*
|
46 |
-
* @param int $attributeId - transmit this to limit processing to one specific attribute
|
47 |
-
* @return Catalin_SEO_Model_Resource_Indexer_Attribute
|
48 |
-
*/
|
49 |
-
public function reindexSeoUrlKeys($attributeId = null)
|
50 |
-
{
|
51 |
-
$attributes = $this->_getAttributes($attributeId);
|
52 |
-
$stores = $this->_getAllStoresIds();
|
53 |
-
|
54 |
-
$data = array();
|
55 |
-
foreach ($attributes as $attribute) {
|
56 |
-
if ($attribute->usesSource()) {
|
57 |
-
foreach ($stores as $storeId) {
|
58 |
-
$result = $this->_getInsertValues($attribute, $storeId);
|
59 |
-
$data = array_merge($data, $result);
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
if (!empty($attributeId)) {
|
65 |
-
$this->_saveData($data, array("`attribute_id` = ?" => $attributeId));
|
66 |
-
} else {
|
67 |
-
$this->_saveData($data);
|
68 |
-
}
|
69 |
-
|
70 |
-
return $this;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Save data into database
|
75 |
-
*
|
76 |
-
* @param array $data
|
77 |
-
* @param array $deleteWhere
|
78 |
-
*/
|
79 |
-
protected function _saveData(array $data, array $deleteWhere = array())
|
80 |
-
{
|
81 |
-
// Continue only if we have something to insert
|
82 |
-
if (empty($data)) {
|
83 |
-
return $this;
|
84 |
-
}
|
85 |
-
|
86 |
-
// Do it in one transaction
|
87 |
-
$this->beginTransaction();
|
88 |
-
|
89 |
-
try {
|
90 |
-
$writeAdapter = $this->_getWriteAdapter();
|
91 |
-
$writeAdapter->delete($this->getMainTable(), $deleteWhere);
|
92 |
-
$writeAdapter->insertMultiple($this->getMainTable(), $data);
|
93 |
-
|
94 |
-
$this->commit();
|
95 |
-
} catch (Exception $e) {
|
96 |
-
$this->rollBack();
|
97 |
-
throw $e;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Retrieve product attributes with frontend input type 'select' and 'multiselect'
|
103 |
-
*
|
104 |
-
* @return Mage_Eav_Model_Resource_Entity_Attribute_Collection
|
105 |
-
*/
|
106 |
-
protected function _getAttributes($attributeId = null)
|
107 |
-
{
|
108 |
-
$collection = Mage::getSingleton('eav/config')
|
109 |
-
->getEntityType(Mage_Catalog_Model_Product::ENTITY)
|
110 |
-
->getAttributeCollection()
|
111 |
-
->addFieldToFilter('`main_table`.`frontend_input`', array('in' => array('select', 'multiselect')));
|
112 |
-
//->addSetInfo();
|
113 |
-
if (!empty($attributeId)) {
|
114 |
-
$collection->addFieldToFilter('`main_table`.`attribute_id`', $attributeId);
|
115 |
-
}
|
116 |
-
|
117 |
-
return $collection;
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Retrieve data to be insterted after processing attribute
|
122 |
-
*
|
123 |
-
* @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
|
124 |
-
* @param int $storeId
|
125 |
-
* @return array
|
126 |
-
*/
|
127 |
-
protected function _getInsertValues($attribute, $storeId)
|
128 |
-
{
|
129 |
-
|
130 |
-
$collection = Mage::getResourceModel('eav/entity_attribute_option_collection')
|
131 |
-
->setStoreFilter($storeId)
|
132 |
-
->setPositionOrder('asc')
|
133 |
-
->setAttributeFilter($attribute->getId())
|
134 |
-
->load();
|
135 |
-
$options = $collection->toOptionArray();
|
136 |
-
|
137 |
-
$data = array();
|
138 |
-
foreach ($options as $option) {
|
139 |
-
// Generate url key
|
140 |
-
$urlKey = $this->_getHelper()->transliterate($option['label']);
|
141 |
-
|
142 |
-
// Check if this url key is taken and add -{count}
|
143 |
-
$count = 0;
|
144 |
-
$origUrlKey = $urlKey;
|
145 |
-
do {
|
146 |
-
$found = false;
|
147 |
-
foreach ($data as $line) {
|
148 |
-
if ($line['url_key'] == $urlKey) {
|
149 |
-
$found = true;
|
150 |
-
}
|
151 |
-
}
|
152 |
-
if ($found) {
|
153 |
-
$urlKey = $origUrlKey . '-' . ++$count;
|
154 |
-
}
|
155 |
-
} while ($found);
|
156 |
-
|
157 |
-
$data[] = array(
|
158 |
-
'attribute_code' => $attribute->getAttributeCode(),
|
159 |
-
'attribute_id' => $attribute->getId(),
|
160 |
-
'store_id' => $storeId,
|
161 |
-
'option_id' => $option['value'],
|
162 |
-
'url_key' => $urlKey
|
163 |
-
);
|
164 |
-
}
|
165 |
-
|
166 |
-
return $data;
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Retrieve all stores ids
|
171 |
-
*
|
172 |
-
* @return array
|
173 |
-
*/
|
174 |
-
protected function _getAllStoresIds()
|
175 |
-
{
|
176 |
-
if ($this->_storesIds === null) {
|
177 |
-
$this->_storesIds = array();
|
178 |
-
$stores = Mage::app()->getStores();
|
179 |
-
foreach ($stores as $storeId => $store) {
|
180 |
-
$this->_storesIds[] = $storeId;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
return $this->_storesIds;
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Retrieve helper object
|
189 |
-
*
|
190 |
-
* @return Catalin_SEO_Helper_Data
|
191 |
-
*/
|
192 |
-
protected function _getHelper()
|
193 |
-
{
|
194 |
-
if ($this->_helper === null) {
|
195 |
-
$this->_helper = Mage::helper('catalin_seo');
|
196 |
-
}
|
197 |
-
|
198 |
-
return $this->_helper;
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Reindex attribute options on attribute save event
|
203 |
-
*
|
204 |
-
* @param Mage_Index_Model_Event $event
|
205 |
-
* @return Catalin_SEO_Model_Resource_Indexer_Attribute
|
206 |
-
*/
|
207 |
-
public function catalogEavAttributeSave(Mage_Index_Model_Event $event)
|
208 |
-
{
|
209 |
-
$attribute = $event->getDataObject();
|
210 |
-
$this->reindexSeoUrlKeys($attribute->getId());
|
211 |
-
|
212 |
-
return $this;
|
213 |
-
}
|
214 |
-
|
215 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Resource_Abstract
|
18 |
+
{
|
19 |
+
|
20 |
+
protected $_storesIds;
|
21 |
+
protected $_helper;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Initialize resource model
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
protected function _construct()
|
28 |
+
{
|
29 |
+
$this->_init('catalin_seo/attribute_url_key', 'id');
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Reindex all
|
34 |
+
*
|
35 |
+
* @return Catalin_SEO_Model_Resource_Indexer_Attribute
|
36 |
+
*/
|
37 |
+
public function reindexAll()
|
38 |
+
{
|
39 |
+
$this->reindexSeoUrlKeys();
|
40 |
+
return $this;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Generate SEO values for catalog product attributes options
|
45 |
+
*
|
46 |
+
* @param int $attributeId - transmit this to limit processing to one specific attribute
|
47 |
+
* @return Catalin_SEO_Model_Resource_Indexer_Attribute
|
48 |
+
*/
|
49 |
+
public function reindexSeoUrlKeys($attributeId = null)
|
50 |
+
{
|
51 |
+
$attributes = $this->_getAttributes($attributeId);
|
52 |
+
$stores = $this->_getAllStoresIds();
|
53 |
+
|
54 |
+
$data = array();
|
55 |
+
foreach ($attributes as $attribute) {
|
56 |
+
if ($attribute->usesSource()) {
|
57 |
+
foreach ($stores as $storeId) {
|
58 |
+
$result = $this->_getInsertValues($attribute, $storeId);
|
59 |
+
$data = array_merge($data, $result);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if (!empty($attributeId)) {
|
65 |
+
$this->_saveData($data, array("`attribute_id` = ?" => $attributeId));
|
66 |
+
} else {
|
67 |
+
$this->_saveData($data);
|
68 |
+
}
|
69 |
+
|
70 |
+
return $this;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Save data into database
|
75 |
+
*
|
76 |
+
* @param array $data
|
77 |
+
* @param array $deleteWhere
|
78 |
+
*/
|
79 |
+
protected function _saveData(array $data, array $deleteWhere = array())
|
80 |
+
{
|
81 |
+
// Continue only if we have something to insert
|
82 |
+
if (empty($data)) {
|
83 |
+
return $this;
|
84 |
+
}
|
85 |
+
|
86 |
+
// Do it in one transaction
|
87 |
+
$this->beginTransaction();
|
88 |
+
|
89 |
+
try {
|
90 |
+
$writeAdapter = $this->_getWriteAdapter();
|
91 |
+
$writeAdapter->delete($this->getMainTable(), $deleteWhere);
|
92 |
+
$writeAdapter->insertMultiple($this->getMainTable(), $data);
|
93 |
+
|
94 |
+
$this->commit();
|
95 |
+
} catch (Exception $e) {
|
96 |
+
$this->rollBack();
|
97 |
+
throw $e;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Retrieve product attributes with frontend input type 'select' and 'multiselect'
|
103 |
+
*
|
104 |
+
* @return Mage_Eav_Model_Resource_Entity_Attribute_Collection
|
105 |
+
*/
|
106 |
+
protected function _getAttributes($attributeId = null)
|
107 |
+
{
|
108 |
+
$collection = Mage::getSingleton('eav/config')
|
109 |
+
->getEntityType(Mage_Catalog_Model_Product::ENTITY)
|
110 |
+
->getAttributeCollection()
|
111 |
+
->addFieldToFilter('`main_table`.`frontend_input`', array('in' => array('select', 'multiselect')));
|
112 |
+
//->addSetInfo();
|
113 |
+
if (!empty($attributeId)) {
|
114 |
+
$collection->addFieldToFilter('`main_table`.`attribute_id`', $attributeId);
|
115 |
+
}
|
116 |
+
|
117 |
+
return $collection;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Retrieve data to be insterted after processing attribute
|
122 |
+
*
|
123 |
+
* @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
|
124 |
+
* @param int $storeId
|
125 |
+
* @return array
|
126 |
+
*/
|
127 |
+
protected function _getInsertValues($attribute, $storeId)
|
128 |
+
{
|
129 |
+
|
130 |
+
$collection = Mage::getResourceModel('eav/entity_attribute_option_collection')
|
131 |
+
->setStoreFilter($storeId)
|
132 |
+
->setPositionOrder('asc')
|
133 |
+
->setAttributeFilter($attribute->getId())
|
134 |
+
->load();
|
135 |
+
$options = $collection->toOptionArray();
|
136 |
+
|
137 |
+
$data = array();
|
138 |
+
foreach ($options as $option) {
|
139 |
+
// Generate url key
|
140 |
+
$urlKey = $this->_getHelper()->transliterate($option['label']);
|
141 |
+
|
142 |
+
// Check if this url key is taken and add -{count}
|
143 |
+
$count = 0;
|
144 |
+
$origUrlKey = $urlKey;
|
145 |
+
do {
|
146 |
+
$found = false;
|
147 |
+
foreach ($data as $line) {
|
148 |
+
if ($line['url_key'] == $urlKey) {
|
149 |
+
$found = true;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
if ($found) {
|
153 |
+
$urlKey = $origUrlKey . '-' . ++$count;
|
154 |
+
}
|
155 |
+
} while ($found);
|
156 |
+
|
157 |
+
$data[] = array(
|
158 |
+
'attribute_code' => $attribute->getAttributeCode(),
|
159 |
+
'attribute_id' => $attribute->getId(),
|
160 |
+
'store_id' => $storeId,
|
161 |
+
'option_id' => $option['value'],
|
162 |
+
'url_key' => $urlKey
|
163 |
+
);
|
164 |
+
}
|
165 |
+
|
166 |
+
return $data;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Retrieve all stores ids
|
171 |
+
*
|
172 |
+
* @return array
|
173 |
+
*/
|
174 |
+
protected function _getAllStoresIds()
|
175 |
+
{
|
176 |
+
if ($this->_storesIds === null) {
|
177 |
+
$this->_storesIds = array();
|
178 |
+
$stores = Mage::app()->getStores();
|
179 |
+
foreach ($stores as $storeId => $store) {
|
180 |
+
$this->_storesIds[] = $storeId;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return $this->_storesIds;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Retrieve helper object
|
189 |
+
*
|
190 |
+
* @return Catalin_SEO_Helper_Data
|
191 |
+
*/
|
192 |
+
protected function _getHelper()
|
193 |
+
{
|
194 |
+
if ($this->_helper === null) {
|
195 |
+
$this->_helper = Mage::helper('catalin_seo');
|
196 |
+
}
|
197 |
+
|
198 |
+
return $this->_helper;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Reindex attribute options on attribute save event
|
203 |
+
*
|
204 |
+
* @param Mage_Index_Model_Event $event
|
205 |
+
* @return Catalin_SEO_Model_Resource_Indexer_Attribute
|
206 |
+
*/
|
207 |
+
public function catalogEavAttributeSave(Mage_Index_Model_Event $event)
|
208 |
+
{
|
209 |
+
$attribute = $event->getDataObject();
|
210 |
+
$this->reindexSeoUrlKeys($attribute->getId());
|
211 |
+
|
212 |
+
return $this;
|
213 |
+
}
|
214 |
+
|
215 |
}
|
app/code/community/Catalin/SEO/controllers/ResultController.php
CHANGED
@@ -1,93 +1,93 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Catalin Ciobanu
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @package Catalin_Seo
|
14 |
-
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
-
*/
|
17 |
-
require_once 'Mage/CatalogSearch/controllers/ResultController.php';
|
18 |
-
|
19 |
-
class Catalin_Seo_ResultController extends Mage_CatalogSearch_ResultController
|
20 |
-
{
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Display search result
|
24 |
-
*/
|
25 |
-
public function indexAction()
|
26 |
-
{
|
27 |
-
$query = Mage::helper('catalogsearch')->getQuery();
|
28 |
-
/* @var $query Mage_CatalogSearch_Model_Query */
|
29 |
-
|
30 |
-
$query->setStoreId(Mage::app()->getStore()->getId());
|
31 |
-
|
32 |
-
if ($query->getQueryText() != '') {
|
33 |
-
if (Mage::helper('catalogsearch')->isMinQueryLength()) {
|
34 |
-
$query->setId(0)
|
35 |
-
->setIsActive(1)
|
36 |
-
->setIsProcessed(1);
|
37 |
-
} else {
|
38 |
-
if ($query->getId()) {
|
39 |
-
$query->setPopularity($query->getPopularity() + 1);
|
40 |
-
} else {
|
41 |
-
$query->setPopularity(1);
|
42 |
-
}
|
43 |
-
|
44 |
-
if ($query->getRedirect()) {
|
45 |
-
$query->save();
|
46 |
-
$this->getResponse()->setRedirect($query->getRedirect());
|
47 |
-
return;
|
48 |
-
} else {
|
49 |
-
$query->prepare();
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
Mage::helper('catalogsearch')->checkNotes();
|
54 |
-
|
55 |
-
$this->loadLayout();
|
56 |
-
// apply custom ajax layout
|
57 |
-
if ($this->getRequest()->isAjax()) {
|
58 |
-
$update = $this->getLayout()->getUpdate();
|
59 |
-
$update->addHandle('catalog_category_layered_ajax_layer');
|
60 |
-
}
|
61 |
-
$this->_initLayoutMessages('catalog/session');
|
62 |
-
$this->_initLayoutMessages('checkout/session');
|
63 |
-
|
64 |
-
// return json formatted response for ajax
|
65 |
-
if ($this->getRequest()->isAjax()) {
|
66 |
-
$listing = $this->getLayout()->getBlock('search_result_list')->toHtml();
|
67 |
-
$layer = $this->getLayout()->getBlock('catalogsearch.leftnav')->toHtml();
|
68 |
-
|
69 |
-
// Fix urls that contain '___SID=U'
|
70 |
-
$urlModel = Mage::getSingleton('core/url');
|
71 |
-
$listing = $urlModel->sessionUrlVar($listing);
|
72 |
-
$layer = $urlModel->sessionUrlVar($layer);
|
73 |
-
|
74 |
-
$response = array(
|
75 |
-
'listing' => $listing,
|
76 |
-
'layer' => $layer
|
77 |
-
);
|
78 |
-
|
79 |
-
$this->getResponse()->setHeader('Content-Type', 'application/json', true);
|
80 |
-
$this->getResponse()->setBody(json_encode($response));
|
81 |
-
} else {
|
82 |
-
$this->renderLayout();
|
83 |
-
}
|
84 |
-
|
85 |
-
if (!Mage::helper('catalogsearch')->isMinQueryLength()) {
|
86 |
-
$query->save();
|
87 |
-
}
|
88 |
-
} else {
|
89 |
-
$this->_redirectReferer();
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Catalin Ciobanu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @package Catalin_Seo
|
14 |
+
* @copyright Copyright (c) 2013 Catalin Ciobanu
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
require_once 'Mage/CatalogSearch/controllers/ResultController.php';
|
18 |
+
|
19 |
+
class Catalin_Seo_ResultController extends Mage_CatalogSearch_ResultController
|
20 |
+
{
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Display search result
|
24 |
+
*/
|
25 |
+
public function indexAction()
|
26 |
+
{
|
27 |
+
$query = Mage::helper('catalogsearch')->getQuery();
|
28 |
+
/* @var $query Mage_CatalogSearch_Model_Query */
|
29 |
+
|
30 |
+
$query->setStoreId(Mage::app()->getStore()->getId());
|
31 |
+
|
32 |
+
if ($query->getQueryText() != '') {
|
33 |
+
if (Mage::helper('catalogsearch')->isMinQueryLength()) {
|
34 |
+
$query->setId(0)
|
35 |
+
->setIsActive(1)
|
36 |
+
->setIsProcessed(1);
|
37 |
+
} else {
|
38 |
+
if ($query->getId()) {
|
39 |
+
$query->setPopularity($query->getPopularity() + 1);
|
40 |
+
} else {
|
41 |
+
$query->setPopularity(1);
|
42 |
+
}
|
43 |
+
|
44 |
+
if ($query->getRedirect()) {
|
45 |
+
$query->save();
|
46 |
+
$this->getResponse()->setRedirect($query->getRedirect());
|
47 |
+
return;
|
48 |
+
} else {
|
49 |
+
$query->prepare();
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
Mage::helper('catalogsearch')->checkNotes();
|
54 |
+
|
55 |
+
$this->loadLayout();
|
56 |
+
// apply custom ajax layout
|
57 |
+
if ($this->getRequest()->isAjax()) {
|
58 |
+
$update = $this->getLayout()->getUpdate();
|
59 |
+
$update->addHandle('catalog_category_layered_ajax_layer');
|
60 |
+
}
|
61 |
+
$this->_initLayoutMessages('catalog/session');
|
62 |
+
$this->_initLayoutMessages('checkout/session');
|
63 |
+
|
64 |
+
// return json formatted response for ajax
|
65 |
+
if ($this->getRequest()->isAjax()) {
|
66 |
+
$listing = $this->getLayout()->getBlock('search_result_list')->toHtml();
|
67 |
+
$layer = $this->getLayout()->getBlock('catalogsearch.leftnav')->toHtml();
|
68 |
+
|
69 |
+
// Fix urls that contain '___SID=U'
|
70 |
+
$urlModel = Mage::getSingleton('core/url');
|
71 |
+
$listing = $urlModel->sessionUrlVar($listing);
|
72 |
+
$layer = $urlModel->sessionUrlVar($layer);
|
73 |
+
|
74 |
+
$response = array(
|
75 |
+
'listing' => $listing,
|
76 |
+
'layer' => $layer
|
77 |
+
);
|
78 |
+
|
79 |
+
$this->getResponse()->setHeader('Content-Type', 'application/json', true);
|
80 |
+
$this->getResponse()->setBody(json_encode($response));
|
81 |
+
} else {
|
82 |
+
$this->renderLayout();
|
83 |
+
}
|
84 |
+
|
85 |
+
if (!Mage::helper('catalogsearch')->isMinQueryLength()) {
|
86 |
+
$query->save();
|
87 |
+
}
|
88 |
+
} else {
|
89 |
+
$this->_redirectReferer();
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Catalin_Seo</name>
|
4 |
-
<version>2.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -17,16 +17,11 @@
|
|
17 |
</ul>
|
18 |
<p>All the above features can be enabled/disabled from backend from "System -> Configuration -> Catalin SEO -> Catalog Layered Navigation"</p></description>
|
19 |
<notes>- fixed layout issues for the Magento 1.9 theme
|
20 |
-
-
|
21 |
-
- updated native.history.js
|
22 |
-
- removed the price slider delayed auto submit - counter intuitive and harmfull
|
23 |
-
- fixed issue with AM and AM+ filters
|
24 |
-
- minimum supported Magento version is 1.9
|
25 |
-
- fixed issues with flat catalog category enabled</notes>
|
26 |
<authors><author><name>Catalin Ciobanu</name><user>catalin_ciobanu</user><email>caciobanu@gmail.com</email></author></authors>
|
27 |
-
<date>2014-10
|
28 |
-
<time>
|
29 |
-
<contents><target name="magecommunity"><dir name="Catalin"><dir name="SEO"><dir name="Block"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="decdc5633827964ff7aba28f8e8f89ff"/><file name="Price.php" hash="1a0f2b2c455e50614a4ac1694640cd56"/></dir><file name="State.php" hash="fd21c5a6603427ae81e7eddbef3d827f"/></dir><dir name="Product"><dir name="List"><file name="Pager.php" hash="7720a417475b5a512d383fd06242e43a"/><file name="Toolbar.php" hash="1624c89efb4f94ed1f35622c70fd3d9a"/></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="008e737de084f5a400518bda4dda09f8"/></dir></dir></dir></dir><dir name="Controller"><file name="Router.php" hash="22133b902420683a41df3a6b935a84b7"/></dir><dir name="Helper"><file name="Data.php" hash="513ad6d9c86166adb5749e856c8eb83d"/><dir name="data"><file name="x00.php" hash="450182e4917ae346e6e64c17ffb63e97"/><file name="x01.php" hash="8e4880febe04e8bbc68c6ee6bc14f112"/><file name="x02.php" hash="919566cf560d5865a4f347cb0cf5ce30"/><file name="x03.php" hash="14dcbdbcde12f478d8657da808fe643d"/><file name="x04.php" hash="b4ca085c2a79244199f079d01c7e2c6b"/><file name="x05.php" hash="3797d79ee103c227f650d39da9bf0fb6"/><file name="x06.php" hash="e4faf649ef87968f2b58f9644687de2c"/><file name="x07.php" hash="5dc7d9d484aa28d77edd934c47cbb38c"/><file name="x09.php" hash="63337e20c61da6c5b5842c39bbfcd033"/><file name="x0a.php" hash="df2383cac3d3164a054d123e428a6ef0"/><file name="x0b.php" hash="55bf005378faa332a988145edfe65bfe"/><file name="x0c.php" hash="d3b45c5fd9d6794907523233e7b5ef73"/><file name="x0d.php" hash="0efd5f8911480341c1c5d9dd2cd96eab"/><file name="x0e.php" hash="00bafa974dd7e72e3cdfa84460146743"/><file name="x0f.php" hash="c5ab298134b47c79f2317ce291f29091"/><file name="x10.php" hash="db5df20e88ef152852d51108a28faf68"/><file name="x11.php" hash="6dbce9e90d9d1c2bffd476fffd9c81ad"/><file name="x12.php" hash="1911521e2aa3cc389e74b33282c80b5a"/><file name="x13.php" hash="ac373e87af343f2f39586f6e01f3bc7a"/><file name="x14.php" hash="618d7ca14ced92c68225108c1fdf3d1f"/><file name="x15.php" hash="6019f2cf672cfcf4486742d640ca0a49"/><file name="x16.php" hash="363b81373dd510f53444d2fca01500d0"/><file name="x17.php" hash="0075d26788b3147ee1b93f1fbe4abcb5"/><file name="x18.php" hash="382dcd23cdbb6a2c1585f91d528aae5c"/><file name="x1e.php" hash="e0d2195ccdb96cf4ea345715de4a2fe0"/><file name="x1f.php" hash="13fffadc97ef3445cbd4969d347b8d32"/><file name="x20.php" hash="ad43141b04fb6d7bab183e13354acb13"/><file name="x21.php" hash="eb84515b6f6be292bf81c576e6ed0b0f"/><file name="x22.php" hash="51ade912682064603ca54b20ecaa9334"/><file name="x23.php" hash="2b153cbc0e81d3151c1ec44e6accd682"/><file name="x24.php" hash="98d4b201e8c670219cc7569e28653d1c"/><file name="x25.php" hash="ee79b56b8b4c5a79af30c30e74b2de22"/><file name="x26.php" hash="88c02bafbf73d21d21c59768419b0c2a"/><file name="x27.php" hash="72bb13e4b32fbf9a174b5d35e6264159"/><file name="x28.php" hash="dcbe588e9d301c627f1dc5ebea623f35"/><file name="x2e.php" hash="a506c372cb82f9e84a514075b788914b"/><file name="x2f.php" hash="577fb5f9d9968471a95906c840c4ec97"/><file name="x30.php" hash="be9214f6b21c651fdd8a7f0ff624826e"/><file name="x31.php" hash="09cb141e4e5b15715b4eb092ff62f6ce"/><file name="x32.php" hash="5781ef2460e4fc93260899c37f3ca6af"/><file name="x33.php" hash="582fcde78a8bb85f11a4c6098b523234"/><file name="x4d.php" hash="8842aa5496002094ae68b2ddc10b3dcc"/><file name="x4e.php" hash="b0d1ed31e7268c2fe7fda95e1eba8bed"/><file name="x4f.php" hash="841625fff58304e2171fef729e6ed695"/><file name="x50.php" hash="dbcc2470e51be09e4d36b8c3ab07767d"/><file name="x51.php" hash="fd96d946cd328ac8e2041b99d64cf37d"/><file name="x52.php" hash="5e3a9fa55c4c8de7d3438b11d930c3ca"/><file name="x53.php" hash="29603023fa46a48c75a5cd5149823894"/><file name="x54.php" hash="3b8da5215b64deecc23f6b51f1c0510d"/><file name="x55.php" hash="06814d53163929c319af8c2a49edcd9b"/><file name="x56.php" hash="2b2ebbadb098a2353ddd659fb8ccb7cd"/><file name="x57.php" hash="725cd6c2ce9ecc6ceaf9aee144741984"/><file name="x58.php" hash="ac31204c457ab7a814ff53939d68447c"/><file name="x59.php" hash="48c0049cb0eb14d13f98cf6c12103db0"/><file name="x5a.php" hash="2ae0dbe06a3d97ae9bcd25fb94fd31c3"/><file name="x5b.php" hash="14f157d36788f292258ed9a83de5da73"/><file name="x5c.php" hash="50bcac83e76c63281f8985320e6e830a"/><file name="x5d.php" hash="862216f95a3590d28cebf287a25c5746"/><file name="x5e.php" hash="fbffe7592bfbe00e9999dde4c83d601d"/><file name="x5f.php" hash="9a87b39043670fdd7cfe07fd49279e22"/><file name="x60.php" hash="e160340e86644fd83c1800026dea241f"/><file name="x61.php" hash="eb3b4d5a8108ba0d1b4f9bd67fadd817"/><file name="x62.php" hash="3e558391bc4ed3768e13e0cace21bcc5"/><file name="x63.php" hash="ade79f321bb4449620e86a77b556a4c4"/><file name="x64.php" hash="664368342658a4aed7853d9a2d65d750"/><file name="x65.php" hash="a1bbc07e58b13d99ed4302ec4e67f4b2"/><file name="x66.php" hash="2f17f60177981e12be650c13f04a49e0"/><file name="x67.php" hash="3a4b21418a78042243721c98f28968d8"/><file name="x68.php" hash="1b8b4ce217986cc3f7550f16e8db1780"/><file name="x69.php" hash="6def6c5b5e469c806a6b38827d0c34f5"/><file name="x6a.php" hash="9fae911d681a0c625fc6e5151ae44d28"/><file name="x6b.php" hash="245472ec4357e0b25da3d16140bcf6d1"/><file name="x6c.php" hash="28fc6a8e4660a0b50566e850e2afc6a3"/><file name="x6d.php" hash="18f83b6b5a6f55520f975057fef4fa3a"/><file name="x6e.php" hash="df5ab12708cd053e6ec8b2228380adbb"/><file name="x6f.php" hash="866c65a813461f43324a24cb463cf4bb"/><file name="x70.php" hash="daf8e99c570287fa4bdac6c353884937"/><file name="x71.php" hash="6b136f7c2a07422d1c0120ff39677b8f"/><file name="x72.php" hash="3312f70e586836e16b3802d24f828888"/><file name="x73.php" hash="010e32351d3ee643e8b4464d391eb51f"/><file name="x74.php" hash="d9c0fb5bb46813b9fd7078d2054ca0b1"/><file name="x75.php" hash="34ee63177ea043bea198fe191327d6e0"/><file name="x76.php" hash="8e1cd7e7db6f45f2e1288ebb90eb31e6"/><file name="x77.php" hash="9e295e80d931332ace899152972f34a0"/><file name="x78.php" hash="ef15567cc00457ca734d18a021b5e52d"/><file name="x79.php" hash="41467fa793d377d10980ab2256993a29"/><file name="x7a.php" hash="bc618f669de10280de11c8678f4d651f"/><file name="x7b.php" hash="d065d37d486d53273b18b0b9f9dd86b2"/><file name="x7c.php" hash="5921121839baed16b78cc36145b52a62"/><file name="x7d.php" hash="f0077edfa1f9859d0f14d3bab15bef0c"/><file name="x7e.php" hash="63d1daf0b583b4c4a66c011894a8cc98"/><file name="x7f.php" hash="c688c38a38e171755e43e905a69e339a"/><file name="x80.php" hash="9070a439e5c0b2ea086f11863746cafb"/><file name="x81.php" hash="06f4d64caf41f3d985caea14ab3a31b0"/><file name="x82.php" hash="6cb491f40badaeaa3f9f292f5bfca217"/><file name="x83.php" hash="d9d39c5e7130705f69b46647f5af8250"/><file name="x84.php" hash="38c71fc265e5b1d431cf2b58e163eaa2"/><file name="x85.php" hash="b112d31fa357b3d3b67842a77cb5310a"/><file name="x86.php" hash="d7fa4167950da670cadd2d451f1a2edb"/><file name="x87.php" hash="80a3ab6690073fe3775ec81f2ee35013"/><file name="x88.php" hash="e05489231b1d4915c42997dec89b15cb"/><file name="x89.php" hash="19d3087264c2dbed0ffa4cd47c6f2853"/><file name="x8a.php" hash="093885354302b9898b8851e09444fd96"/><file name="x8b.php" hash="05588068116c641f70c7e459632f5394"/><file name="x8c.php" hash="b098af3f0e138b56ab8411b2cde600b9"/><file name="x8d.php" hash="a9cb4c30252f615dc452041ccf651467"/><file name="x8e.php" hash="53a2cd6937d88c19f8e1ae228a65c830"/><file name="x8f.php" hash="4e0c37fe92418505c7c4612eb8251e3a"/><file name="x90.php" hash="1112c376c17c3aba6f958dbff6d15362"/><file name="x91.php" hash="f9eeb625c3c66af15a8d82f1db0cdc15"/><file name="x92.php" hash="3be097a2d595bf46323de0661161846c"/><file name="x93.php" hash="beac90d08e9c9753c90afd26db2ad1d0"/><file name="x94.php" hash="45555c59ed7e9e9a0abc470d272835ad"/><file name="x95.php" hash="8ee187be6fbeb7fe3297baa9c89ea6dd"/><file name="x96.php" hash="57b310726908124b27f6ac0d7a5aa95b"/><file name="x97.php" hash="fcfa660695fc43f0ef974416d6417ec2"/><file name="x98.php" hash="88b0e6407503716e4e8d221f77e63f00"/><file name="x99.php" hash="a0924c478967313bd96ca5bc62b955a0"/><file name="x9a.php" hash="d8e1f4684908ffea274e7d62f9b7f210"/><file name="x9b.php" hash="ff855336ea0962b81d9410eea22a8eca"/><file name="x9c.php" hash="9866a2f684ac602cac02ba02f66bdacf"/><file name="x9d.php" hash="64b8d5235c86678f88b3adc1fff2b944"/><file name="x9e.php" hash="c9fad776841bc34fc5fd7700797b65f4"/><file name="x9f.php" hash="f1c6d6cbb8ac5fb5c76e7489bef8774d"/><file name="xa0.php" hash="f27b2025d8a2dc84d5821ee0de443243"/><file name="xa1.php" hash="9079b3e07655b0536153c70d09f2dd41"/><file name="xa2.php" hash="43abb79aa36b6575be2072aca536e770"/><file name="xa3.php" hash="ac0f7f693a8b9b15c14c7e93d16e44d4"/><file name="xa4.php" hash="673c5ca4d9faa59ae7c1fbde0618714d"/><file name="xac.php" hash="113f809d9d7c474d80588d240639dc2f"/><file name="xad.php" hash="16010ec214c0bd856ff4880aba557b18"/><file name="xae.php" hash="c01cb4a18ef68ae1e793e947857e6a72"/><file name="xaf.php" hash="98f242cb0bc7429a5a450e9c82d462db"/><file name="xb0.php" hash="7f37bfe7e9782a8702a8bac106a45627"/><file name="xb1.php" hash="f7105123854bb619b232c2fd9502715a"/><file name="xb2.php" hash="824a10352cf082b71df114bc9362eb3c"/><file name="xb3.php" hash="fabb7f1a18d2632127f405ed5b419f61"/><file name="xb4.php" hash="eff9e802c59769e6f6255ebe3e4c5cb6"/><file name="xb5.php" hash="cbf6d291c99528a3564c1d3ff3a777b3"/><file name="xb6.php" hash="b0d1ab9d95e1e6e82c69a399311df856"/><file name="xb7.php" hash="a685d5656e8f31212e01f64afc6298fc"/><file name="xb8.php" hash="fd7a9295e32870eec0889695a6be3f6c"/><file name="xb9.php" hash="abb9c74fe83846f07826bf6044640e23"/><file name="xba.php" hash="36d7426647eedf90b52cf38f54c1cb0e"/><file name="xbb.php" hash="d547091bb8a6390ef90957c7687b0ab4"/><file name="xbc.php" hash="078a5499d2429ae0460d0277bbdb525d"/><file name="xbd.php" hash="bd9b10559360179d75cd84a389c75f15"/><file name="xbe.php" hash="624c0d43f2f9cf75a1e7da423ef46b07"/><file name="xbf.php" hash="51213b7f0991eb46aee2a1ce730b76e7"/><file name="xc0.php" hash="1a8012c0f8d16de7a93deb57d9907fc0"/><file name="xc1.php" hash="17faeb0f134d296e73b87d31820c7b45"/><file name="xc2.php" hash="95182ef9085fceca36ca1fcd60b6532f"/><file name="xc3.php" hash="a472ff382a6d1b5b43535f0ea339a06d"/><file name="xc4.php" hash="9afbcb6b0f0664ff70f896472dd699cf"/><file name="xc5.php" hash="141d244dc5372cd0abb688106041166e"/><file name="xc6.php" hash="a938470c97c22df1333b1f4de59d10fc"/><file name="xc7.php" hash="6e9e2dbc3b5f8d102ea63fc5599900d2"/><file name="xc8.php" hash="e6a8179a9e4b497e8d04e8ca6240a5d8"/><file name="xc9.php" hash="bf4e9f9324133fa15dd925b4558f258e"/><file name="xca.php" hash="897dd8dd4c588ca9cd34f5b61b1323a9"/><file name="xcb.php" hash="0df0f5b354a5c251e985dad8b7eafdd3"/><file name="xcc.php" hash="910fed76843cbed1b83bdc42b0217768"/><file name="xcd.php" hash="517dd294b9680ef27979cf492274d91b"/><file name="xce.php" hash="e5039314ab0cc94966820e1a7f986e40"/><file name="xcf.php" hash="b346e1ec9989d5c9995330982bbf1247"/><file name="xd0.php" hash="03586ec3fe0a918af9a5b2e0deec7177"/><file name="xd1.php" hash="a817a0340fbc8600e578218ffedd8f6d"/><file name="xd2.php" hash="41024477c699d431f68d8f56c3f6e85b"/><file name="xd3.php" hash="58fb27e572fa053f32920df9e7cd5a34"/><file name="xd4.php" hash="cd0e76107f22781373ed430500c38fc8"/><file name="xd5.php" hash="5d2258b3806920efde76e95838d5f4c3"/><file name="xd6.php" hash="673fe086f96039b1eb010fcb22ef5028"/><file name="xd7.php" hash="e23e0c525b319c846f92fc43bbb482ba"/><file name="xf9.php" hash="5ce24abde1c4f80a24f9af851fd5ae52"/><file name="xfa.php" hash="0beca78d4119f03af6f6af953239ed40"/><file name="xfb.php" hash="add34b1f16d2a6d2beb6eb9d42a89e32"/><file name="xfc.php" hash="04c1d8d478177fa22b4ccfd75a6f7083"/><file name="xfd.php" hash="6e99507389f70dc22fc5b88086edcaa5"/><file name="xfe.php" hash="6172c6780c7a848d8529e65fb08ccfa6"/><file name="xff.php" hash="6731af770a26cad1dcb3c370aa50aea8"/></dir></dir><dir name="Model"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="17dde650381b5a65dd1c3fc6d942bb2a"/><file name="Category.php" hash="2cd4f37176f394c411f9c705507e81d5"/><file name="Item.php" hash="13654b27109eebf1a6c619e5629bfb5e"/><file name="Price.php" hash="007863c9ab2335d90ce99e297231e950"/></dir></dir><file name="Layer.php" hash="c23bfdfc7bcd8662d40d30b93a98f687"/><dir name="Resource"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="7f235b63e342d77b18da3ffffd97de10"/><file name="Price.php" hash="b72298d29e1b021c4e35bf05acd2c3a3"/></dir></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="10d9f2ce5066e42a3338c1a6018f2643"/></dir></dir><file name="Layer.php" hash="3f980ee1a82354d0bd65edde410a2818"/></dir><dir name="Indexer"><file name="Attribute.php" hash="9d5bd74b9c9204c4aee3fd6f0478688b"/></dir><dir name="Resource"><dir name="Attribute"><file name="Urlkey.php" hash="54d9cd6ecff9198f6db4b584d7ca65b8"/></dir><dir name="Indexer"><file name="Attribute.php" hash="483fdb9cc0429e7111f35403cc5fe1b0"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Seo"><file name="Catalog.php" hash="233ca11b938d6198b5a4400a2c5e1d61"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="CategoryController.php" hash="6d34f9ca5e73384c14f8dd98e0991629"/><file name="ResultController.php" hash="5e520cd6609a0c5f474d956c6a089f89"/></dir><dir name="etc"><file name="adminhtml.xml" hash="240f607b0156d1de84667b382ba3f73c"/><file name="config.xml" hash="84497b48a381ac370292a3ac70d3a7b1"/><file name="system.xml" hash="aedb1897f2d1f3f062e626c7c35ee314"/></dir><dir name="sql"><dir name="catalin_seo_setup"><file name="install-2.0.0.php" hash="1f1e47269b9658b4a3f53cb17ba728e1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="catalin_seo.xml" hash="61db99f6cfd6fe7bd52b8e0093f34643"/></dir><dir name="template"><dir name="catalin_seo"><dir><dir name="catalog"><dir name="layer"><file name="filter.phtml" hash="cc5acd4dbad707f881a74726cd91857c"/><file name="price.phtml" hash="9c14c521b8cfef1c9b3e0ecc88ac0d95"/><file name="view.phtml" hash="561a2287bdbea3653c6a003706819b07"/></dir><dir name="product"><file name="list.phtml" hash="439011ed74a9d1fa4340935891a8ab2c"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="catalin_seo"><file name="style.css" hash="fca26e893de5054621ad8f8722371fc7"/></dir></dir><dir name="images"><dir name="catalin_seo"><file name="bkg_slider.png" hash="898eb55265200836a479588ed54e1309"/><file name="slider.png" hash="b95e0855075c3a854a220dc886445ea0"/></dir></dir><dir name="js"><dir name="catalin_seo"><file name="handler.js" hash="a6d2ef5787f3fd329c54f68b07225fd4"/><file name="native.history.js" hash="5d8d6becc18cc0c370aa1a562e532ade"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Catalin_SEO.xml" hash="e0ad01abfe976aefb6587fcfb3bf0d2b"/></dir></target></contents>
|
30 |
<compatible/>
|
31 |
-
<dependencies><required><php><min>5.
|
32 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Catalin_Seo</name>
|
4 |
+
<version>2.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
17 |
</ul>
|
18 |
<p>All the above features can be enabled/disabled from backend from "System -> Configuration -> Catalin SEO -> Catalog Layered Navigation"</p></description>
|
19 |
<notes>- fixed layout issues for the Magento 1.9 theme
|
20 |
+
- minimum PHP version 5.3.0</notes>
|
|
|
|
|
|
|
|
|
|
|
21 |
<authors><author><name>Catalin Ciobanu</name><user>catalin_ciobanu</user><email>caciobanu@gmail.com</email></author></authors>
|
22 |
+
<date>2014-12-10</date>
|
23 |
+
<time>20:14:53</time>
|
24 |
+
<contents><target name="magecommunity"><dir name="Catalin"><dir name="SEO"><dir name="Block"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="decdc5633827964ff7aba28f8e8f89ff"/><file name="Price.php" hash="1a0f2b2c455e50614a4ac1694640cd56"/></dir><file name="State.php" hash="fd21c5a6603427ae81e7eddbef3d827f"/></dir><dir name="Product"><dir name="List"><file name="Pager.php" hash="7720a417475b5a512d383fd06242e43a"/><file name="Toolbar.php" hash="1624c89efb4f94ed1f35622c70fd3d9a"/></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="697d6770827be3bbda4cbe8baf2054b6"/></dir></dir></dir></dir><dir name="Controller"><file name="Router.php" hash="22133b902420683a41df3a6b935a84b7"/></dir><dir name="Helper"><file name="Data.php" hash="513ad6d9c86166adb5749e856c8eb83d"/><dir name="data"><file name="x00.php" hash="450182e4917ae346e6e64c17ffb63e97"/><file name="x01.php" hash="8e4880febe04e8bbc68c6ee6bc14f112"/><file name="x02.php" hash="919566cf560d5865a4f347cb0cf5ce30"/><file name="x03.php" hash="14dcbdbcde12f478d8657da808fe643d"/><file name="x04.php" hash="b4ca085c2a79244199f079d01c7e2c6b"/><file name="x05.php" hash="3797d79ee103c227f650d39da9bf0fb6"/><file name="x06.php" hash="e4faf649ef87968f2b58f9644687de2c"/><file name="x07.php" hash="5dc7d9d484aa28d77edd934c47cbb38c"/><file name="x09.php" hash="63337e20c61da6c5b5842c39bbfcd033"/><file name="x0a.php" hash="df2383cac3d3164a054d123e428a6ef0"/><file name="x0b.php" hash="55bf005378faa332a988145edfe65bfe"/><file name="x0c.php" hash="d3b45c5fd9d6794907523233e7b5ef73"/><file name="x0d.php" hash="0efd5f8911480341c1c5d9dd2cd96eab"/><file name="x0e.php" hash="00bafa974dd7e72e3cdfa84460146743"/><file name="x0f.php" hash="c5ab298134b47c79f2317ce291f29091"/><file name="x10.php" hash="db5df20e88ef152852d51108a28faf68"/><file name="x11.php" hash="6dbce9e90d9d1c2bffd476fffd9c81ad"/><file name="x12.php" hash="1911521e2aa3cc389e74b33282c80b5a"/><file name="x13.php" hash="ac373e87af343f2f39586f6e01f3bc7a"/><file name="x14.php" hash="618d7ca14ced92c68225108c1fdf3d1f"/><file name="x15.php" hash="6019f2cf672cfcf4486742d640ca0a49"/><file name="x16.php" hash="363b81373dd510f53444d2fca01500d0"/><file name="x17.php" hash="0075d26788b3147ee1b93f1fbe4abcb5"/><file name="x18.php" hash="382dcd23cdbb6a2c1585f91d528aae5c"/><file name="x1e.php" hash="e0d2195ccdb96cf4ea345715de4a2fe0"/><file name="x1f.php" hash="13fffadc97ef3445cbd4969d347b8d32"/><file name="x20.php" hash="ad43141b04fb6d7bab183e13354acb13"/><file name="x21.php" hash="eb84515b6f6be292bf81c576e6ed0b0f"/><file name="x22.php" hash="51ade912682064603ca54b20ecaa9334"/><file name="x23.php" hash="2b153cbc0e81d3151c1ec44e6accd682"/><file name="x24.php" hash="98d4b201e8c670219cc7569e28653d1c"/><file name="x25.php" hash="ee79b56b8b4c5a79af30c30e74b2de22"/><file name="x26.php" hash="88c02bafbf73d21d21c59768419b0c2a"/><file name="x27.php" hash="72bb13e4b32fbf9a174b5d35e6264159"/><file name="x28.php" hash="dcbe588e9d301c627f1dc5ebea623f35"/><file name="x2e.php" hash="a506c372cb82f9e84a514075b788914b"/><file name="x2f.php" hash="577fb5f9d9968471a95906c840c4ec97"/><file name="x30.php" hash="be9214f6b21c651fdd8a7f0ff624826e"/><file name="x31.php" hash="09cb141e4e5b15715b4eb092ff62f6ce"/><file name="x32.php" hash="5781ef2460e4fc93260899c37f3ca6af"/><file name="x33.php" hash="582fcde78a8bb85f11a4c6098b523234"/><file name="x4d.php" hash="8842aa5496002094ae68b2ddc10b3dcc"/><file name="x4e.php" hash="b0d1ed31e7268c2fe7fda95e1eba8bed"/><file name="x4f.php" hash="841625fff58304e2171fef729e6ed695"/><file name="x50.php" hash="dbcc2470e51be09e4d36b8c3ab07767d"/><file name="x51.php" hash="fd96d946cd328ac8e2041b99d64cf37d"/><file name="x52.php" hash="5e3a9fa55c4c8de7d3438b11d930c3ca"/><file name="x53.php" hash="29603023fa46a48c75a5cd5149823894"/><file name="x54.php" hash="3b8da5215b64deecc23f6b51f1c0510d"/><file name="x55.php" hash="06814d53163929c319af8c2a49edcd9b"/><file name="x56.php" hash="2b2ebbadb098a2353ddd659fb8ccb7cd"/><file name="x57.php" hash="725cd6c2ce9ecc6ceaf9aee144741984"/><file name="x58.php" hash="ac31204c457ab7a814ff53939d68447c"/><file name="x59.php" hash="48c0049cb0eb14d13f98cf6c12103db0"/><file name="x5a.php" hash="2ae0dbe06a3d97ae9bcd25fb94fd31c3"/><file name="x5b.php" hash="14f157d36788f292258ed9a83de5da73"/><file name="x5c.php" hash="50bcac83e76c63281f8985320e6e830a"/><file name="x5d.php" hash="862216f95a3590d28cebf287a25c5746"/><file name="x5e.php" hash="fbffe7592bfbe00e9999dde4c83d601d"/><file name="x5f.php" hash="9a87b39043670fdd7cfe07fd49279e22"/><file name="x60.php" hash="e160340e86644fd83c1800026dea241f"/><file name="x61.php" hash="eb3b4d5a8108ba0d1b4f9bd67fadd817"/><file name="x62.php" hash="3e558391bc4ed3768e13e0cace21bcc5"/><file name="x63.php" hash="ade79f321bb4449620e86a77b556a4c4"/><file name="x64.php" hash="664368342658a4aed7853d9a2d65d750"/><file name="x65.php" hash="a1bbc07e58b13d99ed4302ec4e67f4b2"/><file name="x66.php" hash="2f17f60177981e12be650c13f04a49e0"/><file name="x67.php" hash="3a4b21418a78042243721c98f28968d8"/><file name="x68.php" hash="1b8b4ce217986cc3f7550f16e8db1780"/><file name="x69.php" hash="6def6c5b5e469c806a6b38827d0c34f5"/><file name="x6a.php" hash="9fae911d681a0c625fc6e5151ae44d28"/><file name="x6b.php" hash="245472ec4357e0b25da3d16140bcf6d1"/><file name="x6c.php" hash="28fc6a8e4660a0b50566e850e2afc6a3"/><file name="x6d.php" hash="18f83b6b5a6f55520f975057fef4fa3a"/><file name="x6e.php" hash="df5ab12708cd053e6ec8b2228380adbb"/><file name="x6f.php" hash="866c65a813461f43324a24cb463cf4bb"/><file name="x70.php" hash="daf8e99c570287fa4bdac6c353884937"/><file name="x71.php" hash="6b136f7c2a07422d1c0120ff39677b8f"/><file name="x72.php" hash="3312f70e586836e16b3802d24f828888"/><file name="x73.php" hash="010e32351d3ee643e8b4464d391eb51f"/><file name="x74.php" hash="d9c0fb5bb46813b9fd7078d2054ca0b1"/><file name="x75.php" hash="34ee63177ea043bea198fe191327d6e0"/><file name="x76.php" hash="8e1cd7e7db6f45f2e1288ebb90eb31e6"/><file name="x77.php" hash="9e295e80d931332ace899152972f34a0"/><file name="x78.php" hash="ef15567cc00457ca734d18a021b5e52d"/><file name="x79.php" hash="41467fa793d377d10980ab2256993a29"/><file name="x7a.php" hash="bc618f669de10280de11c8678f4d651f"/><file name="x7b.php" hash="d065d37d486d53273b18b0b9f9dd86b2"/><file name="x7c.php" hash="5921121839baed16b78cc36145b52a62"/><file name="x7d.php" hash="f0077edfa1f9859d0f14d3bab15bef0c"/><file name="x7e.php" hash="63d1daf0b583b4c4a66c011894a8cc98"/><file name="x7f.php" hash="c688c38a38e171755e43e905a69e339a"/><file name="x80.php" hash="9070a439e5c0b2ea086f11863746cafb"/><file name="x81.php" hash="06f4d64caf41f3d985caea14ab3a31b0"/><file name="x82.php" hash="6cb491f40badaeaa3f9f292f5bfca217"/><file name="x83.php" hash="d9d39c5e7130705f69b46647f5af8250"/><file name="x84.php" hash="38c71fc265e5b1d431cf2b58e163eaa2"/><file name="x85.php" hash="b112d31fa357b3d3b67842a77cb5310a"/><file name="x86.php" hash="d7fa4167950da670cadd2d451f1a2edb"/><file name="x87.php" hash="80a3ab6690073fe3775ec81f2ee35013"/><file name="x88.php" hash="e05489231b1d4915c42997dec89b15cb"/><file name="x89.php" hash="19d3087264c2dbed0ffa4cd47c6f2853"/><file name="x8a.php" hash="093885354302b9898b8851e09444fd96"/><file name="x8b.php" hash="05588068116c641f70c7e459632f5394"/><file name="x8c.php" hash="b098af3f0e138b56ab8411b2cde600b9"/><file name="x8d.php" hash="a9cb4c30252f615dc452041ccf651467"/><file name="x8e.php" hash="53a2cd6937d88c19f8e1ae228a65c830"/><file name="x8f.php" hash="4e0c37fe92418505c7c4612eb8251e3a"/><file name="x90.php" hash="1112c376c17c3aba6f958dbff6d15362"/><file name="x91.php" hash="f9eeb625c3c66af15a8d82f1db0cdc15"/><file name="x92.php" hash="3be097a2d595bf46323de0661161846c"/><file name="x93.php" hash="beac90d08e9c9753c90afd26db2ad1d0"/><file name="x94.php" hash="45555c59ed7e9e9a0abc470d272835ad"/><file name="x95.php" hash="8ee187be6fbeb7fe3297baa9c89ea6dd"/><file name="x96.php" hash="57b310726908124b27f6ac0d7a5aa95b"/><file name="x97.php" hash="fcfa660695fc43f0ef974416d6417ec2"/><file name="x98.php" hash="88b0e6407503716e4e8d221f77e63f00"/><file name="x99.php" hash="a0924c478967313bd96ca5bc62b955a0"/><file name="x9a.php" hash="d8e1f4684908ffea274e7d62f9b7f210"/><file name="x9b.php" hash="ff855336ea0962b81d9410eea22a8eca"/><file name="x9c.php" hash="9866a2f684ac602cac02ba02f66bdacf"/><file name="x9d.php" hash="64b8d5235c86678f88b3adc1fff2b944"/><file name="x9e.php" hash="c9fad776841bc34fc5fd7700797b65f4"/><file name="x9f.php" hash="f1c6d6cbb8ac5fb5c76e7489bef8774d"/><file name="xa0.php" hash="f27b2025d8a2dc84d5821ee0de443243"/><file name="xa1.php" hash="9079b3e07655b0536153c70d09f2dd41"/><file name="xa2.php" hash="43abb79aa36b6575be2072aca536e770"/><file name="xa3.php" hash="ac0f7f693a8b9b15c14c7e93d16e44d4"/><file name="xa4.php" hash="673c5ca4d9faa59ae7c1fbde0618714d"/><file name="xac.php" hash="113f809d9d7c474d80588d240639dc2f"/><file name="xad.php" hash="16010ec214c0bd856ff4880aba557b18"/><file name="xae.php" hash="c01cb4a18ef68ae1e793e947857e6a72"/><file name="xaf.php" hash="98f242cb0bc7429a5a450e9c82d462db"/><file name="xb0.php" hash="7f37bfe7e9782a8702a8bac106a45627"/><file name="xb1.php" hash="f7105123854bb619b232c2fd9502715a"/><file name="xb2.php" hash="824a10352cf082b71df114bc9362eb3c"/><file name="xb3.php" hash="fabb7f1a18d2632127f405ed5b419f61"/><file name="xb4.php" hash="eff9e802c59769e6f6255ebe3e4c5cb6"/><file name="xb5.php" hash="cbf6d291c99528a3564c1d3ff3a777b3"/><file name="xb6.php" hash="b0d1ab9d95e1e6e82c69a399311df856"/><file name="xb7.php" hash="a685d5656e8f31212e01f64afc6298fc"/><file name="xb8.php" hash="fd7a9295e32870eec0889695a6be3f6c"/><file name="xb9.php" hash="abb9c74fe83846f07826bf6044640e23"/><file name="xba.php" hash="36d7426647eedf90b52cf38f54c1cb0e"/><file name="xbb.php" hash="d547091bb8a6390ef90957c7687b0ab4"/><file name="xbc.php" hash="078a5499d2429ae0460d0277bbdb525d"/><file name="xbd.php" hash="bd9b10559360179d75cd84a389c75f15"/><file name="xbe.php" hash="624c0d43f2f9cf75a1e7da423ef46b07"/><file name="xbf.php" hash="51213b7f0991eb46aee2a1ce730b76e7"/><file name="xc0.php" hash="1a8012c0f8d16de7a93deb57d9907fc0"/><file name="xc1.php" hash="17faeb0f134d296e73b87d31820c7b45"/><file name="xc2.php" hash="95182ef9085fceca36ca1fcd60b6532f"/><file name="xc3.php" hash="a472ff382a6d1b5b43535f0ea339a06d"/><file name="xc4.php" hash="9afbcb6b0f0664ff70f896472dd699cf"/><file name="xc5.php" hash="141d244dc5372cd0abb688106041166e"/><file name="xc6.php" hash="a938470c97c22df1333b1f4de59d10fc"/><file name="xc7.php" hash="6e9e2dbc3b5f8d102ea63fc5599900d2"/><file name="xc8.php" hash="e6a8179a9e4b497e8d04e8ca6240a5d8"/><file name="xc9.php" hash="bf4e9f9324133fa15dd925b4558f258e"/><file name="xca.php" hash="897dd8dd4c588ca9cd34f5b61b1323a9"/><file name="xcb.php" hash="0df0f5b354a5c251e985dad8b7eafdd3"/><file name="xcc.php" hash="910fed76843cbed1b83bdc42b0217768"/><file name="xcd.php" hash="517dd294b9680ef27979cf492274d91b"/><file name="xce.php" hash="e5039314ab0cc94966820e1a7f986e40"/><file name="xcf.php" hash="b346e1ec9989d5c9995330982bbf1247"/><file name="xd0.php" hash="03586ec3fe0a918af9a5b2e0deec7177"/><file name="xd1.php" hash="a817a0340fbc8600e578218ffedd8f6d"/><file name="xd2.php" hash="41024477c699d431f68d8f56c3f6e85b"/><file name="xd3.php" hash="58fb27e572fa053f32920df9e7cd5a34"/><file name="xd4.php" hash="cd0e76107f22781373ed430500c38fc8"/><file name="xd5.php" hash="5d2258b3806920efde76e95838d5f4c3"/><file name="xd6.php" hash="673fe086f96039b1eb010fcb22ef5028"/><file name="xd7.php" hash="e23e0c525b319c846f92fc43bbb482ba"/><file name="xf9.php" hash="5ce24abde1c4f80a24f9af851fd5ae52"/><file name="xfa.php" hash="0beca78d4119f03af6f6af953239ed40"/><file name="xfb.php" hash="add34b1f16d2a6d2beb6eb9d42a89e32"/><file name="xfc.php" hash="04c1d8d478177fa22b4ccfd75a6f7083"/><file name="xfd.php" hash="6e99507389f70dc22fc5b88086edcaa5"/><file name="xfe.php" hash="6172c6780c7a848d8529e65fb08ccfa6"/><file name="xff.php" hash="6731af770a26cad1dcb3c370aa50aea8"/></dir></dir><dir name="Model"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="17dde650381b5a65dd1c3fc6d942bb2a"/><file name="Category.php" hash="2cd4f37176f394c411f9c705507e81d5"/><file name="Item.php" hash="13654b27109eebf1a6c619e5629bfb5e"/><file name="Price.php" hash="f860335f254a7a23ce337271998c9448"/></dir></dir><file name="Layer.php" hash="9312ca287fc78fb9ccd62a113e32f4d1"/><dir name="Resource"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="7f235b63e342d77b18da3ffffd97de10"/><file name="Price.php" hash="b72298d29e1b021c4e35bf05acd2c3a3"/></dir></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="fba5ffa8f4fe3f5f644bd9b9d514e873"/></dir></dir><file name="Layer.php" hash="6b58c6d92dca299b6aaa5ee232251ae1"/></dir><dir name="Indexer"><file name="Attribute.php" hash="54b46dac272417bab35b2e0ba645ce22"/></dir><dir name="Resource"><dir name="Attribute"><file name="Urlkey.php" hash="54d9cd6ecff9198f6db4b584d7ca65b8"/></dir><dir name="Indexer"><file name="Attribute.php" hash="5cfad3d9fa13cb679705db9b528722b1"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Seo"><file name="Catalog.php" hash="233ca11b938d6198b5a4400a2c5e1d61"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="CategoryController.php" hash="6d34f9ca5e73384c14f8dd98e0991629"/><file name="ResultController.php" hash="590a78422cde57a1ce1b5bae0bbf2134"/></dir><dir name="etc"><file name="adminhtml.xml" hash="240f607b0156d1de84667b382ba3f73c"/><file name="config.xml" hash="84497b48a381ac370292a3ac70d3a7b1"/><file name="system.xml" hash="aedb1897f2d1f3f062e626c7c35ee314"/></dir><dir name="sql"><dir name="catalin_seo_setup"><file name="install-2.0.0.php" hash="1f1e47269b9658b4a3f53cb17ba728e1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="catalin_seo.xml" hash="61db99f6cfd6fe7bd52b8e0093f34643"/></dir><dir name="template"><dir name="catalin_seo"><dir><dir name="catalog"><dir name="layer"><file name="filter.phtml" hash="cc5acd4dbad707f881a74726cd91857c"/><file name="price.phtml" hash="9c14c521b8cfef1c9b3e0ecc88ac0d95"/><file name="view.phtml" hash="561a2287bdbea3653c6a003706819b07"/></dir><dir name="product"><file name="list.phtml" hash="439011ed74a9d1fa4340935891a8ab2c"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="catalin_seo"><file name="style.css" hash="fca26e893de5054621ad8f8722371fc7"/></dir></dir><dir name="images"><dir name="catalin_seo"><file name="bkg_slider.png" hash="898eb55265200836a479588ed54e1309"/><file name="slider.png" hash="b95e0855075c3a854a220dc886445ea0"/></dir></dir><dir name="js"><dir name="catalin_seo"><file name="handler.js" hash="35b5eb60d87a91c1e6483be2ddae87db"/><file name="native.history.js" hash="5d8d6becc18cc0c370aa1a562e532ade"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Catalin_SEO.xml" hash="e0ad01abfe976aefb6587fcfb3bf0d2b"/></dir></target></contents>
|
25 |
<compatible/>
|
26 |
+
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
</package>
|
skin/frontend/base/default/js/catalin_seo/handler.js
CHANGED
@@ -53,6 +53,9 @@ var CatalinSeoHandler = {
|
|
53 |
layer: transport.responseJSON.layer
|
54 |
}, url, true);
|
55 |
self.ajaxListener();
|
|
|
|
|
|
|
56 |
} else {
|
57 |
$('ajax-errors').show();
|
58 |
}
|
@@ -144,9 +147,180 @@ var CatalinSeoHandler = {
|
|
144 |
$('catalog-listing').update(State.data.listing);
|
145 |
$('layered-navigation').update(State.data.layer);
|
146 |
self.ajaxListener();
|
|
|
|
|
|
|
147 |
}
|
148 |
});
|
149 |
})(window.History);
|
150 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
}
|
53 |
layer: transport.responseJSON.layer
|
54 |
}, url, true);
|
55 |
self.ajaxListener();
|
56 |
+
self.toggleContent();
|
57 |
+
self.alignProductGridActions();
|
58 |
+
self.blockCollapsing();
|
59 |
} else {
|
60 |
$('ajax-errors').show();
|
61 |
}
|
147 |
$('catalog-listing').update(State.data.listing);
|
148 |
$('layered-navigation').update(State.data.layer);
|
149 |
self.ajaxListener();
|
150 |
+
self.toggleContent();
|
151 |
+
self.alignProductGridActions();
|
152 |
+
self.blockCollapsing();
|
153 |
}
|
154 |
});
|
155 |
})(window.History);
|
156 |
});
|
157 |
+
},
|
158 |
+
toggleContent: function() {
|
159 |
+
// ==============================================
|
160 |
+
// UI Pattern - Toggle Content (tabs and accordions in one setup)
|
161 |
+
// ==============================================
|
162 |
+
|
163 |
+
$j('.toggle-content').each(function () {
|
164 |
+
var wrapper = jQuery(this);
|
165 |
+
|
166 |
+
var hasTabs = wrapper.hasClass('tabs');
|
167 |
+
var hasAccordion = wrapper.hasClass('accordion');
|
168 |
+
var startOpen = wrapper.hasClass('open');
|
169 |
+
|
170 |
+
var dl = wrapper.children('dl:first');
|
171 |
+
var dts = dl.children('dt');
|
172 |
+
var panes = dl.children('dd');
|
173 |
+
var groups = new Array(dts, panes);
|
174 |
+
|
175 |
+
//Create a ul for tabs if necessary.
|
176 |
+
if (hasTabs) {
|
177 |
+
var ul = jQuery('<ul class="toggle-tabs"></ul>');
|
178 |
+
dts.each(function () {
|
179 |
+
var dt = jQuery(this);
|
180 |
+
var li = jQuery('<li></li>');
|
181 |
+
li.html(dt.html());
|
182 |
+
ul.append(li);
|
183 |
+
});
|
184 |
+
ul.insertBefore(dl);
|
185 |
+
var lis = ul.children();
|
186 |
+
groups.push(lis);
|
187 |
+
}
|
188 |
+
|
189 |
+
//Add "last" classes.
|
190 |
+
var i;
|
191 |
+
for (i = 0; i < groups.length; i++) {
|
192 |
+
groups[i].filter(':last').addClass('last');
|
193 |
+
}
|
194 |
+
|
195 |
+
function toggleClasses(clickedItem, group) {
|
196 |
+
var index = group.index(clickedItem);
|
197 |
+
var i;
|
198 |
+
for (i = 0; i < groups.length; i++) {
|
199 |
+
groups[i].removeClass('current');
|
200 |
+
groups[i].eq(index).addClass('current');
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
//Toggle on tab (dt) click.
|
205 |
+
dts.on('click', function (e) {
|
206 |
+
//They clicked the current dt to close it. Restore the wrapper to unclicked state.
|
207 |
+
if (jQuery(this).hasClass('current') && wrapper.hasClass('accordion-open')) {
|
208 |
+
wrapper.removeClass('accordion-open');
|
209 |
+
} else {
|
210 |
+
//They're clicking something new. Reflect the explicit user interaction.
|
211 |
+
wrapper.addClass('accordion-open');
|
212 |
+
}
|
213 |
+
toggleClasses(jQuery(this), dts);
|
214 |
+
});
|
215 |
+
|
216 |
+
//Toggle on tab (li) click.
|
217 |
+
if (hasTabs) {
|
218 |
+
lis.on('click', function (e) {
|
219 |
+
toggleClasses(jQuery(this), lis);
|
220 |
+
});
|
221 |
+
//Open the first tab.
|
222 |
+
lis.eq(0).trigger('click');
|
223 |
+
}
|
224 |
+
|
225 |
+
//Open the first accordion if desired.
|
226 |
+
if (startOpen) {
|
227 |
+
dts.eq(0).trigger('click');
|
228 |
+
}
|
229 |
+
|
230 |
+
});
|
231 |
+
},
|
232 |
+
alignProductGridActions: function() {
|
233 |
+
// ==============================================
|
234 |
+
// Product Listing - Align action buttons/links
|
235 |
+
// ==============================================
|
236 |
+
|
237 |
+
// Since the number of columns per grid will vary based on the viewport size, the only way to align the action
|
238 |
+
// buttons/links is via JS
|
239 |
+
|
240 |
+
if ($j('.products-grid').length) {
|
241 |
+
|
242 |
+
var alignProductGridActions = function () {
|
243 |
+
// Loop through each product grid on the page
|
244 |
+
$j('.products-grid').each(function(){
|
245 |
+
var gridRows = []; // This will store an array per row
|
246 |
+
var tempRow = [];
|
247 |
+
productGridElements = $j(this).children('li');
|
248 |
+
productGridElements.each(function (index) {
|
249 |
+
// The JS ought to be agnostic of the specific CSS breakpoints, so we are dynamically checking to find
|
250 |
+
// each row by grouping all cells (eg, li elements) up until we find an element that is cleared.
|
251 |
+
// We are ignoring the first cell since it will always be cleared.
|
252 |
+
if ($j(this).css('clear') != 'none' && index != 0) {
|
253 |
+
gridRows.push(tempRow); // Add the previous set of rows to the main array
|
254 |
+
tempRow = []; // Reset the array since we're on a new row
|
255 |
+
}
|
256 |
+
tempRow.push(this);
|
257 |
+
|
258 |
+
// The last row will not contain any cells that clear that row, so we check to see if this is the last cell
|
259 |
+
// in the grid, and if so, we add its row to the array
|
260 |
+
if (productGridElements.length == index + 1) {
|
261 |
+
gridRows.push(tempRow);
|
262 |
+
}
|
263 |
+
});
|
264 |
+
|
265 |
+
$j.each(gridRows, function () {
|
266 |
+
var tallestProductInfo = 0;
|
267 |
+
$j.each(this, function () {
|
268 |
+
// Since this function is called every time the page is resized, we need to remove the min-height
|
269 |
+
// and bottom-padding so each cell can return to its natural size before being measured.
|
270 |
+
$j(this).find('.product-info').css({
|
271 |
+
'min-height': '',
|
272 |
+
'padding-bottom': ''
|
273 |
+
});
|
274 |
+
|
275 |
+
// We are checking the height of .product-info (rather than the entire li), because the images
|
276 |
+
// will not be loaded when this JS is run.
|
277 |
+
var productInfoHeight = $j(this).find('.product-info').height();
|
278 |
+
// Space above .actions element
|
279 |
+
var actionSpacing = 10;
|
280 |
+
// The height of the absolutely positioned .actions element
|
281 |
+
var actionHeight = $j(this).find('.product-info .actions').height();
|
282 |
+
|
283 |
+
// Add height of two elements. This is necessary since .actions is absolutely positioned and won't
|
284 |
+
// be included in the height of .product-info
|
285 |
+
var totalHeight = productInfoHeight + actionSpacing + actionHeight;
|
286 |
+
if (totalHeight > tallestProductInfo) {
|
287 |
+
tallestProductInfo = totalHeight;
|
288 |
+
}
|
289 |
+
|
290 |
+
// Set the bottom-padding to accommodate the height of the .actions element. Note: if .actions
|
291 |
+
// elements are of varying heights, they will not be aligned.
|
292 |
+
$j(this).find('.product-info').css('padding-bottom', actionHeight + 'px');
|
293 |
+
});
|
294 |
+
// Set the height of all .product-info elements in a row to the tallest height
|
295 |
+
$j.each(this, function () {
|
296 |
+
$j(this).find('.product-info').css('min-height', tallestProductInfo);
|
297 |
+
});
|
298 |
+
});
|
299 |
+
});
|
300 |
+
}
|
301 |
+
alignProductGridActions();
|
302 |
+
}
|
303 |
+
},
|
304 |
+
blockCollapsing: function() {
|
305 |
+
// ==============================================
|
306 |
+
// Block collapsing (on smaller viewports)
|
307 |
+
// ==============================================
|
308 |
+
|
309 |
+
enquire.register('(max-width: ' + bp.medium + 'px)', {
|
310 |
+
setup: function () {
|
311 |
+
this.toggleElements = $j(
|
312 |
+
// This selects the menu on the My Account and CMS pages
|
313 |
+
'.col-left-first .block:not(.block-layered-nav) .block-title, ' +
|
314 |
+
'.col-left-first .block-layered-nav .block-subtitle--filter, ' +
|
315 |
+
'.sidebar:not(.col-left-first) .block .block-title'
|
316 |
+
);
|
317 |
+
},
|
318 |
+
match: function () {
|
319 |
+
this.toggleElements.toggleSingle();
|
320 |
+
},
|
321 |
+
unmatch: function () {
|
322 |
+
this.toggleElements.toggleSingle({destruct: true});
|
323 |
+
}
|
324 |
+
});
|
325 |
}
|
326 |
}
|