Catalin_Seo - Version 3.0.0

Version Notes

- fix issues introduced with SUPEE6788
- other improvements

Download this release

Release Info

Developer Catalin Ciobanu
Extension Catalin_Seo
Version 3.0.0
Comparing to
See all releases


Code changes from version 2.1.1 to 3.0.0

Files changed (225) hide show
  1. app/code/community/Catalin/SEO/Block/Catalog/Layer/Filter/Attribute.php +2 -2
  2. app/code/community/Catalin/SEO/Block/Catalog/Layer/Filter/Price.php +5 -5
  3. app/code/community/Catalin/SEO/Block/Catalog/Layer/State.php +1 -1
  4. app/code/community/Catalin/SEO/Block/Catalog/Product/List/Pager.php +2 -2
  5. app/code/community/Catalin/SEO/Block/Catalog/Product/List/Toolbar.php +2 -2
  6. app/code/community/Catalin/SEO/Block/CatalogSearch/Layer/Filter/Attribute.php +1 -1
  7. app/code/community/Catalin/SEO/Block/Enterprise/Catalog/Layer/Filter/Attribute.php +37 -0
  8. app/code/community/Catalin/SEO/Block/Enterprise/CatalogSearch/Layer/Filter/Attribute.php +30 -0
  9. app/code/community/Catalin/SEO/Controller/Router.php +30 -9
  10. app/code/community/Catalin/SEO/Helper/Data.php +70 -178
  11. app/code/community/Catalin/SEO/Helper/data/x00.php +0 -0
  12. app/code/community/Catalin/SEO/Helper/data/x01.php +0 -0
  13. app/code/community/Catalin/SEO/Helper/data/x02.php +0 -0
  14. app/code/community/Catalin/SEO/Helper/data/x03.php +0 -0
  15. app/code/community/Catalin/SEO/Helper/data/x04.php +0 -0
  16. app/code/community/Catalin/SEO/Helper/data/x05.php +0 -0
  17. app/code/community/Catalin/SEO/Helper/data/x06.php +0 -0
  18. app/code/community/Catalin/SEO/Helper/data/x07.php +0 -0
  19. app/code/community/Catalin/SEO/Helper/data/x09.php +0 -0
  20. app/code/community/Catalin/SEO/Helper/data/x0a.php +0 -0
  21. app/code/community/Catalin/SEO/Helper/data/x0b.php +0 -0
  22. app/code/community/Catalin/SEO/Helper/data/x0c.php +0 -0
  23. app/code/community/Catalin/SEO/Helper/data/x0d.php +0 -0
  24. app/code/community/Catalin/SEO/Helper/data/x0e.php +0 -0
  25. app/code/community/Catalin/SEO/Helper/data/x0f.php +0 -0
  26. app/code/community/Catalin/SEO/Helper/data/x10.php +0 -0
  27. app/code/community/Catalin/SEO/Helper/data/x11.php +0 -0
  28. app/code/community/Catalin/SEO/Helper/data/x12.php +0 -0
  29. app/code/community/Catalin/SEO/Helper/data/x13.php +0 -0
  30. app/code/community/Catalin/SEO/Helper/data/x14.php +0 -0
  31. app/code/community/Catalin/SEO/Helper/data/x15.php +0 -0
  32. app/code/community/Catalin/SEO/Helper/data/x16.php +0 -0
  33. app/code/community/Catalin/SEO/Helper/data/x17.php +0 -0
  34. app/code/community/Catalin/SEO/Helper/data/x18.php +0 -0
  35. app/code/community/Catalin/SEO/Helper/data/x1e.php +0 -0
  36. app/code/community/Catalin/SEO/Helper/data/x1f.php +0 -0
  37. app/code/community/Catalin/SEO/Helper/data/x20.php +0 -0
  38. app/code/community/Catalin/SEO/Helper/data/x21.php +0 -0
  39. app/code/community/Catalin/SEO/Helper/data/x22.php +0 -0
  40. app/code/community/Catalin/SEO/Helper/data/x23.php +0 -0
  41. app/code/community/Catalin/SEO/Helper/data/x24.php +0 -0
  42. app/code/community/Catalin/SEO/Helper/data/x25.php +0 -0
  43. app/code/community/Catalin/SEO/Helper/data/x26.php +0 -0
  44. app/code/community/Catalin/SEO/Helper/data/x27.php +0 -0
  45. app/code/community/Catalin/SEO/Helper/data/x28.php +0 -0
  46. app/code/community/Catalin/SEO/Helper/data/x2e.php +0 -0
  47. app/code/community/Catalin/SEO/Helper/data/x2f.php +0 -0
  48. app/code/community/Catalin/SEO/Helper/data/x30.php +0 -0
  49. app/code/community/Catalin/SEO/Helper/data/x31.php +0 -0
  50. app/code/community/Catalin/SEO/Helper/data/x32.php +0 -0
  51. app/code/community/Catalin/SEO/Helper/data/x33.php +0 -0
  52. app/code/community/Catalin/SEO/Helper/data/x4d.php +0 -0
  53. app/code/community/Catalin/SEO/Helper/data/x4e.php +0 -0
  54. app/code/community/Catalin/SEO/Helper/data/x4f.php +0 -0
  55. app/code/community/Catalin/SEO/Helper/data/x50.php +0 -0
  56. app/code/community/Catalin/SEO/Helper/data/x51.php +0 -0
  57. app/code/community/Catalin/SEO/Helper/data/x52.php +0 -0
  58. app/code/community/Catalin/SEO/Helper/data/x53.php +0 -0
  59. app/code/community/Catalin/SEO/Helper/data/x54.php +0 -0
  60. app/code/community/Catalin/SEO/Helper/data/x55.php +0 -0
  61. app/code/community/Catalin/SEO/Helper/data/x56.php +0 -0
  62. app/code/community/Catalin/SEO/Helper/data/x57.php +0 -0
  63. app/code/community/Catalin/SEO/Helper/data/x58.php +0 -0
  64. app/code/community/Catalin/SEO/Helper/data/x59.php +0 -0
  65. app/code/community/Catalin/SEO/Helper/data/x5a.php +0 -0
  66. app/code/community/Catalin/SEO/Helper/data/x5b.php +0 -0
  67. app/code/community/Catalin/SEO/Helper/data/x5c.php +0 -0
  68. app/code/community/Catalin/SEO/Helper/data/x5d.php +0 -0
  69. app/code/community/Catalin/SEO/Helper/data/x5e.php +0 -0
  70. app/code/community/Catalin/SEO/Helper/data/x5f.php +0 -0
  71. app/code/community/Catalin/SEO/Helper/data/x60.php +0 -0
  72. app/code/community/Catalin/SEO/Helper/data/x61.php +0 -0
  73. app/code/community/Catalin/SEO/Helper/data/x62.php +0 -0
  74. app/code/community/Catalin/SEO/Helper/data/x63.php +0 -0
  75. app/code/community/Catalin/SEO/Helper/data/x64.php +0 -0
  76. app/code/community/Catalin/SEO/Helper/data/x65.php +0 -0
  77. app/code/community/Catalin/SEO/Helper/data/x66.php +0 -0
  78. app/code/community/Catalin/SEO/Helper/data/x67.php +0 -0
  79. app/code/community/Catalin/SEO/Helper/data/x68.php +0 -0
  80. app/code/community/Catalin/SEO/Helper/data/x69.php +0 -0
  81. app/code/community/Catalin/SEO/Helper/data/x6a.php +0 -0
  82. app/code/community/Catalin/SEO/Helper/data/x6b.php +0 -0
  83. app/code/community/Catalin/SEO/Helper/data/x6c.php +0 -0
  84. app/code/community/Catalin/SEO/Helper/data/x6d.php +0 -0
  85. app/code/community/Catalin/SEO/Helper/data/x6e.php +0 -0
  86. app/code/community/Catalin/SEO/Helper/data/x6f.php +0 -0
  87. app/code/community/Catalin/SEO/Helper/data/x70.php +0 -0
  88. app/code/community/Catalin/SEO/Helper/data/x71.php +0 -0
  89. app/code/community/Catalin/SEO/Helper/data/x72.php +0 -0
  90. app/code/community/Catalin/SEO/Helper/data/x73.php +0 -0
  91. app/code/community/Catalin/SEO/Helper/data/x74.php +0 -0
  92. app/code/community/Catalin/SEO/Helper/data/x75.php +0 -0
  93. app/code/community/Catalin/SEO/Helper/data/x76.php +0 -0
  94. app/code/community/Catalin/SEO/Helper/data/x77.php +0 -0
  95. app/code/community/Catalin/SEO/Helper/data/x78.php +0 -0
  96. app/code/community/Catalin/SEO/Helper/data/x79.php +0 -0
  97. app/code/community/Catalin/SEO/Helper/data/x7a.php +0 -0
  98. app/code/community/Catalin/SEO/Helper/data/x7b.php +0 -0
  99. app/code/community/Catalin/SEO/Helper/data/x7c.php +0 -0
  100. app/code/community/Catalin/SEO/Helper/data/x7d.php +0 -0
  101. app/code/community/Catalin/SEO/Helper/data/x7e.php +0 -0
  102. app/code/community/Catalin/SEO/Helper/data/x7f.php +0 -0
  103. app/code/community/Catalin/SEO/Helper/data/x80.php +0 -0
  104. app/code/community/Catalin/SEO/Helper/data/x81.php +0 -0
  105. app/code/community/Catalin/SEO/Helper/data/x82.php +0 -0
  106. app/code/community/Catalin/SEO/Helper/data/x83.php +0 -0
  107. app/code/community/Catalin/SEO/Helper/data/x84.php +0 -0
  108. app/code/community/Catalin/SEO/Helper/data/x85.php +0 -0
  109. app/code/community/Catalin/SEO/Helper/data/x86.php +0 -0
  110. app/code/community/Catalin/SEO/Helper/data/x87.php +0 -0
  111. app/code/community/Catalin/SEO/Helper/data/x88.php +0 -0
  112. app/code/community/Catalin/SEO/Helper/data/x89.php +0 -0
  113. app/code/community/Catalin/SEO/Helper/data/x8a.php +0 -0
  114. app/code/community/Catalin/SEO/Helper/data/x8b.php +0 -0
  115. app/code/community/Catalin/SEO/Helper/data/x8c.php +0 -0
  116. app/code/community/Catalin/SEO/Helper/data/x8d.php +0 -0
  117. app/code/community/Catalin/SEO/Helper/data/x8e.php +0 -0
  118. app/code/community/Catalin/SEO/Helper/data/x8f.php +0 -0
  119. app/code/community/Catalin/SEO/Helper/data/x90.php +0 -0
  120. app/code/community/Catalin/SEO/Helper/data/x91.php +0 -0
  121. app/code/community/Catalin/SEO/Helper/data/x92.php +0 -0
  122. app/code/community/Catalin/SEO/Helper/data/x93.php +0 -0
  123. app/code/community/Catalin/SEO/Helper/data/x94.php +0 -0
  124. app/code/community/Catalin/SEO/Helper/data/x95.php +0 -0
  125. app/code/community/Catalin/SEO/Helper/data/x96.php +0 -0
  126. app/code/community/Catalin/SEO/Helper/data/x97.php +0 -0
  127. app/code/community/Catalin/SEO/Helper/data/x98.php +0 -0
  128. app/code/community/Catalin/SEO/Helper/data/x99.php +0 -0
  129. app/code/community/Catalin/SEO/Helper/data/x9a.php +0 -0
  130. app/code/community/Catalin/SEO/Helper/data/x9b.php +0 -0
  131. app/code/community/Catalin/SEO/Helper/data/x9c.php +0 -0
  132. app/code/community/Catalin/SEO/Helper/data/x9d.php +0 -0
  133. app/code/community/Catalin/SEO/Helper/data/x9e.php +0 -0
  134. app/code/community/Catalin/SEO/Helper/data/x9f.php +0 -0
  135. app/code/community/Catalin/SEO/Helper/data/xa0.php +0 -0
  136. app/code/community/Catalin/SEO/Helper/data/xa1.php +0 -0
  137. app/code/community/Catalin/SEO/Helper/data/xa2.php +0 -0
  138. app/code/community/Catalin/SEO/Helper/data/xa3.php +0 -0
  139. app/code/community/Catalin/SEO/Helper/data/xa4.php +0 -0
  140. app/code/community/Catalin/SEO/Helper/data/xac.php +0 -0
  141. app/code/community/Catalin/SEO/Helper/data/xad.php +0 -0
  142. app/code/community/Catalin/SEO/Helper/data/xae.php +0 -0
  143. app/code/community/Catalin/SEO/Helper/data/xaf.php +0 -0
  144. app/code/community/Catalin/SEO/Helper/data/xb0.php +0 -0
  145. app/code/community/Catalin/SEO/Helper/data/xb1.php +0 -0
  146. app/code/community/Catalin/SEO/Helper/data/xb2.php +0 -0
  147. app/code/community/Catalin/SEO/Helper/data/xb3.php +0 -0
  148. app/code/community/Catalin/SEO/Helper/data/xb4.php +0 -0
  149. app/code/community/Catalin/SEO/Helper/data/xb5.php +0 -0
  150. app/code/community/Catalin/SEO/Helper/data/xb6.php +0 -0
  151. app/code/community/Catalin/SEO/Helper/data/xb7.php +0 -0
  152. app/code/community/Catalin/SEO/Helper/data/xb8.php +0 -0
  153. app/code/community/Catalin/SEO/Helper/data/xb9.php +0 -0
  154. app/code/community/Catalin/SEO/Helper/data/xba.php +0 -0
  155. app/code/community/Catalin/SEO/Helper/data/xbb.php +0 -0
  156. app/code/community/Catalin/SEO/Helper/data/xbc.php +0 -0
  157. app/code/community/Catalin/SEO/Helper/data/xbd.php +0 -0
  158. app/code/community/Catalin/SEO/Helper/data/xbe.php +0 -0
  159. app/code/community/Catalin/SEO/Helper/data/xbf.php +0 -0
  160. app/code/community/Catalin/SEO/Helper/data/xc0.php +0 -0
  161. app/code/community/Catalin/SEO/Helper/data/xc1.php +0 -0
  162. app/code/community/Catalin/SEO/Helper/data/xc2.php +0 -0
  163. app/code/community/Catalin/SEO/Helper/data/xc3.php +0 -0
  164. app/code/community/Catalin/SEO/Helper/data/xc4.php +0 -0
  165. app/code/community/Catalin/SEO/Helper/data/xc5.php +0 -0
  166. app/code/community/Catalin/SEO/Helper/data/xc6.php +0 -0
  167. app/code/community/Catalin/SEO/Helper/data/xc7.php +0 -0
  168. app/code/community/Catalin/SEO/Helper/data/xc8.php +0 -0
  169. app/code/community/Catalin/SEO/Helper/data/xc9.php +0 -0
  170. app/code/community/Catalin/SEO/Helper/data/xca.php +0 -0
  171. app/code/community/Catalin/SEO/Helper/data/xcb.php +0 -0
  172. app/code/community/Catalin/SEO/Helper/data/xcc.php +0 -0
  173. app/code/community/Catalin/SEO/Helper/data/xcd.php +0 -0
  174. app/code/community/Catalin/SEO/Helper/data/xce.php +0 -0
  175. app/code/community/Catalin/SEO/Helper/data/xcf.php +0 -0
  176. app/code/community/Catalin/SEO/Helper/data/xd0.php +0 -0
  177. app/code/community/Catalin/SEO/Helper/data/xd1.php +0 -0
  178. app/code/community/Catalin/SEO/Helper/data/xd2.php +0 -0
  179. app/code/community/Catalin/SEO/Helper/data/xd3.php +0 -0
  180. app/code/community/Catalin/SEO/Helper/data/xd4.php +0 -0
  181. app/code/community/Catalin/SEO/Helper/data/xd5.php +0 -0
  182. app/code/community/Catalin/SEO/Helper/data/xd6.php +0 -0
  183. app/code/community/Catalin/SEO/Helper/data/xd7.php +0 -0
  184. app/code/community/Catalin/SEO/Helper/data/xf9.php +0 -0
  185. app/code/community/Catalin/SEO/Helper/data/xfa.php +0 -0
  186. app/code/community/Catalin/SEO/Helper/data/xfb.php +0 -0
  187. app/code/community/Catalin/SEO/Helper/data/xfc.php +0 -0
  188. app/code/community/Catalin/SEO/Helper/data/xfd.php +0 -0
  189. app/code/community/Catalin/SEO/Helper/data/xfe.php +0 -0
  190. app/code/community/Catalin/SEO/Helper/data/xff.php +0 -0
  191. app/code/community/Catalin/SEO/Model/Catalog/Layer.php +3 -3
  192. app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Attribute.php +20 -5
  193. app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Category.php +6 -6
  194. app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Item.php +13 -13
  195. app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Price.php +4 -4
  196. app/code/community/Catalin/SEO/Model/Catalog/Resource/Layer/Filter/Attribute.php +3 -3
  197. app/code/community/Catalin/SEO/Model/Catalog/Resource/Layer/Filter/Price.php +2 -2
  198. app/code/community/Catalin/SEO/Model/CatalogSearch/Layer.php +2 -2
  199. app/code/community/Catalin/SEO/Model/CatalogSearch/Layer/Filter/Attribute.php +2 -2
  200. app/code/community/Catalin/SEO/Model/Enterprise/Catalog/Layer/Filter/Attribute.php +125 -0
  201. app/code/community/Catalin/SEO/Model/Enterprise/Catalog/Layer/Filter/Category.php +126 -0
  202. app/code/community/Catalin/SEO/Model/Indexer/Attribute.php +3 -2
  203. app/code/community/Catalin/SEO/Model/Resource/Attribute/Urlkey.php +53 -28
  204. app/code/community/Catalin/SEO/Model/Resource/Indexer/Attribute.php +33 -31
  205. app/code/community/Catalin/SEO/Model/System/Config/Backend/Seo/Catalog.php +1 -1
  206. app/code/community/Catalin/SEO/controllers/CategoryController.php +10 -3
  207. app/code/community/Catalin/SEO/controllers/ResultController.php +10 -3
  208. app/code/community/Catalin/SEO/etc/adminhtml.xml +1 -1
  209. app/code/community/Catalin/SEO/etc/config.xml +12 -3
  210. app/code/community/Catalin/SEO/etc/system.xml +3 -3
  211. app/code/community/Catalin/SEO/sql/catalin_seo_setup/install-2.0.0.php +1 -1
  212. app/code/community/Catalin/SEO/sql/catalin_seo_setup/upgrade-2.0.0-3.0.0.php +19 -0
  213. app/design/frontend/base/default/layout/catalin_seo.xml +12 -2
  214. app/design/frontend/base/default/template/catalin_seo/catalog/layer/filter.phtml +0 -0
  215. app/design/frontend/base/default/template/catalin_seo/catalog/layer/price.phtml +0 -0
  216. app/design/frontend/base/default/template/catalin_seo/catalog/layer/view.phtml +0 -0
  217. app/design/frontend/base/default/template/catalin_seo/catalog/product/list.phtml +2 -1
  218. app/etc/modules/Catalin_SEO.xml +1 -1
  219. package.xml +7 -7
  220. skin/frontend/base/default/css/catalin_seo/style.css +0 -0
  221. skin/frontend/base/default/images/catalin_seo/bkg_slider.png +0 -0
  222. skin/frontend/base/default/images/catalin_seo/slider.png +0 -0
  223. skin/frontend/base/default/js/catalin_seo/handler-ee-rwd.js +338 -0
  224. skin/frontend/base/default/js/catalin_seo/handler.js +0 -0
  225. skin/frontend/base/default/js/catalin_seo/native.history.js +0 -0
