MagnifyStudio_Catalogue - Version 0.1.0

Version Notes

# 0.1.0 - 02/09/2014

- Initial release of Magento Catalogue
- Ability to browse a root category (anchored) using layered navigation
- Manufacturer page listing all manufacturers and linking to corresponding products
- Block helper for implementing manufacturer drop-down in header

Download this release

Release Info

Developer MagnifyStudio
Extension MagnifyStudio_Catalogue
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/MagnifyStudio/Catalogue/.DS_Store ADDED
Binary file
app/code/community/MagnifyStudio/Catalogue/controllers/.DS_Store ADDED
Binary file
app/code/community/MagnifyStudio/Catalogue/controllers/IndexController.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once "app/code/core/Mage/Catalog/controllers/CategoryController.php";
4
+
5
+ /**
6
+ * Catalogue index controller for providing layered navigation for the root category
7
+ *
8
+ * @package Catalogue
9
+ * @author Micheal Morgan <micheal@morgan.ly>
10
+ * @copyright (c) 2014 Micheal Morgan
11
+ * @license MIT
12
+ */
13
+ class MagnifyStudio_Catalogue_IndexController extends Mage_Catalog_CategoryController
14
+ {
15
+ /**
16
+ * indexAction
17
+ *
18
+ * @access public
19
+ * @return void
20
+ */
21
+ public function indexAction()
22
+ {
23
+ $this->viewAction();
24
+ }
25
+
26
+ /**
27
+ * Overload and initiate using root category. Note: Under the Admin Panel for the root
28
+ * category, in "Display Settings" -> "Is Anchor" needs to be set to "Yes"
29
+ *
30
+ * @static
31
+ * @access public
32
+ * @param mixed string|NULL
33
+ * @param array
34
+ * @return Storage_Connection
35
+ */
36
+ protected function _initCatagory()
37
+ {
38
+ Mage::dispatchEvent('catalog_controller_category_init_before', array('controller_action' => $this));
39
+
40
+ $categoryId = Mage::app()->getStore()->getRootCategoryId();
41
+
42
+ $category = Mage::getModel('catalog/category')
43
+ ->setStoreId(Mage::app()->getStore()->getId())
44
+ ->load($categoryId);
45
+
46
+ Mage::getSingleton('catalog/session')->setLastVisitedCategoryId($category->getId());
47
+ Mage::register('current_category', $category);
48
+ Mage::register('current_entity_key', $category->getPath());
49
+
50
+ try {
51
+ Mage::dispatchEvent(
52
+ 'catalog_controller_category_init_after',
53
+ array(
54
+ 'category' => $category,
55
+ 'controller_action' => $this
56
+ )
57
+ );
58
+ } catch (Mage_Core_Exception $e) {
59
+ Mage::logException($e);
60
+ return false;
61
+ }
62
+
63
+ return $category;
64
+ }
65
+ }
app/code/community/MagnifyStudio/Catalogue/controllers/ManufacturersController.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Catalogue Manufacturers
4
+ *
5
+ * @package Catalogue
6
+ * @author Micheal Morgan <micheal@morgan.ly>
7
+ * @copyright (c) 2014 Micheal Morgan
8
+ * @license MIT
9
+ */
10
+ class MagnifyStudio_Catalogue_ManufacturersController extends Mage_Core_Controller_Front_Action
11
+ {
12
+ /**
13
+ * indexAction
14
+ *
15
+ * @access public
16
+ * @return void
17
+ */
18
+ public function indexAction()
19
+ {
20
+ $this->loadLayout();
21
+
22
+ $this->renderLayout();
23
+ }
24
+ }
app/code/community/MagnifyStudio/Catalogue/etc/.DS_Store ADDED
Binary file
app/code/community/MagnifyStudio/Catalogue/etc/config.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MagnifyStudio_Catalogue>
5
+ <version>0.1.0</version>
6
+ </MagnifyStudio_Catalogue>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <catalogue>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>MagnifyStudio_Catalogue</module>
14
+ <frontName>catalogue</frontName>
15
+ </args>
16
+ </catalogue>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <catalogue>
21
+ <file>magnifystudio-catalogue.xml</file>
22
+ </catalogue>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ </config>
app/design/frontend/default/default/layout/magnifystudio-catalogue.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <catalogue_manufacturers_index>
4
+ <reference name="head">
5
+ <action method="setTitle" translate="title"><title>Manufacturers</title></action>
6
+ </reference>
7
+ <reference name="root">
8
+ <action method="setTemplate"><template>page/3columns.phtml</template></action>
9
+ </reference>
10
+ <reference name="content">
11
+ <block type="core/template" template="magnifystudio-catalogue/manufacturers.phtml"/>
12
+ </reference>
13
+ </catalogue_manufacturers_index>
14
+ </layout>
app/design/frontend/default/default/template/magnifystudio-catalogue/.DS_Store ADDED
Binary file
app/design/frontend/default/default/template/magnifystudio-catalogue/manufacturers.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Catalogue Manufacturers
4
+ *
5
+ * @package Catalogue
6
+ * @author Micheal Morgan <micheal@morgan.ly>
7
+ * @copyright (c) 2014 Micheal Morgan
8
+ * @license MIT
9
+ */
10
+ $product = Mage::getModel('catalog/product');
11
+
12
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
13
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
14
+ ->addFieldToFilter('attribute_code', 'manufacturer');
15
+
16
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
17
+
18
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
19
+ ?>
20
+
21
+ <div class="page-head">
22
+ <h3><?php echo $this->__('Manufacturers') ?></h3>
23
+ </div>
24
+
25
+ <ul>
26
+ <?php foreach ($manufacturers as $manufacturer): ?>
27
+ <li><a href="<?php echo Mage::getURL(), 'catalogue/?manufacturer=', $manufacturer['value']; ?>"><?php echo $manufacturer['label'] ?></a></li>
28
+ <?php endforeach; ?>
29
+ </ul>
app/design/frontend/default/default/template/magnifystudio-catalogue/navigation/.DS_Store ADDED
Binary file
app/design/frontend/default/default/template/magnifystudio-catalogue/navigation/manufacturers.phtml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manufacturers navigation list
4
+ *
5
+ * @package Catalogue
6
+ * @author Micheal Morgan <micheal@morgan.ly>
7
+ * @copyright (c) 2014 Micheal Morgan
8
+ * @license MIT
9
+ */
10
+ $product = Mage::getModel('catalog/product');
11
+
12
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
13
+ ->setEntityTypeFilter($product->getResource()->getTypeId())
14
+ ->addFieldToFilter('attribute_code', 'manufacturer');
15
+
16
+ $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
17
+
18
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
19
+ ?>
20
+ <ul>
21
+ <?php foreach ($manufacturers as $manufacturer): ?>
22
+ <li><a href="<?php echo Mage::getURL(), 'catalogue/?manufacturer=', $manufacturer['value']; ?>"><?php echo $manufacturer['label'] ?></a></li>
23
+ <?php endforeach; ?>
24
+ </ul>
app/etc/modules/MagnifyStudio_Catalogue.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MagnifyStudio_Catalogue>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </MagnifyStudio_Catalogue>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MagnifyStudio_Catalogue</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license>MIT</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Browse all products with layered navigation. Page listing all manufacturers and linking to their corresponding products.</summary>
10
+ <description>Ability for user to browse all products on the front-end with layered navigation. Manufacturers page that lists and links to their corresponding products.</description>
11
+ <notes># 0.1.0 - 02/09/2014&#xD;
12
+ &#xD;
13
+ - Initial release of Magento Catalogue&#xD;
14
+ - Ability to browse a root category (anchored) using layered navigation&#xD;
15
+ - Manufacturer page listing all manufacturers and linking to corresponding products&#xD;
16
+ - Block helper for implementing manufacturer drop-down in header</notes>
17
+ <authors><author><name>MagnifyStudio</name><user>magnifystudio</user><email>micheal.morgan@magnifystudio.com</email></author></authors>
18
+ <date>2014-02-18</date>
19
+ <time>07:14:49</time>
20
+ <contents><target name="mageetc"><dir name="modules"><file name="MagnifyStudio_Catalogue.xml" hash="51256b5f332520ddd32a45d42b4e0128"/></dir></target><target name="magecommunity"><dir name="MagnifyStudio"><dir name="Catalogue"><dir><dir name="controllers"><file name="IndexController.php" hash="f17dc2583e7f67f0d39bceff824627e7"/><file name="ManufacturersController.php" hash="3f09812ec508ab49685504a2b00fc468"/><file name=".DS_Store" hash="0acc0acb491de9ce9abb599ba59f83e5"/></dir><dir name="etc"><file name="config.xml" hash="9ffcbf631ee92bebfc65e41addd4a8a6"/><file name=".DS_Store" hash="5c1d51d504074ee8fa5010ff7b26ca40"/></dir></dir><file name=".DS_Store" hash="9ca904f12a1592635fee7229b28c0676"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="magnifystudio-catalogue.xml" hash="85f325bbfdd7803ab19bcbca5c8dda3e"/></dir><dir name="template"><dir name="magnifystudio-catalogue"><file name="manufacturers.phtml" hash="24b68f9cff4d517ec17875632530a1a6"/><dir><dir name="navigation"><file name="manufacturers.phtml" hash="cdc71e7c5d37d5ec3b89e97e1f334c51"/><file name=".DS_Store" hash="f645a00e439558af6677095428a9ae52"/></dir></dir><file name=".DS_Store" hash="9478f697940077208e3728f6071a5fc6"/></dir></dir></dir></dir></dir></target></contents>
21
+ <compatible/>
22
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
23
+ </package>