Order_tickets - Version 1.3.1

Version Notes

Url for creating new ticket fixed

Download this release

Release Info

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


Code changes from version 1.3.0 to 1.3.1

app/code/community/Laurent/OrderTickets/Block/Adminhtml/Order/View/Tab/Tickets.php CHANGED
@@ -59,7 +59,9 @@ class Laurent_OrderTickets_Block_Adminhtml_Order_View_Tab_Tickets
59
  */
60
  public function getChat(){
61
  if(!$this->_chat){
62
- $chat = Mage::helper('ordertickets')->loadChatFromOrderId($this->getOrder()->getId());
 
 
63
 
64
  if($chat && $chat->getId()){
65
  $this->_chat = $chat;
@@ -80,4 +82,12 @@ class Laurent_OrderTickets_Block_Adminhtml_Order_View_Tab_Tickets
80
 
81
  return $this->getUrl('ordertickets_admin/chat/view', array('chat_id' => $this->getChat()->getId()));
82
  }
 
 
 
 
 
 
 
 
83
  }
59
  */
60
  public function getChat(){
61
  if(!$this->_chat){
62
+ /** @var $chatHelper Laurent_OrderTickets_Helper_Data */
63
+ $chatHelper = Mage::helper('ordertickets');
64
+ $chat = $chatHelper->loadChatFromOrderId($this->getOrder()->getId());
65
 
66
  if($chat && $chat->getId()){
67
  $this->_chat = $chat;
82
 
83
  return $this->getUrl('ordertickets_admin/chat/view', array('chat_id' => $this->getChat()->getId()));
84
  }
85
+
86
+ /**
87
+ * Get url fro creating ticket for currently viewed order
88
+ * @return string
89
+ */
90
+ public function getCreateTicketUrl(){
91
+ return $this->getUrl('ordertickets_admin/create/steptwo', array('order_id' => $this->getOrder()->getId()));
92
+ }
93
  }
app/code/community/Laurent/OrderTickets/Model/Chat.php CHANGED
@@ -14,6 +14,8 @@
14
  * @method string getStatus()
15
  * @method Laurent_OrderTickets_Model_Chat setStatus(string $status)
16
  * @method int getOrderId()
 
 
17
  *
18
  */
19
  class Laurent_OrderTickets_Model_Chat extends Laurent_OrderTickets_Model_Abstract {
14
  * @method string getStatus()
15
  * @method Laurent_OrderTickets_Model_Chat setStatus(string $status)
16
  * @method int getOrderId()
17
+ * @method string getCreatedAt()
18
+ * @method string getLastAnswerDate()
19
  *
20
  */
21
  class Laurent_OrderTickets_Model_Chat extends Laurent_OrderTickets_Model_Abstract {
app/code/community/Laurent/OrderTickets/etc/config.xml CHANGED
@@ -9,7 +9,7 @@
9
  <config>
10
  <modules>
11
  <Laurent_OrderTickets>
12
- <version>1.3.0</version>
13
  </Laurent_OrderTickets>
14
  </modules>
15
  <global>
9
  <config>
10
  <modules>
11
  <Laurent_OrderTickets>
12
+ <version>1.3.1</version>
13
  </Laurent_OrderTickets>
14
  </modules>
15
  <global>
app/design/adminhtml/default/default/template/ordertickets/order/view/tab/tickets.phtml CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
  /* @var $this Laurent_OrderTickets_Block_Adminhtml_Order_View_Tab_Tickets */
 
 
3
  ?>
4
  <div class="entry-edit">
5
  <div class="entry-edit-head">
@@ -10,11 +12,15 @@
10
  <table cellspacing="0" class="form-list">
11
  <tr>
12
  <td class="label"><?php echo $this->__('Created at') ?></td>
13
- <td class="value"><?php echo Mage::helper('core')->formatDate($this->getChat()->getCreatedAt(), 'full', true) ?></td>
 
 
14
  </tr>
15
  <tr>
16
  <td class="label"><?php echo $this->__('Last answer date') ?></td>
17
- <td class="value"><?php echo Mage::helper('core')->formatDate($this->getChat()->getLastAnswerDate(), 'full', true) ?></td>
 
 
18
  </tr>
19
  <tr>
20
  <td class="label"><?php echo $this->__('Status') ?></td>
@@ -31,8 +37,7 @@
31
  </table>
32
  <?php else: ?>
33
  <?php echo $this->__('There is no ticket associated to this order') ?><br />
34
- <button type="button" class="scalable add"
35
- onclick="setLocation('<?php echo $this->getUrl('ordertickets/adminhtml_create/steptwo', array('order_id' => $this->getOrder()->getId()))?>')">
36
  <span><?php echo $this->__('Create ticket') ?></span>
37
  </button>
38
  <?php endif; ?>
1
  <?php
2
  /* @var $this Laurent_OrderTickets_Block_Adminhtml_Order_View_Tab_Tickets */
3
+ /** @var $coreHelper Mage_Core_Helper_Data */
4
+ $coreHelper = Mage::helper('core');
5
  ?>
6
  <div class="entry-edit">
7
  <div class="entry-edit-head">
12
  <table cellspacing="0" class="form-list">
13
  <tr>
14
  <td class="label"><?php echo $this->__('Created at') ?></td>
15
+ <td class="value">
16
+ <?php echo $coreHelper->formatDate($this->getChat()->getCreatedAt(), 'full', true) ?>
17
+ </td>
18
  </tr>
19
  <tr>
20
  <td class="label"><?php echo $this->__('Last answer date') ?></td>
21
+ <td class="value">
22
+ <?php echo $coreHelper->formatDate($this->getChat()->getLastAnswerDate(), 'full', true) ?>
23
+ </td>
24
  </tr>
25
  <tr>
26
  <td class="label"><?php echo $this->__('Status') ?></td>
37
  </table>
38
  <?php else: ?>
39
  <?php echo $this->__('There is no ticket associated to this order') ?><br />
40
+ <button type="button" class="scalable add" onclick="setLocation('<?php echo $this->getCreateTicketUrl()?>')">
 
41
  <span><?php echo $this->__('Create ticket') ?></span>
42
  </button>
43
  <?php endif; ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Order_tickets</name>
4
- <version>1.3.0</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,11 +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>Possibility of disabling answer for closed tickets</notes>
15
  <authors><author><name>Laurent Clouet</name><user>auto-converted</user><email>laurent35240@gmail.com</email></author></authors>
16
- <date>2012-10-07</date>
17
- <time>17:45:57</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="878e4932d98a2c46c7a63ac01c3f9e28"/></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="1f8a6bea02208100938ee9f38a1c5d74"/><file name="Observer.php" hash="b6d6db35f8d63fc8cf6c8f9f96730e80"/><file name="Ticket.php" hash="a7d70471a959d82c6c9ff184d50eea9e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ChatController.php" hash="22110c7385e72f371bf36b7f1dfe4eab"/><file name="CreateController.php" hash="cbe6071edf569cbfd78036063e0c08f4"/></dir><file name="ChatController.php" hash="276a4b7488baed2fcbb8a10f6e066c4e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f4a61001efef301ff263010aad0ecb9d"/><file name="config.xml" hash="d0022d453d1cb1fc6344735a47795cc7"/><file name="system.xml" hash="33934d7e9443b340daa1b58b36294dc8"/></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="baa5371991469d993477bae28cfacf2f"/></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="074eb18924a8c6fb4d4d29a7286486bb"/></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="6a8cafdb0a9b7136cfbc7b30fe2edb2b"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Order_tickets</name>
4
+ <version>1.3.1</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>Url for creating new ticket fixed</notes>
15
  <authors><author><name>Laurent Clouet</name><user>auto-converted</user><email>laurent35240@gmail.com</email></author></authors>
16
+ <date>2013-01-27</date>
17
+ <time>17:50:45</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="878e4932d98a2c46c7a63ac01c3f9e28"/></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="78cc90b8582578c6370fb1ae18aaa161"/></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="17c4c6e412fd8fb398646b8d292d2c96"/><file name="Observer.php" hash="b6d6db35f8d63fc8cf6c8f9f96730e80"/><file name="Ticket.php" hash="a7d70471a959d82c6c9ff184d50eea9e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ChatController.php" hash="22110c7385e72f371bf36b7f1dfe4eab"/><file name="CreateController.php" hash="cbe6071edf569cbfd78036063e0c08f4"/></dir><file name="ChatController.php" hash="276a4b7488baed2fcbb8a10f6e066c4e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f4a61001efef301ff263010aad0ecb9d"/><file name="config.xml" hash="870f221cd8964a50cace003350262650"/><file name="system.xml" hash="33934d7e9443b340daa1b58b36294dc8"/></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="baa5371991469d993477bae28cfacf2f"/></dir></dir></dir><dir name="order"><dir name="view"><dir name="tab"><file name="tickets.phtml" hash="dee13d8912c7819fb96cd1695baee9b1"/></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="074eb18924a8c6fb4d4d29a7286486bb"/></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="6a8cafdb0a9b7136cfbc7b30fe2edb2b"/></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>