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 1717?>
1818<?php
1919
20- if (!Mage::getStoreConfig ('zendesk/backend_features/show_on_customer ' )) {
20+ if (!Mage::getStoreConfig ('zendesk/backend_features/show_on_customer ' )) {
2121 return ;
2222}
2323
2424$ tickets = null ;
25- if ($ customer = Mage::registry ('current_customer ' )) {
25+ if ($ customer = Mage::registry ('current_customer ' )) {
2626 try {
2727 $ 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 ' );
3030 }
31+ } else {
32+ Mage::log ('Magento failed to return current customer. ' , null , 'zendesk.log ' );
3133
34+ return ;
3235}
3336?>
34- <?php if ($ tickets ): ?>
37+ <?php if ($ tickets ): ?>
3538 <div class="clear"></div>
3639 <br/>
3740 <div class="entry-edit">
@@ -53,7 +56,7 @@ if($customer = Mage::registry('current_customer')) {
5356 </tr>
5457 </thead>
5558 <tbody class="odd">
56- <?php foreach ($ tickets as $ ticket ):?>
59+ <?php foreach ($ tickets as $ ticket ):?>
5760 <tr class="border">
5861 <td><?php echo ucwords ($ ticket ['priority ' ]); ?> </td>
5962 <td><?php echo Mage::helper ('zendesk ' )->getTicketUrl ($ ticket ); ?> </td>
You can’t perform that action at this time.
0 commit comments