app/code/community/Catalin/SEO/Block/Catalog/Layer/Filter/Attribute.php CHANGED
@@ -11,7 +11,7 @@
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_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Block_Layer_Filter_Attribute
@@ -34,4 +34,4 @@ class Catalin_SEO_Block_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Bloc
34
  }
35
  }
36
 
37
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Block_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Block_Layer_Filter_Attribute
34
  }
35
  }
36
 
37
+ }
app/code/community/Catalin/SEO/Block/Catalog/Layer/Filter/Price.php CHANGED
@@ -11,7 +11,7 @@
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_Catalog_Layer_Filter_Price extends Mage_Catalog_Block_Layer_Filter_Price
@@ -59,8 +59,8 @@ class Catalin_SEO_Block_Catalog_Layer_Filter_Price extends Mage_Catalog_Block_La
59
  */
60
  public function getCurrentMinPriceFilter()
61
  {
62
- list($from, $to) = $this->_filter->getInterval();
63
- $from = floor((float) $from);
64
 
65
  if ($from < $this->getMinPriceFloat()) {
66
  return $this->getMinPriceFloat();
@@ -76,8 +76,8 @@ class Catalin_SEO_Block_Catalog_Layer_Filter_Price extends Mage_Catalog_Block_La
76
  */
77
  public function getCurrentMaxPriceFilter()
78
  {
79
- list($from, $to) = $this->_filter->getInterval();
80
- $to = round((float) $to);
81
 
82
  if ($to == 0 || $to > $this->getMaxPriceFloat()) {
83
  return $this->getMaxPriceFloat();
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Block_Catalog_Layer_Filter_Price extends Mage_Catalog_Block_Layer_Filter_Price
59
  */
60
  public function getCurrentMinPriceFilter()
61
  {
62
+ $interval = $this->_filter->getInterval();
63
+ $from = floor((float) $interval[0]);
64
 
65
  if ($from < $this->getMinPriceFloat()) {
66
  return $this->getMinPriceFloat();
76
  */
77
  public function getCurrentMaxPriceFilter()
78
  {
79
+ $interval = $this->_filter->getInterval();
80
+ $to = round((float) $interval[1]);
81
 
82
  if ($to == 0 || $to > $this->getMaxPriceFloat()) {
83
  return $this->getMaxPriceFloat();
app/code/community/Catalin/SEO/Block/Catalog/Layer/State.php CHANGED
@@ -11,7 +11,7 @@
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_Catalog_Layer_State extends Mage_Catalog_Block_Layer_State
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Block_Catalog_Layer_State extends Mage_Catalog_Block_Layer_State
app/code/community/Catalin/SEO/Block/Catalog/Product/List/Pager.php CHANGED
@@ -11,7 +11,7 @@
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_Catalog_Product_List_Pager extends Mage_Page_Block_Html_Pager
@@ -37,4 +37,4 @@ class Catalin_SEO_Block_Catalog_Product_List_Pager extends Mage_Page_Block_Html_
37
  return $this->helper('catalin_seo')->getPagerUrl($params);
38
  }
39
 
40
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Block_Catalog_Product_List_Pager extends Mage_Page_Block_Html_Pager
37
  return $this->helper('catalin_seo')->getPagerUrl($params);
38
  }
39
 
40
+ }
app/code/community/Catalin/SEO/Block/Catalog/Product/List/Toolbar.php CHANGED
@@ -11,7 +11,7 @@
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_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
@@ -37,4 +37,4 @@ class Catalin_SEO_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_
37
  return $this->helper('catalin_seo')->getPagerUrl($params);
38
  }
39
 
40
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Block_Catalog_Product_List_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
37
  return $this->helper('catalin_seo')->getPagerUrl($params);
38
  }
39
 
40
+ }
app/code/community/Catalin/SEO/Block/CatalogSearch/Layer/Filter/Attribute.php CHANGED
@@ -11,7 +11,7 @@
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
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
app/code/community/Catalin/SEO/Block/Enterprise/Catalog/Layer/Filter/Attribute.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Enterprise_Catalog_Layer_Filter_Attribute extends Enterprise_Search_Block_Catalog_Layer_Filter_Attribute
18
+ {
19
+
20
+ /**
21
+ * Class constructor
22
+ */
23
+ public function __construct()
24
+ {
25
+ parent::__construct();
26
+
27
+ if ($this->helper('catalin_seo')->isEnabled()
28
+ && $this->helper('catalin_seo')->isMultipleChoiceFiltersEnabled()) {
29
+ /**
30
+ * Modify template for multiple filters rendering
31
+ * It has checkboxes instead of classic links
32
+ */
33
+ $this->setTemplate('catalin_seo/catalog/layer/filter.phtml');
34
+ }
35
+ }
36
+
37
+ }
app/code/community/Catalin/SEO/Block/Enterprise/CatalogSearch/Layer/Filter/Attribute.php ADDED
@@ -0,0 +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_Enterprise_CatalogSearch_Layer_Filter_Attribute extends Catalin_SEO_Block_Enterprise_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 = 'enterprise_search/catalog_layer_filter_attribute';
28
+ }
29
+
30
+ }
app/code/community/Catalin/SEO/Controller/Router.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Catalin Ciobanu
5
  *
@@ -11,7 +10,7 @@
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_Controller_Router extends Mage_Core_Controller_Varien_Router_Standard
@@ -44,8 +43,10 @@ class Catalin_SEO_Controller_Router extends Mage_Core_Controller_Varien_Router_S
44
  }
45
 
46
  $suffix = Mage::getStoreConfig('catalog/seo/category_url_suffix');
47
- $identifier = ltrim($request->getPathInfo(), '/');
48
- $identifier = substr($identifier, 0, strlen($identifier) - strlen($suffix));
 
 
49
  $urlSplit = explode($helper->getRoutingSuffix(), $identifier, 2);
50
 
51
  // Check if it is a link generated by the SEO module
@@ -53,12 +54,23 @@ class Catalin_SEO_Controller_Router extends Mage_Core_Controller_Varien_Router_S
53
  return false;
54
  }
55
 
56
- $urlRewrite = Mage::getModel('core/url_rewrite');
57
- $urlRewrite->setStoreId(Mage::app()->getStore()->getId());
58
  $cat = $urlSplit[0];
59
-
60
- $catPath = $cat . $suffix;
61
- $urlRewrite->loadByRequestPath($catPath);
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  // Check if a valid category is found
64
  if ($urlRewrite->getId()) {
@@ -95,6 +107,8 @@ class Catalin_SEO_Controller_Router extends Mage_Core_Controller_Varien_Router_S
95
  if (!$found) {
96
  return false;
97
  }
 
 
98
 
99
  // Set the required data on $request object
100
  $request->setPathInfo($urlRewrite->getTargetPath());
@@ -108,6 +122,13 @@ class Catalin_SEO_Controller_Router extends Mage_Core_Controller_Varien_Router_S
108
  Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, $catPath
109
  );
110
 
 
 
 
 
 
 
 
111
  // Parse url params
112
  $params = explode('/', trim($urlSplit[1], '/'));
113
  $layerParams = array();
1
  <?php
 
2
  /**
3
  * Catalin Ciobanu
4
  *
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
  * @package Catalin_Seo
13
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
14
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
  */
16
  class Catalin_SEO_Controller_Router extends Mage_Core_Controller_Varien_Router_Standard
43
  }
44
 
45
  $suffix = Mage::getStoreConfig('catalog/seo/category_url_suffix');
46
+ $path = ltrim($request->getPathInfo(), '/');
47
+ $lenSuffix = (strlen($suffix) > 0?strlen($suffix)+1:0);
48
+ $identifier = $helper->getUrlBody($suffix, $path);
49
+
50
  $urlSplit = explode($helper->getRoutingSuffix(), $identifier, 2);
51
 
52
  // Check if it is a link generated by the SEO module
54
  return false;
55
  }
56
 
57
+ // Massage path to load proper request path
 
58
  $cat = $urlSplit[0];
59
+ $catPath = $cat;
60
+ $catPath = $helper->appendSuffix($catPath, $suffix);
61
+
62
+ if(Mage::getEdition() == Mage::EDITION_ENTERPRISE){
63
+ $urlRequest = Mage::getModel('enterprise_urlrewrite/url_rewrite_request');
64
+ $paths = $urlRequest->getSystemPaths($catPath);
65
+
66
+ $urlRewrite = Mage::getModel('enterprise_urlrewrite/url_rewrite');
67
+ $urlRewrite->setStoreId(Mage::app()->getStore()->getId());
68
+ $urlRewrite->loadByRequestPath($paths);
69
+ } else {
70
+ $urlRewrite = Mage::getModel('core/url_rewrite');
71
+ $urlRewrite->setStoreId(Mage::app()->getStore()->getId());
72
+ $urlRewrite->loadByRequestPath($catPath);
73
+ }
74
 
