Deskero - Version 1.0.1

Version Notes

Fixed Side Navigation
Added check on API connection

Download this release

Release Info

Developer Fausto Iannuzzi
Extension Deskero
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Deskero/Deskero/Block/Adminhtml/Ticket/Create/Create.php CHANGED
@@ -34,4 +34,5 @@ class Deskero_Deskero_Block_Adminhtml_Ticket_Create_Create extends Mage_Adminhtm
34
  {
35
  return $this->getUrl('*/*/save', array('_current' => true, 'back' => null));
36
  }
 
37
  }
34
  {
35
  return $this->getUrl('*/*/save', array('_current' => true, 'back' => null));
36
  }
37
+
38
  }
app/code/community/Deskero/Deskero/Block/Adminhtml/Ticket/Create/Form.php CHANGED
@@ -90,20 +90,27 @@ class Deskero_Deskero_Block_Adminhtml_Ticket_Create_Form extends Mage_Adminhtml_
90
 
91
  if ($values) {
92
 
93
- $fieldset->addField('type', 'select', array(
94
- 'name' => 'type',
95
- 'label' => $this->__('Type'),
96
- 'title' => $this->__('Type'),
97
- 'required' => true,
98
- 'values' => $values
99
-
100
- ));
101
 
102
- }
103
 
 
 
 
104
  }
105
 
106
 
 
 
 
 
107
  }
108
 
109
  $fieldset->addField('description', 'textarea', array(
@@ -113,14 +120,31 @@ class Deskero_Deskero_Block_Adminhtml_Ticket_Create_Form extends Mage_Adminhtml_
113
  'required' => true
114
  ));
115
 
116
- $form->setValues(Mage::getSingleton('adminhtml/session')->getData('createTicket_form'));
117
-
118
- Mage::getSingleton('adminhtml/session')->setData('createTicket_form','');
 
 
 
 
 
 
 
 
 
119
 
120
- $form->setUseContainer(true);
121
- $form->setMethod('post');
122
- $this->setForm($form);
123
- return parent::_prepareForm();
 
 
 
 
 
 
 
 
124
  }
125
 
126
  }
90
 
91
  if ($values) {
92
 
93
+ $fieldset->addField('type', 'select', array(
94
+ 'name' => 'type',
95
+ 'label' => $this->__('Type'),
96
+ 'title' => $this->__('Type'),
97
+ 'required' => true,
98
+ 'values' => $values
99
+
100
+ ));
101
 
102
+ }
103
 
104
+ } else {
105
+
106
+ $apiError = true;
107
  }
108
 
109
 
110
+ } else {
111
+
112
+ $apiError = true;
113
+
114
  }
115
 
116
  $fieldset->addField('description', 'textarea', array(
120
  'required' => true
121
  ));
122
 
123
+ if (!$apiError) {
124
+
125
+ $notifyText = $this->__('Oops! ');
126
+ $notifyText .= "<br/>".$this->__('Error in API connection! Please check your API configuration, or contact support@deskero.com');
127
+
128
+ Mage::getSingleton('adminhtml/session')->addError($notifyText);
129
+
130
+ Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl()."/admin/system_config/edit/section/deskero_settings");
131
+
132
+ } else {
133
+
134
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getData('createTicket_form'));
135
 
136
+ Mage::getSingleton('adminhtml/session')->setData('createTicket_form','');
137
+
138
+ $form->setUseContainer(true);
139
+ $form->setMethod('post');
140
+ $this->setForm($form);
141
+ return parent::_prepareForm();
142
+
143
+ }
144
+
145
+
146
+
147
+
148
  }
149
 
150
  }
app/code/community/Deskero/Deskero/controllers/Adminhtml/DeskeroController.php CHANGED
@@ -38,11 +38,28 @@ class Deskero_Deskero_Adminhtml_DeskeroController extends Mage_Adminhtml_Control
38
 
39
  public function createTicketAction() {
40
 
41
- $this->loadLayout();
42
- $this->_title($this->__("Create Ticket"));
43
- $this->_addContent($this->getLayout()->createBlock('deskero/adminhtml_ticket_create_create'));
44
- $this->_addLeft($this->getLayout()->createBlock('deskero/adminhtml_menu'));
45
- $this->renderLayout();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  }
48
 
