Order_tickets - Version 1.2.3

Version Notes

Admin email text in english

Download this release

Release Info

Developer Magento Core Team
Extension Order_tickets
Version 1.2.3
Comparing to
See all releases


Code changes from version 1.2.2 to 1.2.3

app/code/community/Laurent/OrderTickets/Model/Observer.php CHANGED
@@ -9,7 +9,7 @@
9
  */
10
 
11
  /**
12
- * Description of Observer
13
  *
14
  */
15
  class Laurent_OrderTickets_Model_Observer {
@@ -19,9 +19,9 @@ class Laurent_OrderTickets_Model_Observer {
19
  * Email recipients are defined in BO configuration
20
  * return boolean telling if everything went fine
21
  */
22
- public function sendEmailLastRequests(){
23
-
24
  try{
 
25
  $tickets = Mage::getResourceModel('ordertickets/ticket_collection')
26
  ->addFieldToFilter('type', Laurent_OrderTickets_Model_Ticket::TYPE_REQUEST)
27
  ->addFieldToFilter('reported_by_cron', false)
@@ -38,13 +38,13 @@ class Laurent_OrderTickets_Model_Observer {
38
  $email->addTo($recipient);
39
  }
40
 
41
- $subject = 'Derniers messages envoyés par les clients';
42
 
43
  $body = '';
44
  foreach($tickets as $ticket){
45
  $customerFullname = $ticket->getChat()->getCustomerFirstname() . ' '. $ticket->getChat()->getCustomerLastname() . ' <' . $ticket->getChat()->getCustomerEmail() . '>';
46
- $body .= 'Message de '. $customerFullname .' envoyé le ' . Mage::helper('core')->formatDate($ticket->getCreatedAt(), 'full', ' ') ."\n";
47
- $body .= 'Commande ' . $ticket->getChat()->getOrder()->getIncrementId() . "\n";
48
  $body .= $ticket->getMessage() . "\n";
49
  $body .= "\n";
50
  $body .= "\n";
@@ -59,7 +59,6 @@ class Laurent_OrderTickets_Model_Observer {
59
  $ticket->setReportedByCron(true);
60
  $ticket->save();
61
  }
62
-
63
  }
64
  }
65
  catch(Exception $e){
@@ -67,6 +66,5 @@ class Laurent_OrderTickets_Model_Observer {
67
  return false;
68
  }
69
  return true;
70
- }
71
-
72
  }
9
  */
10
 
11
  /**
12
+ * Class used by cron
13
  *
14
  */
15
  class Laurent_OrderTickets_Model_Observer {
19
  * Email recipients are defined in BO configuration
20
  * return boolean telling if everything went fine
21
  */
22
+ public function sendEmailLastRequests(){
 
23
  try{
24
+ /* @var $tickets Laurent_OrderTickets_Model_Mysql4_Ticket_Collection */
25
  $tickets = Mage::getResourceModel('ordertickets/ticket_collection')
26
  ->addFieldToFilter('type', Laurent_OrderTickets_Model_Ticket::TYPE_REQUEST)
27
  ->addFieldToFilter('reported_by_cron', false)
38
  $email->addTo($recipient);
39
  }
40
 
41
+ $subject = 'Last messages send by customers';
42
 
43
  $body = '';
44
  foreach($tickets as $ticket){
45
  $customerFullname = $ticket->getChat()->getCustomerFirstname() . ' '. $ticket->getChat()->getCustomerLastname() . ' <' . $ticket->getChat()->getCustomerEmail() . '>';
46
+ $body .= 'Message from '. $customerFullname .' send the ' . Mage::helper('core')->formatDate($ticket->getCreatedAt(), 'full', ' ') ."\n";
47
+ $body .= 'Order ' . $ticket->getChat()->getOrder()->getIncrementId() . "\n";
48
  $body .= $ticket->getMessage() . "\n";
49
  $body .= "\n";
50
  $body .= "\n";
59
  $ticket->setReportedByCron(true);
60
  $ticket->save();
61
  }
 
62
  }
63
  }
64
  catch(Exception $e){
66
  return false;
67
  }
68
  return true;
69
+ }
 
70
  }