75
  // Check if a valid category is found
76
  if ($urlRewrite->getId()) {
107
  if (!$found) {
108
  return false;
109
  }
110
+
111
+
112
 
113
  // Set the required data on $request object
114
  $request->setPathInfo($urlRewrite->getTargetPath());
122
  Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, $catPath
123
  );
124
 
125
+
126
+ // EE does not have category ID in enteprise_url_rewrite table
127
+ if(Mage::getEdition() == Mage::EDITION_ENTERPRISE){
128
+ list($pathPrefix, $targetPath) = explode('/category/view/id/',$urlRewrite->getTargetPath());
129
+ $request->setParam('id', $targetPath);
130
+ }
131
+
132
  // Parse url params
133
  $params = explode('/', trim($urlSplit[1], '/'));
134
  $layerParams = array();
app/code/community/Catalin/SEO/Helper/Data.php CHANGED
@@ -11,7 +11,7 @@
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_Helper_Data extends Mage_Core_Helper_Data
@@ -24,7 +24,7 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
24
 
25
  /**
26
  * Check if module is enabled or not
27
- *
28
  * @return boolean
29
  */
30
  public function isEnabled()
@@ -34,7 +34,7 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
34
 
35
  /**
36
  * Check if ajax is enabled
37
- *
38
  * @return boolean
39
  */
40
  public function isAjaxEnabled()
@@ -46,8 +46,8 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
46
  }
47
 
48
  /**
49
- * Check if multipe choice filters is enabled
50
- *
51
  * @return boolean
52
  */
53
  public function isMultipleChoiceFiltersEnabled()
@@ -55,12 +55,12 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
55
  if (!$this->isEnabled()) {
56
  return false;
57
  }
58
- return Mage::getStoreConfigFlag('catalin_seo/catalog/multiple_choise_filters');
59
  }
60
 
61
  /**
62
  * Check if price slider is enabled
63
- *
64
  * @return boolean
65
  */
66
  public function isPriceSliderEnabled()
@@ -73,7 +73,7 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
73
 
74
  /**
75
  * Retrieve routing suffix
76
- *
77
  * @return string
78
  */
79
  public function getRoutingSuffix()
@@ -84,7 +84,7 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
84
  /**
85
  * Getter for layered navigation params
86
  * If $params are provided then it overrides the ones from registry
87
- *
88
  * @param array $params
89
  * @return array|null
90
  */
@@ -106,6 +106,8 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
106
  }
107
  }
108
 
 
 
109
  // Sort by key - small SEO improvement
110
  ksort($layerParams);
111
  return $layerParams;
@@ -113,9 +115,8 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
113
 
114
  /**
115
  * Method to get url for layered navigation
116
- *
117
  * @param array $filters array with new filter values
118
- * @param integer $escape to autoescape or not
119
  * @param boolean $noFilters to add filters to the url or not
120
  * @param array $q array with values to add to query string
121
  * @return string
@@ -156,12 +157,14 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
156
 
157
  $urlParts = explode('?', $url);
158
 
159
- $urlParts[0] = substr($urlParts[0], 0, strlen($urlParts[0]) - strlen($suffix));
160
- // Add the suffix to the url - fixes when comming from non suffixed pages
 
161
  // It should always be the last bits in the URL
162
  $urlParts[0] .= $this->getRoutingSuffix();
163
 
164
- $url = $urlParts[0] . $urlPath . $suffix;
 
165
  if (!empty($urlParts[1])) {
166
  $url .= '?' . $urlParts[1];
167
  }
@@ -169,9 +172,43 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
169
  return $url;
170
  }
171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  /**
173
  * Get the url to clear all layered navigation filters
174
- *
175
  * @return string
176
  */
177
  public function getClearFiltersUrl()
@@ -181,7 +218,7 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
181
 
182
  /**
183
  * Get url for layered navigation pagination
184
- *
185
  * @param array $query
186
  * @return string
187
  */
@@ -192,7 +229,7 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
192
 
193
  /**
194
  * Check if we are in the catalog search
195
- *
196
  * @return boolean
197
  */
198
  public function isCatalogSearch()
@@ -208,11 +245,12 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
208
  * Check if a string has utf8 characters in it
209
  *
210
  * @param string $string
211
- * @return boolean $bool
212
  */
213
  public function seemsUtf8($string)
214
  {
215
- for ($i = 0; $i < strlen($string); $i++) {
 
216
  if (ord($string[$i]) < 0x80) {
217
  continue; # 0bbbbbbb
218
  } elseif ((ord($string[$i]) & 0xE0) == 0xC0) {
@@ -237,148 +275,6 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
237
  return true;
238
  }
239
 
240
- /**
241
- * Remove any illegal characters, accents, etc.
242
- *
243
- * @param string $string String to unaccent
244
- * @return string $string Unaccented string
245
- */
246
- public function unaccent($string)
247
- {
248
- if (!preg_match('/[\x80-\xff]/', $string)) {
249
- return $string;
250
- }
251
-
252
- if ($this->seemsUtf8($string)) {
253
- $chars = array(
254
- // Decompositions for Latin-1 Supplement
255
- chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',
256
- chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',
257
- chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',
258
- chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E',
259
- chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E',
260
- chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I',
261
- chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I',
262
- chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N',
263
- chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',
264
- chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',
265
- chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',
266
- chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',
267
- chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',
268
- chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a',
269
- chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a',
270
- chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a',
271
- chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c',
272
- chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',
273
- chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',
274
- chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',
275
- chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',
276
- chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o',
277
- chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o',
278
- chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o',
279
- chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u',
280
- chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u',
281
- chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y',
282
- chr(195) . chr(191) => 'y',
283
- // Decompositions for Latin Extended-A
284
- chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',
285
- chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',
286
- chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',
287
- chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',
288
- chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',
289
- chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',
290
- chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',
291
- chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',
292
- chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',
293
- chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',
294
- chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',
295
- chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',
296
- chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',
297
- chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',
298
- chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',
299
- chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',
300
- chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',
301
- chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',
302
- chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',
303
- chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',
304
- chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',
305
- chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',
306
- chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',
307
- chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',
308
- chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',
309
- chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',
310
- chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',
311
- chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',
312
- chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',
313
- chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',
314
- chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',
315
- chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',
316
- chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',
317
- chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',
318
- chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',
319
- chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',
320
- chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',
321
- chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',
322
- chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',
323
- chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',
324
- chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',
325
- chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',
326
- chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',
327
- chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',
328
- chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',
329
- chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',
330
- chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',
331
- chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',
332
- chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',
333
- chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',
334
- chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',
335
- chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',
336
- chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',
337
- chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',
338
- chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',
339
- chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',
340
- chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',
341
- chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',
342
- chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',
343
- chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',
344
- chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',
345
- chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',
346
- chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',
347
- chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's',
348
- // Euro Sign
349
- chr(226) . chr(130) . chr(172) => 'E',
350
- // GBP (Pound) Sign
351
- chr(194) . chr(163) => '',
352
- 'Ä' => 'Ae', 'ä' => 'ae', 'Ü' => 'Ue', 'ü' => 'ue',
353
- 'Ö' => 'Oe', 'ö' => 'oe', 'ß' => 'ss',
354
- // Norwegian characters
355
- 'Å' => 'Aa', 'Æ' => 'Ae', 'Ø' => 'O', 'æ' => 'a', 'ø' => 'o', 'å' => 'aa'
356
- );
357
-
358
- $string = strtr($string, $chars);
359
- } else {
360
- // Assume ISO-8859-1 if not UTF-8
361
- $chars['in'] = chr(128) . chr(131) . chr(138) . chr(142) . chr(154) . chr(158)
362
- . chr(159) . chr(162) . chr(165) . chr(181) . chr(192) . chr(193) . chr(194)
363
- . chr(195) . chr(196) . chr(197) . chr(199) . chr(200) . chr(201) . chr(202)
364
- . chr(203) . chr(204) . chr(205) . chr(206) . chr(207) . chr(209) . chr(210)
365
- . chr(211) . chr(212) . chr(213) . chr(214) . chr(216) . chr(217) . chr(218)
366
- . chr(219) . chr(220) . chr(221) . chr(224) . chr(225) . chr(226) . chr(227)
367
- . chr(228) . chr(229) . chr(231) . chr(232) . chr(233) . chr(234) . chr(235)
368
- . chr(236) . chr(237) . chr(238) . chr(239) . chr(241) . chr(242) . chr(243)
369
- . chr(244) . chr(245) . chr(246) . chr(248) . chr(249) . chr(250) . chr(251)
370
- . chr(252) . chr(253) . chr(255);
371
-
372
- $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy";
373
-
374
- $string = strtr($string, $chars['in'], $chars['out']);
375
- $doubleChars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254));
376
- $doubleChars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');
377
- $string = str_replace($doubleChars['in'], $doubleChars['out'], $string);
378
- }
379
- return $string;
380
- }
381
-
382
  /**
383
  * US-ASCII transliterations of Unicode text
384
  * Warning: you should only pass this well formed UTF-8!
@@ -386,8 +282,8 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
386
  * characters to - it uses a PHP output buffer to do this - it means, memory use will increase,
387
  * requiring up to the same amount again as the input string
388
  *
389
- * @param string UTF-8 string to convert
390
- * @param string (default = ?) Character use if character unknown
391
  * @return string US-ASCII string
392
  */
393
  public function utf8ToAscii($str, $unknown = '?')
@@ -447,19 +343,6 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
447
  return implode('', $chars);
448
  }
449
 
450
- /**
451
- * Does not transliterate correctly eastern languages
452
- *
453
- * @param string $text
454
- * @param string $separator
455
- * @return string
456
- */
457
- public function urlize($text, $separator = '-')
458
- {
459
- $text = $this->unaccent($text);
460
- return $this->postProcessText($text, $separator);
461
- }
462
-
463
  /**
464
  * Uses transliteration tables to convert any kind of utf8 character
465
  *
@@ -478,8 +361,8 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
478
  /**
479
  * Tests a string as to whether it's valid UTF-8 and supported by the
480
  * Unicode standard
481
- *
482
- * @param string UTF-8 encoded string
483
  * @return boolean true if valid
484
  */
485
  public function validUtf8($str)
@@ -611,4 +494,13 @@ class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
611
  return trim($text, $separator);
612
  }
613
 
 
 
 
 
 
 
 
 
 
614
  }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Helper_Data extends Mage_Core_Helper_Data
24
 
25
  /**
26
  * Check if module is enabled or not
27
+ *
28
  * @return boolean
29
  */
30
  public function isEnabled()
34
 
35
  /**
36
  * Check if ajax is enabled
37
+ *
38
  * @return boolean
39
  */
40
  public function isAjaxEnabled()
46
  }
47
 
48
  /**
49
+ * Check if multiple choice filters is enabled
50
+ *
51
  * @return boolean
52
  */
53
  public function isMultipleChoiceFiltersEnabled()
55
  if (!$this->isEnabled()) {
56
  return false;
57
  }
58
+ return Mage::getStoreConfigFlag('catalin_seo/catalog/multiple_choice_filters');
59
  }
60
 
61
  /**
62
  * Check if price slider is enabled
63
+ *
64
  * @return boolean
65
  */
66
  public function isPriceSliderEnabled()
73
 
74
  /**
75
  * Retrieve routing suffix
76
+ *
77
  * @return string
78
  */
79
  public function getRoutingSuffix()
84
  /**
85
  * Getter for layered navigation params
86
  * If $params are provided then it overrides the ones from registry
87
+ *
88
  * @param array $params
89
  * @return array|null
90
  */
106
  }
107
  }
108
 
109
+ unset($layerParams['isLayerAjax']);
110
+
111
  // Sort by key - small SEO improvement
112
  ksort($layerParams);
113
  return $layerParams;
115
 