38
 
39
  public function createTicketAction() {
40
 
41
+ $apiToken = Mage::getStoreConfig('deskero_settings/deskero_general_settings/deskero_api_token');
42
+ $clientID = Mage::getStoreConfig('deskero_settings/deskero_general_settings/deskero_clientid');
43
+
44
+ if ($apiToken == "" || $clientID == "") {
45
+
46
+ $notifyText = $this->__('Oops! ');
47
+ $notifyText .= "<br/>".$this->__('To create a new ticket, set CLIENT ID and API TOKEN!');
48
+
49
+ Mage::getSingleton('adminhtml/session')->addError($notifyText);
50
+
51
+ $this->_redirect('adminhtml/system_config/edit/section/deskero_settings');
52
+
53
+ } else {
54
+
55
+ $this->loadLayout();
56
+ $this->_title($this->__("Create Ticket"));
57
+ $this->_addContent($this->getLayout()->createBlock('deskero/adminhtml_ticket_create_create'));
58
+ $this->_addLeft($this->getLayout()->createBlock('deskero/adminhtml_menu'));
59
+ $this->renderLayout();
60
+
61
+ }
62
+
63
 
64
  }
65
 
app/design/adminhtml/default/default/template/deskero/left-menu.phtml CHANGED
@@ -2,7 +2,7 @@
2
  <ul class="tabs">
3
 
4
  <li>
5
- <a href="<?php echo $this->getUrl('adminhtml/system_config/edit/section/deskero'); ?>" class="tab-item-link">
6
  <span><?php echo $this->__('Settings'); ?></span>
7
  </a>
8
  </li>
2
  <ul class="tabs">
3
 
4
  <li>
5
+ <a href="<?php echo $this->getUrl('adminhtml/system_config/edit/section/deskero_settings'); ?>" class="tab-item-link">
6
  <span><?php echo $this->__('Settings'); ?></span>
7
  </a>
8
  </li>
app/locale/Deskero_Deskero.csv ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Deskero Settings","Impostazioni Deskero"
2
+ "Launch Deskero","Avvia Deskero"
3
+ "Settings","Impostazioni"
4
+ "General Setting","Impostazioni generali"
5
+ "Your Deskero Domain","Dominio in Deskero"
6
+ "Your Deskero Domain. Example: https://yourdomain.deskero.com","Il tuo dominio in Deskero. Esempio: https://iltuodominio.deskero.com"
7
+ "Client ID","Client ID"
8
+ "Find your Client ID in Deskero on Settings > Security Settings > API management","Trova il tuo Client ID su Deskero nel menù Configurazioni > Sicurezza > Gestione API"
9
+ "API Token","Token API"
10
+ "Find your API Token in Deskero on Settings > Security Settings > API management","Trova il tuo Token SSO su Deskero nel menù Configurazioni > Sicurezza > Gestione API"
11
+ "Widget Setting","Impostazioni widget"
12
+ "Widget Active","Widget Attivo"
13
+ "If YES, the widget will be shown on all pages.","Se YES, il widget apparirà su tutte le pagine."
14
+ "Widget Code","Codice widget"
15
+ "Login to Deskero, go to Settings > Feedback Widget and copy here your widget embed code.","Accedi a Deskero, vai nel menù Configurazioni > Widget per feedback e copia qui il tuo codice da incorporare."
16
+ "SSO Setting","Impostazioni SSO"
17
+ "SSO Token","Token SSO"
18
+ "Find your SSO Token in Deskero on Settings > Security Settings > Shared authentication","Trova il tuo Token SSO su Deskero nel menù Configurazioni > Sicurezza > Autenticazione condivisa"
19
+ "Agent Email","Email agente"
20
+ "Your Agent Email in Deskero","La tua email da operatore in Deskero"
21
+ "New Ticket","Nuovo Ticket"
22
+ "Create Ticket","Crea Ticket"
23
+ "Customer Email","Email del cliente"
24
+ "Customer Name","Nome del cliente"
25
+ "Subject","Oggetto"
26
+ "Type","Tipo"
27
+ "Description","Descrizione"
28
+ "Ticket <b>#%s</b> has been created!","Il ticket <b>#%s</b> è stato creato!"
29
+ "View ticket in Deskero","Leggi il ticket su Deskero"
30
+ "Error in ticket creation!","Errore durante la creazione del ticket"
31
+ "Customer not found!","Cliente non trovato!"
32
+ "Can't connect to Deskero API!","Connessione alle API Deskero non riuscita!"
33
+ "Oops! ","Oops! "
34
+ "Customer Email is required!","L'email del cliente è obbligatoria!"
35
+ "Customer Email is not a valid address!","L'email del cliente non è un indirizzo valido!"
36
+ "Customer Name is required!","Il nome del cliente è obbligatorio!"
37
+ "Type is required!","Il tipo di ticket è obbligatorio!"
38
+ "Subject is required!","L'oggetto è obbligatorio!"
39
+ "Description is required!","La descrizione è obbligatoria!"
40
+ "No data sended!","Nessun dato inviato!"
41
+ "To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!","Per avviare Deskero, imposta il TUO DOMINIO IN DESKERO, il TOKEN SSO e l'EMAIL AGENTE!"
42
+ "To create a new ticket, set CLIENT ID and API TOKEN!","Per creare un nuovo ticket, imposta il tuo CLIENT ID e il TOKEN API!"
43
+ "Error in API connection! Please check your API configuration, or contact support@deskero.com","Errore nella connessione alle API. Controlla la tua configurazione API o invia una email a support@deskero.com"
app/locale/en_US/Deskero_Deskero.csv CHANGED
@@ -38,4 +38,6 @@
38
  "Subject is required!","Subject is required!"
