Year_Make_Model_Filter_Box - Version 4.4

Version Notes

The error when wrong make or model or year is entered in the url fixed

Download this release

Release Info

Developer Magento Core Team
Extension Year_Make_Model_Filter_Box
Version 4.4
Comparing to
See all releases


Code changes from version 4.3 to 4.4

app/code/local/Pektsekye/Catalog/Model/Category.php CHANGED
@@ -11,9 +11,9 @@ class Pektsekye_Catalog_Model_Category extends Mage_Catalog_Model_Category
11
  public function getProductCollection()
12
  {
13
 
14
- $helper = new Pektsekye_Ymm_Helper_Data;
15
 
16
- if($ids = $helper->getProductIds()){
17
 
18
  $collection = Mage::getResourceModel('catalog/product_collection')
19
  ->setStoreId($this->getStoreId())
11
  public function getProductCollection()
12
  {
13
 
14
+ $ids = Mage::helper('ymm')->getProductIds();
15
 
16
+ if($ids){
17
 
18
  $collection = Mage::getResourceModel('catalog/product_collection')
19
  ->setStoreId($this->getStoreId())
app/code/local/Pektsekye/Catalog/Model/Resource/Eav/Mysql4/Category.php CHANGED
@@ -21,9 +21,9 @@ class Pektsekye_Catalog_Model_Resource_Eav_Mysql4_Category extends Mage_Catalog_
21
 
22
  if(Mage::getStoreConfig('catalog/navigation/filtering', Mage::app()->getStore()->getStoreId())){
23
 
24
- $helper = new Pektsekye_Ymm_Helper_Data;
25
 
26
- if($ids = $helper->getProductIds()){
27
 
28
  $pids = implode(',',$ids);
29
  $resource = Mage::getSingleton('core/resource');
21
 
22
  if(Mage::getStoreConfig('catalog/navigation/filtering', Mage::app()->getStore()->getStoreId())){
23
 
24
+ $ids = Mage::helper('ymm')->getProductIds();
25
 
26
+ if($ids){
27
 
28
  $pids = implode(',',$ids);
29
  $resource = Mage::getSingleton('core/resource');
app/code/local/Pektsekye/CatalogSearch/Model/Layer.php CHANGED
@@ -16,8 +16,7 @@ class Pektsekye_CatalogSearch_Model_Layer extends Mage_CatalogSearch_Model_Layer
16
  }
17
  else {
18
 
19
- $helper = new Pektsekye_Ymm_Helper_Data;
20
- $ids = $helper->getProductIds();
21
 
22
  if($ids){
23
 
@@ -33,6 +32,9 @@ class Pektsekye_CatalogSearch_Model_Layer extends Mage_CatalogSearch_Model_Layer
33
  ->addStoreFilter()
34
  ->addUrlRewrite();
35
 
 
 
 
36
  } elseif (!Mage::helper('catalogSearch')->getEscapedQueryText()){
37
 
38
  $collection = Mage::getResourceModel('catalog/product_collection')
@@ -45,6 +47,9 @@ class Pektsekye_CatalogSearch_Model_Layer extends Mage_CatalogSearch_Model_Layer
45
  ->addStoreFilter()
46
  ->addUrlRewrite();
47
 
 
 
 
48
  } else {
49
 
50
  $collection = Mage::getResourceModel('catalogsearch/fulltext_collection');
@@ -52,8 +57,6 @@ class Pektsekye_CatalogSearch_Model_Layer extends Mage_CatalogSearch_Model_Layer
52
 
53
  }
54
 
55
- Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
56
- Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
57
 
58
  } else {
59
 
16
  }
17
  else {
18
 
19
+ $ids = Mage::helper('ymm')->getProductIds();
 
20
 
21
  if($ids){
22
 
32
  ->addStoreFilter()
33
  ->addUrlRewrite();
34
 
35
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
36
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
37
+
38
  } elseif (!Mage::helper('catalogSearch')->getEscapedQueryText()){
39
 
40
  $collection = Mage::getResourceModel('catalog/product_collection')
47
  ->addStoreFilter()
48
  ->addUrlRewrite();
49
 
50
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
51
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
52
+
53
  } else {
54
 
55
  $collection = Mage::getResourceModel('catalogsearch/fulltext_collection');
57
 
58
  }
59
 
 
 
60
 
61
  } else {
62
 
app/code/local/Pektsekye/Ymm/controllers/ProductController.php CHANGED
@@ -9,6 +9,12 @@ class Pektsekye_Ymm_ProductController extends Mage_Core_Controller_Front_Action
9
  $this->getResponse()->setRedirect(Mage::getBaseUrl());
10
  return;
11
  }
 
 
 
 
 
 
12
  $this->loadLayout();
13
  $this->_initLayoutMessages('checkout/session');
14
  $this->_initLayoutMessages('tag/session');
9
  $this->getResponse()->setRedirect(Mage::getBaseUrl());
10
  return;
11
  }
12
+
13
+ if(!Mage::helper('ymm')->getProductIds()){
14
+ $this->getResponse()->setRedirect(Mage::getBaseUrl());
15
+ return;
16
+ }
17
+
18
  $this->loadLayout();
19
  $this->_initLayoutMessages('checkout/session');
20
  $this->_initLayoutMessages('tag/session');
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.3</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,17 +10,12 @@
10
  <description>This small extension makes it impossible for a customer to filter products by vehicle make, model and year.
11
 
12
  HOW TO USE:
13
- Go to your Magento admin panel -&gt; Ymm -&gt; Manage Items and add YMM items to all your products.
14
-
15
- NOTE: You should know your product id to be able to add an YMM item to it.
16
- You can find product id in the product description page url:
17
- http://yoursite.com/magento/catalog/product/view/id/119/s/coalesce-functioning-on-impatience-t-shirt/category/4/
18
- The number 119 is the product id in the url.</description>
19
- <notes>Catalog Search is made filtered by ymm</notes>
20
  <authors><author><name>Stanislav</name><user>auto-converted</user><email>pektsekye@gmail.com</email></author></authors>
21
- <date>2009-08-01</date>
22
- <time>00:01:14</time>
23
- <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="c8afb5a9803571c68fd62e460002c63d"/></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="e497f8d795dc4ada58b42828ee1ded75"/></dir></dir></dir><file name="Category.php" hash="c1e9b8cfd53a2bf466cbb80d4a9bb227"/></dir></dir><dir name="CatalogSearch"><dir name="Model"><file name="Layer.php" hash="f67a029af92a723745453e6544d5d32c"/></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="bf96d82627a567ea6bb6b5f4b5c96eb4"/></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="de8fc65d3c9652dba2c19553a58fa4bb"/><file name="system.xml" hash="3cc4856f3571c39d735c2818b9aea6b3"/></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>
24
  <compatible/>
25
  <dependencies/>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Year_Make_Model_Filter_Box</name>
4
+ <version>4.4</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>This small extension makes it impossible for a customer to filter products by vehicle make, model and year.
11
 
12
  HOW TO USE:
13
+ Go to your Magento admin panel -&gt; Ymm -&gt; Manage Items and add YMM items to all your products.</description>
14
+ <notes>The error when wrong make or model or year is entered in the url fixed</notes>
 
 
 
 
 
15
  <authors><author><name>Stanislav</name><user>auto-converted</user><email>pektsekye@gmail.com</email></author></authors>
16
+ <date>2009-08-08</date>
17
+ <time>18:36:14</time>
18
+ <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="c8afb5a9803571c68fd62e460002c63d"/></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="e6a2dd8432bf96bbe81909018dea96e4"/></dir></dir></dir><file name="Category.php" hash="ebfe6bf863be9f263cf9f6bd6a94cc12"/></dir></dir><dir name="CatalogSearch"><dir name="Model"><file name="Layer.php" hash="bb507d38a24ff252edccf397d5a3dcab"/></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="bf96d82627a567ea6bb6b5f4b5c96eb4"/></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="802ffa70661155a01d001717a826cdd6"/></dir><dir name="etc"><file name="config.xml" hash="de8fc65d3c9652dba2c19553a58fa4bb"/><file name="system.xml" hash="3cc4856f3571c39d735c2818b9aea6b3"/></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>
19
  <compatible/>
20
  <dependencies/>
21
  </package>