app/code/community/Laurent/OrderTickets/etc/config.xml CHANGED
@@ -9,7 +9,7 @@
9
  <config>
10
  <modules>
11
  <Laurent_OrderTickets>
12
- <version>1.2.2</version>
13
  </Laurent_OrderTickets>
14
  </modules>
15
  <global>
9
  <config>
10
  <modules>
11
  <Laurent_OrderTickets>
12
+ <version>1.2.3</version>
13
  </Laurent_OrderTickets>
14
  </modules>
15
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Order_tickets</name>
4
- <version>1.2.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
7
  <channel>community</channel>
@@ -11,12 +11,11 @@
11
  - customer can add message to orders&#xD;
12
  - administrator can see these messages, reply to them, change status of a chat and create new messages&#xD;
13
  - a cron also exists to send a reminder email to administrator about new messages</description>
14
- <notes>Better route name for frontend and backend&#xD;
15
- Security fix for frontend actions</notes>
16
  <authors><author><name>Laurent Clouet</name><user>auto-converted</user><email>laurent35240@gmail.com</email></author></authors>
17
- <date>2012-05-22</date>
18
- <time>22:15:53</time>
19
- <contents><target name="magecommunity"><dir name="Laurent"><dir name="OrderTickets"><dir name="Block"><dir name="Adminhtml"><dir name="Chat"><dir name="Create"><dir name="Order"><file name="Grid.php" hash="c7f1c769d398155bd346edb8fe76d6bf"/></dir><dir name="Steptwo"><file name="Form.php" hash="00359248809a4f067f8c488fda650712"/></dir><file name="Form.php" hash="521cca1147cbcecdf66d6e25e42e93d4"/><file name="Order.php" hash="4b5cbda78abda88f5858b1b389ef5b75"/><file name="Steptwo.php" hash="3a439f520e3469d0499ddf4443df674f"/></dir><dir name="View"><dir name="Tab"><file name="Main.php" hash="03c4041d1cf51152b81960301c1a7a09"/><file name="Tickets.php" hash="1113741720801f3101ba7eea34be9e0f"/></dir><file name="Form.php" hash="39fdb499109549c3f343c558016bbeba"/><file name="Tabs.php" hash="f8013ba3783ab56b81ddf85a9322f6eb"/></dir><file name="Create.php" hash="12830fc66389cc498f31a08e75dcac6f"/><file name="Grid.php" hash="991c017b9bc30ea7d21abc37d5357d1f"/><file name="View.php" hash="456751975ddd5022aec9d3dd86f6c393"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Tickets.php" hash="ed5185f29d37f483f7db8538773fe6a7"/></dir></dir></dir><dir name="Order"><dir name="View"><dir name="Tab"><file name="Tickets.php" hash="21259dd5bcaed5c30062b09ba4597561"/></dir></dir></dir><file name="Chat.php" hash="1c2c452367328e34b5e887473e06a220"/></dir><dir name="Order"><file name="Tabs.php" hash="33f15dfed00eca206271cef1f6d17f88"/></dir><file name="Chat.php" hash="4b0247f7c114a894adba736e08cdda7c"/></dir><dir name="Controller"><dir name="Adminhtml"><file name="Chat.php" hash="43b419b5c2b5e6900051e6358153175d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="93cacb500a03173347d3136403be13b1"/></dir><dir name="Model"><dir name="Config"><file name="Cron.php" hash="71180552ddcaa52e340668255ed871a0"/></dir><dir name="Mysql4"><dir name="Chat"><file name="Collection.php" hash="3765532820c8272190ad6bd65a42594d"/></dir><dir name="Ticket"><file name="Collection.php" hash="c04b0fe47e291380a57dce1939425b95"/></dir><file name="Chat.php" hash="105edfaafa9109c87dfb509b641decdc"/><file name="Ticket.php" hash="f9f4e7f6e9da8c110d5042760fe1183e"/></dir><file name="Abstract.php" hash="1c3cebb3cdfbba03c4b21198e2412bd5"/><file name="Chat.php" hash="64ee63f9f7d636c24ba9bde51f7fa5d3"/><file name="Observer.php" hash="e8df8052d45030c5a0548aa1caccbd8b"/><file name="Ticket.php" hash="967e3fd66fd24b689a38f3e1970d5e98"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ChatController.php" hash="074737a0f23108e91b9075bad9cad78b"/><file name="CreateController.php" hash="cbe6071edf569cbfd78036063e0c08f4"/></dir><file name="ChatController.php" hash="d290e0593e45dcb5aec6c44b586f0888"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f4a61001efef301ff263010aad0ecb9d"/><file name="config.xml" hash="4f82d45686bf68efddb43241fba8f853"/><file name="system.xml" hash="37739c5007d90bdf7ee8cbe567e98b6a"/></dir><dir name="sql"><dir name="ordertickets_setup"><file name="mysql4-install-0.1.0.php" hash="eaf0ed1190d400612f7eda66b51a28df"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a59e90142a8ba64c370f59699878a7e1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ordertickets.xml" hash="066b893e6f6d4043f0d7ef0093d7d840"/></dir><dir name="template"><dir name="ordertickets"><dir name="chat"><dir name="create"><file name="abstract.phtml" hash="19cbea5ac678b9197b08c6d9e8f55880"/><file name="form.phtml" hash="5a45de144e3f0b6b52a2e2ee19450413"/></dir><dir name="view"><dir name="tab"><file name="tickets.phtml" hash="c9bdcaca76a70fd3c4a7bbcdf02fa3bf"/></dir></dir></dir><dir name="order"><dir name="view"><dir name="tab"><file name="tickets.phtml" hash="f3aa00997858afcf85373b8e0f1716db"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ordertickets.xml" hash="ff2e6b3a75dcf121fdc5a11bc320d46f"/></dir><dir name="template"><dir name="ordertickets"><dir name="order"><file name="tabs.phtml" hash="3a146acbd5ef5af0a7c939f60ee4c383"/></dir><file name="chat.phtml" hash="d1b6b23797743377040aa3d401ea5001"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Laurent_OrderTickets.xml" hash="46fdc0a685ad8d9144f4db4cb99f97fe"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Laurent_OrderTickets.csv" hash="5cd05adbf7fb074b01ede590ce30a04e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="ordertickets.css" hash="f009140fffa838b6b3a3bfe011cebaa2"/></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Order_tickets</name>
4
+ <version>1.2.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
7
  <channel>community</channel>