39
  "Description is required!","Description is required!"
40
  "No data sended!","No data sended!"
41
- "To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!","To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!"
 
 
38
  "Subject is required!","Subject is required!"
39
  "Description is required!","Description is required!"
40
  "No data sended!","No data sended!"
41
+ "To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!","To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!"
42
+ "To create a new ticket, set CLIENT ID and API TOKEN!","To create a new ticket, set CLIENT ID and API TOKEN!"
43
+ "Error in API connection! Please check your API configuration, or contact support@deskero.com","Error in API connection! Please check your API configuration, or contact support@deskero.com"
app/locale/it_IT/Deskero_Deskero.csv CHANGED
@@ -38,4 +38,5 @@
38
  "Subject is required!","L'oggetto è obbligatorio!"
39
  "Description is required!","La descrizione è obbligatoria!"
40
  "No data sended!","Nessun dato inviato!"
41
- "To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!","Per avviare Deskero, imposta il TUO DOMINIO IN DESKERO, il TOKEN SSO e l'EMAIL AGENTE!"
 
38
  "Subject is required!","L'oggetto è obbligatorio!"
39
  "Description is required!","La descrizione è obbligatoria!"
40
  "No data sended!","Nessun dato inviato!"
41
+ "To launch Deskero, set YOUR DESKERO DOMAIN, TOKEN SSO and AGENT EMAIL!","Per avviare Deskero, imposta il TUO DOMINIO IN DESKERO, il TOKEN SSO e l'EMAIL AGENTE!"
42
+ "To create a new ticket, set CLIENT ID and API TOKEN!","Per creare un nuovo ticket, imposta il tuo CLIENT ID e il TOKEN API!"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Deskero</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -21,11 +21,12 @@
21
  &lt;/p&gt;&#xD;
22
  &#xD;
23
  &lt;p&gt;Deskero extension for Magento is available only to Business or Power users.&lt;/p&gt;</description>
24
- <notes>First release</notes>
 
25
  <authors><author><name>Fausto Iannuzzi</name><user>faustoiannuzzi</user><email>fausto@deskero.com</email></author></authors>