116
  /**
117
  * Method to get url for layered navigation
118
+ *
119
  * @param array $filters array with new filter values
 
120
  * @param boolean $noFilters to add filters to the url or not
121
  * @param array $q array with values to add to query string
122
  * @return string
157
 
158
  $urlParts = explode('?', $url);
159
 
160
+ $urlParts[0] = $this->getUrlBody($suffix, $urlParts[0]);
161
+
162
+ // Add the suffix to the url - fixes when coming from non suffixed pages
163
  // It should always be the last bits in the URL
164
  $urlParts[0] .= $this->getRoutingSuffix();
165
 
166
+ $url = $urlParts[0] . $urlPath;
167
+ $url = $this->appendSuffix($url, $suffix);
168
  if (!empty($urlParts[1])) {
169
  $url .= '?' . $urlParts[1];
170
  }
172
  return $url;
173
  }
174
 
175
+ /**
176
+ * Get the url path, including the base url, minus the suffix.
177
+ * Checks for Enterprise and if it is, checks for the dot
178
+ * before returning
179
+ * @param string $suffix
180
+ * @param srting $urlParts
181
+ * @return string
182
+ */
183
+ public function getUrlBody($suffix, $urlParts) {
184
+ if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {
185
+ $lenSuffix = (strlen($suffix) > 0 ? strlen($suffix) + 1 : 0);
186
+ return substr($urlParts, 0, strlen($urlParts) - $lenSuffix);
187
+ } else {
188
+ return substr($urlParts, 0, strlen($urlParts) - strlen($suffix));
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Appends the suffix to the url, if applicable.
194
+ * Checks for Enterprise and if it is, adds the dot
195
+ * before returning
196
+ *
197
+ * @param string $url
198
+ * @param string $suffix
199
+ * @return string
200
+ */
201
+ public function appendSuffix($url, $suffix) {
202
+ if (strlen($suffix) == 0) {
203
+ return $url;
204
+ }
205
+ if (Mage::getEdition() == Mage::EDITION_ENTERPRISE ? $ds = "." : $ds="");
206
+ return $url . $ds . $suffix;
207
+ }
208
+
209
  /**
210
  * Get the url to clear all layered navigation filters
211
+ *
212
  * @return string
213
  */
214
  public function getClearFiltersUrl()
218
 
219
  /**
220
  * Get url for layered navigation pagination
221
+ *
222
  * @param array $query
223
  * @return string
224
  */
229
 
230
  /**
231
  * Check if we are in the catalog search
232
+ *
233
  * @return boolean
234
  */
235
  public function isCatalogSearch()
245
  * Check if a string has utf8 characters in it
246
  *
247
  * @param string $string
248
+ * @return boolean
249
  */
250
  public function seemsUtf8($string)
251
  {
252
+ $length = strlen($string);
253
+ for ($i = 0; $i < $length; $i++) {
254
  if (ord($string[$i]) < 0x80) {
255
  continue; # 0bbbbbbb
256
  } elseif ((ord($string[$i]) & 0xE0) == 0xC0) {
275
  return true;
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  /**
279
  * US-ASCII transliterations of Unicode text
280
  * Warning: you should only pass this well formed UTF-8!
282
  * characters to - it uses a PHP output buffer to do this - it means, memory use will increase,
283
  * requiring up to the same amount again as the input string
284
  *
285
+ * @param string $str UTF-8 string to convert
286
+ * @param string $unknown Character use if character unknown
287
  * @return string US-ASCII string
288
  */
289
  public function utf8ToAscii($str, $unknown = '?')
343
  return implode('', $chars);
344
  }
345
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  /**
347
  * Uses transliteration tables to convert any kind of utf8 character
348
  *
361
  /**
362
  * Tests a string as to whether it's valid UTF-8 and supported by the
363
  * Unicode standard
364
+ *
365
+ * @param string $str UTF-8 encoded string
366
  * @return boolean true if valid
367
  */
368
  public function validUtf8($str)
494
  return trim($text, $separator);
495
  }
496
 
497
+ public function getSkinJsUrl()
498
+ {
499
+ if(Mage::getEdition() == Mage::EDITION_ENTERPRISE){
500
+ return "js/catalin_seo/handler-ee-rwd.js";
501
+ }
502
+
503
+ return "js/catalin_seo/handler.js";
504
+ }
505
+
506
  }
app/code/community/Catalin/SEO/Helper/data/x00.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x01.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x02.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x03.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x04.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x05.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x06.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x07.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x09.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x0a.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x0b.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x0c.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x0d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x0e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x0f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x10.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x11.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x12.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x13.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x14.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x15.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x16.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x17.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x18.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x1e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x1f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x20.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x21.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x22.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x23.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x24.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x25.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x26.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x27.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x28.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x2e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x2f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x30.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x31.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x32.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x33.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x4d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x4e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x4f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x50.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x51.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x52.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x53.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x54.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x55.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x56.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x57.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x58.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x59.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x5a.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x5b.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x5c.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x5d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x5e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x5f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x60.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x61.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x62.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x63.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x64.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x65.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x66.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x67.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x68.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x69.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x6a.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x6b.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x6c.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x6d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x6e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x6f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x70.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x71.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x72.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x73.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x74.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x75.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x76.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x77.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x78.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x79.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x7a.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x7b.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x7c.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x7d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x7e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x7f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x80.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x81.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x82.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x83.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x84.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x85.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x86.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x87.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x88.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x89.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x8a.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x8b.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x8c.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x8d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x8e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x8f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x90.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x91.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x92.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x93.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x94.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x95.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x96.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x97.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x98.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x99.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x9a.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x9b.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x9c.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x9d.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x9e.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/x9f.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xa0.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xa1.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xa2.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xa3.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xa4.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xac.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xad.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xae.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xaf.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb0.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb1.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb2.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb3.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb4.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb5.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb6.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb7.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb8.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xb9.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xba.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xbb.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xbc.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xbd.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xbe.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xbf.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc0.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc1.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc2.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc3.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc4.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc5.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc6.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc7.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc8.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xc9.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xca.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xcb.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xcc.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xcd.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xce.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xcf.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd0.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd1.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd2.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd3.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd4.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd5.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd6.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xd7.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xf9.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xfa.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xfb.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xfc.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xfd.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xfe.php CHANGED
File without changes
app/code/community/Catalin/SEO/Helper/data/xff.php CHANGED
File without changes
app/code/community/Catalin/SEO/Model/Catalog/Layer.php CHANGED
@@ -11,7 +11,7 @@
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
@@ -27,7 +27,7 @@ class Catalin_SEO_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
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
  }
@@ -35,4 +35,4 @@ class Catalin_SEO_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
35
  return $collection;
36
  }
37
 
38
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
27
  $collection = parent::getFilterableAttributes();
28
 
29
  if ($collection instanceof Mage_Catalog_Model_Resource_Product_Attribute_Collection) {
30
+ // Pre-loads all needed attributes at once
31
  $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
32
  $attrUrlKeyModel->preloadAttributesOptions($collection);
33
  }
35
  return $collection;
36
  }
37
 
38
+ }
app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Attribute.php CHANGED
@@ -11,7 +11,7 @@
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_Attribute extends Mage_Catalog_Model_Layer_Filter_Attribute
@@ -77,7 +77,6 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Mode
77
  }
78
 
79
  $attribute = $this->getAttributeModel();
80
- $this->_requestVar = $attribute->getAttributeCode();
81
 
82
  $key = $this->getLayer()->getStateKey() . '_' . $this->_requestVar;
83
  $data = $this->getLayer()->getAggregator()->getCacheData($key);
@@ -97,14 +96,14 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Mode
97
  if (!empty($optionsCount[$option['value']])) {
98
  $data[] = array(
99
  'label' => $option['label'],
100
- 'value' => $attrUrlKeyModel->getUrlKey($attribute->getId(), $option['value']),
101
  'count' => $optionsCount[$option['value']],
102
  );
103
  }
104
  } else {
105
  $data[] = array(
106
  'label' => $option['label'],
107
- 'value' => $attrUrlKeyModel->getUrlKey($attribute->getId(), $option['value']),
108
  'count' => isset($optionsCount[$option['value']]) ? $optionsCount[$option['value']] : 0,
109
  );
110
  }
@@ -122,4 +121,20 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Mode
122
  return $data;
123
  }
124
 
125
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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_Attribute extends Mage_Catalog_Model_Layer_Filter_Attribute
77
  }
78
 
79
  $attribute = $this->getAttributeModel();
 
80
 
81
  $key = $this->getLayer()->getStateKey() . '_' . $this->_requestVar;
82
  $data = $this->getLayer()->getAggregator()->getCacheData($key);
96
  if (!empty($optionsCount[$option['value']])) {
97
  $data[] = array(
98
  'label' => $option['label'],
99
+ 'value' => $attrUrlKeyModel->getUrlValue($attribute->getId(), $option['value']),
100
  'count' => $optionsCount[$option['value']],
101
  );
102
  }
103
  } else {
104
  $data[] = array(
105
  'label' => $option['label'],
106
+ 'value' => $attrUrlKeyModel->getUrlValue($attribute->getId(), $option['value']),
107
  'count' => isset($optionsCount[$option['value']]) ? $optionsCount[$option['value']] : 0,
108
  );
109
  }
121
  return $data;
122
  }
123
 
124
+ /**
125
+ * Set request variable name which is used for apply filter
126
+ *
127
+ * @param string $varName
128
+ * @return Mage_Catalog_Model_Layer_Filter_Abstract
129
+ */
130
+ public function setRequestVar($varName)
131
+ {
132
+ if (Mage::helper('catalin_seo')->isEnabled()) {
133
+ $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
134
+ $varName = $attrUrlKeyModel->getUrlKey($varName);
135
+ }
136
+
137
+ return parent::setRequestVar($varName);
138
+ }
139
+
140
+ }
app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Category.php CHANGED
@@ -11,7 +11,7 @@
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_Category extends Mage_Catalog_Model_Layer_Filter_Category
@@ -23,7 +23,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Category extends Mage_Catalog_Model
23
  * @param Mage_Catalog_Model_Category $category
24
  * @return Varien_Data_Collection_Db
25
  */
