Version Notes
Category navigation become filtered by ymm.
Layered navigation "SHOP BY" was added to the ymm/product/list page.
The products without ymm restrictions are not longer considered as universal and are not shown.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Year_Make_Model_Filter_Box |
Version | 4.1 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.1
app/code/local/Pektsekye/Ymm/Block/Product/Result.php
CHANGED
@@ -41,32 +41,11 @@ class Pektsekye_Ymm_Block_Product_Result extends Mage_Catalog_Block_Product_Abst
|
|
41 |
|
42 |
protected function _getProductCollection()
|
43 |
{
|
44 |
-
$helper = new Pektsekye_Ymm_Helper_Data;
|
45 |
-
|
46 |
-
if($ids = $helper->getProductIds()){
|
47 |
-
|
48 |
-
$this->_productCollection = Mage::getResourceModel('catalog/product_collection')
|
49 |
-
->setStoreId($this->getStoreId())
|
50 |
-
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
51 |
-
->addIdFilter($ids)
|
52 |
-
->addStoreFilter()
|
53 |
-
->addMinimalPrice()
|
54 |
-
->addUrlRewrite();
|
55 |
-
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
|
56 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_productCollection);
|
57 |
-
|
58 |
-
} else {
|
59 |
-
|
60 |
-
$this->_productCollection = Mage::getResourceModel('catalog/product_collection')
|
61 |
-
->setStoreId($this->getStoreId())
|
62 |
-
->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
|
63 |
-
->addStoreFilter()
|
64 |
-
->addMinimalPrice()
|
65 |
-
->addUrlRewrite();
|
66 |
-
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_productCollection);
|
67 |
-
Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_productCollection);
|
68 |
-
}
|
69 |
|
|
|
|
|
|
|
|
|
70 |
return $this->_productCollection;
|
71 |
}
|
72 |
|
41 |
|
42 |
protected function _getProductCollection()
|
43 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
+
if (is_null($this->_productCollection)) {
|
46 |
+
$this->_productCollection = Mage::getSingleton('catalogsearch/layer')->getProductCollection();
|
47 |
+
}
|
48 |
+
|
49 |
return $this->_productCollection;
|
50 |
}
|
51 |
|
app/design/frontend/default/default/layout/ymm.xml
CHANGED
@@ -1,22 +1,14 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<catalog_category_view>
|
4 |
-
<reference name="right">
|
5 |
-
<block type="ymm/ymm" name="ymm" before="-" template="ymm/ymm.phtml" />
|
6 |
-
</reference>
|
7 |
-
</catalog_category_view>
|
8 |
|
9 |
-
<
|
10 |
<reference name="right">
|
11 |
-
<block type="ymm/ymm" name="ymm" before="-" template="ymm/ymm.phtml"
|
12 |
-
<action method="setResultPage"><resultPage>ymm/product/list</resultPage></action>
|
13 |
-
</block>
|
14 |
</reference>
|
15 |
-
</
|
16 |
|
17 |
<ymm_product_list>
|
18 |
<reference name="right">
|
19 |
-
<block type="ymm/ymm" name="ymm" before="-" template="ymm/ymm.phtml"/>
|
20 |
<block type="catalogsearch/layer" name="catalogsearch.leftnav" after="ymm" template="catalog/layer/view.phtml"/>
|
21 |
</reference>
|
22 |
<reference name="content">
|
1 |
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
<default>
|
5 |
<reference name="right">
|
6 |
+
<block type="ymm/ymm" name="ymm" before="-" template="ymm/ymm.phtml"/>
|
|
|
|
|
7 |
</reference>
|
8 |
+
</default>
|
9 |
|
10 |
<ymm_product_list>
|
11 |
<reference name="right">
|
|
|
12 |
<block type="catalogsearch/layer" name="catalogsearch.leftnav" after="ymm" template="catalog/layer/view.phtml"/>
|
13 |
</reference>
|
14 |
<reference name="content">
|
app/design/frontend/default/default/template/ymm/ymm.phtml
CHANGED
@@ -159,7 +159,7 @@ function pop_year(){
|
|
159 |
<div class="head">
|
160 |
<h4><span><?php echo $this->__('Select Vehicle') ?></span></h4>
|
161 |
</div>
|
162 |
-
<form name="make_model_year" action="<?php echo $module
|
163 |
<div class="content">
|
164 |
<select name="Make" onChange="pop_model();" style="width: 100%">
|
165 |
<?php
|
@@ -184,7 +184,7 @@ function pop_year(){
|
|
184 |
</div>
|
185 |
<div class="actions">
|
186 |
<button class="form-button-alt right" type="submit"><span><?php echo $this->__('Go') ?></span></button>
|
187 |
-
<?php if(isset($Make_selected_var)): ?><a href="<?php echo $module
|
188 |
</div>
|
189 |
</form>
|
190 |
</div>
|
159 |
<div class="head">
|
160 |
<h4><span><?php echo $this->__('Select Vehicle') ?></span></h4>
|
161 |
</div>
|
162 |
+
<form name="make_model_year" action="<?php echo $module != 'catalog' ? Mage::getUrl('ymm/product/list') : '' ;?>" method="get">
|
163 |
<div class="content">
|
164 |
<select name="Make" onChange="pop_model();" style="width: 100%">
|
165 |
<?php
|
184 |
</div>
|
185 |
<div class="actions">
|
186 |
<button class="form-button-alt right" type="submit"><span><?php echo $this->__('Go') ?></span></button>
|
187 |
+
<?php if(isset($Make_selected_var)): ?><a href="<?php echo $module != 'catalog' ? Mage::getBaseUrl() : '' ; ?>?Make=all&Model=all&Year=0">Clear Vehicle</a> <?php endif ?>
|
188 |
</div>
|
189 |
</form>
|
190 |
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Year_Make_Model_Filter_Box</name>
|
4 |
-
<version>4.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -23,8 +23,8 @@ Layered navigation "SHOP BY" was added to the ymm/product/list page.
|
|
23 |
The products without ymm restrictions are not longer considered as universal and are not shown.</notes>
|
24 |
<authors><author><name>Stanislav</name><user>auto-converted</user><email>pektsekye@gmail.com</email></author></authors>
|
25 |
<date>2009-07-30</date>
|
26 |
-
<time>
|
27 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ymm.xml" hash="07bb5759f6ff145da493c94452f029af"/></dir><dir name="template"><dir name="ymm"><file name="importExport.phtml" hash="962cd5005434dfb5878b59af757f796e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ymm.xml" hash="
|
28 |
<compatible/>
|
29 |
<dependencies/>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Year_Make_Model_Filter_Box</name>
|
4 |
+
<version>4.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>
|
23 |
The products without ymm restrictions are not longer considered as universal and are not shown.</notes>
|
24 |
<authors><author><name>Stanislav</name><user>auto-converted</user><email>pektsekye@gmail.com</email></author></authors>
|
25 |
<date>2009-07-30</date>
|
26 |
+
<time>19:59:28</time>
|
27 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ymm.xml" hash="07bb5759f6ff145da493c94452f029af"/></dir><dir name="template"><dir name="ymm"><file name="importExport.phtml" hash="962cd5005434dfb5878b59af757f796e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ymm.xml" hash="d7262dfdd3d36f2115652d979caa6688"/></dir><dir name="template"><dir name="ymm"><file name="ymm.phtml" hash="bf4a4c4aa5c726e68eeae908ee938b1a"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pektsekye_Catalog.xml" hash="89e3ec6056b4ba53d06df1370b347d42"/><file name="Pektsekye_CatalogSearch.xml" hash="c1152b8350ae4906db9736369c8e5edf"/><file name="Pektsekye_Ymm.xml" hash="990f4f561816481bd0c517f4fa131436"/></dir></target><target name="magelocal"><dir name="Pektsekye"><dir name="Catalog"><dir name="Model"><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Category.php" hash="5d8d5cd3a20472b66306e161c06865a8"/></dir></dir></dir><file name="Category.php" hash="c1e9b8cfd53a2bf466cbb80d4a9bb227"/></dir></dir><dir name="CatalogSearch"><dir name="Model"><file name="Layer.php" hash="d9576052f726186cbf8d9d23e7ced335"/></dir></dir><dir name="Ymm"><dir name="Block"><dir name="Adminhtml"><dir name="Ymm"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="df436e6aad93d09f7d3082e08373ae22"/></dir><file name="Form.php" hash="c673af9d5e772ee2230a838971a633e1"/><file name="Tabs.php" hash="9048cfd443135e36e2b9cb5de38fcb47"/></dir><file name="Edit.php" hash="fb03b2d7cc9d282221af18c6ce9f6f9f"/><file name="Grid.php" hash="ada75e652f9d9920c08a229242181a05"/><file name="ImportExport.php" hash="e1b161394a704c51c454ead1ca04e6cd"/></dir><file name="Ymm.php" hash="2c2d280c93d8839cd67515cd2d6c7ddd"/></dir><dir name="Product"><file name="Result.php" hash="62a89f2fb905930d5ece223e35d21fda"/></dir><file name="Ymm.php" hash="e3aaa2b05fb14bd52da70d27ae962604"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="YmmController.php" hash="917dbf072d01849a01aa3d35945ef14a"/></dir><file name="IndexController.php" hash="241a989b18c6309977568c050215730a"/><file name="ProductController.php" hash="84c655e892f90dd4b7442243390ebb4a"/></dir><dir name="etc"><file name="config.xml" hash="9a8fe4bc8baab099ee0c9f34acce2ebc"/></dir><dir name="Helper"><file name="Data.php" hash="181c50a246f314fc20991571c4980e5c"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Ymm"><file name="Collection.php" hash="1c6a50ea1416ce936892156806d20e15"/></dir><file name="Ymm.php" hash="1608c162d190561029817336de386205"/></dir><file name="Status.php" hash="a10da0eebafef60fcceb6a8c396ad201"/><file name="Ymm.php" hash="fdf6dbac2b9595f7183ca1f951538b97"/></dir><dir name="sql"><dir name="ymm_setup"><file name="mysql4-install-0.1.0.php" hash="9e4d9d55d8996105775b26c667eff6d1"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="f84214fc43f665c79b92dc7a092b364f"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="b3c26ec790ce60161c9317b01f111ea5"/></dir></dir></dir></dir></target></contents>
|
28 |
<compatible/>
|
29 |
<dependencies/>
|
30 |
</package>
|