Etatvasoft_5_In_one_catalog - Version 1.1.8

Version Notes

Homepage is the main visual part of any website. It's very important to show some meaningful

Download this release

Release Info

Developer Etatvasoft
Extension Etatvasoft_5_In_one_catalog
Version 1.1.8
Comparing to
See all releases


Code changes from version 1.1.7 to 1.1.8

app/code/local/Tatva/Catalogextensions/Block/Bestsellers/Home/List.php CHANGED
@@ -16,10 +16,16 @@ class Tatva_Catalogextensions_Block_Bestsellers_Home_List extends Tatva_Cataloge
16
  protected function _getProductCollection()
17
  {
18
  parent::__construct();
19
- $storeId = Mage::app()->getStore()->getId();
 
 
 
 
 
 
20
  $products = Mage::getResourceModel('reports/product_collection')
21
  ->addAttributeToSelect('*')
22
- ->addOrderedQty()
23
  ->setStoreId($storeId)
24
  ->addStoreFilter($storeId)
25
  ->setOrder('ordered_qty', 'desc')
@@ -29,18 +35,21 @@ class Tatva_Catalogextensions_Block_Bestsellers_Home_List extends Tatva_Cataloge
29
 
30
  if(Mage::getStoreConfig('catalogextensions/config1/max_product'))
31
  {
32
- $products->setPageSize(Mage::getStoreConfig('catalogextensions/config2/max_product'));
33
  }
34
 
35
  $productFlatData = Mage::getStoreConfig('catalog/frontend/flat_catalog_product');
36
  if($productFlatData == "1")
37
  {
38
  $products->getSelect()->joinLeft(
39
- array('flat' => 'catalog_product_flat_1'),
40
  "(e.entity_id = flat.entity_id ) ",
41
- array(
42
- 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
43
- )
 
 
 
44
  );
45
  }
46
 
16
  protected function _getProductCollection()
17
  {
18
  parent::__construct();
19
+
20
+ $today = time();
21
+ $last = $today - (60*60*24*30);
22
+ $from = date("Y-m-d", $last);
23
+ $to = date("Y-m-d", $today);
24
+
25
+ $storeId = Mage::app()->getStore()->getId();
26
  $products = Mage::getResourceModel('reports/product_collection')
27
  ->addAttributeToSelect('*')
28
+ ->addOrderedQty($from, $to)
29
  ->setStoreId($storeId)
30
  ->addStoreFilter($storeId)
31
  ->setOrder('ordered_qty', 'desc')
35
 
36
  if(Mage::getStoreConfig('catalogextensions/config1/max_product'))
37
  {
38
+ $products->setPageSize(Mage::getStoreConfig('catalogextensions/config1/max_product'));
39
  }
40
 
41
  $productFlatData = Mage::getStoreConfig('catalog/frontend/flat_catalog_product');
42
  if($productFlatData == "1")
43
  {
44
  $products->getSelect()->joinLeft(
45
+ array('flat' => 'catalog_product_flat_'.$storeId),
46
  "(e.entity_id = flat.entity_id ) ",
47
+ //array(
48
+ // 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
49
+ // )
50
+ array(
51
+ 'flat.name AS name','flat.small_image AS small_image','flat.price AS price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
52
+ )
53
  );
54
  }
55
 
app/code/local/Tatva/Catalogextensions/Block/Bestsellers/List.php CHANGED
@@ -25,15 +25,19 @@ class Tatva_Catalogextensions_Block_Bestsellers_List extends Mage_Catalog_Block_
25
  ->setPageSize($this->get_prod_count())
26
  ->setOrder($this->get_order(), $this->get_order_dir())
27
  ->setCurPage($this->get_cur_page());
 
28
  $productFlatData = Mage::getStoreConfig('catalog/frontend/flat_catalog_product');
29
  if($productFlatData == "1")
30
  {
31
  $products->getSelect()->joinLeft(
32
- array('flat' => 'catalog_product_flat_1'),
33
  "(e.entity_id = flat.entity_id ) ",
34
- array(
35
- 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
36
- )
 
 
 
37
  );
38
  }
39
 
25
  ->setPageSize($this->get_prod_count())
26
  ->setOrder($this->get_order(), $this->get_order_dir())
27
  ->setCurPage($this->get_cur_page());
28
+
29
  $productFlatData = Mage::getStoreConfig('catalog/frontend/flat_catalog_product');
30
  if($productFlatData == "1")
31
  {
32
  $products->getSelect()->joinLeft(
33
+ array('flat' => 'catalog_product_flat_'.$storeId),
34
  "(e.entity_id = flat.entity_id ) ",
35
+ //array(
36
+ // 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
37
+ // )
38
+ array(
39
+ 'flat.name AS name','flat.small_image AS small_image','flat.price AS price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
40
+ )
41
  );
42
  }
43
 
app/code/local/Tatva/Catalogextensions/Block/Mostviewed/Home/List.php CHANGED
@@ -31,11 +31,14 @@ class Tatva_Catalogextensions_Block_Mostviewed_Home_List extends Tatva_Catalogex
31
  if($productFlatData == "1")
32
  {
33
  $products->getSelect()->joinLeft(
34
- array('flat' => 'catalog_product_flat_1'),
35
  "(e.entity_id = flat.entity_id ) ",
36
- array(
37
- 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
38
- )
 
 
 
39
  );
40
  }
41
 
31
  if($productFlatData == "1")
32
  {
33
  $products->getSelect()->joinLeft(
34
+ array('flat' => 'catalog_product_flat_'.$storeId),
35
  "(e.entity_id = flat.entity_id ) ",
36
+ //array(
37
+ // 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
38
+ // )
39
+ array(
40
+ 'flat.name AS name','flat.small_image AS small_image','flat.price AS price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
41
+ )
42
  );
43
  }
44
 
app/code/local/Tatva/Catalogextensions/Block/Mostviewed/List.php CHANGED
@@ -28,12 +28,15 @@ class Tatva_Catalogextensions_Block_Mostviewed_List extends Mage_Catalog_Block_P
28
  if($productFlatData == "1")
29
  {
30
  $products->getSelect()->joinLeft(
31
- array('flat' => 'catalog_product_flat_1'),
32
  "(e.entity_id = flat.entity_id ) ",
33
- array(
34
- 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
35
- )
36
- );
 
 
 
37
  }
38
  Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
39
  Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
28
  if($productFlatData == "1")
29
  {
30
  $products->getSelect()->joinLeft(
31
+ array('flat' => 'catalog_product_flat_'.$storeId),
32
  "(e.entity_id = flat.entity_id ) ",
33
+ //array(
34
+ // 'flat.name AS name','flat.image AS small_image','flat.price AS price','flat.minimal_price as minimal_price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
35
+ // )
36
+ array(
37
+ 'flat.name AS name','flat.small_image AS small_image','flat.price AS price','flat.special_price as special_price','flat.special_from_date AS special_from_date','flat.special_to_date AS special_to_date'
38
+ )
39
+ );
40
  }
41
  Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
42
  Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
app/etc/modules/Tatva_Catalogextensions.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Tatva_Catalogextensions>
5
- <active>true</active>
6
  <codePool>local</codePool>
7
  </Tatva_Catalogextensions>
8
  </modules>
2
  <config>
3
  <modules>
4
  <Tatva_Catalogextensions>
5
+ <active>false</active>
6
  <codePool>local</codePool>
7
  </Tatva_Catalogextensions>
8
  </modules>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Etatvasoft_5_In_one_catalog</name>
4
- <version>1.1.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Homepage is the main visual part of any website. It's very important to show some meaningful </description>
11
  <notes>Homepage is the main visual part of any website. It's very important to show some meaningful </notes>
12
  <authors><author><name>Etatvasoft</name><user>Etatvasoft</user><email>etatvasoft.magentodevelopment@gmail.com</email></author></authors>
13
- <date>2013-10-08</date>
14
- <time>07:46:44</time>
15
- <contents><target name="magelocal"><dir name="Tatva"><dir name="Catalogextensions"><dir name="Block"><dir name="Allproducts"><file name="List.php" hash="23bb783bec9a95377cf7d7bfeebc82e5"/></dir><dir name="Bestsellers"><dir name="Home"><file name="List.php" hash="f36ace39970c38c26fa91169b62d3569"/></dir><file name="List.php" hash="e02db79e2a8cf0c0af38fc9f46b6da94"/></dir><file name="Catalogextensions.php" hash="c8db46ed313124e15f4547cd23481805"/><dir name="Featured"><dir name="Home"><file name="List.php" hash="821b6fd6ef9beabddb9c74d1d1da26cd"/></dir><file name="List.php" hash="216bff6d57edeb08ec1fbe113f171b61"/></dir><dir name="Lastordered"><dir name="Home"><file name="List.php" hash="f4a0389616c720fdcb202e042db2578a"/></dir><file name="List.php" hash="b7db3b72ac98b1b829fd3583bf0fc953"/></dir><dir name="Mostviewed"><dir name="Home"><file name="List.php" hash="f90919166784cff6261f0aa0b171d793"/></dir><file name="List.php" hash="0a98585a71ef439261dfd1248bd39f84"/></dir><dir name="Newproduct"><dir name="Home"><file name="List.php" hash="3fb45a68a9634e88de44a729caca32da"/></dir><file name="List.php" hash="9585d810fcf72d9df1157510900e6219"/></dir><dir name="Promotional"><dir name="Home"><file name="List.php" hash="60824f9318b57f2ee2cd50f0133b1461"/></dir><file name="List.php" hash="cc021c39e82f12208c86f9f6ac4b043d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b611bd4cc8fcfbb18474ae0f7abbb92f"/></dir><dir name="Model"><file name="Catalogextensions.php" hash="d13d2010207ce2a98c7aa4d105ab0c89"/><dir name="Mysql4"><dir name="Catalogextensions"><file name="Collection.php" hash="78c860170f8a69d2853dd244d30c3086"/></dir><file name="Catalogextensions.php" hash="19ccf69401d4e2f68c84a99b1fa12e02"/></dir><file name="Status.php" hash="0544078ffbda9356571152f217b4728c"/></dir><dir name="controllers"><file name="IndexController.php" hash="160ca8b9e3dfdbd979e6bac4f78153ea"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d049baa4bd9d3ea71f2ea01176344c74"/><file name="config.xml" hash="8f1a67cb30208b1fd87c0d56c9a4cc19"/><file name="system.xml" hash="2cd615bdaf08a2868ff07c37cd7915ad"/></dir><dir name="sql"><dir name="catalogextensions_setup"><file name="mysql4-install-0.1.0.php" hash="da1797c1b3d77ae8a140dfd894f139bb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="catalogextensions"><file name="catalogextensions.xml" hash="af78cc2f1ddea55a1daca3afe1d089d5"/></dir></dir><dir name="template"><dir name="catalogextensions"><file name="home_bestsellers.phtml" hash="00b1bee017c65cc07356a701c7106e07"/><file name="home_featured.phtml" hash="e49cbba85123819faf8ff2c74caf5c79"/><file name="home_lastordered.phtml" hash="06768230f0f3d062f9d02c318726dcda"/><file name="home_mostviewed.phtml" hash="f78e5f182364572b476b5ecce2f2b9b4"/><file name="home_newproduct.phtml" hash="153840870c297ca89e6a1c12e73f93be"/><file name="home_promotional.phtml" hash="17c1fffa356e073cd722ef7ac8c37814"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tatva_Catalogextensions.xml" hash="e750c8253d16f81be8b9b71ae69d70be"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="catalogextensions"><file name="catalogextensions.css" hash="80504e8af7b1ee6dafcec2c6ce35823d"/></dir></dir><dir name="images"><dir name="catalogextensions"><file name="Thumbs.db" hash="455a6ee36501c4dcba5966b8ad185216"/><file name="greyboxbg.gif" hash="0276e336f4103bc5b76aa923490cc556"/><file name="verticledivider.jpg" hash="c43a4c3be49fae4c2b3b2f4081237dbd"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Etatvasoft_5_In_one_catalog</name>
4
+ <version>1.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
10
  <description>Homepage is the main visual part of any website. It's very important to show some meaningful </description>
11
  <notes>Homepage is the main visual part of any website. It's very important to show some meaningful </notes>
12
  <authors><author><name>Etatvasoft</name><user>Etatvasoft</user><email>etatvasoft.magentodevelopment@gmail.com</email></author></authors>
13
+ <date>2014-02-25</date>
14
+ <time>08:29:53</time>
15
+ <contents><target name="magelocal"><dir name="Tatva"><dir name="Catalogextensions"><dir name="Block"><dir name="Allproducts"><file name="List.php" hash="23bb783bec9a95377cf7d7bfeebc82e5"/></dir><dir name="Bestsellers"><dir name="Home"><file name="List.php" hash="500331b9e4d6fcb245915b8e9a131dbe"/></dir><file name="List.php" hash="a0f735fe3d1e3d9c8ca8e30d56a3481f"/></dir><file name="Catalogextensions.php" hash="c8db46ed313124e15f4547cd23481805"/><dir name="Featured"><dir name="Home"><file name="List.php" hash="821b6fd6ef9beabddb9c74d1d1da26cd"/></dir><file name="List.php" hash="216bff6d57edeb08ec1fbe113f171b61"/></dir><dir name="Lastordered"><dir name="Home"><file name="List.php" hash="f4a0389616c720fdcb202e042db2578a"/></dir><file name="List.php" hash="b7db3b72ac98b1b829fd3583bf0fc953"/></dir><dir name="Mostviewed"><dir name="Home"><file name="List.php" hash="558bfdced5a6425840f4047d54431859"/></dir><file name="List.php" hash="da211e51efd016fb23ab79f94826bec2"/></dir><dir name="Newproduct"><dir name="Home"><file name="List.php" hash="3fb45a68a9634e88de44a729caca32da"/></dir><file name="List.php" hash="9585d810fcf72d9df1157510900e6219"/></dir><dir name="Promotional"><dir name="Home"><file name="List.php" hash="60824f9318b57f2ee2cd50f0133b1461"/></dir><file name="List.php" hash="cc021c39e82f12208c86f9f6ac4b043d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b611bd4cc8fcfbb18474ae0f7abbb92f"/></dir><dir name="Model"><file name="Catalogextensions.php" hash="d13d2010207ce2a98c7aa4d105ab0c89"/><dir name="Mysql4"><dir name="Catalogextensions"><file name="Collection.php" hash="78c860170f8a69d2853dd244d30c3086"/></dir><file name="Catalogextensions.php" hash="19ccf69401d4e2f68c84a99b1fa12e02"/></dir><file name="Status.php" hash="0544078ffbda9356571152f217b4728c"/></dir><dir name="controllers"><file name="IndexController.php" hash="160ca8b9e3dfdbd979e6bac4f78153ea"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d049baa4bd9d3ea71f2ea01176344c74"/><file name="config.xml" hash="8f1a67cb30208b1fd87c0d56c9a4cc19"/><file name="system.xml" hash="2cd615bdaf08a2868ff07c37cd7915ad"/></dir><dir name="sql"><dir name="catalogextensions_setup"><file name="mysql4-install-0.1.0.php" hash="da1797c1b3d77ae8a140dfd894f139bb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="catalogextensions"><file name="catalogextensions.xml" hash="af78cc2f1ddea55a1daca3afe1d089d5"/></dir></dir><dir name="template"><dir name="catalogextensions"><file name="home_bestsellers.phtml" hash="00b1bee017c65cc07356a701c7106e07"/><file name="home_featured.phtml" hash="e49cbba85123819faf8ff2c74caf5c79"/><file name="home_lastordered.phtml" hash="06768230f0f3d062f9d02c318726dcda"/><file name="home_mostviewed.phtml" hash="f78e5f182364572b476b5ecce2f2b9b4"/><file name="home_newproduct.phtml" hash="153840870c297ca89e6a1c12e73f93be"/><file name="home_promotional.phtml" hash="17c1fffa356e073cd722ef7ac8c37814"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tatva_Catalogextensions.xml" hash="9064b853391158bdfc474f72509dd422"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="catalogextensions"><file name="catalogextensions.css" hash="80504e8af7b1ee6dafcec2c6ce35823d"/></dir></dir><dir name="images"><dir name="catalogextensions"><file name="Thumbs.db" hash="455a6ee36501c4dcba5966b8ad185216"/><file name="greyboxbg.gif" hash="0276e336f4103bc5b76aa923490cc556"/><file name="verticledivider.jpg" hash="c43a4c3be49fae4c2b3b2f4081237dbd"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>