26
- protected function _getChildrenCategories(Mage_Catalog_Model_Category $category)
27
  {
28
  $collection = $category->getCollection();
29
  $collection->addAttributeToSelect('url_key')
@@ -52,9 +52,9 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Category extends Mage_Catalog_Model
52
  $data = $this->getLayer()->getAggregator()->getCacheData($key);
53
 
54
  if ($data === null) {
55
- $categoty = $this->getCategory();
56
- /** @var $categoty Mage_Catalog_Model_Category */
57
- $categories = $this->_getChildrenCategories($categoty);
58
 
59
  $this->getLayer()->getProductCollection()
60
  ->addCountToCategories($categories);
@@ -123,4 +123,4 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Category extends Mage_Catalog_Model
123
  return $this;
124
  }
125
 
126
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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_Category extends Mage_Catalog_Model_Layer_Filter_Category
23
  * @param Mage_Catalog_Model_Category $category
24
  * @return Varien_Data_Collection_Db
25
  */
26
+ protected function getChildrenCategories(Mage_Catalog_Model_Category $category)
27
  {
28
  $collection = $category->getCollection();
29
  $collection->addAttributeToSelect('url_key')
52
  $data = $this->getLayer()->getAggregator()->getCacheData($key);
53
 
54
  if ($data === null) {
55
+ $currentCategory = $this->getCategory();
56
+ /** @var $currentCategory Mage_Catalog_Model_Category */
57
+ $categories = $this->getChildrenCategories($currentCategory);
58
 
59
  $this->getLayer()->getProductCollection()
60
  ->addCountToCategories($categories);
123
  return $this;
124
  }
125
 
126
+ }
app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Item.php CHANGED
@@ -11,20 +11,20 @@
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_Item extends Mage_Catalog_Model_Layer_Filter_Item
18
  {
19
 
20
- protected $_helper;
21
 
22
- protected function _helper()
23
  {
24
- if ($this->_helper === null) {
25
- $this->_helper = Mage::helper('catalin_seo');
26
  }
27
- return $this->_helper;
28
  }
29
 
30
  /**
@@ -34,7 +34,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
34
  */
35
  public function getUrl()
36
  {
37
- if (!$this->_helper()->isEnabled()) {
38
  return parent::getUrl();
39
  }
40
 
@@ -48,7 +48,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
48
  $values = $this->getValue();
49
  }
50
 
51
- if ($this->_helper()->isCatalogSearch()) {
52
  $query = array(
53
  'isLayerAjax' => null,
54
  $this->getFilter()->getRequestVar() => $values,
@@ -57,7 +57,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
57
  return Mage::getUrl('*/*/*', array('_current' => true, '_use_rewrite' => true, '_query' => $query));
58
  }
59
 
60
- return $this->_helper()->getFilterUrl(array(
61
  $this->getFilter()->getRequestVar() => $values
62
  ));
63
  }
@@ -69,7 +69,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
69
  */
70
  public function getRemoveUrl()
71
  {
72
- if (!$this->_helper()->isEnabled()) {
73
  return parent::getRemoveUrl();
74
  }
75
 
@@ -84,7 +84,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
84
  } else {
85
  $values = null;
86
  }
87
- if ($this->_helper()->isCatalogSearch()) {
88
  $query = array(
89
  'isLayerAjax' => null,
90
  $this->getFilter()->getRequestVar() => $values
@@ -96,7 +96,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
96
  return Mage::getUrl('*/*/*', $params);
97
  }
98
 
99
- return $this->_helper()->getFilterUrl(array(
100
  $this->getFilter()->getRequestVar() => $values
101
  ));
102
  }
@@ -109,7 +109,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Item extends Mage_Catalog_Model_Lay
109
  public function isSelected()
110
  {
111
  $values = $this->getFilter()->getValues();
112
- if (in_array($this->getValue(), $values)) {
113
  return true;
114
  }
115
  return false;
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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_Item extends Mage_Catalog_Model_Layer_Filter_Item
18
  {
19
 
20
+ protected $helper;
21
 
22
+ protected function helper()
23
  {
24
+ if ($this->helper === null) {
25
+ $this->helper = Mage::helper('catalin_seo');
26
  }
27
+ return $this->helper;
28
  }
29
 
30
  /**
34
  */
35
  public function getUrl()
36
  {
37
+ if (!$this->helper()->isEnabled()) {
38
  return parent::getUrl();
39
  }
40
 
48
  $values = $this->getValue();
49
  }
50
 
51
+ if ($this->helper()->isCatalogSearch()) {
52
  $query = array(
53
  'isLayerAjax' => null,
54
  $this->getFilter()->getRequestVar() => $values,
57
  return Mage::getUrl('*/*/*', array('_current' => true, '_use_rewrite' => true, '_query' => $query));
58
  }
59
 
60
+ return $this->helper()->getFilterUrl(array(
61
  $this->getFilter()->getRequestVar() => $values
62
  ));
63
  }
69
  */
70
  public function getRemoveUrl()
71
  {
72
+ if (!$this->helper()->isEnabled()) {
73
  return parent::getRemoveUrl();
74
  }
75
 
84
  } else {
85
  $values = null;
86
  }
87
+ if ($this->helper()->isCatalogSearch()) {
88
  $query = array(
89
  'isLayerAjax' => null,
90
  $this->getFilter()->getRequestVar() => $values
96
  return Mage::getUrl('*/*/*', $params);
97
  }
98
 
99
+ return $this->helper()->getFilterUrl(array(
100
  $this->getFilter()->getRequestVar() => $values
101
  ));
102
  }
109
  public function isSelected()
110
  {
111
  $values = $this->getFilter()->getValues();
112
+ if (is_array($values) && in_array($this->getValue(), $values)) {
113
  return true;
114
  }
115
  return false;
app/code/community/Catalin/SEO/Model/Catalog/Layer/Filter/Price.php CHANGED
@@ -11,7 +11,7 @@
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
@@ -25,7 +25,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Price extends Mage_Catalog_Model_La
25
  public function getMaxPriceFloat()
26
  {
27
  if (!$this->hasData('max_price_float')) {
28
- $this->_collectPriceRange();
29
  }
30
 
31
  return $this->getData('max_price_float');
@@ -39,7 +39,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Price extends Mage_Catalog_Model_La
39
  public function getMinPriceFloat()
40
  {
41
  if (!$this->hasData('min_price_float')) {
42
- $this->_collectPriceRange();
43
  }
44
 
45
  return $this->getData('min_price_float');
@@ -50,7 +50,7 @@ class Catalin_SEO_Model_Catalog_Layer_Filter_Price extends Mage_Catalog_Model_La
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();
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
25
  public function getMaxPriceFloat()
26
  {
27
  if (!$this->hasData('max_price_float')) {
28
+ $this->collectPriceRange();
29
  }
30
 
31
  return $this->getData('max_price_float');
39
  public function getMinPriceFloat()
40
  {
41
  if (!$this->hasData('min_price_float')) {
42
+ $this->collectPriceRange();
43
  }
44
 
45
  return $this->getData('min_price_float');
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();
app/code/community/Catalin/SEO/Model/Catalog/Resource/Layer/Filter/Attribute.php CHANGED
@@ -11,7 +11,7 @@
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_Resource_Layer_Filter_Attribute extends Mage_Catalog_Model_Resource_Layer_Filter_Attribute
@@ -41,8 +41,8 @@ class Catalin_SEO_Model_Catalog_Resource_Layer_Filter_Attribute extends Mage_Cat
41
  );
42
 
43
  $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
44
- //$options = $attribute->getSource()->getAllOptions(false);
45
  if (!is_array($value)) {
 
46
  foreach ($options as $option) {
47
  if ($option['label'] == $value) {
48
  $value = $option['value'];
@@ -116,4 +116,4 @@ class Catalin_SEO_Model_Catalog_Resource_Layer_Filter_Attribute extends Mage_Cat
116
  return $connection->fetchPairs($select);
117
  }
118
 
119
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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_Resource_Layer_Filter_Attribute extends Mage_Catalog_Model_Resource_Layer_Filter_Attribute
41
  );
42
 
43
  $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
 
44
  if (!is_array($value)) {
45
+ $options = $attribute->getSource()->getAllOptions(false);
46
  foreach ($options as $option) {
47
  if ($option['label'] == $value) {
48
  $value = $option['value'];
116
  return $connection->fetchPairs($select);
117
  }
118
 
119
+ }
app/code/community/Catalin/SEO/Model/Catalog/Resource/Layer/Filter/Price.php CHANGED
@@ -11,7 +11,7 @@
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
- * @copyright Copyright (c) 2014 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_Resource_Layer_Filter_Price extends Mage_Catalog_Model_Resource_Layer_Filter_Price
@@ -74,4 +74,4 @@ class Catalin_SEO_Model_Catalog_Resource_Layer_Filter_Price extends Mage_Catalog
74
  return $this;
75
  }
76
 
77
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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_Resource_Layer_Filter_Price extends Mage_Catalog_Model_Resource_Layer_Filter_Price
74
  return $this;
75
  }
76
 
77
+ }
app/code/community/Catalin/SEO/Model/CatalogSearch/Layer.php CHANGED
@@ -11,7 +11,7 @@
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
@@ -113,4 +113,4 @@ class Catalin_SEO_Model_CatalogSearch_Layer extends Catalin_SEO_Model_Catalog_La
113
  return $attribute;
114
  }
115
 
116
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
113
  return $attribute;
114
  }
115
 
116
+ }
app/code/community/Catalin/SEO/Model/CatalogSearch/Layer/Filter/Attribute.php CHANGED
@@ -11,7 +11,7 @@
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
@@ -28,4 +28,4 @@ class Catalin_SEO_Model_CatalogSearch_Layer_Filter_Attribute extends Catalin_SEO
28
  return $attribute->getIsFilterableInSearch();
29
  }
30
 
31
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
28
  return $attribute->getIsFilterableInSearch();
29
  }
30
 
31
+ }
app/code/community/Catalin/SEO/Model/Enterprise/Catalog/Layer/Filter/Attribute.php ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Enterprise_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Model_Catalog_Layer_Filter_Attribute
18
+ {
19
+
20
+ protected $_values = array();
21
+
22
+ public function getValues()
23
+ {
24
+ return $this->_values;
25
+ }
26
+
27
+ /**
28
+ * Apply attribute filter to layer
29
+ *
30
+ * @param Zend_Controller_Request_Abstract $request
31
+ * @param object $filterBlock
32
+ * @return Enterprise_Search_Model_Catalog_Layer_Filter_Attribute
33
+ */
34
+ public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
35
+ {
36
+ if (!Mage::helper('catalin_seo')->isEnabled()) {
37
+ return parent::apply($request, $filterBlock);
38
+ }
39
+
40
+ $filter = $request->getParam($this->_requestVar);
41
+ if (is_array($filter)) {
42
+ return $this;
43
+ }
44
+
45
+ if (empty($filter)) {
46
+ return $this;
47
+ }
48
+
49
+ $this->_values = explode(Catalin_SEO_Helper_Data::MULTIPLE_FILTERS_DELIMITER, $filter);
50
+
51
+ if (!empty($this->_values)) {
52
+ $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
53
+ $this->_getResource()->applyFilterToCollection($this, $this->_values);
54
+ foreach ($this->_values as $filter) {
55
+ $optionId = $attrUrlKeyModel->getOptionId($this->getAttributeModel()->getId(), $filter);
56
+ $text = $this->_getOptionText($optionId);
57
+ $this->getLayer()->getState()->addFilter($this->_createItem($text, $filter));
58
+ // process all items if multiple choice is enabled
59
+ if (!Mage::helper('catalin_seo')->isMultipleChoiceFiltersEnabled()) {
60
+ $this->_items = array();
61
+ }
62
+ }
63
+ }
64
+
65
+ return $this;
66
+ }
67
+
68
+ /**
69
+ * Get data array for building attribute filter items
70
+ *
71
+ * @return array
72
+ */
73
+ protected function _getItemsData()
74
+ {
75
+ if (!Mage::helper('catalin_seo')->isEnabled()) {
76
+ return parent::_getItemsData();
77
+ }
78
+
79
+ $attribute = $this->getAttributeModel();
80
+ $this->_requestVar = $attribute->getAttributeCode();
81
+
82
+ $key = $this->getLayer()->getStateKey() . '_' . $this->_requestVar;
83
+ $data = $this->getLayer()->getAggregator()->getCacheData($key);
84
+
85
+ if ($data === null) {
86
+ $attrUrlKeyModel = Mage::getResourceModel('catalin_seo/attribute_urlkey');
87
+ $options = $attribute->getFrontend()->getSelectOptions();
88
+ $optionsCount = $this->_getResource()->getCount($this);
89
+ $data = array();
90
+ foreach ($options as $option) {
91
+ if (is_array($option['value'])) {
92
+ continue;
93
+ }
94
+ if (Mage::helper('core/string')->strlen($option['value'])) {
95
+ // Check filter type
96
+ if ($this->_getIsFilterableAttribute($attribute) == self::OPTIONS_ONLY_WITH_RESULTS) {
97
+ if (!empty($optionsCount[$option['value']])) {
98
+ $data[] = array(
99
+ 'label' => $option['label'],
100
+ 'value' => $attrUrlKeyModel->getUrlKey($attribute->getId(), $option['value']),
101
+ 'count' => $optionsCount[$option['value']],
102
+ );
103
+ }
104
+ } else {
105
+ $data[] = array(
106
+ 'label' => $option['label'],
107
+ 'value' => $attrUrlKeyModel->getUrlKey($attribute->getId(), $option['value']),
108
+ 'count' => isset($optionsCount[$option['value']]) ? $optionsCount[$option['value']] : 0,
109
+ );
110
+ }
111
+ }
112
+ }
113
+
114
+ $tags = array(
115
+ Mage_Eav_Model_Entity_Attribute::CACHE_TAG . ':' . $attribute->getId()
116
+ );
117
+
118
+ $tags = $this->getLayer()->getStateTags($tags);
119
+ $this->getLayer()->getAggregator()->saveCacheData($data, $key, $tags);
120
+ }
121
+
122
+ return $data;
123
+ }
124
+
125
+ }
app/code/community/Catalin/SEO/Model/Enterprise/Catalog/Layer/Filter/Category.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Enterprise_Catalog_Layer_Filter_Category extends Enterprise_Search_Model_Catalog_Layer_Filter_Category
18
+ {
19
+
20
+ /**
21
+ * Retrieve a collection of child categories for the provided category
22
+ *
23
+ * @param Mage_Catalog_Model_Category $category
24
+ * @return Varien_Data_Collection_Db
25
+ */
26
+ protected function _getChildrenCategories(Mage_Catalog_Model_Category $category)
27
+ {
28
+ $collection = $category->getCollection();
29
+ $collection->addAttributeToSelect('url_key')
30
+ ->addAttributeToSelect('name')
31
+ ->addAttributeToSelect('is_anchor')
32
+ ->addAttributeToFilter('is_active', 1)
33
+ ->addIdFilter($category->getChildren())
34
+ ->setOrder('position', Varien_Db_Select::SQL_ASC)
35
+ ->load();
36
+
37
+ return $collection;
38
+ }
39
+
40
+ /**
41
+ * Get data array for building category filter items
42
+ *
43
+ * @return array
44
+ */
45
+ protected function _getItemsData()
46
+ {
47
+ if (!Mage::helper('catalin_seo')->isEnabled()) {
48
+ return parent::_getItemsData();
49
+ }
50
+
51
+ $key = $this->getLayer()->getStateKey() . '_SUBCATEGORIES';
52
+ $data = $this->getLayer()->getAggregator()->getCacheData($key);
53
+
54
+ if ($data === null) {
55
+ $categoty = $this->getCategory();
56
+ /** @var $categoty Mage_Catalog_Model_Category */
57
+ $categories = $this->_getChildrenCategories($categoty);
58
+
59
+ $this->getLayer()->getProductCollection()
60
+ ->addCountToCategories($categories);
61
+
62
+ $data = array();
63
+ foreach ($categories as $category) {
64
+ if ($category->getIsActive() && $category->getProductCount()) {
65
+ $urlKey = $category->getUrlKey();
66
+ if (empty($urlKey)) {
67
+ $urlKey = $category->getId();
68
+ }
69
+
70
+ $data[] = array(
71
+ 'label' => Mage::helper('core')->escapeHtml($category->getName()),
72
+ 'value' => $urlKey,
73
+ 'count' => $category->getProductCount(),
74
+ );
75
+ }
76
+ }
77
+ $tags = $this->getLayer()->getStateTags();
78
+ $this->getLayer()->getAggregator()->saveCacheData($data, $key, $tags);
79
+ }
80
+ return $data;
81
+ }
82
+
83
+ /**
84
+ * Apply category filter to layer
85
+ *
86
+ * @param Zend_Controller_Request_Abstract $request
87
+ * @param Mage_Core_Block_Abstract $filterBlock
88
+ * @return Mage_Catalog_Model_Layer_Filter_Category
89
+ */
90
+ public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
91
+ {
92
+ if (!Mage::helper('catalin_seo')->isEnabled()) {
93
+ return parent::apply($request, $filterBlock);
94
+ }
95
+
96
+ $filter = $request->getParam($this->getRequestVar());
97
+ if (!$filter) {
98
+ return $this;
99
+ }
100
+
101
+ // Load the category filter by url_key
102
+ $this->_appliedCategory = Mage::getModel('catalog/category')
103
+ ->setStoreId(Mage::app()->getStore()->getId())
104
+ ->loadByAttribute('url_key', $filter);
105
+
106
+ // Extra check in case it is a category id and not url key
107
+ if (!($this->_appliedCategory instanceof Mage_Catalog_Model_Category)) {
108
+ return parent::apply($request, $filterBlock);
109
+ }
110
+
111
+ $this->_categoryId = $this->_appliedCategory->getId();
112
+ Mage::register('current_category_filter', $this->getCategory(), true);
113
+
114
+ if ($this->_isValidCategory($this->_appliedCategory)) {
115
+ $this->getLayer()->getProductCollection()
116
+ ->addCategoryFilter($this->_appliedCategory);
117
+
118
+ $this->getLayer()->getState()->addFilter(
119
+ $this->_createItem($this->_appliedCategory->getName(), $filter)
120
+ );
121
+ }
122
+
123
+ return $this;
124
+ }
125
+
126
+ }
app/code/community/Catalin/SEO/Model/Indexer/Attribute.php CHANGED
@@ -11,7 +11,7 @@
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
@@ -46,6 +46,7 @@ class Catalin_SEO_Model_Indexer_Attribute extends Mage_Index_Model_Indexer_Abstr
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
  {
@@ -72,4 +73,4 @@ class Catalin_SEO_Model_Indexer_Attribute extends Mage_Index_Model_Indexer_Abstr
72
  return Mage::helper('catalin_seo')->__('Index attribute options for layered navigation filters');
73
  }
74
 
75
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
46
  * Register indexer required data inside event object
47
  *
48
  * @param Mage_Index_Model_Event $event
49
+ * @return $this
50
  */
51
  protected function _registerEvent(Mage_Index_Model_Event $event)
52
  {
73
  return Mage::helper('catalin_seo')->__('Index attribute options for layered navigation filters');
74
  }
75
 
76
+ }
app/code/community/Catalin/SEO/Model/Resource/Attribute/Urlkey.php CHANGED
@@ -11,7 +11,7 @@
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_Attribute_Urlkey extends Mage_Core_Model_Resource_Db_Abstract
@@ -29,18 +29,36 @@ class Catalin_SEO_Model_Resource_Attribute_Urlkey extends Mage_Core_Model_Resour
29
  }
30
 
31
  /**
32
- * Retrieve urk_key for specific option
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *
34
  * @param int $attributeId
35
  * @param int $optionId
36
  * @param int $storeId
37
  * @return int|string
38
  */
39
- public function getUrlKey($attributeId, $optionId, $storeId = null)
40
  {
41
- foreach ($this->_getOptions($attributeId, $storeId) as $result) {
42
  if ($result['option_id'] == $optionId) {
43
- return $result['url_key'];
44
  }
45
  }
46
 
@@ -48,50 +66,55 @@ class Catalin_SEO_Model_Resource_Attribute_Urlkey extends Mage_Core_Model_Resour
48
  }