26
- <date>2013-08-28</date>
27
- <time>10:30:02</time>
28
- <contents><target name="magecommunity"><dir name="Deskero"><dir name="Deskero"><dir name="Block"><dir name="Adminhtml"><file name="Menu.php" hash="2272bbc9281bfac7194a0817cdee2d88"/><dir name="Ticket"><dir name="Create"><file name="Create.php" hash="ac26abca01db34e24831fc5d31fb6c36"/><file name="Form.php" hash="7dadd1df6ff2817c00808fa2d0396bf5"/></dir></dir></dir><file name="Widget.php" hash="0abcc9c7e1852be5b0b69a4b244bb430"/></dir><dir name="Helper"><file name="Data.php" hash="61b36df7759d319fd25e1a58850fbd30"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="DeskeroController.php" hash="21864e4abc6954301f831858d38033c8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b93362d17b15de9a869a8454d38e9ab2"/><file name="config.xml" hash="f999300462a8af5375a6af81481743bc"/><file name="system.xml" hash="1fbe3307eb6be5e043eaf2cbb7bd8f34"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="deskero.xml" hash="dcdec81f7fcc34fb1a2dc9f218360eef"/></dir><dir name="template"><dir name="deskero"><file name="left-menu.phtml" hash="b355e7457cfef5579b342f9a5f9511d4"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="deskero.xml" hash="f1c745105450382b869723f9743e27fe"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Deskero_Deskero.xml" hash="7ccffebaf8d06567bd340bc29f583b59"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Deskero_Deskero.csv" hash="8d384bc914d6b7d0b09ad28c7b864071"/></dir><dir name="it_IT"><file name="Deskero_Deskero.csv" hash="0cea6f325b6c15df4db3b17e2aeaa447"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="deskero"><file name="deskero-menu.png" hash="ccb5b77f7074fa8ace567ec5dc28bd54"/><file name="deskero.css" hash="9e87ec2d6645f48089661212d0521e21"/><file name="header-logo.png" hash="1777ad0345115961079a14a4c62eac1e"/></dir></dir></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Deskero</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
21
  &lt;/p&gt;&#xD;
22
  &#xD;
23
  &lt;p&gt;Deskero extension for Magento is available only to Business or Power users.&lt;/p&gt;</description>
24
+ <notes>Fixed Side Navigation&#xD;
25
+ Added check on API connection</notes>
26
  <authors><author><name>Fausto Iannuzzi</name><user>faustoiannuzzi</user><email>fausto@deskero.com</email></author></authors>
27
+ <date>2013-09-09</date>
28
+ <time>09:52:38</time>
29
+ <contents><target name="magecommunity"><dir name="Deskero"><dir name="Deskero"><dir name="Block"><dir name="Adminhtml"><file name="Menu.php" hash="2272bbc9281bfac7194a0817cdee2d88"/><dir name="Ticket"><dir name="Create"><file name="Create.php" hash="fd35ac2aa559e7eaf694db12fc10b229"/><file name="Form.php" hash="9f9a43d8ecaf3832487948984c2ad5f6"/></dir></dir></dir><file name="Widget.php" hash="0abcc9c7e1852be5b0b69a4b244bb430"/></dir><dir name="Helper"><file name="Data.php" hash="61b36df7759d319fd25e1a58850fbd30"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="DeskeroController.php" hash="20f572339ac3636840e7ef52247a4532"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b93362d17b15de9a869a8454d38e9ab2"/><file name="config.xml" hash="f999300462a8af5375a6af81481743bc"/><file name="system.xml" hash="1fbe3307eb6be5e043eaf2cbb7bd8f34"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="deskero.xml" hash="dcdec81f7fcc34fb1a2dc9f218360eef"/></dir><dir name="template"><dir name="deskero"><file name="left-menu.phtml" hash="a992658498fa0ce208357e405aa3cc34"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="deskero.xml" hash="f1c745105450382b869723f9743e27fe"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Deskero_Deskero.xml" hash="7ccffebaf8d06567bd340bc29f583b59"/></dir></target><target name="magelocale"><dir><dir><file name="Deskero_Deskero.csv" hash="03d3409fdedaf6e70412dccfb4df0818"/></dir><dir name="en_US"><file name="Deskero_Deskero.csv" hash="e806673c210ac157c78055bcb6a74a33"/></dir><dir name="it_IT"><file name="Deskero_Deskero.csv" hash="128a24396a85b3acdb506076447b226f"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="deskero"><file name="deskero-menu.png" hash="ccb5b77f7074fa8ace567ec5dc28bd54"/><file name="deskero.css" hash="9e87ec2d6645f48089661212d0521e21"/><file name="header-logo.png" hash="1777ad0345115961079a14a4c62eac1e"/></dir></dir></dir></dir></target></contents>
30
  <compatible/>
31
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
32
  </package>