Version Notes
Added tracked shipments table to packpin dashboard.
Packpin support chat is available in dashboard page.
Download this release
Release Info
Developer | Packpin Packpin |
Extension | Packpin_Pptrack |
Version | 1.3.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.3.3
- app/code/community/Packpin/Pptrack/Block/Adminhtml/Dashboard.php +11 -1
- app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks.php +15 -0
- app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks/Edit.php +33 -0
- app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks/Edit/Form.php +54 -0
- app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks/Grid.php +136 -0
- app/code/community/Packpin/Pptrack/controllers/Adminhtml/PackpintracksController.php +95 -0
- app/code/community/Packpin/Pptrack/etc/config.xml +1 -1
- app/design/adminhtml/default/default/layout/pptrack.xml +5 -1
- app/design/adminhtml/default/default/template/pptrack/dashboard/index.phtml +33 -1
- app/etc/modules/Packpin_Pptrack.xml +1 -1
- package.xml +6 -5
app/code/community/Packpin/Pptrack/Block/Adminhtml/Dashboard.php
CHANGED
@@ -129,7 +129,7 @@ class Packpin_Pptrack_Block_Adminhtml_Dashboard extends Mage_Adminhtml_Block_Das
|
|
129 |
->addFieldToFilter("DATE(created_at)", array('lteq' => $end))
|
130 |
->getSize();
|
131 |
|
132 |
-
$stats['average'] = $stats['visits'] / $stats['trackings'];
|
133 |
|
134 |
//email stats
|
135 |
$helper = Mage::helper('pptrack');
|
@@ -198,4 +198,14 @@ class Packpin_Pptrack_Block_Adminhtml_Dashboard extends Mage_Adminhtml_Block_Das
|
|
198 |
return $stats;
|
199 |
}
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
129 |
->addFieldToFilter("DATE(created_at)", array('lteq' => $end))
|
130 |
->getSize();
|
131 |
|
132 |
+
$stats['average'] = $stats['trackings'] ? $stats['visits'] / $stats['trackings'] : 0;
|
133 |
|
134 |
//email stats
|
135 |
$helper = Mage::helper('pptrack');
|
198 |
return $stats;
|
199 |
}
|
200 |
|
201 |
+
public function pluginEnabled()
|
202 |
+
{
|
203 |
+
return Mage::getStoreConfig('pp_section_setttings/settings/status');
|
204 |
+
}
|
205 |
+
|
206 |
+
public function notificationsEnabled()
|
207 |
+
{
|
208 |
+
return Mage::getStoreConfig('pp_section_setttings/settings/pp_enable_notifications');
|
209 |
+
}
|
210 |
+
|
211 |
}
|
app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Packpin_Pptrack_Block_Adminhtml_Tracks extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
// The blockGroup must match the first half of how we call the block, and controller matches the second half
|
7 |
+
// ie. foo_bar/adminhtml_baz
|
8 |
+
$this->_blockGroup = 'pptrack';
|
9 |
+
$this->_controller = 'adminhtml_tracks';
|
10 |
+
$this->_headerText = $this->__('Tracked shipments');
|
11 |
+
|
12 |
+
parent::__construct();
|
13 |
+
$this->_removeButton('add');
|
14 |
+
}
|
15 |
+
}
|
app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks/Edit.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Packpin_Pptrack_Block_Adminhtml_Tracks_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Init class
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
$this->_blockGroup = 'pptrack';
|
10 |
+
$this->_controller = 'adminhtml_tracks';
|
11 |
+
|
12 |
+
parent::__construct();
|
13 |
+
|
14 |
+
$this->_updateButton('save', 'label', $this->__('Save Track'));
|
15 |
+
$this->_updateButton('delete', 'label', $this->__('Delete Track'));
|
16 |
+
$this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/dashboard/') . '\')');
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get Header text
|
21 |
+
*
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
public function getHeaderText()
|
25 |
+
{
|
26 |
+
if (Mage::registry('pptrack')->getId()) {
|
27 |
+
return $this->__('Edit Track');
|
28 |
+
}
|
29 |
+
else {
|
30 |
+
return $this->__('New Track');
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks/Edit/Form.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Packpin_Pptrack_Block_Adminhtml_Tracks_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Init class
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
$this->setId('pptrack_tracks_form');
|
12 |
+
$this->setTitle($this->__('Track Information'));
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Setup form fields for inserts/updates
|
17 |
+
*
|
18 |
+
* return Mage_Adminhtml_Block_Widget_Form
|
19 |
+
*/
|
20 |
+
protected function _prepareForm()
|
21 |
+
{
|
22 |
+
$model = Mage::registry('pptrack');
|
23 |
+
|
24 |
+
$form = new Varien_Data_Form(array(
|
25 |
+
'id' => 'edit_form',
|
26 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
27 |
+
'method' => 'post'
|
28 |
+
));
|
29 |
+
|
30 |
+
$fieldset = $form->addFieldset('base_fieldset', array(
|
31 |
+
'legend' => Mage::helper('checkout')->__('Track Information'),
|
32 |
+
'class' => 'fieldset-wide',
|
33 |
+
));
|
34 |
+
|
35 |
+
if ($model->getId()) {
|
36 |
+
$fieldset->addField('id', 'hidden', array(
|
37 |
+
'name' => 'id',
|
38 |
+
));
|
39 |
+
}
|
40 |
+
|
41 |
+
$fieldset->addField('email', 'text', array(
|
42 |
+
'name' => 'email',
|
43 |
+
'label' => Mage::helper('checkout')->__('Email'),
|
44 |
+
'title' => Mage::helper('checkout')->__('Email'),
|
45 |
+
'required' => false,
|
46 |
+
));
|
47 |
+
|
48 |
+
$form->setValues($model->getData());
|
49 |
+
$form->setUseContainer(true);
|
50 |
+
$this->setForm($form);
|
51 |
+
|
52 |
+
return parent::_prepareForm();
|
53 |
+
}
|
54 |
+
}
|
app/code/community/Packpin/Pptrack/Block/Adminhtml/Tracks/Grid.php
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Packpin_Pptrack_Block_Adminhtml_Tracks_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
parent::__construct();
|
7 |
+
|
8 |
+
$this->setDefaultSort('ship_date');
|
9 |
+
$this->setId('pptrack_tracks_grid');
|
10 |
+
$this->setDefaultDir('desc');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
// $this->setUseAjax(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _getCollectionClass()
|
16 |
+
{
|
17 |
+
// This is the model we are using for the grid
|
18 |
+
return 'pptrack/track_collection';
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareCollection()
|
22 |
+
{
|
23 |
+
// Get and set our collection for the grid
|
24 |
+
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
25 |
+
$collection->join(
|
26 |
+
array('a' => 'sales/order_grid'),
|
27 |
+
'main_table.order_id=a.entity_id',
|
28 |
+
array('shipping_name')
|
29 |
+
);
|
30 |
+
$collection->join(
|
31 |
+
array('b' => 'sales/shipment_track'),
|
32 |
+
'main_table.shipment_id=b.entity_id'
|
33 |
+
);
|
34 |
+
|
35 |
+
$this->setCollection($collection);
|
36 |
+
|
37 |
+
return parent::_prepareCollection();
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function _prepareColumns()
|
41 |
+
{
|
42 |
+
$helper = Mage::helper('pptrack');
|
43 |
+
|
44 |
+
// Add the columns that should appear in the grid
|
45 |
+
|
46 |
+
$this->addColumn('code',
|
47 |
+
array(
|
48 |
+
'header'=> $this->__('Tracking Code #'),
|
49 |
+
'index' => 'code'
|
50 |
+
)
|
51 |
+
);
|
52 |
+
$this->addColumn('carrier_name',
|
53 |
+
array(
|
54 |
+
'header'=> $this->__('Carrier'),
|
55 |
+
'index' => 'carrier_name'
|
56 |
+
)
|
57 |
+
);
|
58 |
+
$this->addColumn('status',
|
59 |
+
array(
|
60 |
+
'header'=> $this->__('Status'),
|
61 |
+
'index' => 'status'
|
62 |
+
)
|
63 |
+
);
|
64 |
+
$this->addColumn('created_at', array(
|
65 |
+
'header' => $this->__('Created at'),
|
66 |
+
'type' => 'datetime',
|
67 |
+
'index' => 'created_at',
|
68 |
+
));
|
69 |
+
$this->addColumn('order_id',
|
70 |
+
array(
|
71 |
+
'header'=> $this->__('Order #'),
|
72 |
+
'index' => 'order_id'
|
73 |
+
)
|
74 |
+
);
|
75 |
+
$this->addColumn('shipping_name',
|
76 |
+
array(
|
77 |
+
'header'=> $this->__('Ship to name'),
|
78 |
+
'index' => 'shipping_name'
|
79 |
+
)
|
80 |
+
);
|
81 |
+
|
82 |
+
// $this->addColumn('total_qty', array(
|
83 |
+
// 'header' => $this->__('Total Qty'),
|
84 |
+
// 'index' => 'total_qty',
|
85 |
+
// 'type' => 'number',
|
86 |
+
// ));
|
87 |
+
|
88 |
+
// $this->addColumn('action',
|
89 |
+
// array(
|
90 |
+
// 'header' => Mage::helper('pptrack')->__('Action'),
|
91 |
+
// 'width' => '50px',
|
92 |
+
// 'type' => 'action',
|
93 |
+
// 'getter' => 'getId',
|
94 |
+
// 'actions' => array(
|
95 |
+
// array(
|
96 |
+
// 'caption' => Mage::helper('pptrack')>__('View/Edit'),
|
97 |
+
// 'url' => array('base'=>'*/*/edit'),
|
98 |
+
// 'field' => 'id',
|
99 |
+
// 'data-column' => 'action',
|
100 |
+
// )
|
101 |
+
// ),
|
102 |
+
// 'filter' => false,
|
103 |
+
// 'sortable' => false,
|
104 |
+
// 'index' => 'stores',
|
105 |
+
// 'is_system' => true,
|
106 |
+
// ));
|
107 |
+
|
108 |
+
|
109 |
+
$this->addExportType('*/*/exportTracksCsv', $helper->__('CSV'));
|
110 |
+
$this->addExportType('*/*/exportTracksExcel', $helper->__('Excel XML'));
|
111 |
+
|
112 |
+
return parent::_prepareColumns();
|
113 |
+
}
|
114 |
+
|
115 |
+
protected function _prepareMassaction()
|
116 |
+
{
|
117 |
+
// $this->setMassactionIdField('entity_id');
|
118 |
+
// $this->getMassactionBlock()->setFormFieldName('order_ids');
|
119 |
+
// $this->getMassactionBlock()->setUseSelectAll(false);
|
120 |
+
//
|
121 |
+
// if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) {
|
122 |
+
// $this->getMassactionBlock()->addItem('cancel_order', array(
|
123 |
+
// 'label'=> Mage::helper('sales')->__('Cancel'),
|
124 |
+
// 'url' => $this->getUrl('*/sales_order/massCancel'),
|
125 |
+
// ));
|
126 |
+
// }
|
127 |
+
|
128 |
+
return $this;
|
129 |
+
}
|
130 |
+
|
131 |
+
public function getRowUrl($row)
|
132 |
+
{
|
133 |
+
// This is where our row data will link to
|
134 |
+
return $this->getUrl('*/sales_shipment/view/', array('shipment_id' => $row->getParentId()));
|
135 |
+
}
|
136 |
+
}
|
app/code/community/Packpin/Pptrack/controllers/Adminhtml/PackpintracksController.php
CHANGED
@@ -18,6 +18,101 @@ class Packpin_Pptrack_Adminhtml_PackpintracksController extends Mage_Adminhtml_C
|
|
18 |
->renderLayout();
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
}
|
18 |
->renderLayout();
|
19 |
}
|
20 |
|
21 |
+
public function indexAction()
|
22 |
+
{
|
23 |
+
$this->_initAction()
|
24 |
+
->_title($this->__('Dashboard'))->_title($this->__('Packpin'))
|
25 |
+
->_addBreadcrumb($this->__('Dashboard'), $this->__('Dashboard'))
|
26 |
+
->_addBreadcrumb($this->__('pptrack'), $this->__('Packpin'))
|
27 |
+
->renderLayout();
|
28 |
+
}
|
29 |
+
|
30 |
+
public function newAction()
|
31 |
+
{
|
32 |
+
// We just forward the new action to a blank edit form
|
33 |
+
$this->_forward('edit');
|
34 |
+
}
|
35 |
+
|
36 |
+
public function editAction()
|
37 |
+
{
|
38 |
+
$this->_initAction();
|
39 |
+
|
40 |
+
// Get id if available
|
41 |
+
$id = $this->getRequest()->getParam('id');
|
42 |
+
$model = Mage::getModel('pptrack/track');
|
43 |
+
|
44 |
+
if ($id) {
|
45 |
+
// Load record
|
46 |
+
$model->load($id);
|
47 |
+
|
48 |
+
// Check if record is loaded
|
49 |
+
if (!$model->getId()) {
|
50 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('This Track no longer exists.'));
|
51 |
+
$this->_redirect('*/*/');
|
52 |
+
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
$this->_title($model->getId() ? $model->getName() : $this->__('New Track'));
|
58 |
+
|
59 |
+
$data = Mage::getSingleton('adminhtml/session')->getTracksData(true);
|
60 |
+
if (!empty($data)) {
|
61 |
+
$model->setData($data);
|
62 |
+
}
|
63 |
+
|
64 |
+
Mage::register('pptrack', $model);
|
65 |
|
66 |
+
$this->_initAction()
|
67 |
+
->_addBreadcrumb($id ? $this->__('Edit Track') : $this->__('New Track'), $id ? $this->__('Edit Track') : $this->__('New Track'))
|
68 |
+
->_addContent($this->getLayout()->createBlock('pptrack/adminhtml_tracks_edit')->setData('action', $this->getUrl('*/*/save')))
|
69 |
+
->renderLayout();
|
70 |
+
}
|
71 |
+
|
72 |
+
public function saveAction()
|
73 |
+
{
|
74 |
+
if ($postData = $this->getRequest()->getPost()) {
|
75 |
+
$model = Mage::getSingleton('pptrack/Track');
|
76 |
+
$model->setData($postData);
|
77 |
+
|
78 |
+
try {
|
79 |
+
$model->save();
|
80 |
+
|
81 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The Track has been saved.'));
|
82 |
+
$this->_redirect('*/*/');
|
83 |
+
|
84 |
+
return;
|
85 |
+
}
|
86 |
+
catch (Mage_Core_Exception $e) {
|
87 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
88 |
+
}
|
89 |
+
catch (Exception $e) {
|
90 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('An error occurred while saving this track.'));
|
91 |
+
}
|
92 |
+
|
93 |
+
Mage::getSingleton('adminhtml/session')->setBazData($postData);
|
94 |
+
$this->_redirectReferer();
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
public function messageAction()
|
99 |
+
{
|
100 |
+
$data = Mage::getModel('pptrack/Track')->load($this->getRequest()->getParam('id'));
|
101 |
+
echo $data->getContent();
|
102 |
+
}
|
103 |
+
|
104 |
+
public function exportTracksCsvAction()
|
105 |
+
{
|
106 |
+
$fileName = 'tracks.csv';
|
107 |
+
$grid = $this->getLayout()->createBlock('pptrack/adminhtml_tracks_grid');
|
108 |
+
$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
|
109 |
+
}
|
110 |
+
|
111 |
+
public function exportTracksExcelAction()
|
112 |
+
{
|
113 |
+
$fileName = 'tracks.xml';
|
114 |
+
$grid = $this->getLayout()->createBlock('pptrack/adminhtml_tracks_grid');
|
115 |
+
$this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
|
116 |
+
}
|
117 |
|
118 |
}
|
app/code/community/Packpin/Pptrack/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Packpin_Pptrack>
|
5 |
-
<version>1.3.
|
6 |
</Packpin_Pptrack>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Packpin_Pptrack>
|
5 |
+
<version>1.3.3</version>
|
6 |
</Packpin_Pptrack>
|
7 |
</modules>
|
8 |
<frontend>
|
app/design/adminhtml/default/default/layout/pptrack.xml
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="1.3.
|
3 |
<adminhtml_packpintracks_dashboard>
|
4 |
<reference name="head">
|
5 |
<action method="addCss">
|
6 |
<name>pptrack/css/dashboard.css</name>
|
7 |
</action>
|
|
|
|
|
|
|
8 |
<action method="addItem">
|
9 |
<type>skin_js</type>
|
10 |
<name>pptrack/js/dashboard.js</name>
|
@@ -12,6 +15,7 @@
|
|
12 |
</reference>
|
13 |
<reference name="content">
|
14 |
<block type="pptrack/adminhtml_dashboard" name="pptrack_adminhtml_trackings.dashboard" template="pptrack/dashboard/index.phtml"/>
|
|
|
15 |
</reference>
|
16 |
</adminhtml_packpintracks_dashboard>
|
17 |
<adminhtml_system_config_edit>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<layout version="1.3.3">
|
3 |
<adminhtml_packpintracks_dashboard>
|
4 |
<reference name="head">
|
5 |
<action method="addCss">
|
6 |
<name>pptrack/css/dashboard.css</name>
|
7 |
</action>
|
8 |
+
<action method="addCss">
|
9 |
+
<name>pptrack/css/pptrack.css</name>
|
10 |
+
</action>
|
11 |
<action method="addItem">
|
12 |
<type>skin_js</type>
|
13 |
<name>pptrack/js/dashboard.js</name>
|
15 |
</reference>
|
16 |
<reference name="content">
|
17 |
<block type="pptrack/adminhtml_dashboard" name="pptrack_adminhtml_trackings.dashboard" template="pptrack/dashboard/index.phtml"/>
|
18 |
+
<block type="pptrack/adminhtml_tracks" name="pptrack_tracks" />
|
19 |
</reference>
|
20 |
</adminhtml_packpintracks_dashboard>
|
21 |
<adminhtml_system_config_edit>
|
app/design/adminhtml/default/default/template/pptrack/dashboard/index.phtml
CHANGED
@@ -13,6 +13,21 @@ $data = $rangeStats['graph'];
|
|
13 |
</table>
|
14 |
</div>
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<div id="dashboard_diagram_totals" class="box">
|
17 |
<div class="entry-edit">
|
18 |
<table width="100%" cellspacing="0">
|
@@ -94,7 +109,9 @@ $data = $rangeStats['graph'];
|
|
94 |
</table>
|
95 |
<div id="graph1"></div>
|
96 |
</div>
|
97 |
-
|
|
|
|
|
98 |
<script type="text/javascript">
|
99 |
var rangeInfo = <?php echo json_encode($rangeInfo) ?>;
|
100 |
|
@@ -147,4 +164,19 @@ $data = $rangeStats['graph'];
|
|
147 |
xLabels: "day"
|
148 |
});
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
</script>
|
13 |
</table>
|
14 |
</div>
|
15 |
|
16 |
+
<?php if (!$this->pluginEnabled() || !$this->notificationsEnabled()) : ?>
|
17 |
+
<ul class="messages">
|
18 |
+
<li class="error-msg">
|
19 |
+
<ul>
|
20 |
+
<li>
|
21 |
+
<span>
|
22 |
+
<?php echo !$this->pluginEnabled() ? Mage::helper('pptrack')->__('Packpin extension is disabled.') : Mage::helper('pptrack')->__('Packpin notifications are disabled.') ?>
|
23 |
+
<a href="<?php echo $this->getUrl('adminhtml/system_config/edit/section/pp_section_setttings') ?>"><?php echo Mage::helper('pptrack')->__('Click here') ?></a> <?php echo Mage::helper('pptrack')->__('to change your settings') ?>
|
24 |
+
</span>
|
25 |
+
</li>
|
26 |
+
</ul>
|
27 |
+
</li>
|
28 |
+
</ul>
|
29 |
+
<?php endif; ?>
|
30 |
+
|
31 |
<div id="dashboard_diagram_totals" class="box">
|
32 |
<div class="entry-edit">
|
33 |
<table width="100%" cellspacing="0">
|
109 |
</table>
|
110 |
<div id="graph1"></div>
|
111 |
</div>
|
112 |
+
<br>
|
113 |
+
<br>
|
114 |
+
<br>
|
115 |
<script type="text/javascript">
|
116 |
var rangeInfo = <?php echo json_encode($rangeInfo) ?>;
|
117 |
|
164 |
xLabels: "day"
|
165 |
});
|
166 |
|
167 |
+
<?php $user = Mage::getSingleton('admin/session'); ?>
|
168 |
+
window.intercomSettings = {
|
169 |
+
"plugin": "magento",
|
170 |
+
name: "<?php echo $user->getUser()->getFirstname() . ' ' . $user->getUser()->getLastname() ?>",
|
171 |
+
email: "<?php echo $user->getUser()->getEmail() ?>",
|
172 |
+
app_id: "n806bjdu",
|
173 |
+
"api_key": "<?php echo Mage::getStoreConfig('pp_section_setttings/settings/api_key') ?>",
|
174 |
+
"plugin_version": "<?php echo (string) Mage::getConfig()->getNode()->modules->Packpin_Pptrack->version ?>",
|
175 |
+
"plugin_shop_version": "<?php echo Mage::getVersion() ?>",
|
176 |
+
"shop_name": "<?php echo Mage::getStoreConfig('trans_email/ident_general/name') ?>",
|
177 |
+
"shop_email": "<?php echo Mage::getStoreConfig('trans_email/ident_general/email') ?>",
|
178 |
+
"shop_url": "<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) ?>"
|
179 |
+
};
|
180 |
+
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/n806bjdu';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
|
181 |
+
|
182 |
</script>
|
app/etc/modules/Packpin_Pptrack.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<Packpin_Pptrack>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
-
<version>1.3.
|
8 |
</Packpin_Pptrack>
|
9 |
</modules>
|
10 |
</config>
|
4 |
<Packpin_Pptrack>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
+
<version>1.3.3</version>
|
8 |
</Packpin_Pptrack>
|
9 |
</modules>
|
10 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Packpin_Pptrack</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -18,11 +18,12 @@ Packpin created shipment tracking and cross selling solution within email notifi
|
|
18 |
- Shipment tracking button on shipment notification email.
|
19 |
- Tracking button in customer order.
|
20 |
- Easy 10 minutes installation.</description>
|
21 |
-
<notes>Added
|
|
|
22 |
<authors><author><name>Packpin Packpin</name><user>packpin</user><email>info@packpin.com</email></author></authors>
|
23 |
-
<date>2015-07-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magecommunity"><dir name="Packpin"><dir name="Pptrack"><dir name="Block"><dir name="Adminhtml"><file name="Dashboard.php" hash="
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.2.13</min><max>5.7.0</max></php></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Packpin_Pptrack</name>
|
4 |
+
<version>1.3.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
18 |
- Shipment tracking button on shipment notification email.
|
19 |
- Tracking button in customer order.
|
20 |
- Easy 10 minutes installation.</description>
|
21 |
+
<notes>Added tracked shipments table to packpin dashboard.
|
22 |
+
Packpin support chat is available in dashboard page.</notes>
|
23 |
<authors><author><name>Packpin Packpin</name><user>packpin</user><email>info@packpin.com</email></author></authors>
|
24 |
+
<date>2015-07-30</date>
|
25 |
+
<time>08:17:35</time>
|
26 |
+
<contents><target name="magecommunity"><dir name="Packpin"><dir name="Pptrack"><dir name="Block"><dir name="Adminhtml"><file name="Dashboard.php" hash="2bb42734856a0dae87be8e8105d2f62c"/><dir name="Sales"><dir name="Order"><dir name="Shipment"><dir name="Create"><file name="Tracking.php" hash="1b38e83ca0aee989764fe3a7d0cf1bac"/></dir><dir name="View"><file name="Tracking.php" hash="401f134f83a17d7d6cf9f0d8ede13ec8"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint-owner.php" hash="3f3029efceb1d0e1c8f37f08aa21a371"/><file name="Hint.php" hash="c961a7b4cd0ce5d7b8024a2996262028"/><file name="Scripts.php" hash="79d629b135d51296ee0ba3e3a805ba5f"/></dir><dir name="Form"><dir name="Fieldset"><file name="Carrier.php" hash="8dcd2c2fbfbd6eb5938f06e537c939e3"/></dir></dir></dir></dir><dir name="Tracks"><dir name="Edit"><file name="Form.php" hash="556852017b6608fef3997cea97c069df"/></dir><file name="Edit.php" hash="b623cd711954618b9cc6d26af85791b3"/><file name="Grid.php" hash="747258b47f50b46cfbe41a6154ba1cdb"/></dir><file name="Tracks.php" hash="b0f5a7507dfb3e1425ca9a85d262cf5f"/></dir><file name="Ads.php" hash="aa56b07b8771fb94b9bd11a95aa4e872"/><file name="Crosssell.php" hash="1964eb986f699a500cd445cceed78c1c"/><file name="Index.php" hash="d2d92ae24bad53b4b6f360d04b58f35d"/><file name="Script.php" hash="f7f9d2f660f958e4e4448f88c860d91c"/><file name="Trackings.php" hash="3313a04f6ee29e1a93a940ba52d5af6b"/></dir><dir name="Helper"><file name="Data.php" hash="a144fe246e3a624015559c10bd3428b3"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Crossviews.php" hash="2f353f1eca123be3d5d6628cd6fec9bc"/><file name="Crossviewspage.php" hash="c28db6e0df790fd0f0cd521d31340618"/></dir></dir></dir></dir><file name="Api.php" hash="88d205736602d9f9cf839d3cf487be5c"/><file name="Carrier.php" hash="cc1d7e12e7b8a01768ebebbcebe26c47"/><file name="EnableNotifications.php" hash="989324234904a700f3bd0c529d35789e"/><file name="Observer.php" hash="e37b70cbd2d847b2144d0c7696ef5944"/><dir name="Order"><file name="Shipment.php" hash="97b3f6ad711842e3066300db6dc8a2c5"/></dir><dir name="Resource"><dir name="Carrier"><file name="Collection.php" hash="03005aa1067c8df71710d1224b9eb838"/></dir><file name="Carrier.php" hash="353d1d39c03e23dbbeacc181c1eb7ce9"/><dir name="Setting"><file name="Collection.php" hash="aa4e67bcd7016180fc6febf974533c93"/></dir><file name="Setting.php" hash="3eeee7198164abc0885e3c938b7d8bb4"/><dir name="Track"><file name="Collection.php" hash="cc6adf831c0248a202394e36d458b623"/></dir><file name="Track.php" hash="3f1d555d29f49ef8f6d2f6967d355ee8"/><dir name="Trackdetail"><file name="Collection.php" hash="941c6277814680ec85eb12c51ecf89d4"/></dir><file name="Trackdetail.php" hash="aedb43bb11215a694251e49ad9425eb6"/><dir name="Trackunsubscribed"><file name="Collection.php" hash="33f9820631af51c4e3aa62f34b5a7a3c"/></dir><file name="Trackunsubscribed.php" hash="038ffa7b345e528c808b03932baaf99c"/><dir name="Visit"><file name="Collection.php" hash="69c7a74f615ca0a833ea8e9d31c95ae1"/></dir><file name="Visit.php" hash="db8e9038a1b941a8ef403715d99327e0"/></dir><file name="Setting.php" hash="1f7b781d526211dcb29c78cb498033a2"/><file name="Track.php" hash="28bcecc923f56e3791e821f4434cf3c2"/><file name="Trackdetail.php" hash="5a30f656c2e02258722edb5763d69f9b"/><file name="Trackunsubscribed.php" hash="47770b68d49a554c7e18250578ecddfc"/><file name="Translate.php" hash="dd80869c7e8dec6c0c3260db5cff3ccd"/><file name="Visit.php" hash="260383440fcde030413a650cf44010c6"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PackpintracksController.php" hash="858bc6389e9e255e0a1dcc40b711601b"/><file name="PpnotificationsController.php" hash="3f7422b0c1a272ad9a8948b8ee076054"/></dir><file name="IndexController.php" hash="b9a793c29abf30df5a43b3127b354213"/><file name="UnsubscribeController.php" hash="76fb169f4e2dd8c23504899276ae9152"/></dir><dir name="data"><dir name="pptrack_setup"><file name="data-upgrade-0.1.5-1.1.0.php" hash="412052d61996b3b32ab4608bf1d1dffc"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d940f0fddfc4410080890cf7072c1284"/><file name="api.xml" hash="5986c3cfd16372143cf2d4d0d3252f38"/><file name="config.xml" hash="6e4406fe6143bc0e046ab3a71b7201e8"/><file name="system.xml" hash="9a5152829866b693435346ea2ff82bdc"/></dir><dir name="sql"><dir name="pptrack_setup"><file name="mysql4-install-0.1.2.php" hash="41ddf13aef299e050bd4586c4473eb66"/><file name="mysql4-upgrade-0.1.2-0.1.5.php" hash="edfc436309165f115aeacf29df9d3398"/><file name="mysql4-upgrade-0.1.5-1.3.0.php" hash="c149678902df0b2df795b5eddc0cf696"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pptrack.xml" hash="940072199d0ae9880c39b39b55131208"/></dir><dir name="template"><dir name="pptrack"><file name="ads.phtml" hash="c96197f43506ae6b5cd88c832fa88d1a"/><file name="ads_email.phtml" hash="962207b6baf56c12716b4727e6849444"/><file name="crosssell.phtml" hash="8ab02a9bda48c988dba66e633cb65c76"/><file name="crosssell_email.phtml" hash="84a09283849c332a9a65c60f2a69c6e8"/><dir name="email"><dir name="order"><dir name="shipment"><file name="track.phtml" hash="8b072e5dc5ec2007b344641b805e4a76"/></dir></dir></dir><file name="index.phtml" hash="166d5b337b56dd2fb191d3ef1dce61f2"/><file name="popup.phtml" hash="f8692aeedd28f2b13c92f626b2f6c6ad"/><file name="script.phtml" hash="213e0fc610eb4d66f3ec67cfa82a63a4"/><file name="unsubscribe.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pptrack.xml" hash="8e9588311bebd12448389b8af68f20fc"/></dir><dir name="template"><dir name="pptrack"><dir name="dashboard"><file name="index.phtml" hash="950540d4e17ee56be117b665585fc7a1"/><file name="packpin.phtml" hash="5471f95ed5f17669265762c7814b7dde"/></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="cb1396e7c7f78da4b3d4fe993c37da49"/><file name="scripts.phtml" hash="f83f4bcfddf754e16107b41cf447c493"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Packpin_Pptrack.xml" hash="d6fb36e3706c4c91b58f2d1c78434185"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="pptrack.css" hash="e6e290ac0da281a95481de150d396415"/></dir><dir name="images"><dir name="pptrack"><file name="bulletIcon.png" hash="15f6fd65c7a62f940b7d17b9186a2b35"/><file name="checkedIcon.png" hash="cef38265bdd7675a0497a2296f5b7332"/><file name="postnlLogo.png" hash="3b4595ba4262c574c1147ed39e862092"/><file name="trackingStatus.png" hash="6dcf522f4e22b69bb25c3b3c199bb464"/><file name="truck.png" hash="3eb50f750a0fefa1903613e0bc26a2ee"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="pptrack"><dir name="css"><file name="dashboard.css" hash="b6b60f1fca6cafc98cf4483c3299ab4d"/><file name="pptrack.css" hash="b4c42edf3884eb62617f2347f1740b3f"/></dir><dir name="images"><file name="pp_logo1.png" hash="1a79f10d0f028271ac0b2646243e39d1"/></dir><dir name="js"><file name="dashboard.js" hash="1a4bd65a41a4c5d4d7ba6d4f94fe4955"/><file name="pptrack.js" hash="7bc0ee636b3b83484fc3b9348863bd22"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="packpin"><file name="packpin_delivered_email.html" hash="11d00272d82b3607068429ea494f08f3"/><file name="packpin_exception_email.html" hash="483af61fd9c1fbbca098d1bfcee0ad75"/><file name="packpin_failed_attempt_email.html" hash="483af61fd9c1fbbca098d1bfcee0ad75"/><file name="packpin_in_transit_email.html" hash="483af61fd9c1fbbca098d1bfcee0ad75"/><file name="packpin_info_received_email.html" hash="483af61fd9c1fbbca098d1bfcee0ad75"/><file name="packpin_out_for_delivery_email.html" hash="483af61fd9c1fbbca098d1bfcee0ad75"/></dir></dir></dir><file name="Packpin_Pptrack.csv" hash="582366fe3cf0fc6e79bdf1a09d6922ab"/></dir><dir name="es_ES"><file name="Packpin_Pptrack.csv" hash="b181ac70f3ac3d59a07b3c31ff3c34fe"/></dir><dir name="de_DE"><file name="Packpin_Pptrack.csv" hash="25ca5c6bb882bb2b9f3bfc5342fa76d1"/></dir><dir name="nl_NL"><file name="Packpin_Pptrack.csv" hash="df991ddd35ed4835a29b37b457bf3981"/></dir><dir name="pt_PT"><file name="Packpin_Pptrack.csv" hash="e3c8561588c07affcb0d509940301685"/></dir></target></contents>
|
27 |
<compatible/>
|
28 |
<dependencies><required><php><min>5.2.13</min><max>5.7.0</max></php></required></dependencies>
|
29 |
</package>
|