49
 
50
  /**
51
- * Retrieve option_id for specific url_key
52
  *
53
  * @param int $attributeId
54
- * @param string $urlKey
55
  * @param int $storeId
56
  * @return int|string
57
  */
58
- public function getOptionId($attributeId, $urlKey, $storeId = null)
59
  {
60
- foreach ($this->_getOptions($attributeId, $storeId) as $result) {
61
- if ($result['url_key'] == $urlKey) {
62
  return $result['option_id'];
63
  }
64
  }
65
 
66
- return $urlKey;
67
  }
68
 
69
  /**
70
- * Retrieve options url keys for specific attribute
71
- * Use this as it caches for each attribute all possible values
72
- *
73
- * @param int $attributeId
74
  * @param int $storeId
 
 
75
  * @return array
76
  */
77
- protected function _getOptions($attributeId, $storeId)
78
  {
79
  if ($storeId === null) {
80
  $storeId = Mage::app()->getStore()->getId();
81
  }
82
 
83
- if (!isset(self::$_cachedResults[$attributeId][$storeId])) {
84
  $readAdapter = $this->_getReadAdapter();
85
  $select = $readAdapter->select()
86
  ->from($this->getMainTable())
87
- ->where('`store_id` = ?', $storeId)
88
- ->where("`attribute_id` = ?", $attributeId);
89
  $data = $readAdapter->fetchAll($select);
90
 
91
- self::$_cachedResults[$attributeId][$storeId] = $data;
 
 
 
 
 
92
  }
93
 
94
- return self::$_cachedResults[$attributeId][$storeId];
95
  }
96
 
97
  /**
@@ -118,23 +141,25 @@ class Catalin_SEO_Model_Resource_Attribute_Urlkey extends Mage_Core_Model_Resour
118
  $readAdapter = $this->_getReadAdapter();
119
  $select = $readAdapter->select()
120
  ->from($this->getMainTable())
121
- ->where('`store_id` = ?', $storeId)
122
- ->where('`attribute_id` IN (?)', array('in' => $attributesIds));
123
 
124
  $data = $readAdapter->fetchAll($select);
125
  foreach ($data as $attr) {
126
  self::$_cachedResults[$attr['attribute_id']][$attr['store_id']][] = $attr;
 
127
  }
128
 
129
  // Fill with empty array for the attributes ids that have no values in database
130
- // Prevents from doing suplimentary querys
131
- foreach ($attributesIds as $attributeId) {
132
- if (!isset(self::$_cachedResults[$attributeId][$storeId])) {
133
- self::$_cachedResults[$attributeId][$storeId] = array();
 
134
  }
135
  }
136
 
137
  return $this;
138
  }
139
 
140
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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_Attribute_Urlkey extends Mage_Core_Model_Resource_Db_Abstract
29
  }
30
 
31
  /**
32
+ * Retrieve urk_key for specific attribute code
33
+ *
34
+ * @param string $attributeCode
35
+ * @param int $storeId
36
+ * @return string
37
+ */
38
+ public function getUrlKey($attributeCode, $storeId = null)
39
+ {
40
+ foreach ($this->getAttributeData($storeId, $attributeCode, 'attribute_code') as $result) {
41
+ if ($result['attribute_code'] == $attributeCode) {
42
+ return $result['url_key'];
43
+ }
44
+ }
45
+
46
+ return $attributeCode;
47
+ }
48
+
49
+ /**
50
+ * Retrieve url_value for specific option
51
  *
52
  * @param int $attributeId
53
  * @param int $optionId
54
  * @param int $storeId
55
  * @return int|string
56
  */
57
+ public function getUrlValue($attributeId, $optionId, $storeId = null)
58
  {
59
+ foreach ($this->getAttributeData($storeId, $attributeId) as $result) {
60
  if ($result['option_id'] == $optionId) {
61
+ return $result['url_value'];
62
  }
63
  }
64
 
66
  }
67
 
68
  /**
69
+ * Retrieve option_id for specific url_value
70
  *
71
  * @param int $attributeId
72
+ * @param string $urlValue
73
  * @param int $storeId
74
  * @return int|string
75
  */
76
+ public function getOptionId($attributeId, $urlValue, $storeId = null)
77
  {
78
+ foreach ($this->getAttributeData($storeId, $attributeId) as $result) {
79
+ if ($result['url_value'] == $urlValue) {
80
  return $result['option_id'];
81
  }
82
  }
83
 
84
+ return $urlValue;
85
  }
86
 
87
  /**
88
+ * Retrieve attribute data
89
+ *
 
 
90
  * @param int $storeId
91
+ * @param int|string $whereValue
92
+ * @param string $whereField
93
  * @return array
94
  */
95
+ protected function getAttributeData($storeId, $whereValue, $whereField = 'attribute_id')
96
  {
97
  if ($storeId === null) {
98
  $storeId = Mage::app()->getStore()->getId();
99
  }
100
 
101
+ if (!isset(self::$_cachedResults[$whereValue][$storeId])) {
102
  $readAdapter = $this->_getReadAdapter();
103
  $select = $readAdapter->select()
104
  ->from($this->getMainTable())
105
+ ->where('store_id = ?', $storeId)
106
+ ->where("{$whereField} = ?", $whereValue);
107
  $data = $readAdapter->fetchAll($select);
108
 
109
+ if (!empty($data)) {
110
+ self::$_cachedResults[$data['attribute_id']][$storeId] = $data;
111
+ self::$_cachedResults[$data['attribute_code']][$storeId] = $data;
112
+ } else {
113
+ self::$_cachedResults[$whereValue][$storeId] = $data;
114
+ }
115
  }
116
 
117
+ return self::$_cachedResults[$whereValue][$storeId];
118
  }
119
 
120
  /**
141
  $readAdapter = $this->_getReadAdapter();
142
  $select = $readAdapter->select()
143
  ->from($this->getMainTable())
144
+ ->where('store_id = ?', $storeId)
145
+ ->where('attribute_id IN (?)', array('in' => $attributesIds));
146
 
147
  $data = $readAdapter->fetchAll($select);
148
  foreach ($data as $attr) {
149
  self::$_cachedResults[$attr['attribute_id']][$attr['store_id']][] = $attr;
150
+ self::$_cachedResults[$attr['attribute_code']][$attr['store_id']][] = $attr;
151
  }
152
 
153
  // Fill with empty array for the attributes ids that have no values in database
154
+ // Prevents from doing supplementary queries
155
+ foreach ($collection as $attribute) {
156
+ if (!isset(self::$_cachedResults[$attribute->getId()][$storeId])) {
157
+ self::$_cachedResults[$attribute->getId()][$storeId] = array();
158
+ self::$_cachedResults[$attribute->getAttributeCode()][$storeId] = array();
159
  }
160
  }
161
 
162
  return $this;
163
  }
164
 
165
+ }
app/code/community/Catalin/SEO/Model/Resource/Indexer/Attribute.php CHANGED
@@ -11,14 +11,14 @@
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
@@ -43,28 +43,28 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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;
@@ -75,8 +75,9 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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)) {
@@ -101,17 +102,18 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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;
@@ -124,9 +126,8 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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')
@@ -136,21 +137,21 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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
 
@@ -159,7 +160,8 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
159
  'attribute_id' => $attribute->getId(),
160
  'store_id' => $storeId,
161
  'option_id' => $option['value'],
162
- 'url_key' => $urlKey
 
163
  );
164
  }
165
 
@@ -171,17 +173,17 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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
  /**
@@ -189,13 +191,13 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
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
  /**
@@ -212,4 +214,4 @@ class Catalin_SEO_Model_Resource_Indexer_Attribute extends Mage_Index_Model_Reso
212
  return $this;
213
  }
214
 
215
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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
43
  /**
44
  * Generate SEO values for catalog product attributes options
45
  *
46
+ * @param int|null $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;
75
  *
76
  * @param array $data
77
  * @param array $deleteWhere
78
+ * @throws Exception
79
  */