11
  - customer can add message to orders&#xD;
12
  - administrator can see these messages, reply to them, change status of a chat and create new messages&#xD;
13
  - a cron also exists to send a reminder email to administrator about new messages</description>
14
+ <notes>Admin email text in english</notes>
 
15
  <authors><author><name>Laurent Clouet</name><user>auto-converted</user><email>laurent35240@gmail.com</email></author></authors>
16
+ <date>2012-06-24</date>
17
+ <time>14:13:29</time>
18
+ <contents><target name="magecommunity"><dir name="Laurent"><dir name="OrderTickets"><dir name="Block"><dir name="Adminhtml"><dir name="Chat"><dir name="Create"><dir name="Order"><file name="Grid.php" hash="c7f1c769d398155bd346edb8fe76d6bf"/></dir><dir name="Steptwo"><file name="Form.php" hash="00359248809a4f067f8c488fda650712"/></dir><file name="Form.php" hash="521cca1147cbcecdf66d6e25e42e93d4"/><file name="Order.php" hash="4b5cbda78abda88f5858b1b389ef5b75"/><file name="Steptwo.php" hash="3a439f520e3469d0499ddf4443df674f"/></dir><dir name="View"><dir name="Tab"><file name="Main.php" hash="03c4041d1cf51152b81960301c1a7a09"/><file name="Tickets.php" hash="1113741720801f3101ba7eea34be9e0f"/></dir><file name="Form.php" hash="39fdb499109549c3f343c558016bbeba"/><file name="Tabs.php" hash="f8013ba3783ab56b81ddf85a9322f6eb"/></dir><file name="Create.php" hash="12830fc66389cc498f31a08e75dcac6f"/><file name="Grid.php" hash="991c017b9bc30ea7d21abc37d5357d1f"/><file name="View.php" hash="456751975ddd5022aec9d3dd86f6c393"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Tickets.php" hash="ed5185f29d37f483f7db8538773fe6a7"/></dir></dir></dir><dir name="Order"><dir name="View"><dir name="Tab"><file name="Tickets.php" hash="21259dd5bcaed5c30062b09ba4597561"/></dir></dir></dir><file name="Chat.php" hash="1c2c452367328e34b5e887473e06a220"/></dir><dir name="Order"><file name="Tabs.php" hash="33f15dfed00eca206271cef1f6d17f88"/></dir><file name="Chat.php" hash="4b0247f7c114a894adba736e08cdda7c"/></dir><dir name="Controller"><dir name="Adminhtml"><file name="Chat.php" hash="43b419b5c2b5e6900051e6358153175d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="93cacb500a03173347d3136403be13b1"/></dir><dir name="Model"><dir name="Config"><file name="Cron.php" hash="71180552ddcaa52e340668255ed871a0"/></dir><dir name="Mysql4"><dir name="Chat"><file name="Collection.php" hash="3765532820c8272190ad6bd65a42594d"/></dir><dir name="Ticket"><file name="Collection.php" hash="c04b0fe47e291380a57dce1939425b95"/></dir><file name="Chat.php" hash="105edfaafa9109c87dfb509b641decdc"/><file name="Ticket.php" hash="f9f4e7f6e9da8c110d5042760fe1183e"/></dir><file name="Abstract.php" hash="1c3cebb3cdfbba03c4b21198e2412bd5"/><file name="Chat.php" hash="64ee63f9f7d636c24ba9bde51f7fa5d3"/><file name="Observer.php" hash="b6d6db35f8d63fc8cf6c8f9f96730e80"/><file name="Ticket.php" hash="967e3fd66fd24b689a38f3e1970d5e98"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ChatController.php" hash="074737a0f23108e91b9075bad9cad78b"/><file name="CreateController.php" hash="cbe6071edf569cbfd78036063e0c08f4"/></dir><file name="ChatController.php" hash="d290e0593e45dcb5aec6c44b586f0888"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f4a61001efef301ff263010aad0ecb9d"/><file name="config.xml" hash="e7d9acf05b1c25cfa2eba34c5b7fe292"/><file name="system.xml" hash="37739c5007d90bdf7ee8cbe567e98b6a"/></dir><dir name="sql"><dir name="ordertickets_setup"><file name="mysql4-install-0.1.0.php" hash="eaf0ed1190d400612f7eda66b51a28df"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a59e90142a8ba64c370f59699878a7e1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ordertickets.xml" hash="066b893e6f6d4043f0d7ef0093d7d840"/></dir><dir name="template"><dir name="ordertickets"><dir name="chat"><dir name="create"><file name="abstract.phtml" hash="19cbea5ac678b9197b08c6d9e8f55880"/><file name="form.phtml" hash="5a45de144e3f0b6b52a2e2ee19450413"/></dir><dir name="view"><dir name="tab"><file name="tickets.phtml" hash="c9bdcaca76a70fd3c4a7bbcdf02fa3bf"/></dir></dir></dir><dir name="order"><dir name="view"><dir name="tab"><file name="tickets.phtml" hash="f3aa00997858afcf85373b8e0f1716db"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ordertickets.xml" hash="ff2e6b3a75dcf121fdc5a11bc320d46f"/></dir><dir name="template"><dir name="ordertickets"><dir name="order"><file name="tabs.phtml" hash="3a146acbd5ef5af0a7c939f60ee4c383"/></dir><file name="chat.phtml" hash="d1b6b23797743377040aa3d401ea5001"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Laurent_OrderTickets.xml" hash="46fdc0a685ad8d9144f4db4cb99f97fe"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Laurent_OrderTickets.csv" hash="5cd05adbf7fb074b01ede590ce30a04e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="ordertickets.css" hash="f009140fffa838b6b3a3bfe011cebaa2"/></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies/>
21
  </package>