File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/app/design/adminhtml/default/default/template/zendesk/customer Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 17
17
?>
18
18
<?php
19
19
20
- if (!Mage::getStoreConfig ('zendesk/backend_features/show_on_customer ' )) {
20
+ if (!Mage::getStoreConfig ('zendesk/backend_features/show_on_customer ' )) {
21
21
return ;
22
22
}
23
23
24
24
$ tickets = null ;
25
- if ($ customer = Mage::registry ('current_customer ' )) {
25
+ if ($ customer = Mage::registry ('current_customer ' )) {
26
26
try {
27
27
$ tickets = Mage::getModel ('zendesk/api_tickets ' )->forRequester ($ customer ->getEmail ());
28
- } catch (Exception $ e ) {
29
- // Don't do anything, just don't show the tickets
28
+ } catch (Exception $ e ) {
29
+ Mage:: log ( " Customer { $ customer -> getEmail ()} ticket fetch resulted in: { $ e -> getMessage ()}" , null , ' zendesk.log ' );
30
30
}
31
+ } else {
32
+ Mage::log ('Magento failed to return current customer. ' , null , 'zendesk.log ' );
31
33
34
+ return ;
32
35
}
33
36
?>
34
- <?php if ($ tickets ): ?>
37
+ <?php if ($ tickets ): ?>
35
38
<div class="clear"></div>
36
39
<br/>
37
40
<div class="entry-edit">
@@ -53,7 +56,7 @@ if($customer = Mage::registry('current_customer')) {
53
56
</tr>
54
57
</thead>
55
58
<tbody class="odd">
56
- <?php foreach ($ tickets as $ ticket ):?>
59
+ <?php foreach ($ tickets as $ ticket ):?>
57
60
<tr class="border">
58
61
<td><?php echo ucwords ($ ticket ['priority ' ]); ?> </td>
59
62
<td><?php echo Mage::helper ('zendesk ' )->getTicketUrl ($ ticket ); ?> </td>
You can’t perform that action at this time.
0 commit comments