Carotechs_Audittrack - Version 0.1.5

Version Notes

Audit track

Download this release

Release Info

Developer Carotechs
Extension Carotechs_Audittrack
Version 0.1.5
Comparing to
See all releases


Code changes from version 0.1.4 to 0.1.5

app/code/local/Carotechs/Audittrack/Block/Adminhtml/Audittrack/Grid.php CHANGED
@@ -12,7 +12,7 @@ class Carotechs_Audittrack_Block_Adminhtml_Audittrack_Grid extends Mage_Adminhtm
12
 
13
  protected function _prepareCollection()
14
  {
15
- $collection = Mage::getModel('audittrack/audittrack')->getCollection()->setOrder('log_id', 'DESC');;
16
  $this->setCollection($collection);
17
  return parent::_prepareCollection();
18
  }
12
 
13
  protected function _prepareCollection()
14
  {
15
+ $collection = Mage::getModel('audittrack/audittrack')->getCollection()->setOrder('log_date');
16
  $this->setCollection($collection);
17
  return parent::_prepareCollection();
18
  }
app/code/local/Carotechs/Audittrack/controllers/Catalog/ProductController.php CHANGED
@@ -35,7 +35,6 @@ class Carotechs_Audittrack_Catalog_ProductController extends Mage_Adminhtml_Cata
35
  {
36
  //calling parent action.
37
  $this->variables();
38
- $current_price=0;
39
  $productId1 = $this->getRequest()->getParam('id');
40
  $this->_store_id= $this->getRequest()->getParam('store');
41
  //get product details from product id
@@ -47,7 +46,7 @@ class Carotechs_Audittrack_Catalog_ProductController extends Mage_Adminhtml_Cata
47
 
48
  $p_data = $this->getRequest()->getPost();
49
  $current_price=$p_data['product']['price'];
50
-
51
  $pro = Mage::registry('product');
52
  $productId = $pro->getId();
53
 
@@ -84,19 +83,19 @@ class Carotechs_Audittrack_Catalog_ProductController extends Mage_Adminhtml_Cata
84
 
85
  if(Mage::getStoreConfig("Carotechs_Audittrack/AudittrackPriceAlert/Productprice"))
86
  {
87
- if(($price!=$current_price) && ($price!=0) && ($price!=''))
88
  {
89
  //trans_email_ident_custom1_email
90
  /* Sender Name */
91
- $from=Mage::getStoreConfig('trans_email/ident_sales/name');
92
- $from_email=Mage::getStoreConfig('trans_email/ident_sales/email');
93
  /* Sender Email */
94
  $to=Mage::getStoreConfig("Carotechs_Audittrack/AudittrackPriceAlert/Email");
95
  $subject='Product update notification.';
96
- $headers = "From: $from <$from_email>". "\r\n";
97
  $headers .= "Content-type: text/html\r\n";
98
  $message = 'Product Details are changed for <b>'.$p_name.'</b><br/>';
99
  $message .= '<b> ID :</b>'.$productId.'<br/><b>Sku :</b>'.$sku.'<br/><b>Previous Price : </b>'.$price.'<br/><b>Current Price :</b>'.$current_price.'<br/><b>Website :</b>'.$this->_store_name;
 
100
  mail($to,$subject,$message,$headers);
101
  }
102
  }
35
  {
36
  //calling parent action.
37
  $this->variables();
 
38
  $productId1 = $this->getRequest()->getParam('id');
39
  $this->_store_id= $this->getRequest()->getParam('store');
40
  //get product details from product id
46
 
47
  $p_data = $this->getRequest()->getPost();
48
  $current_price=$p_data['product']['price'];
49
+
50
  $pro = Mage::registry('product');
51
  $productId = $pro->getId();
52
 
83
 
84
  if(Mage::getStoreConfig("Carotechs_Audittrack/AudittrackPriceAlert/Productprice"))
85
  {
86
+ if($price!=$current_price)
87
  {
88
  //trans_email_ident_custom1_email
89
  /* Sender Name */
90
+ $from=Mage::getStoreConfig('trans_email/ident_custom2/name');
 
91
  /* Sender Email */
92
  $to=Mage::getStoreConfig("Carotechs_Audittrack/AudittrackPriceAlert/Email");
93
  $subject='Product update notification.';
94
+ $headers = 'From: BDS Sales <sales@backdropsource.com>' . "\r\n";
95
  $headers .= "Content-type: text/html\r\n";
96
  $message = 'Product Details are changed for <b>'.$p_name.'</b><br/>';
97
  $message .= '<b> ID :</b>'.$productId.'<br/><b>Sku :</b>'.$sku.'<br/><b>Previous Price : </b>'.$price.'<br/><b>Current Price :</b>'.$current_price.'<br/><b>Website :</b>'.$this->_store_name;
98
+ //echo $message;die();
99
  mail($to,$subject,$message,$headers);
100
  }
101
  }
app/code/local/Carotechs/Audittrack/etc/adminhtml.xml CHANGED
@@ -19,19 +19,12 @@
19
  </all>
20
  <admin>
21
  <children>
22
- <Carotechs_Audittrack>
23
- <title>Audittrack Module</title>
24
  <sort_order>10</sort_order>
25
- </Carotechs_Audittrack>
26
  </children>
27
  </admin>
28
  </resources>
29
  </acl>
30
- <layout>
31
- <updates>
32
- <audittrack>
33
- <file>audittrack.xml</file>
34
- </audittrack>
35
- </updates>
36
- </layout>
37
  </adminhtml>
19
  </all>
20
  <admin>
21
  <children>
22
+ <audittrack translate="title" module="audittrack">
23
+ <title>Audit Tracks</title>
24
  <sort_order>10</sort_order>
25
+ </audittrack>
26
  </children>
27
  </admin>
28
  </resources>
29
  </acl>
 
 
 
 
 
 
 
30
  </adminhtml>
app/code/local/Carotechs/Audittrack/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Carotechs_Audittrack>
13
- <version>0.1.4</version>
14
  </Carotechs_Audittrack>
15
  </modules>
16
  <frontend>
@@ -31,33 +31,18 @@
31
  </updates>
32
  </layout>
33
  </frontend>
34
-
35
  <admin>
36
  <routers>
37
  <adminhtml>
38
- <use>admin</use>
39
  <args>
40
- <!--<module>Carotechs_Audittrack</module>-->
41
- <modules><Carotechs_Audittrack before="Mage_Adminhtml">Carotechs_Audittrack</Carotechs_Audittrack></modules>
 
 
42
  </args>
43
- <!--<modules><Carotechs_Audittrack before="Mage_Adminhtml">Carotechs_Audittrack</Carotechs_Audittrack></modules>-->
44
  </adminhtml>
45
  </routers>
46
  </admin>
47
-
48
- <admin>
49
- <routers>
50
- <audittrack>
51
- <use>admin</use>
52
- <args>
53
- <module>Carotechs_Audittrack</module>
54
- <frontName>audittrack</frontName>
55
- </args>
56
- </audittrack>
57
- </routers>
58
- </admin>
59
-
60
-
61
  <adminhtml>
62
  <menu>
63
  <audittrack>
@@ -66,7 +51,7 @@
66
  <items module="audittrack">
67
  <title>View Track</title>
68
  <sort_order>5</sort_order>
69
- <action>audittrack/adminhtml_audittrack/index</action>
70
  </items>
71
  </children>
72
  </audittrack>
@@ -78,15 +63,15 @@
78
  </all>
79
  <admin>
80
  <children>
81
- <Carotechs_Audittrack>
82
- <title>Tracks</title>
83
  <sort_order>10</sort_order>
84
  <children>
85
  <items module="audittrack">
86
  <title>View Tracks</title>
87
  </items>
88
  </children>
89
- </Carotechs_Audittrack>
90
  </children>
91
  </admin>
92
  </resources>
10
  <config>
11
  <modules>
12
  <Carotechs_Audittrack>
13
+ <version>0.1.0</version>
14
  </Carotechs_Audittrack>
15
  </modules>
16
  <frontend>
31
  </updates>
32
  </layout>
33
  </frontend>
 
34
  <admin>
35
  <routers>
36
  <adminhtml>
 
37
  <args>
38
+ <use>admin</use>
39
+ <modules>
40
+ <Carotechs_Audittrack before="Mage_Adminhtml">Carotechs_Audittrack</Carotechs_Audittrack>
41
+ </modules>
42
  </args>
 
43
  </adminhtml>
44
  </routers>
45
  </admin>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  <adminhtml>
47
  <menu>
48
  <audittrack>
51
  <items module="audittrack">
52
  <title>View Track</title>
53
  <sort_order>5</sort_order>
54
+ <action>audittrack/adminhtml_audittrack</action>
55
  </items>
56
  </children>
57
  </audittrack>
63
  </all>
64
  <admin>
65
  <children>
66
+ <audittrack translate="title" module="audittrack">
67
+ <title>Audit Tracks</title>
68
  <sort_order>10</sort_order>
69
  <children>
70
  <items module="audittrack">
71
  <title>View Tracks</title>
72
  </items>
73
  </children>
74
+ </audittrack>
75
  </children>
76
  </admin>
77
  </resources>
app/code/local/Carotechs/Audittrack/sql/audittrack_setup/{mysql4-install-0.1.3.php → mysql4-install-0.1.0.php} RENAMED
File without changes
app/design/adminhtml/default/default/layout/audittrack.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <layout version="0.1.4">
3
  <audittrack_adminhtml_audittrack_index>
4
  <reference name="content">
5
  <block type="audittrack/adminhtml_audittrack" name="audittrack" />
1
  <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
  <audittrack_adminhtml_audittrack_index>
4
  <reference name="content">
5
  <block type="audittrack/adminhtml_audittrack" name="audittrack" />
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Carotechs_Audittrack</name>
4
- <version>0.1.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>
8
  <extends/>
9
- <summary>Audittrack log all actions you perform in key Magento entities in the backend of your Magento store!</summary>
10
- <description>AuditLog extension is simple but powerful mechanism to log and track the changes made in the major Magento entities in the Magento Admin. It also allows to send email notification when the product price is updated. &#xD;
11
- List of entities logged: Product, Category, Attribute, Attribute Set, Price Rules and Customer.</description>
12
- <notes>Initial Release</notes>
13
- <authors><author><name>Carotechs</name><user>carotechsinc</user><email>apps@carotechs.com</email></author></authors>
14
- <date>2013-07-18</date>
15
- <time>09:13:39</time>
16
- <contents><target name="magelocal"><dir name="Carotechs"><dir name="Audittrack"><dir name="Block"><file name="Aboutconfig.php" hash="59aef46dfc28403283126fedf6c37b48"/><file name="Aboutprice.php" hash="2326296050f48c8688ba02e8eae3b0da"/><dir name="Adminhtml"><dir name="Audittrack"><file name="Grid.php" hash="89088141bc7e65ed7f9e10cd6411b2df"/></dir><file name="Audittrack.php" hash="e951f4d043132c20fe27b796680ddc12"/></dir><file name="Audittrack.php" hash="9b00af50e8207c1309b2e40b2612a311"/></dir><dir name="Helper"><file name="Data.php" hash="8bda5cc47def24a8b64e7e6dd87ad7de"/></dir><dir name="Model"><file name="Audittrack.php" hash="57cc96db1fd2d1dcd6925da2f454bc35"/><dir name="Mysql4"><dir name="Audittrack"><file name="Collection.php" hash="19a55edf9900150dda6e05ad5e785646"/></dir><file name="Audittrack.php" hash="36b6b2d3c082fa116f6359ee7ae12a57"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AudittrackController.php" hash="fc646ed73c774a280df64c8fb9ad72dc"/></dir><dir name="Catalog"><file name="CategoryController.php" hash="a8488e3d28ab0ffdfa3a34ab00a10532"/><dir name="Product"><file name="AttributeController.php" hash="49aabe7443707ae7a3606a4cf4aec13d"/><file name="SetController.php" hash="c862c562fd686a4377b4723a98c83f98"/></dir><file name="ProductController.php" hash="3d553bee32c74caca045fecc950e45a2"/></dir><file name="CustomerController.php" hash="f0a322b2bde60283c422da58f25c4ffd"/><dir name="Promo"><file name="CatalogController.php" hash="61e30758870a13b45aa6cc46bedf40dd"/><file name="QuoteController.php" hash="e2aed1ce668a0b47517eb33b4e5084b3"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5f6b82a7ee69ac288d76482cbaecfbbb"/><file name="config.xml" hash="e0d1c55b4b56e4e9bc846d9d24892bc1"/><file name="system.xml" hash="6c451bfa506cd6474c0ae27fb39ae566"/></dir><dir name="sql"><dir name="audittrack_setup"><file name="mysql4-install-0.1.3.php" hash="ed8af37952d290c0632666172892794b"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="audittrack.xml" hash="9440ebe6c749748a3fd78c116b0d4fae"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Carotechs_Audittrack.xml" hash="9f1a85ba90bd65b2bb44127e02b40331"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Carotechs_Audittrack</name>
4
+ <version>0.1.5</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSLv3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Audit track</summary>
10
+ <description>Audit track</description>
11
+ <notes>Audit track</notes>
12
+ <authors><author><name>Carotechs</name><user>Carotechs</user><email>apps@carotechs.com</email></author></authors>
13
+ <date>2015-02-18</date>
14
+ <time>09:29:58</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Carotechs_Audittrack.xml" hash="9f1a85ba90bd65b2bb44127e02b40331"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="audittrack.xml" hash="73d7014c2371143c3a9f34683c446c51"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Carotechs"><dir name="Audittrack"><dir name="Block"><file name="Aboutconfig.php" hash="59aef46dfc28403283126fedf6c37b48"/><file name="Aboutprice.php" hash="2326296050f48c8688ba02e8eae3b0da"/><dir name="Adminhtml"><dir name="Audittrack"><file name="Grid.php" hash="24598ebb500f395c990c3e4eca57816f"/></dir><file name="Audittrack.php" hash="e951f4d043132c20fe27b796680ddc12"/></dir><file name="Audittrack.php" hash="9b00af50e8207c1309b2e40b2612a311"/></dir><dir name="Helper"><file name="Data.php" hash="8bda5cc47def24a8b64e7e6dd87ad7de"/></dir><dir name="Model"><file name="Audittrack.php" hash="57cc96db1fd2d1dcd6925da2f454bc35"/><dir name="Mysql4"><dir name="Audittrack"><file name="Collection.php" hash="19a55edf9900150dda6e05ad5e785646"/></dir><file name="Audittrack.php" hash="36b6b2d3c082fa116f6359ee7ae12a57"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AudittrackController.php" hash="fc646ed73c774a280df64c8fb9ad72dc"/></dir><dir name="Catalog"><file name="CategoryController.php" hash="a8488e3d28ab0ffdfa3a34ab00a10532"/><dir name="Product"><file name="AttributeController.php" hash="49aabe7443707ae7a3606a4cf4aec13d"/><file name="SetController.php" hash="c862c562fd686a4377b4723a98c83f98"/></dir><file name="ProductController.php" hash="12f0a4fd3d3e071d7571dd30bdca18f3"/></dir><file name="CustomerController.php" hash="f0a322b2bde60283c422da58f25c4ffd"/><dir name="Promo"><file name="CatalogController.php" hash="61e30758870a13b45aa6cc46bedf40dd"/><file name="QuoteController.php" hash="e2aed1ce668a0b47517eb33b4e5084b3"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="669f549a81ddf72ae27ebe266b2665e8"/><file name="config.xml" hash="9b1b33f5a82eb87a67bc0d7f7bb338e2"/><file name="system.xml" hash="6c451bfa506cd6474c0ae27fb39ae566"/></dir><dir name="sql"><dir name="audittrack_setup"><file name="mysql4-install-0.1.0.php" hash="ed8af37952d290c0632666172892794b"/></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>