Version Notes
Add a vertical menu to your site. Features many css classes and several configuration options.
Download this release
Release Info
Developer | Magento Core Team |
Extension | RicoNeitzel_VertNav |
Version | 0.3.1 |
Comparing to | |
See all releases |
Code changes from version 0.3.0 to 0.3.1
- app/code/community/RicoNeitzel/VertNav/Block/Navigation.php +106 -35
- app/code/community/RicoNeitzel/VertNav/Helper/Data.php +20 -1
- app/code/community/RicoNeitzel/VertNav/Model/System/Config/Source/Root.php +19 -0
- app/code/community/RicoNeitzel/VertNav/etc/config.xml +22 -1
- app/code/community/RicoNeitzel/VertNav/etc/system.xml +21 -0
- app/design/frontend/base/default/template/vertnav/left.phtml +58 -56
- app/design/frontend/default/default/template/vertnav/left.phtml +58 -56
- package.xml +4 -4
app/code/community/RicoNeitzel/VertNav/Block/Navigation.php
CHANGED
@@ -4,23 +4,18 @@
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
*
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
*
|
15 |
* DISCLAIMER
|
16 |
*
|
17 |
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future.
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category RicoNeitzel
|
22 |
* @package RicoNeitzel_VertNav
|
23 |
-
* @copyright Copyright (c)
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
@@ -41,13 +36,19 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
41 |
* Netzarbeiter_GroupsCatalog
|
42 |
* Netzarbeiter_LoginCatalog
|
43 |
*
|
|
|
|
|
|
|
44 |
* @return string
|
45 |
*/
|
46 |
public function getCacheKey()
|
47 |
{
|
48 |
-
$key =
|
49 |
-
$
|
50 |
-
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
/**
|
@@ -61,7 +62,7 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
-
* Check if the
|
65 |
*
|
66 |
* @return boolean
|
67 |
*/
|
@@ -75,7 +76,7 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
-
* Check if the
|
79 |
*
|
80 |
* @return boolean
|
81 |
*/
|
@@ -90,7 +91,7 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
90 |
}
|
91 |
|
92 |
/**
|
93 |
-
* This method is only here to provide compatibility with the
|
94 |
*
|
95 |
* @param Varien_Data_Tree_Node $category
|
96 |
* @param int $level
|
@@ -115,10 +116,7 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
115 |
{
|
116 |
$html = array();
|
117 |
|
118 |
-
//if (! $category instanceof Varien_Data_Tree_Node) return '';
|
119 |
-
|
120 |
if ($this->_checkLoginCatalog()) return '';
|
121 |
-
|
122 |
if (! $category->getIsActive()) return '';
|
123 |
|
124 |
if (! isset($levelClass)) $levelClass = array();
|
@@ -155,13 +153,10 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
155 |
if (in_array($category->getId(), $this->getCurrentCategoryPath())
|
156 |
|| ($autoExpand && $autoMaxDepth == 0)
|
157 |
|| ($autoExpand && $autoMaxDepth > $level+1)
|
158 |
-
)
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
{
|
163 |
-
$this->_addProductCount($children);
|
164 |
-
}
|
165 |
$children = $this->toLinearArray($children);
|
166 |
|
167 |
//usort($children, array($this, '_sortCategoryArrayByName'));
|
@@ -225,11 +220,25 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
225 |
return $array;
|
226 |
}
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
protected function _sortCategoryArrayByName($a, $b)
|
229 |
{
|
230 |
return strcoll($a->getName(), $b->getName());
|
231 |
}
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
protected function _getClassNameFromCategoryName($category)
|
234 |
{
|
235 |
$name = $category->getName();
|
@@ -253,11 +262,23 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
253 |
return $customerGroupId;
|
254 |
}
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
protected function _isCurrentCategory($category)
|
257 |
{
|
258 |
return ($cat = $this->getCurrentCategory()) && $cat->getId() == $category->getId();
|
259 |
}
|
260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
protected function _getProductCount($category)
|
262 |
{
|
263 |
if (null === ($count = $category->getData('product_count')))
|
@@ -275,15 +296,21 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
275 |
return $count;
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
protected function _getProductCountFromTreeNode(Varien_Data_Tree_Node $category)
|
279 |
{
|
280 |
-
return Mage::
|
281 |
}
|
282 |
|
283 |
/**
|
284 |
* Get catagories of current store, using the max depth setting for the vertical navigation
|
285 |
*
|
286 |
-
* @return
|
287 |
*/
|
288 |
public function getStoreCategories()
|
289 |
{
|
@@ -328,6 +355,19 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
328 |
$parent = $cat->getId();
|
329 |
}
|
330 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
if (! $parent && Mage::getStoreConfig('catalog/vertnav/fallback_to_root'))
|
332 |
{
|
333 |
$parent = Mage::app()->getStore()->getRootCategoryId();
|
@@ -340,22 +380,45 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
340 |
{
|
341 |
return array();
|
342 |
}
|
|
|
|
|
343 |
|
344 |
-
$
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
->addAttributeToSelect('name')
|
347 |
-
->
|
348 |
-
->
|
349 |
-
|
|
|
|
|
|
|
350 |
if ($this->displayProductCount())
|
351 |
{
|
352 |
-
$
|
353 |
}
|
354 |
|
355 |
-
|
356 |
-
return $storeCategories;
|
357 |
}
|
358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
protected function _addProductCount($collection)
|
360 |
{
|
361 |
if ($collection instanceof Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection)
|
@@ -376,6 +439,10 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
376 |
return $this;
|
377 |
}
|
378 |
|
|
|
|
|
|
|
|
|
379 |
protected function _getProductCollectionResource()
|
380 |
{
|
381 |
if (null === $this->_productCollection)
|
@@ -385,6 +452,10 @@ class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
|
|
385 |
return $this->_productCollection;
|
386 |
}
|
387 |
|
|
|
|
|
|
|
|
|
388 |
public function displayProductCount()
|
389 |
{
|
390 |
return Mage::getStoreConfigFlag('catalog/vertnav/display_product_count');
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0).
|
8 |
+
* It is available through the world-wide-web at this URL:
|
|
|
9 |
* http://opensource.org/licenses/osl-3.0.php
|
|
|
|
|
|
|
10 |
*
|
11 |
* DISCLAIMER
|
12 |
*
|
13 |
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
14 |
+
* versions in the future.
|
|
|
15 |
*
|
16 |
* @category RicoNeitzel
|
17 |
* @package RicoNeitzel_VertNav
|
18 |
+
* @copyright Copyright (c) 2011 Vinai Kopp http://netzarbeiter.com/
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
36 |
* Netzarbeiter_GroupsCatalog
|
37 |
* Netzarbeiter_LoginCatalog
|
38 |
*
|
39 |
+
* Also add the current product and current cms page id if they exist if
|
40 |
+
* this block has been added to a cms or product detail page.
|
41 |
+
*
|
42 |
* @return string
|
43 |
*/
|
44 |
public function getCacheKey()
|
45 |
{
|
46 |
+
$key = parent::getCacheKey();
|
47 |
+
$customerGroupId = $this->_getCustomerGroupId();
|
48 |
+
$productId = Mage::registry('current_product') ? Mage::registry('current_product') : 0;
|
49 |
+
$cmsPageId = Mage::app()->getRequest()->getParam('page_id', Mage::getStoreConfig(Mage_Cms_Helper_Page::XML_PATH_HOME_PAGE));
|
50 |
+
|
51 |
+
return 'VERTNAV_' . $key . '_' . $customerGroupId . '_' . $productId . '_' . $cmsPageId;
|
52 |
}
|
53 |
|
54 |
/**
|
62 |
}
|
63 |
|
64 |
/**
|
65 |
+
* Check if the Netzarbeiter_LoginCatalog extension is installed and active
|
66 |
*
|
67 |
* @return boolean
|
68 |
*/
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
+
* Check if the Netzarbeiter_LoginCatalog extension is configured to hide categories from logged out customers
|
80 |
*
|
81 |
* @return boolean
|
82 |
*/
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
+
* This method is only here to provide compatibility with the Netzarbeiter_LoginCatalog extension
|
95 |
*
|
96 |
* @param Varien_Data_Tree_Node $category
|
97 |
* @param int $level
|
116 |
{
|
117 |
$html = array();
|
118 |
|
|
|
|
|
119 |
if ($this->_checkLoginCatalog()) return '';
|
|
|
120 |
if (! $category->getIsActive()) return '';
|
121 |
|
122 |
if (! isset($levelClass)) $levelClass = array();
|
153 |
if (in_array($category->getId(), $this->getCurrentCategoryPath())
|
154 |
|| ($autoExpand && $autoMaxDepth == 0)
|
155 |
|| ($autoExpand && $autoMaxDepth > $level+1)
|
156 |
+
) {
|
157 |
+
$children = $this->_getCategoryCollection()
|
158 |
+
->addIdFilter($category->getChildren());
|
159 |
+
|
|
|
|
|
|
|
160 |
$children = $this->toLinearArray($children);
|
161 |
|
162 |
//usort($children, array($this, '_sortCategoryArrayByName'));
|
220 |
return $array;
|
221 |
}
|
222 |
|
223 |
+
/**
|
224 |
+
* Sorting Method
|
225 |
+
*
|
226 |
+
* @param Mage_Catalog_Model_Category $a
|
227 |
+
* @param Mage_Catalog_Model_Category $b
|
228 |
+
* @return int
|
229 |
+
* @deprecated
|
230 |
+
*/
|
231 |
protected function _sortCategoryArrayByName($a, $b)
|
232 |
{
|
233 |
return strcoll($a->getName(), $b->getName());
|
234 |
}
|
235 |
|
236 |
+
/**
|
237 |
+
* Convert the category name into a string that can be used as a css class
|
238 |
+
*
|
239 |
+
* @param Mage_Catalog_Model_Category $category
|
240 |
+
* @return string
|
241 |
+
*/
|
242 |
protected function _getClassNameFromCategoryName($category)
|
243 |
{
|
244 |
$name = $category->getName();
|
262 |
return $customerGroupId;
|
263 |
}
|
264 |
|
265 |
+
/**
|
266 |
+
* Check if the current category matches the passed in category
|
267 |
+
*
|
268 |
+
* @param Mage_Catalog_Model_Category $category
|
269 |
+
* @return bool
|
270 |
+
*/
|
271 |
protected function _isCurrentCategory($category)
|
272 |
{
|
273 |
return ($cat = $this->getCurrentCategory()) && $cat->getId() == $category->getId();
|
274 |
}
|
275 |
|
276 |
+
/**
|
277 |
+
* Return the number of products assigned to the category
|
278 |
+
*
|
279 |
+
* @param Mage_Catalog_Model_Category|Varien_Data_Tree_Node $category
|
280 |
+
* @return int
|
281 |
+
*/
|
282 |
protected function _getProductCount($category)
|
283 |
{
|
284 |
if (null === ($count = $category->getData('product_count')))
|
296 |
return $count;
|
297 |
}
|
298 |
|
299 |
+
/**
|
300 |
+
* Get the number of products from a category tree node
|
301 |
+
*
|
302 |
+
* @param Varien_Data_Tree_Node $category
|
303 |
+
* @return int
|
304 |
+
*/
|
305 |
protected function _getProductCountFromTreeNode(Varien_Data_Tree_Node $category)
|
306 |
{
|
307 |
+
return Mage::getSingleton('catalog/category')->setId($category->getId())->getProductCount();
|
308 |
}
|
309 |
|
310 |
/**
|
311 |
* Get catagories of current store, using the max depth setting for the vertical navigation
|
312 |
*
|
313 |
+
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
|
314 |
*/
|
315 |
public function getStoreCategories()
|
316 |
{
|
355 |
$parent = $cat->getId();
|
356 |
}
|
357 |
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Thanks to thebod for this patch!
|
361 |
+
* It enables the setting of the category ID to use via Layout XML:
|
362 |
+
*
|
363 |
+
* <reference name="catalog.vertnav">
|
364 |
+
* <action method="setCategoryId"><category_id>8</category_id></action>
|
365 |
+
* </reference>
|
366 |
+
*/
|
367 |
+
if ($customId = $this->getCategoryId()) {
|
368 |
+
$parent = $customId;
|
369 |
+
}
|
370 |
+
|
371 |
if (! $parent && Mage::getStoreConfig('catalog/vertnav/fallback_to_root'))
|
372 |
{
|
373 |
$parent = Mage::app()->getStore()->getRootCategoryId();
|
380 |
{
|
381 |
return array();
|
382 |
}
|
383 |
+
$storeCategories = $this->_getCategoryCollection()
|
384 |
+
->addFieldToFilter('parent_id', $parent);
|
385 |
|
386 |
+
$this->_storeCategories = $storeCategories;
|
387 |
+
return $storeCategories;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* $childrenIdString is a comma seperated list of category IDs
|
392 |
+
*
|
393 |
+
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
|
394 |
+
*/
|
395 |
+
protected function _getCategoryCollection()
|
396 |
+
{
|
397 |
+
$collection = Mage::getResourceModel('catalog/category_collection');
|
398 |
+
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
|
399 |
+
$collection->addAttributeToSelect('url_key')
|
400 |
->addAttributeToSelect('name')
|
401 |
+
->addAttributeToSelect('all_children')
|
402 |
+
->addAttributeToFilter('is_active', 1)
|
403 |
+
->addAttributeToFilter('include_in_menu', 1)
|
404 |
+
->setOrder('position', 'ASC')
|
405 |
+
->joinUrlRewrite();
|
406 |
+
|
407 |
if ($this->displayProductCount())
|
408 |
{
|
409 |
+
$collection->setLoadProductCount(true);
|
410 |
}
|
411 |
|
412 |
+
return $collection;
|
|
|
413 |
}
|
414 |
|
415 |
+
/**
|
416 |
+
*
|
417 |
+
* @param Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection $collection
|
418 |
+
* @return RicoNeitzel_VertNav_Block_Navigation
|
419 |
+
* @deprecated Now the count is added directly in _getCategoryChildren()
|
420 |
+
* @see _getCategoryChildren()
|
421 |
+
*/
|
422 |
protected function _addProductCount($collection)
|
423 |
{
|
424 |
if ($collection instanceof Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection)
|
439 |
return $this;
|
440 |
}
|
441 |
|
442 |
+
/**
|
443 |
+
*
|
444 |
+
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
|
445 |
+
*/
|
446 |
protected function _getProductCollectionResource()
|
447 |
{
|
448 |
if (null === $this->_productCollection)
|
452 |
return $this->_productCollection;
|
453 |
}
|
454 |
|
455 |
+
/**
|
456 |
+
*
|
457 |
+
* @return bool
|
458 |
+
*/
|
459 |
public function displayProductCount()
|
460 |
{
|
461 |
return Mage::getStoreConfigFlag('catalog/vertnav/display_product_count');
|
app/code/community/RicoNeitzel/VertNav/Helper/Data.php
CHANGED
@@ -1,6 +1,25 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
class RicoNeitzel_VertNav_Helper_Data extends
|
4 |
{
|
5 |
|
6 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0).
|
8 |
+
* It is available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
11 |
+
* DISCLAIMER
|
12 |
+
*
|
13 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
14 |
+
* versions in the future.
|
15 |
+
*
|
16 |
+
* @category RicoNeitzel
|
17 |
+
* @package RicoNeitzel_VertNav
|
18 |
+
* @copyright Copyright (c) 2011 Vinai Kopp http://netzarbeiter.com/
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
|
22 |
+
class RicoNeitzel_VertNav_Helper_Data extends Mage_Core_Helper_Abstract
|
23 |
{
|
24 |
|
25 |
}
|
app/code/community/RicoNeitzel/VertNav/Model/System/Config/Source/Root.php
CHANGED
@@ -1,4 +1,23 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
class RicoNeitzel_VertNav_Model_System_Config_Source_Root
|
4 |
extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0).
|
8 |
+
* It is available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
11 |
+
* DISCLAIMER
|
12 |
+
*
|
13 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
14 |
+
* versions in the future.
|
15 |
+
*
|
16 |
+
* @category RicoNeitzel
|
17 |
+
* @package RicoNeitzel_VertNav
|
18 |
+
* @copyright Copyright (c) 2011 Vinai Kopp http://netzarbeiter.com/
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
|
22 |
class RicoNeitzel_VertNav_Model_System_Config_Source_Root
|
23 |
extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
|
app/code/community/RicoNeitzel/VertNav/etc/config.xml
CHANGED
@@ -1,8 +1,29 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<RicoNeitzel_VertNav>
|
5 |
-
<version>0.3.
|
6 |
</RicoNeitzel_VertNav>
|
7 |
</modules>
|
8 |
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0).
|
9 |
+
* It is available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @category RicoNeitzel
|
18 |
+
* @package RicoNeitzel_VertNav
|
19 |
+
* @copyright Copyright (c) 2011 Vinai Kopp http://netzarbeiter.com/
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
<config>
|
24 |
<modules>
|
25 |
<RicoNeitzel_VertNav>
|
26 |
+
<version>0.3.1</version>
|
27 |
</RicoNeitzel_VertNav>
|
28 |
</modules>
|
29 |
|
app/code/community/RicoNeitzel/VertNav/etc/system.xml
CHANGED
@@ -1,4 +1,25 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<sections>
|
4 |
<catalog translate="label" module="catalog">
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0).
|
9 |
+
* It is available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @category RicoNeitzel
|
18 |
+
* @package RicoNeitzel_VertNav
|
19 |
+
* @copyright Copyright (c) 2011 Vinai Kopp http://netzarbeiter.com/
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
<config>
|
24 |
<sections>
|
25 |
<catalog translate="label" module="catalog">
|
app/design/frontend/base/default/template/vertnav/left.phtml
CHANGED
@@ -1,56 +1,58 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category design_default
|
22 |
-
* @package RicoNeitzel
|
23 |
-
* @copyright Copyright (c) 2009 Vinai Kopp http//netzarbeiter.com/
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
/**
|
29 |
-
* Left menu for store
|
30 |
-
*
|
31 |
-
* @see RicoNeitzel_VertNav_Block_Navgation
|
32 |
-
* @see Mage_Catalog_Block_Navigation
|
33 |
-
*/
|
34 |
-
?>
|
35 |
-
<div class="vertnav-container">
|
36 |
-
<div class="">
|
37 |
-
<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
|
38 |
-
|
39 |
-
<?php $
|
40 |
-
|
41 |
-
<?php
|
42 |
-
<?php $class = array() ?>
|
43 |
-
<?php if ($count == 1): ?>
|
44 |
-
<?php $class[] = 'only' ?>
|
45 |
-
<?php elseif (! $i): ?>
|
46 |
-
<?php $class[] = 'first' ?>
|
47 |
-
<?php elseif ($i == $count-1): ?>
|
48 |
-
<?php $class[] = 'last' ?>
|
49 |
-
<?php endif; ?>
|
50 |
-
<?php if (isset($store_categories[$i+1]) && $this->isCategoryActive($store_categories[$i+1])) $class[] = 'prev'; ?>
|
51 |
-
<?php if (isset($store_categories[$i-1]) && $this->isCategoryActive($store_categories[$i-1])) $class[] = 'next'; ?>
|
52 |
-
<?php echo $this->drawOpenCategoryItem($_category, 0, $class) ?>
|
53 |
-
<?php endforeach ?>
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package RicoNeitzel
|
23 |
+
* @copyright Copyright (c) 2009 Vinai Kopp http//netzarbeiter.com/
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Left menu for store
|
30 |
+
*
|
31 |
+
* @see RicoNeitzel_VertNav_Block_Navgation
|
32 |
+
* @see Mage_Catalog_Block_Navigation
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<div class="vertnav-container">
|
36 |
+
<div class="">
|
37 |
+
<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
|
38 |
+
<?php $store_categories = $this->toLinearArray($this->getStoreCategories()) ?>
|
39 |
+
<?php if ($count = count($store_categories)): ?>
|
40 |
+
<ul id="vertnav">
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php foreach ($store_categories as $i => $_category): ?><?php $class = array() ?>
|
43 |
+
<?php if ($count == 1): ?>
|
44 |
+
<?php $class[] = 'only' ?>
|
45 |
+
<?php elseif (! $i): ?>
|
46 |
+
<?php $class[] = 'first' ?>
|
47 |
+
<?php elseif ($i == $count-1): ?>
|
48 |
+
<?php $class[] = 'last' ?>
|
49 |
+
<?php endif; ?>
|
50 |
+
<?php if (isset($store_categories[$i+1]) && $this->isCategoryActive($store_categories[$i+1])) $class[] = 'prev'; ?>
|
51 |
+
<?php if (isset($store_categories[$i-1]) && $this->isCategoryActive($store_categories[$i-1])) $class[] = 'next'; ?>
|
52 |
+
<?php echo $this->drawOpenCategoryItem($_category, 0, $class) ?>
|
53 |
+
<?php endforeach ?>
|
54 |
+
<?php if ($count): ?>
|
55 |
+
</ul>
|
56 |
+
<?php endif; ?>
|
57 |
+
</div>
|
58 |
+
</div>
|
app/design/frontend/default/default/template/vertnav/left.phtml
CHANGED
@@ -1,56 +1,58 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category design_default
|
22 |
-
* @package RicoNeitzel
|
23 |
-
* @copyright Copyright (c) 2009 Vinai Kopp http//netzarbeiter.com/
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
/**
|
29 |
-
* Left menu for store
|
30 |
-
*
|
31 |
-
* @see RicoNeitzel_VertNav_Block_Navgation
|
32 |
-
* @see Mage_Catalog_Block_Navigation
|
33 |
-
*/
|
34 |
-
?>
|
35 |
-
<div class="vertnav-container">
|
36 |
-
<div class="">
|
37 |
-
<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
|
38 |
-
|
39 |
-
<?php $
|
40 |
-
|
41 |
-
<?php
|
42 |
-
<?php $class = array() ?>
|
43 |
-
<?php if ($count == 1): ?>
|
44 |
-
<?php $class[] = 'only' ?>
|
45 |
-
<?php elseif (! $i): ?>
|
46 |
-
<?php $class[] = 'first' ?>
|
47 |
-
<?php elseif ($i == $count-1): ?>
|
48 |
-
<?php $class[] = 'last' ?>
|
49 |
-
<?php endif; ?>
|
50 |
-
<?php if (isset($store_categories[$i+1]) && $this->isCategoryActive($store_categories[$i+1])) $class[] = 'prev'; ?>
|
51 |
-
<?php if (isset($store_categories[$i-1]) && $this->isCategoryActive($store_categories[$i-1])) $class[] = 'next'; ?>
|
52 |
-
<?php echo $this->drawOpenCategoryItem($_category, 0, $class) ?>
|
53 |
-
<?php endforeach ?>
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package RicoNeitzel
|
23 |
+
* @copyright Copyright (c) 2009 Vinai Kopp http//netzarbeiter.com/
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Left menu for store
|
30 |
+
*
|
31 |
+
* @see RicoNeitzel_VertNav_Block_Navgation
|
32 |
+
* @see Mage_Catalog_Block_Navigation
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<div class="vertnav-container">
|
36 |
+
<div class="">
|
37 |
+
<h4 class="no-display"><?php echo $this->__('Category Navigation:') ?></h4>
|
38 |
+
<?php $store_categories = $this->toLinearArray($this->getStoreCategories()) ?>
|
39 |
+
<?php if ($count = count($store_categories)): ?>
|
40 |
+
<ul id="vertnav">
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php foreach ($store_categories as $i => $_category): ?><?php $class = array() ?>
|
43 |
+
<?php if ($count == 1): ?>
|
44 |
+
<?php $class[] = 'only' ?>
|
45 |
+
<?php elseif (! $i): ?>
|
46 |
+
<?php $class[] = 'first' ?>
|
47 |
+
<?php elseif ($i == $count-1): ?>
|
48 |
+
<?php $class[] = 'last' ?>
|
49 |
+
<?php endif; ?>
|
50 |
+
<?php if (isset($store_categories[$i+1]) && $this->isCategoryActive($store_categories[$i+1])) $class[] = 'prev'; ?>
|
51 |
+
<?php if (isset($store_categories[$i-1]) && $this->isCategoryActive($store_categories[$i-1])) $class[] = 'next'; ?>
|
52 |
+
<?php echo $this->drawOpenCategoryItem($_category, 0, $class) ?>
|
53 |
+
<?php endforeach ?>
|
54 |
+
<?php if ($count): ?>
|
55 |
+
</ul>
|
56 |
+
<?php endif; ?>
|
57 |
+
</div>
|
58 |
+
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>RicoNeitzel_VertNav</name>
|
4 |
-
<version>0.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Lots of css selectors available.</description>
|
11 |
<notes>Add a vertical menu to your site. Features many css classes and several configuration options.</notes>
|
12 |
<authors><author><name>Vinai Kopp</name><user>auto-converted</user><email>vinai@netzarbeiter.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>RicoNeitzel_VertNav</name>
|
4 |
+
<version>0.3.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Lots of css selectors available.</description>
|
11 |
<notes>Add a vertical menu to your site. Features many css classes and several configuration options.</notes>
|
12 |
<authors><author><name>Vinai Kopp</name><user>auto-converted</user><email>vinai@netzarbeiter.com</email></author></authors>
|
13 |
+
<date>2011-07-01</date>
|
14 |
+
<time>09:47:44</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="RicoNeitzel"><dir name="VertNav"><dir name="Block"><file name="Navigation.php" hash="940b4d2df80832e116e8e94cc2132b05"/></dir><dir name="Helper"><file name="Data.php" hash="a3995193a1ce5560edbd95e11720ce8b"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Root.php" hash="20696bf2dfef3e1092d7c08caf1dbc8e"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="fe162a257b72b1fb21f182b59f44c303"/><file name="system.xml" hash="6008ceee34063d9cb0c6779993af2cfa"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RicoNeitzel_VertNav.xml" hash="227d7980c24ebd629e1c1d4f10b8c62c"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="RicoNeitzel_VertNav.csv" hash="d42b529ba0390d03812d979fbe498d49"/></dir><dir name="es_MX"><file name="RicoNeitzel_VertNav.csv" hash="54b83643165bc5b72ca8ce2122fd5422"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="vertnav.xml" hash="956ada78dc7cd460a2e94a718e33dfa9"/></dir><dir name="template"><dir name="vertnav"><file name="left.phtml" hash="e2f0d7e286ad1d3caadd4892fbb0671f"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="vertnav.xml" hash="956ada78dc7cd460a2e94a718e33dfa9"/></dir><dir name="template"><dir name="vertnav"><file name="left.phtml" hash="e2f0d7e286ad1d3caadd4892fbb0671f"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="vertnav.css" hash="48ed54348eefcc8e1e0286feb84cbe4e"/></dir></dir></dir><dir name="default"><dir name="default"><dir name="css"><file name="vertnav.css" hash="48ed54348eefcc8e1e0286feb84cbe4e"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|