Version Notes
1.0.1 - Added uninstall file
1.0.0.0 - First stable release
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magmodules_Sortbydate |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0.0 to 1.0.1
app/code/local/Magmodules/Sortbydate/uninstall-sortbydate.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu
|
4 |
+
* http://www.magmodules.eu
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Magmodules
|
17 |
+
* @package Magmodules_Sortbydate
|
18 |
+
* @author Magmodules <info@magmodules.eu)
|
19 |
+
* @copyright Copyright (c) 2013 (http://www.magmodules.eu)
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
|
23 |
+
// Load Magento
|
24 |
+
require 'app/Mage.php';
|
25 |
+
Mage::app();
|
26 |
+
|
27 |
+
// Load attribute_id of created_at
|
28 |
+
$eavAttribute = new Mage_Eav_Model_Mysql4_Entity_Attribute();
|
29 |
+
$attribute_id = $eavAttribute->getIdByCode('catalog_product', 'created_at');
|
30 |
+
|
31 |
+
// Update database
|
32 |
+
if($attribute_id) {
|
33 |
+
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
34 |
+
$sql = "UPDATE catalog_eav_attribute SET used_for_sort_by = 1 WHERE attribute_id = '$attribute_id' LIMIT 1";
|
35 |
+
$write->query($sql);
|
36 |
+
echo 'Uninstalled!';
|
37 |
+
} else {
|
38 |
+
echo 'Error!';
|
39 |
+
}
|
40 |
+
?>
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sortbydate</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Sort category products by date</summary>
|
10 |
<description>Sort category products by date</description>
|
11 |
-
<notes>
|
|
|
12 |
<authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.eu</email></author></authors>
|
13 |
-
<date>2013-02
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Magmodules"><dir name="Sortbydate"><dir name="etc"><file name="config.xml" hash="1b22f829bb37ae6b5556d250ce9459a2"/></dir><dir name="sql"><dir name="sortbydate_setup"><file name="mysql4-install-0.1.0.php" hash="201336150a707715cc1d9fb122457405"/></dir></dir
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Sortbydate</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Sort category products by date</summary>
|
10 |
<description>Sort category products by date</description>
|
11 |
+
<notes>1.0.1 - Added uninstall file
|
12 |
+
1.0.0.0 - First stable release</notes>
|
13 |
<authors><author><name>Magmodules</name><user>auto-converted</user><email>info@magmodules.eu</email></author></authors>
|
14 |
+
<date>2013-03-02</date>
|
15 |
+
<time>16:56:45</time>
|
16 |
+
<contents><target name="magelocal"><dir name="Magmodules"><dir name="Sortbydate"><dir name="etc"><file name="config.xml" hash="1b22f829bb37ae6b5556d250ce9459a2"/></dir><dir name="sql"><dir name="sortbydate_setup"><file name="mysql4-install-0.1.0.php" hash="201336150a707715cc1d9fb122457405"/></dir></dir><file name="uninstall-sortbydate.php" hash="2bb5d93eae09cdb23c12bb6fbb9c4d21"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Sortbydate.xml" hash="468544b2c4df08e194b19fb0ac0fdc33"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Magmodules_Sortbydate.csv" hash="e8f715350d801c7ac81d679493a0d60b"/></dir><dir name="nl_NL"><file name="Magmodules_Sortbydate.csv" hash="c8a334694909e36b5875a9f26ebc2bc6"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|