80
+ protected function saveData(array $data, array $deleteWhere = array())
81
  {
82
  // Continue only if we have something to insert
83
  if (empty($data)) {
102
  /**
103
  * Retrieve product attributes with frontend input type 'select' and 'multiselect'
104
  *
105
+ * @param int|null $attributeId
106
  * @return Mage_Eav_Model_Resource_Entity_Attribute_Collection
107
  */
108
+ protected function getAttributes($attributeId = null)
109
  {
110
  $collection = Mage::getSingleton('eav/config')
111
  ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
112
  ->getAttributeCollection()
113
+ ->addFieldToFilter('main_table.frontend_input', array('in' => array('select', 'multiselect')));
114
  //->addSetInfo();
115
  if (!empty($attributeId)) {
116
+ $collection->addFieldToFilter('main_table.attribute_id', $attributeId);
117
  }
118
 
119
  return $collection;
126
  * @param int $storeId
127
  * @return array
128
  */
129
+ protected function getInsertValues($attribute, $storeId)
130
  {
 
131
  $collection = Mage::getResourceModel('eav/entity_attribute_option_collection')
132
  ->setStoreFilter($storeId)
133
  ->setPositionOrder('asc')
137
 
138
  $data = array();
139
  foreach ($options as $option) {
140
+ // Generate url value
141
+ $urlValue = $this->getHelper()->transliterate($option['label']);
142
 
143
  // Check if this url key is taken and add -{count}
144
  $count = 0;
145
+ $origUrlValue = $urlValue;
146
  do {
147
  $found = false;
148
  foreach ($data as $line) {
149
+ if ($line['url_value'] == $urlValue) {
150
  $found = true;
151
  }
152
  }
153
  if ($found) {
154
+ $urlValue = $origUrlValue . '-' . ++$count;
155
  }
156
  } while ($found);
157
 
160
  'attribute_id' => $attribute->getId(),
161
  'store_id' => $storeId,
162
  'option_id' => $option['value'],
163
+ 'url_key' => $this->getHelper()->transliterate($attribute->getStoreLabel($storeId)),
164
+ 'url_value' => $urlValue,
165
  );
166
  }
167
 
173
  *
174
  * @return array
175
  */
176
+ protected function getAllStoresIds()
177
  {
178
+ if ($this->storesIds === null) {
179
+ $this->storesIds = array();
180
  $stores = Mage::app()->getStores();
181
  foreach ($stores as $storeId => $store) {
182
+ $this->storesIds[] = $storeId;
183
  }
184
  }
185
 
186
+ return $this->storesIds;
187
  }
188
 
189
  /**
191
  *
192
  * @return Catalin_SEO_Helper_Data
193
  */
194
+ protected function getHelper()
195
  {
196
+ if ($this->helper === null) {
197
+ $this->helper = Mage::helper('catalin_seo');
198
  }
199
 
200
+ return $this->helper;
201
  }
202
 
203
  /**
214
  return $this;
215
  }
216
 
217
+ }
app/code/community/Catalin/SEO/Model/System/Config/Backend/Seo/Catalog.php CHANGED
@@ -11,7 +11,7 @@
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_System_Config_Backend_Seo_Catalog extends Mage_Core_Model_Config_Data
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  class Catalin_SEO_Model_System_Config_Backend_Seo_Catalog extends Mage_Core_Model_Config_Data
app/code/community/Catalin/SEO/controllers/CategoryController.php CHANGED
@@ -11,7 +11,7 @@
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/Catalog/controllers/CategoryController.php';
@@ -73,8 +73,15 @@ class Catalin_Seo_CategoryController extends Mage_Catalog_CategoryController
73
 
74
  // return json formatted response for ajax
75
  if ($this->getRequest()->isAjax()) {
 
 
 
 
 
 
 
76
  $listing = $this->getLayout()->getBlock('product_list')->toHtml();
77
- $layer = $this->getLayout()->getBlock('catalog.leftnav')->toHtml();
78
 
79
  // Fix urls that contain '___SID=U'
80
  $urlModel = Mage::getSingleton('core/url');
@@ -96,4 +103,4 @@ class Catalin_Seo_CategoryController extends Mage_Catalog_CategoryController
96
  }
97
  }
98
 
99
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 Catalin Ciobanu
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
  require_once 'Mage/Catalog/controllers/CategoryController.php';
73
 
74
  // return json formatted response for ajax
75
  if ($this->getRequest()->isAjax()) {
76
+
77
+ if(Mage::getEdition() == Mage::EDITION_ENTERPRISE){
78
+ $block = $this->getLayout()->getBlock('enterprisecatalog.leftnav');
79
+ } else {
80
+ $block = $this->getLayout()->getBlock('catalog.leftnav');
81
+ }
82
+
83
  $listing = $this->getLayout()->getBlock('product_list')->toHtml();
84
+ $layer = $block->toHtml();
85
 
86
  // Fix urls that contain '___SID=U'
87
  $urlModel = Mage::getSingleton('core/url');
103
  }
104
  }
105
 
106
+ }
app/code/community/Catalin/SEO/controllers/ResultController.php CHANGED
@@ -11,7 +11,7 @@
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';
@@ -64,7 +64,14 @@ class Catalin_Seo_ResultController extends Mage_CatalogSearch_ResultController
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');
@@ -90,4 +97,4 @@ class Catalin_Seo_ResultController extends Mage_CatalogSearch_ResultController
90
  }
91
  }
92
 
93
- }
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @package Catalin_Seo
14
+ * @copyright Copyright (c) 2015 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';
64
  // return json formatted response for ajax
65
  if ($this->getRequest()->isAjax()) {
66
  $listing = $this->getLayout()->getBlock('search_result_list')->toHtml();
67
+
68
+
69
+ if(Mage::getEdition() == Mage::EDITION_ENTERPRISE){
70
+ $block = $this->getLayout()->getBlock('enterprisesearch.leftnav');
71
+ } else {
72
+ $block = $this->getLayout()->getBlock('catalogsearch.leftnav');
73
+ }
74
+ $layer = $block->toHtml();
75
 
76
  // Fix urls that contain '___SID=U'
77
  $urlModel = Mage::getSingleton('core/url');
97
  }
98
  }
99
 
100
+ }
app/code/community/Catalin/SEO/etc/adminhtml.xml CHANGED
@@ -19,4 +19,4 @@
19
  </admin>
20
  </resources>
21
  </acl>
22
- </config>
19
  </admin>
20
  </resources>
21
  </acl>
22
+ </config>
app/code/community/Catalin/SEO/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Catalin_SEO>
5
- <version>2.0.0</version>
6
  </Catalin_SEO>
7
  </modules>
8
  <global>
@@ -22,6 +22,9 @@
22
  <layer_filter_attribute>Catalin_SEO_Model_CatalogSearch_Layer_Filter_Attribute</layer_filter_attribute>
23
  </rewrite>
24
  </catalogsearch>
 
 
 
25
  <catalog_resource>
26
  <rewrite>
27
  <layer_filter_attribute>Catalin_SEO_Model_Catalog_Resource_Layer_Filter_Attribute</layer_filter_attribute>
@@ -62,6 +65,12 @@
62
  <layer_filter_attribute>Catalin_SEO_Block_CatalogSearch_Layer_Filter_Attribute</layer_filter_attribute>
63
  </rewrite>
64
  </catalogsearch>
 
 
 
 
 
 
65
  <catalin_seo>
66
  <class>Catalin_SEO_Block</class>
67
  </catalin_seo>
@@ -120,9 +129,9 @@
120
  <enabled>1</enabled>
121
  <ajax_enabled>1</ajax_enabled>
122
  <price_slider>1</price_slider>
123
- <multiple_choise_filters>1</multiple_choise_filters>
124
  <routing_suffix>filter</routing_suffix>
125
  </catalog>
126
  </catalin_seo>
127
  </default>
128
- </config>
2
  <config>
3
  <modules>
4
  <Catalin_SEO>
5
+ <version>3.0.0</version>
6
  </Catalin_SEO>
7
  </modules>
8
  <global>
22
  <layer_filter_attribute>Catalin_SEO_Model_CatalogSearch_Layer_Filter_Attribute</layer_filter_attribute>
23
  </rewrite>
24
  </catalogsearch>
25
+ <enterprise_search>
26
+ <catalog_layer_filter_attribute>Catalin_SEO_Model_Enterprise_Catalog_Layer_Filter_Attribute</catalog_layer_filter_attribute>
27
+ </enterprise_search>
28
  <catalog_resource>
29
  <rewrite>
30
  <layer_filter_attribute>Catalin_SEO_Model_Catalog_Resource_Layer_Filter_Attribute</layer_filter_attribute>
65
  <layer_filter_attribute>Catalin_SEO_Block_CatalogSearch_Layer_Filter_Attribute</layer_filter_attribute>
66
  </rewrite>
67
  </catalogsearch>
68
+ <enterprise_search>
69
+ <rewrite>
70
+ <catalog_layer_filter_attribute>Catalin_SEO_Block_Enterprise_Catalog_Layer_Filter_Attribute</catalog_layer_filter_attribute>
71
+ <catalogsearch_layer_filter_attribute>Catalin_SEO_Block_Enterprise_CatalogSearch_Layer_Filter_Attribute</catalogsearch_layer_filter_attribute>
72
+ </rewrite>
73
+ </enterprise_search>
74
  <catalin_seo>
75
  <class>Catalin_SEO_Block</class>
76
  </catalin_seo>
129
  <enabled>1</enabled>
130
  <ajax_enabled>1</ajax_enabled>
131
  <price_slider>1</price_slider>
132
+ <multiple_choice_filters>1</multiple_choice_filters>
133
  <routing_suffix>filter</routing_suffix>
134
  </catalog>
135
  </catalin_seo>
136
  </default>
137
+ </config>
app/code/community/Catalin/SEO/etc/system.xml CHANGED
@@ -60,8 +60,8 @@
60
  <enabled>1</enabled>
61
  </depends>
62
  </price_slider>
63
- <multiple_choise_filters translate="label">
64
- <label>Enable Multipe Choise Filter</label>
65
  <frontend_type>select</frontend_type>
66
  <source_model>adminhtml/system_config_source_yesno</source_model>
67
  <backend_model>catalin_seo/system_config_backend_seo_catalog</backend_model>
@@ -72,7 +72,7 @@
72
  <depends>
73
  <enabled>1</enabled>
74
  </depends>
75
- </multiple_choise_filters>
76
  <routing_suffix translate="label">
77
  <label>Routing Souffix</label>
78
  <frontend_type>text</frontend_type>
60
  <enabled>1</enabled>
61
  </depends>
62
  </price_slider>
63
+ <multiple_choice_filters translate="label">
64
+ <label>Enable Multiple Choice Filter</label>
65
  <frontend_type>select</frontend_type>
66
  <source_model>adminhtml/system_config_source_yesno</source_model>
67
  <backend_model>catalin_seo/system_config_backend_seo_catalog</backend_model>
72
  <depends>
73
  <enabled>1</enabled>
74
  </depends>
75
+ </multiple_choice_filters>
76
  <routing_suffix translate="label">
77
  <label>Routing Souffix</label>
78
  <frontend_type>text</frontend_type>
app/code/community/Catalin/SEO/sql/catalin_seo_setup/install-2.0.0.php CHANGED
@@ -39,4 +39,4 @@ $table = $installer->getConnection()
39
  ->setComment('Tag');
40
  $installer->getConnection()->createTable($table);
41
 
42
- $installer->endSetup();
39
  ->setComment('Tag');
40
  $installer->getConnection()->createTable($table);
41
 
42
+ $installer->endSetup();
app/code/community/Catalin/SEO/sql/catalin_seo_setup/upgrade-2.0.0-3.0.0.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* @var $installer Mage_Core_Model_Resource_Setup */
4
+ $installer = $this;
5
+
6
+ $installer->startSetup();
7
+
8
+ $tableName = $installer->getTable('catalin_seo/attribute_url_key');
9
+ /**
10
+ * Create table 'catalin_seo/attribute_url_key'
11
+ */
12
+ $table = $installer->getConnection()
13
+ ->addColumn($tableName, 'url_value', array(
14
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
15
+ 'length' => 255,
16
+ 'comment' => 'Url Value'
17
+ ));
18
+
19
+ $installer->endSetup();
app/design/frontend/base/default/layout/catalin_seo.xml CHANGED
@@ -12,7 +12,7 @@
12
  </action>
13
  <action method="addItem">
14
  <type>skin_js</type>
15
- <name>js/catalin_seo/handler.js</name>
16
  </action>
17
  </reference>
18
  <reference name="product_list_toolbar">
@@ -23,6 +23,11 @@
23
  <template>catalin_seo/catalog/product/list.phtml</template>
24
  </action>
25
  </reference>
 
 
 
 
 
26
  <reference name="catalog.leftnav">
27
  <action method="setTemplate">
28
  <template>catalin_seo/catalog/layer/view.phtml</template>
@@ -57,6 +62,11 @@
57
  <template>catalin_seo/catalog/product/list.phtml</template>
58
  </action>
59
  </reference>
 
 
 
 
 
60
  <reference name="catalogsearch.leftnav">
61
  <action method="setTemplate">
62
  <template>catalin_seo/catalog/layer/view.phtml</template>
@@ -66,4 +76,4 @@
66
  <block type="catalin_seo/catalog_product_list_pager" name="product_list_toolbar_pager"/>
67
  </reference>
68
  </catalogsearch_result_index>
69
- </layout>
12
  </action>
13
  <action method="addItem">
14
  <type>skin_js</type>
15
+ <name helper="catalin_seo/getSkinJsUrl"/>
16
  </action>
17
  </reference>
18
  <reference name="product_list_toolbar">
23
  <template>catalin_seo/catalog/product/list.phtml</template>
24
  </action>
25
  </reference>
26
+ <reference name="enterprisecatalog.leftnav">
27
+ <action method="setTemplate">
28
+ <template>catalin_seo/catalog/layer/view.phtml</template>
29
+ </action>
30
+ </reference>
31
  <reference name="catalog.leftnav">
32
  <action method="setTemplate">
33
  <template>catalin_seo/catalog/layer/view.phtml</template>
62
  <template>catalin_seo/catalog/product/list.phtml</template>
63
  </action>
64
  </reference>
65
+ <reference name="enterprisesearch.leftnav">
66
+ <action method="setTemplate">
67
+ <template>catalin_seo/catalog/layer/view.phtml</template>
68
+ </action>
69
+ </reference>
70
  <reference name="catalogsearch.leftnav">
71
  <action method="setTemplate">
72
  <template>catalin_seo/catalog/layer/view.phtml</template>
76
  <block type="catalin_seo/catalog_product_list_pager" name="product_list_toolbar_pager"/>
77
  </reference>
78
  </catalogsearch_result_index>
79
+ </layout>
app/design/frontend/base/default/template/catalin_seo/catalog/layer/filter.phtml CHANGED
File without changes
app/design/frontend/base/default/template/catalin_seo/catalog/layer/price.phtml CHANGED
File without changes
app/design/frontend/base/default/template/catalin_seo/catalog/layer/view.phtml CHANGED
File without changes
app/design/frontend/base/default/template/catalin_seo/catalog/product/list.phtml CHANGED
@@ -173,7 +173,8 @@ foreach($_afterChildren as $_afterChildName):
173
  //<![CDATA[
174
  <?php if ($this->helper('catalin_seo')->isAjaxEnabled()): ?>
175
  CatalinSeoHandler.isAjaxEnabled = true;
 
176
  <?php endif; ?>
177
  CatalinSeoHandler.bindListeners();
178
  //]]>
179
- </script>
173
  //<![CDATA[
174
  <?php if ($this->helper('catalin_seo')->isAjaxEnabled()): ?>
175
  CatalinSeoHandler.isAjaxEnabled = true;
176
+ CatalinSeoHandler.urlSuffix = <?php echo json_encode(Mage::getStoreConfig('catalog/seo/category_url_suffix')) ?>;
177
  <?php endif; ?>
178
  CatalinSeoHandler.bindListeners();
179
  //]]>
180
+ </script>
app/etc/modules/Catalin_SEO.xml CHANGED
@@ -9,4 +9,4 @@
9
  </depends>
10
  </Catalin_SEO>
11
  </modules>
12
- </config>
9
  </depends>
10
  </Catalin_SEO>
11
  </modules>
12
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
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>
@@ -16,12 +16,12 @@
16
  &lt;li&gt;multiple filters for the same attribute&lt;/li&gt;&#xD;
17
  &lt;/ul&gt;&#xD;
18
  &lt;p&gt;All the above features can be enabled/disabled from backend from "System -&gt; Configuration -&gt; Catalin SEO -&gt; Catalog Layered Navigation"&lt;/p&gt;</description>
19
- <notes>- fixed layout issues for the Magento 1.9 theme&#xD;
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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Catalin_Seo</name>
4
+ <version>3.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
16
  &lt;li&gt;multiple filters for the same attribute&lt;/li&gt;&#xD;
17
  &lt;/ul&gt;&#xD;
18
  &lt;p&gt;All the above features can be enabled/disabled from backend from "System -&gt; Configuration -&gt; Catalin SEO -&gt; Catalog Layered Navigation"&lt;/p&gt;</description>
19
+ <notes>- fix issues introduced with SUPEE6788&#xD;
20
+ - other improvements</notes>
21
  <authors><author><name>Catalin Ciobanu</name><user>catalin_ciobanu</user><email>caciobanu@gmail.com</email></author></authors>
22
+ <date>2015-11-02</date>
23
+ <time>19:23:44</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="2f7cdb2d86a331d9810e414213baf724"/><file name="Price.php" hash="ce0827e0a2d5dfda6323242f33956213"/></dir><file name="State.php" hash="5ff4500a94a957ac6013eb7cfff95d3c"/></dir><dir name="Product"><dir name="List"><file name="Pager.php" hash="e4eb82c017956cdb637c98f137a3c2bb"/><file name="Toolbar.php" hash="11c5d2b5ac568ca952fb2fbe6f8b3ee7"/></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="d61b7ab7358d288d9d3ec5648f66b6c7"/></dir></dir></dir><dir name="Enterprise"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="78c084be7874a6610bc12565842429e1"/></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="fe79783fee5cb3576c3194d8b7c59ce5"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Router.php" hash="e5ddd71d2f8098c7b3a6619499a7d0d2"/></dir><dir name="Helper"><file name="Data.php" hash="872fabbf012fe028d7ce4d97d967b92c"/><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="a095ec8b9195e35fb65946bbbcd70992"/><file name="Category.php" hash="98c11d32fc67d0cae132b72461d6c5df"/><file name="Item.php" hash="7f84daa98c084341d4f6bc877ca4160f"/><file name="Price.php" hash="a0b83acef25498dcd4e7215101296aba"/></dir></dir><file name="Layer.php" hash="22d221050dbb92f2e4ea99d4fbfb4f06"/><dir name="Resource"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="8347876511185a48c28f8fe8533012a8"/><file name="Price.php" hash="4e1643e73d8920e244394e07960cd906"/></dir></dir></dir></dir><dir name="CatalogSearch"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="5ce335a514b240c66a64ef255caec0da"/></dir></dir><file name="Layer.php" hash="46d36c9f22e2b18b729017f9fc300c38"/></dir><dir name="Enterprise"><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="45addbc9c7a408c1be60a0a6b49e53e2"/><file name="Category.php" hash="18bc9bc411b9aa47ffd0622095d58592"/></dir></dir></dir></dir><dir name="Indexer"><file name="Attribute.php" hash="c4fbbbf14e8e1da8aa9cd93d5ac11342"/></dir><dir name="Resource"><dir name="Attribute"><file name="Urlkey.php" hash="bd0abcaf35f5140263428262e4069878"/></dir><dir name="Indexer"><file name="Attribute.php" hash="3f292eb6253661504d900d747ca45c59"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Seo"><file name="Catalog.php" hash="033eb9e049fb896dcbf4430474540ec2"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="CategoryController.php" hash="1e527318a6977d80ffd4ee0fe112115f"/><file name="ResultController.php" hash="bf5dfcb3e69a9033d7a16726855d9f8d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1719b869d3153268f6d020da7fd25544"/><file name="config.xml" hash="6ba1606ebcf9d5b3d40f3626135b4e52"/><file name="system.xml" hash="e24e6e9f466fb03af5295f0521a4d357"/></dir><dir name="sql"><dir name="catalin_seo_setup"><file name="install-2.0.0.php" hash="999b376f81cf088a6004d1d0ff6c69fb"/><file name="upgrade-2.0.0-3.0.0.php" hash="c40909daa09e186e6bd4893b59d28ef1"/></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="dfad30bc85d98828f0e9011f883b74c1"/></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="8e779537d1b79e8382dc85a1d5ff1c7b"/></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-ee-rwd.js" hash="167dcde29e9d2c1950ea5976060f1108"/><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="d8056befe6d816e8a3f9db445f22670a"/></dir></target></contents>
25
  <compatible/>
26
+ <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
27
  </package>
skin/frontend/base/default/css/catalin_seo/style.css CHANGED
File without changes
skin/frontend/base/default/images/catalin_seo/bkg_slider.png CHANGED
File without changes
skin/frontend/base/default/images/catalin_seo/slider.png CHANGED
File without changes
skin/frontend/base/default/js/catalin_seo/handler-ee-rwd.js ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var CatalinSeoHandler = {
2
+ urlSuffix: null,
3
+ listenersBinded: false,
4
+ isAjaxEnabled: false,
5
+ priceSlider: {
6
+ urlTemplate: '',
7
+ minPrice: 0,
8
+ maxPrice: 0,
9
+ currentMinPrice: 0,
10
+ currentMaxPrice: 0
11
+ },
12
+ handlePriceEvent: function (val) {
13
+ var self = this;
14
+ if (val) {
15
+ var url = self.priceSlider.urlTemplate.replace('__PRICE_VALUE__', val);
16
+ if (self.isAjaxEnabled) {
17
+ self.handleEvent(url);
18
+ } else {
19
+ window.location.href = url;
20
+ }
21
+ }
22
+ },
23
+ handleEvent: function (el, event) {
24
+ var url, fullUrl;
25
+ var self = this;
26
+ if (typeof el === 'string') {
27
+ url = el;
28
+ } else if (el.tagName.toLowerCase() === 'a') {
29
+ url = $(el).readAttribute('href');
30
+ } else if (el.tagName.toLowerCase() === 'select') {
31
+ url = $(el).getValue();
32
+ }
33
+
34
+ var suffix = CatalinSeoHandler.urlSuffix;
35
+ if (suffix !== null && url.substr(-suffix.length) == suffix) {
36
+ // Add to the query url so that FPC handles correctly.
37
+ var urlWithoutSuffix = url.substr(0, url.length - suffix.length);
38
+ if (urlWithoutSuffix.indexOf("/filter") == -1) {
39
+ fullUrl = urlWithoutSuffix + "/filter/isLayerAjax/1" + suffix;
40
+ } else {
41
+ fullUrl = urlWithoutSuffix + "/isLayerAjax/1" + suffix;
42
+ }
43
+ } else {
44
+ // Add this to query string for full page caching systems
45
+ if (url.indexOf('?') != -1) {
46
+ fullUrl = url + '&isLayerAjax=1';
47
+ } else {
48
+ fullUrl = url + '?isLayerAjax=1';
49
+ }
50
+ }
51
+
52
+ $('loading').show();
53
+ $('ajax-errors').hide();
54
+
55
+ self.pushState(null, url, false);
56
+
57
+ new Ajax.Request(fullUrl, {
58
+ method: 'get',
59
+ onSuccess: function (transport) {
60
+ if (transport.responseJSON) {
61
+ $('catalog-listing').update(transport.responseJSON.listing);
62
+ $$('.block-layered-nav')[0].update(transport.responseJSON.layer);
63
+ self.pushState({
64
+ listing: transport.responseJSON.listing,
65
+ layer: transport.responseJSON.layer
66
+ }, url, true);
67
+ self.ajaxListener();
68
+ self.toggleContent();
69
+ self.alignProductGridActions();
70
+ self.blockCollapsing();
71
+ } else {
72
+ $('ajax-errors').show();
73
+ }
74
+ $('loading').hide();
75
+ }
76
+ });
77
+
78
+ if (event) {
79
+ event.preventDefault();
80
+ }
81
+ },
82
+ pushState: function (data, link, replace) {
83
+ var History = window.History;
84
+ if (!History.enabled) {
85
+ return false;
86
+ }
87
+
88
+ if (replace) {
89
+ History.replaceState(data, document.title, link);
90
+ } else {
91
+ History.pushState(data, document.title, link);
92
+ }
93
+ },
94
+ ajaxListener: function () {
95
+ var self = this;
96
+ var els;
97
+ els = $$('div.pager a').concat(
98
+ $$('div.sorter a'),
99
+ $$('div.pager select'),
100
+ $$('div.sorter select'),
101
+ $$('div.block-layered-nav a')
102
+ );
103
+ els.each(function (el) {
104
+ if (el.tagName.toLowerCase() === 'a') {
105
+ $(el).observe('click', function (event) {
106
+ self.handleEvent(this, event);
107
+ });
108
+ } else if (el.tagName.toLowerCase() === 'select') {
109
+ $(el).setAttribute('onchange', '');
110
+ $(el).observe('change', function (event) {
111
+ self.handleEvent(this, event);
112
+ });
113
+ }
114
+ });
115
+ },
116
+ bindPriceSlider: function () {
117
+ var self = this;
118
+ new Control.Slider([$('price-min'), $('price-max')], 'price-range', {
119
+ range: $R(self.priceSlider.minPrice, self.priceSlider.maxPrice),
120
+ sliderValue: [self.priceSlider.currentMinPrice, self.priceSlider.currentMaxPrice],
121
+ values: $R(self.priceSlider.minPrice, self.priceSlider.maxPrice),
122
+
123
+ restricted: true,
124
+ onChange: function (val) {
125
+ if (val[0] != self.priceSlider.currentMinPrice || val[1] != self.priceSlider.currentMaxPrice) {
126
+ $('button-price-slider').value = val.join('-');
127
+ }
128
+ },
129
+ onSlide: function (val) {
130
+ $('price-max-display').innerHTML = val[1];
131
+ $('price-min-display').innerHTML = val[0];
132
+ }
133
+ }
134
+ );
135
+ },
136
+ bindListeners: function () {
137
+ var self = this;
138
+ if (self.listenersBinded || !self.isAjaxEnabled) {
139
+ return false;
140
+ }
141
+ self.listenersBinded = true;
142
+ document.observe("dom:loaded", function () {
143
+ self.ajaxListener();
144
+
145
+ (function (History) {
146
+ if (!History.enabled) {
147
+ return false;
148
+ }
149
+
150
+ self.pushState({
151
+ listing: $('catalog-listing').innerHTML,
152
+ layer: $$('.block-layered-nav')[0].innerHTML
153
+ }, document.location.href, true);
154
+
155
+ // Bind to StateChange Event
156
+ History.Adapter.bind(window, 'popstate', function (event) {
157
+ if (event.type == 'popstate') {
158
+ var State = History.getState();
159
+ $('catalog-listing').update(State.data.listing);
160
+ $$('.block-layered-nav')[0].update(State.data.layer);
161
+ self.ajaxListener();
162
+ self.toggleContent();
163
+ self.alignProductGridActions();
164
+ self.blockCollapsing();
165
+ }
166
+ });
167
+ })(window.History);
168
+ });
169
+ },
170
+ toggleContent: function() {
171
+ // ==============================================
172
+ // UI Pattern - Toggle Content (tabs and accordions in one setup)
173
+ // ==============================================
174
+
175
+ $j('.toggle-content').each(function () {
176
+ var wrapper = jQuery(this);
177
+
178
+ var hasTabs = wrapper.hasClass('tabs');
179
+ var hasAccordion = wrapper.hasClass('accordion');
180
+ var startOpen = wrapper.hasClass('open');
181
+
182
+ var dl = wrapper.children('dl:first');
183
+ var dts = dl.children('dt');
184
+ var panes = dl.children('dd');
185
+ var groups = new Array(dts, panes);
186
+
187
+ //Create a ul for tabs if necessary.
188
+ if (hasTabs) {
189
+ var ul = jQuery('<ul class="toggle-tabs"></ul>');
190
+ dts.each(function () {
191
+ var dt = jQuery(this);
192
+ var li = jQuery('<li></li>');
193
+ li.html(dt.html());
194
+ ul.append(li);
195
+ });
196
+ ul.insertBefore(dl);
197
+ var lis = ul.children();
198
+ groups.push(lis);
199
+ }
200
+
201
+ //Add "last" classes.
202
+ var i;
203
+ for (i = 0; i < groups.length; i++) {
204
+ groups[i].filter(':last').addClass('last');
205
+ }
206
+
207
+ function toggleClasses(clickedItem, group) {
208
+ var index = group.index(clickedItem);
209
+ var i;
210
+ for (i = 0; i < groups.length; i++) {
211
+ groups[i].removeClass('current');
212
+ groups[i].eq(index).addClass('current');
213
+ }
214
+ }
215
+
216
+ //Toggle on tab (dt) click.
217
+ dts.on('click', function (e) {
218
+ //They clicked the current dt to close it. Restore the wrapper to unclicked state.
219
+ if (jQuery(this).hasClass('current') && wrapper.hasClass('accordion-open')) {
220
+ wrapper.removeClass('accordion-open');
221
+ } else {
222
+ //They're clicking something new. Reflect the explicit user interaction.
223
+ wrapper.addClass('accordion-open');
224
+ }
225
+ toggleClasses(jQuery(this), dts);
226
+ });
227
+
228
+ //Toggle on tab (li) click.
229
+ if (hasTabs) {
230
+ lis.on('click', function (e) {
231
+ toggleClasses(jQuery(this), lis);
232
+ });
233
+ //Open the first tab.
234
+ lis.eq(0).trigger('click');
235
+ }
236
+
237
+ //Open the first accordion if desired.
238
+ if (startOpen) {
239
+ dts.eq(0).trigger('click');
240
+ }
241
+
242
+ });
243
+ },
244
+ alignProductGridActions: function() {
245
+ // ==============================================
246
+ // Product Listing - Align action buttons/links
247
+ // ==============================================
248
+
249
+ // Since the number of columns per grid will vary based on the viewport size, the only way to align the action
250
+ // buttons/links is via JS
251
+
252
+ if ($j('.products-grid').length) {
253
+
254
+ var alignProductGridActions = function () {
255
+ // Loop through each product grid on the page
256
+ $j('.products-grid').each(function(){
257
+ var gridRows = []; // This will store an array per row
258
+ var tempRow = [];
259
+ productGridElements = $j(this).children('li');
260
+ productGridElements.each(function (index) {
261
+ // The JS ought to be agnostic of the specific CSS breakpoints, so we are dynamically checking to find
262
+ // each row by grouping all cells (eg, li elements) up until we find an element that is cleared.
263
+ // We are ignoring the first cell since it will always be cleared.
264
+ if ($j(this).css('clear') != 'none' && index != 0) {
265
+ gridRows.push(tempRow); // Add the previous set of rows to the main array
266
+ tempRow = []; // Reset the array since we're on a new row
267
+ }
268
+ tempRow.push(this);
269
+
270
+ // The last row will not contain any cells that clear that row, so we check to see if this is the last cell
271
+ // in the grid, and if so, we add its row to the array
272
+ if (productGridElements.length == index + 1) {
273
+ gridRows.push(tempRow);
274
+ }
275
+ });
276
+
277
+ $j.each(gridRows, function () {
278
+ var tallestProductInfo = 0;
279
+ $j.each(this, function () {
280
+ // Since this function is called every time the page is resized, we need to remove the min-height
281
+ // and bottom-padding so each cell can return to its natural size before being measured.
282
+ $j(this).find('.product-info').css({
283
+ 'min-height': '',
284
+ 'padding-bottom': ''
285
+ });
286
+
287
+ // We are checking the height of .product-info (rather than the entire li), because the images
288
+ // will not be loaded when this JS is run.
289
+ var productInfoHeight = $j(this).find('.product-info').height();
290
+ // Space above .actions element
291
+ var actionSpacing = 10;
292
+ // The height of the absolutely positioned .actions element
293
+ var actionHeight = $j(this).find('.product-info .actions').height();
294
+
295
+ // Add height of two elements. This is necessary since .actions is absolutely positioned and won't
296
+ // be included in the height of .product-info
297
+ var totalHeight = productInfoHeight + actionSpacing + actionHeight;
298
+ if (totalHeight > tallestProductInfo) {
299
+ tallestProductInfo = totalHeight;
300
+ }
301
+
302
+ // Set the bottom-padding to accommodate the height of the .actions element. Note: if .actions
303
+ // elements are of varying heights, they will not be aligned.
304
+ $j(this).find('.product-info').css('padding-bottom', actionHeight + 'px');
305
+ });
306
+ // Set the height of all .product-info elements in a row to the tallest height
307
+ $j.each(this, function () {
308
+ $j(this).find('.product-info').css('min-height', tallestProductInfo);
309
+ });
310
+ });
311
+ });
312
+ }
313
+ alignProductGridActions();
314
+ }
315
+ },
316
+ blockCollapsing: function() {
317
+ // ==============================================
318
+ // Block collapsing (on smaller viewports)
319
+ // ==============================================
320
+
321
+ enquire.register('(max-width: ' + bp.medium + 'px)', {
322
+ setup: function () {
323
+ this.toggleElements = $j(
324
+ // This selects the menu on the My Account and CMS pages
325
+ '.col-left-first .block:not(.block-layered-nav) .block-title, ' +
326
+ '.col-left-first .block-layered-nav .block-subtitle--filter, ' +
327
+ '.sidebar:not(.col-left-first) .block .block-title'
328
+ );
329
+ },
330
+ match: function () {
331
+ this.toggleElements.toggleSingle();
332
+ },
333
+ unmatch: function () {
334
+ this.toggleElements.toggleSingle({destruct: true});
335
+ }
336
+ });
337
+ }
338
+ }
skin/frontend/base/default/js/catalin_seo/handler.js CHANGED
File without changes
skin/frontend/base/default/js/catalin_seo/native.history.js CHANGED
File without changes