Esat_Esatisfaction - Version 1.0.6

Version Notes

The first stable version of e-satisfaction extension

Download this release

Release Info

Developer e-satisfaction
Extension Esat_Esatisfaction
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.6

Files changed (19) hide show
  1. app/code/community/Esat/Esatisfaction/Block/Checkoutsuccessscripts.php +8 -0
  2. app/code/community/Esat/Esatisfaction/Model/Resource/Setup.php +4 -0
  3. app/code/community/Esat/Esatisfaction/controllers/Adminhtml/Esatisfaction/CustomquestionsController.php +1 -0
  4. app/code/community/Esat/Esatisfaction/controllers/Adminhtml/Esatisfaction/SaveiconController.php +17 -0
  5. app/code/community/Esat/Esatisfaction/etc/config.xml +9 -1
  6. app/code/community/Esat/Esatisfaction/sql/esatisfaction_setup/mysql4-install-1.0.6.php +15 -0
  7. app/design/adminhtml/default/default/template/esatisfaction/aggregatedorders.phtml +79 -16
  8. app/design/adminhtml/default/default/template/esatisfaction/customer/js.phtml +0 -3
  9. app/design/adminhtml/default/default/template/esatisfaction/customerorders.phtml +1 -12
  10. app/design/adminhtml/default/default/template/esatisfaction/customquestions.phtml +11 -11
  11. app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/comment.phtml +1 -1
  12. app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/customer_smiley.phtml +1 -1
  13. app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/gensatisfaction.phtml +1 -1
  14. app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/nps.phtml +1 -1
  15. app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/schedule.phtml +1 -1
  16. app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/smiley.phtml +11 -6
  17. app/design/adminhtml/default/default/template/esatisfaction/sales/order/tab/esatisfaction.phtml +4 -4
  18. app/design/frontend/base/default/template/esatisfaction/checkout/success_scripts.phtml +2 -2
  19. package.xml +4 -4
app/code/community/Esat/Esatisfaction/Block/Checkoutsuccessscripts.php CHANGED
@@ -36,6 +36,14 @@ class Esat_Esatisfaction_Block_Checkoutsuccessscripts
36
  return $orderId;
37
  }
38
 
 
 
 
 
 
 
 
 
39
  public function getCustomerEmail(){
40
  $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
41
  $order = Mage::getModel('sales/order')->load($orderId);
36
  return $orderId;
37
  }
38
 
39
+ public function getIncrementId()
40
+ {
41
+ $order = Mage::getModel('sales/order');
42
+ $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
43
+ $increment_id = $order->getIncrementId();
44
+ return $increment_id;
45
+ }
46
+
47
  public function getCustomerEmail(){
48
  $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
49
  $order = Mage::getModel('sales/order')->load($orderId);
app/code/community/Esat/Esatisfaction/Model/Resource/Setup.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Esat_Esatisfaction_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {
3
+ }
4
+ ?>
app/code/community/Esat/Esatisfaction/controllers/Adminhtml/Esatisfaction/CustomquestionsController.php CHANGED
@@ -21,6 +21,7 @@ class Esat_Esatisfaction_Adminhtml_Esatisfaction_CustomquestionsController exten
21
  $this->renderLayout();
22
  }
23
 
 
24
  public function exportAction()
25
  {
26
 
21
  $this->renderLayout();
22
  }
23
 
24
+
25
  public function exportAction()
26
  {
27
 
app/code/community/Esat/Esatisfaction/controllers/Adminhtml/Esatisfaction/SaveiconController.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Esat_Esatisfaction_Adminhtml_Esatisfaction_SaveiconController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+
5
+ public function indexAction()
6
+ {
7
+ $order_id = $this->getRequest()->getPost('order_id');
8
+ $icon_url = $this->getRequest()->getPost('icon_url');
9
+
10
+ $orderModel = Mage::getModel('sales/order')->loadByIncrementId($order_id)->setEsatIcon($icon_url);
11
+
12
+ $orderModel->setIncrementId($order_id)->save();
13
+ }
14
+
15
+
16
+ }
17
+ ?>
app/code/community/Esat/Esatisfaction/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Esat_Esatisfaction>
5
- <version>0.1.0</version>
6
  </Esat_Esatisfaction>
7
  </modules>
8
  <admin>
@@ -17,6 +17,14 @@
17
  </routers>
18
  </admin>
19
  <global>
 
 
 
 
 
 
 
 
20
  <blocks>
21
  <esatisfaction>
22
  <class>Esat_Esatisfaction_Block</class>
2
  <config>
3
  <modules>
4
  <Esat_Esatisfaction>
5
+ <version>1.0.6</version>
6
  </Esat_Esatisfaction>
7
  </modules>
8
  <admin>
17
  </routers>
18
  </admin>
19
  <global>
20
+ <resources>
21
+ <esatisfaction_setup>
22
+ <setup>
23
+ <module>Esat_Esatisfaction</module>
24
+ <class>Esat_Esatisfaction_Model_Resource_Setup</class>
25
+ </setup>
26
+ </esatisfaction_setup>
27
+ </resources>
28
  <blocks>
29
  <esatisfaction>
30
  <class>Esat_Esatisfaction_Block</class>
app/code/community/Esat/Esatisfaction/sql/esatisfaction_setup/mysql4-install-1.0.6.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+
6
+ $installer->getConnection()
7
+ ->addColumn($installer->getTable('sales/order'),'esat_icon', array(
8
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
9
+ 'nullable' => false,
10
+ 'length' => 255,
11
+ 'after' => null, // column name to insert new column after
12
+ 'comment' => 'Esatisfaction Icon'
13
+ ));
14
+ $installer->endSetup();
15
+ ?>
app/design/adminhtml/default/default/template/esatisfaction/aggregatedorders.phtml CHANGED
@@ -1,4 +1,5 @@
1
  <script type="text/javascript">
 
2
  <?php $site_id = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_id'); ?>
3
  <?php $public_key = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_public_key'); ?>
4
  <?php $private_key = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_private_key'); ?>
@@ -18,39 +19,101 @@ var setHeaders = function(request, public_key, timestamp, hashInBase64){
18
  request.setRequestHeader('X-Microtime', timestamp);
19
  }
20
 
21
-
22
- var getAggregatedOrders = function(order_id) {
23
  $j.ajax({
24
  type: "GET",
25
- url:"https://www.e-satisfaction.gr/api/v2/prestashop/aggregated_order_page/<?php echo $site_id; ?>",
26
  contentType: "application/json; charset=utf-8",
27
  dataType: "json",
28
- data:{'order_id':order_id},
29
  beforeSend: function (request) {
30
  buildAuth(request,this.type);
31
  },
32
  success: function (data) {
33
- var imageFound = 0;
34
  if(data){
35
- if(!data['error']){
36
- if(data['ordrlist_pg_imgurl']){
37
- if(data['ordrlist_pg_imgurl'] != '-'){
38
- $j('#esatisfaction-smiley-order-'+order_id+'-img').attr('src',data['ordrlist_pg_imgurl']);
39
- imageFound = 1;
 
 
 
 
 
40
  }
 
 
41
  }
42
  }
43
  }
44
- if(imageFound == 0){
45
- $j('#esatisfaction-smiley-order-'+order_id).html('-');
46
- }
47
 
48
-
49
- //alert(JSON.stringify(data));
50
  },
51
  error: function (errorMessage) {
52
  if(errorMessage.status == 401) alert('Access denied');
53
  }
54
  });
55
  };
56
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <script type="text/javascript">
2
+
3
  <?php $site_id = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_id'); ?>
4
  <?php $public_key = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_public_key'); ?>
5
  <?php $private_key = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_private_key'); ?>
19
  request.setRequestHeader('X-Microtime', timestamp);
20
  }
21
 
22
+ var getAllOrders = function(orders) {
 
23
  $j.ajax({
24
  type: "GET",
25
+ url:"http://www.e-satisfaction.gr/api/v2/prestashop/aggregated_order_page_json/<?php echo $site_id; ?>?json_data="+orders,
26
  contentType: "application/json; charset=utf-8",
27
  dataType: "json",
 
28
  beforeSend: function (request) {
29
  buildAuth(request,this.type);
30
  },
31
  success: function (data) {
 
32
  if(data){
33
+ var data_lentgh = data.length;
34
+ for (var i = 0; i < data_lentgh; i++) {
35
+ console.log(data[i])
36
+ var order_id = data[i]['order_id'];
37
+ if(!data[i]['error']){
38
+ var need_update = data[i]['need_update'];
39
+ var img_url = data[i]['ordrlist_pg_imgurl'];
40
+ $j('#esatisfaction-smiley-order-'+order_id+'-img').attr('src',img_url);
41
+ if(need_update == 0){
42
+ saveIcon(order_id,img_url);
43
  }
44
+ }else{
45
+ $j('#esatisfaction-smiley-order-'+order_id).html('-');
46
  }
47
  }
48
  }
 
 
 
49
 
 
 
50
  },
51
  error: function (errorMessage) {
52
  if(errorMessage.status == 401) alert('Access denied');
53
  }
54
  });
55
  };
56
+
57
+ var orders = '{"order":[';
58
+ var add_comma = 0;
59
+ var number_of_passed_rows = 1;
60
+ var send = 1;
61
+
62
+
63
+ var getOrdersShown = function(order_id,get_icon) {
64
+
65
+ var limit = $j('select[name="limit"]').val() * 1;
66
+ var page = ($j('input[name="page"]').val() * 1) - 1;
67
+ var total = $j('#sales_order_grid-total-count').html() * 1;
68
+ var number_of_rows = 0;
69
+ if(page > 0){
70
+ total = total - (page * limit);
71
+ }
72
+ if(limit < total){
73
+ number_of_rows = limit;
74
+ }else{
75
+ number_of_rows = total;
76
+ }
77
+
78
+ if(get_icon){
79
+ if(add_comma){
80
+ orders += ',';
81
+ }else{
82
+ orders = '{"order":[';
83
+ add_comma = 1;
84
+ }
85
+ orders += '{"id":"'+order_id+'"}';
86
+ }
87
+ if(number_of_passed_rows == number_of_rows){
88
+ number_of_passed_rows = 1;
89
+ send = 1;
90
+ add_comma = 0;
91
+ orders+=']}';
92
+ var encodedData = encodeURIComponent(orders);
93
+ getAllOrders(encodedData);
94
+ }else if(send == 100){
95
+ send = 1;
96
+ add_comma = 0;
97
+ orders+=']}';
98
+ var encodedData = encodeURIComponent(orders);
99
+ getAllOrders(encodedData);
100
+ number_of_passed_rows++;
101
+ }else{
102
+ send++;
103
+ number_of_passed_rows++;
104
+ }
105
+ }
106
+
107
+ </script>
108
+ <script type="text/javascript">//<![CDATA[
109
+ function saveIcon(order_id,icon_url){
110
+ var request_data = {
111
+ 'order_id' : order_id,
112
+ 'icon_url' : icon_url
113
+ };
114
+ new Ajax.Request("<?php echo $this->getUrl('adminhtml/esatisfaction_saveicon') ?>", {
115
+ method: 'Post',
116
+ parameters: request_data
117
+ });
118
+ }
119
+ //]]></script>
app/design/adminhtml/default/default/template/esatisfaction/customer/js.phtml DELETED
@@ -1,3 +0,0 @@
1
- <script type="text/javascript">
2
- $$('h3.head-customer').first().insert({ after: "<p>Some html</p>" });
3
- </script>
 
 
 
app/design/adminhtml/default/default/template/esatisfaction/customerorders.phtml CHANGED
@@ -19,6 +19,7 @@ var setHeaders = function(request, public_key, timestamp, hashInBase64){
19
  request.setRequestHeader('X-Microtime', timestamp);
20
  }
21
  var getAllOrders = function(order_id) {
 
22
  $j.ajax({
23
  type: "GET",
24
  url:"https://www.e-satisfaction.gr/api/v2/prestashop/customer_page_details/<?php echo $site_id; ?>",
@@ -70,7 +71,6 @@ var getAllOrders = function(order_id) {
70
  $j('#esatisfaction-comment-order-'+order_id).text('-');
71
  }
72
 
73
- //alert(JSON.stringify(data));
74
  },
75
  error: function (errorMessage) {
76
  if(errorMessage.status == 401) alert('Access denied');
@@ -78,15 +78,4 @@ var getAllOrders = function(order_id) {
78
  });
79
  };
80
 
81
- /*/
82
- $j(document).ready(function(){
83
- $j('div[id^="esatisfaction-smiley-order-"]').each(function(){
84
- var id = $j(this).attr('id');
85
- var order_id = id.replace("esatisfaction-smiley-order-", "");
86
- order_id = (1 * order_id );
87
-
88
- getAllOrders(<?php echo $site_id; ?>,order_id);
89
- });
90
- });
91
- //*/
92
  </script>
19
  request.setRequestHeader('X-Microtime', timestamp);
20
  }
21
  var getAllOrders = function(order_id) {
22
+ console.log(order_id);
23
  $j.ajax({
24
  type: "GET",
25
  url:"https://www.e-satisfaction.gr/api/v2/prestashop/customer_page_details/<?php echo $site_id; ?>",
71
  $j('#esatisfaction-comment-order-'+order_id).text('-');
72
  }
73
 
 
74
  },
75
  error: function (errorMessage) {
76
  if(errorMessage.status == 401) alert('Access denied');
78
  });
79
  };
80
 
 
 
 
 
 
 
 
 
 
 
 
81
  </script>
app/design/adminhtml/default/default/template/esatisfaction/customquestions.phtml CHANGED
@@ -1,13 +1,13 @@
1
-  <div class="content-header">
2
- <table cellspacing="0">
3
- <tbody>
4
- <tr>
5
- <td style="width:50%;"><h3 class="icon-head head-products"><?php echo $this->__('Custom Questions'); ?></h3></td>
6
- </tr>
7
- </tbody>
8
- </table>
9
- </div>
10
- <div>
11
  <?php if($this->isCustomQuestionsEnabled()){ ?>
12
  <?php $site_id = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_id'); ?>
13
  <div id="customQuestionsGrid">
@@ -119,4 +119,4 @@
119
 
120
  </div>
121
  <?php } ?>
122
- </div>
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tbody>
4
+ <tr>
5
+ <td style="width:50%;"><h3 class="icon-head head-products"><?php echo $this->__('Custom Questions'); ?></h3></td>
6
+ </tr>
7
+ </tbody>
8
+ </table>
9
+ </div>
10
+ <div>
11
  <?php if($this->isCustomQuestionsEnabled()){ ?>
12
  <?php $site_id = Mage::getStoreConfig('esatisfaction/section_one/esatisfaction_site_id'); ?>
13
  <div id="customQuestionsGrid">
119
 
120
  </div>
121
  <?php } ?>
122
+ </div>
app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/comment.phtml CHANGED
@@ -1,5 +1,5 @@
1
  <?php if ($this->canRender()): ?>
2
- <?php $order_id = $this->getOrder()->getId(); ?>
3
  <div class="esatisfaction-comment-order-container" id="esatisfaction-comment-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
1
  <?php if ($this->canRender()): ?>
2
+ <?php $order_id = $this->getOrder()->getIncrementId(); ?>
3
  <div class="esatisfaction-comment-order-container" id="esatisfaction-comment-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/customer_smiley.phtml CHANGED
@@ -1,5 +1,5 @@
1
  <?php if ($this->canRender()): ?>
2
- <?php $order_id = $this->getOrder()->getId(); ?>
3
  <div class="smile-container" id="esatisfaction-smiley-order-<?php echo $order_id; ?>">
4
  <img src="" id="esatisfaction-smiley-order-<?php echo $order_id; ?>-img" />
5
  </div>
1
  <?php if ($this->canRender()): ?>
2
+ <?php $order_id = $this->getOrder()->getIncrementId(); ?>
3
  <div class="smile-container" id="esatisfaction-smiley-order-<?php echo $order_id; ?>">
4
  <img src="" id="esatisfaction-smiley-order-<?php echo $order_id; ?>-img" />
5
  </div>
app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/gensatisfaction.phtml CHANGED
@@ -1,5 +1,5 @@
1
  <?php if ($this->canRender()): ?>
2
- <?php $order_id = $this->getOrder()->getId(); ?>
3
  <div class="esatisfaction-gensatisfaction-order-container" id="esatisfaction-gensatisfaction-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
1
  <?php if ($this->canRender()): ?>
2
+ <?php $order_id = $this->getOrder()->getIncrementId(); ?>
3
  <div class="esatisfaction-gensatisfaction-order-container" id="esatisfaction-gensatisfaction-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/nps.phtml CHANGED
@@ -1,5 +1,5 @@
1
  <?php if ($this->canRender()): ?>
2
- <?php $order_id = $this->getOrder()->getId(); ?>
3
  <div class="esatisfaction-nps-order-container" id="esatisfaction-nps-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
1
  <?php if ($this->canRender()): ?>
2
+ <?php $order_id = $this->getOrder()->getIncrementId(); ?>
3
  <div class="esatisfaction-nps-order-container" id="esatisfaction-nps-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/schedule.phtml CHANGED
@@ -1,5 +1,5 @@
1
  <?php if ($this->canRender()): ?>
2
- <?php $order_id = $this->getOrder()->getId(); ?>
3
  <div class="esatisfaction-schedule-order-container" id="esatisfaction-schedule-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
1
  <?php if ($this->canRender()): ?>
2
+ <?php $order_id = $this->getOrder()->getIncrementId(); ?>
3
  <div class="esatisfaction-schedule-order-container" id="esatisfaction-schedule-order-<?php echo $order_id; ?>">
4
  </div>
5
  <?php endif; ?>
app/design/adminhtml/default/default/template/esatisfaction/grid/renderer/sales/order/smiley.phtml CHANGED
@@ -1,10 +1,15 @@
1
  <?php if ($this->canRender()): ?>
2
  <?php $order_id = $this->getOrder()->getId(); ?>
3
- <div class="smile-container" id="esatisfaction-smiley-order-<?php echo $order_id; ?>">
4
- <img src="" id="esatisfaction-smiley-order-<?php echo $order_id; ?>-img" />
 
 
5
  </div>
 
 
 
 
 
 
 
6
  <?php endif; ?>
7
-
8
- <script type="text/javascript">
9
- getAggregatedOrders(<?php echo $order_id; ?>);
10
- </script>
1
  <?php if ($this->canRender()): ?>
2
  <?php $order_id = $this->getOrder()->getId(); ?>
3
+ <?php $increment_id = $this->getOrder()->getIncrementId(); ?>
4
+ <?php $esat_icon = Mage::getModel('sales/order')->load($order_id)->getEsatIcon(); ?>
5
+ <div class="smile-container" id="esatisfaction-smiley-order-<?php echo $increment_id; ?>">
6
+ <img src="<?php echo $esat_icon; ?>" id="esatisfaction-smiley-order-<?php echo $increment_id; ?>-img" />
7
  </div>
8
+ <script type="text/javascript">
9
+ <?php if(!$esat_icon){ ?>
10
+ getOrdersShown(<?php echo $increment_id; ?>,1);
11
+ <?php } else { ?>
12
+ getOrdersShown(<?php echo $increment_id; ?>,0);
13
+ <?php } ?>
14
+ </script>
15
  <?php endif; ?>
 
 
 
 
app/design/adminhtml/default/default/template/esatisfaction/sales/order/tab/esatisfaction.phtml CHANGED
@@ -565,7 +565,7 @@ new Varien.Tabs('.e-satisfaction-tabs');
565
  }
566
 
567
 
568
- //alert(JSON.stringify(data));
569
  },
570
  error: function (errorMessage) {
571
  if(errorMessage.status == 401) alert('Access denied');
@@ -584,7 +584,7 @@ new Varien.Tabs('.e-satisfaction-tabs');
584
  });
585
  };
586
  var site_id = <?php echo $site_id; ?>;
587
- var order_id = <?php echo $_order->getId(); ?>;
588
 
589
  getOrder(site_id, order_id);
590
 
@@ -595,7 +595,7 @@ new Varien.Tabs('.e-satisfaction-tabs');
595
  var request_data = {
596
  'email_to' : '<?php echo $this->escapeHtml($_order->getCustomerEmail()) ?>',
597
  'customer_name' : '<?php echo $this->escapeHtml($_order->getCustomerName()) ?>',
598
- 'order_id' : '<?php echo $_order->getId(); ?>',
599
  'stage' : 'Checkout',
600
  'comment' : $j('#ordr_pg_comments_text').text(),
601
  'answer' : $j('#esatisfaction_checkout_comment_answer').val()
@@ -628,7 +628,7 @@ new Varien.Tabs('.e-satisfaction-tabs');
628
  var request_data = {
629
  'email_to' : '<?php echo $this->escapeHtml($_order->getCustomerEmail()) ?>',
630
  'customer_name' : '<?php echo $this->escapeHtml($_order->getCustomerName()) ?>',
631
- 'order_id' : '<?php echo $_order->getId(); ?>',
632
  'stage' : 'After sales',
633
  'comment' : $j('#ordr_pg_after_sales_comments_text').text(),
634
  'answer' : $j('#esatisfaction_after_sales_comment_answer').val()
565
  }
566
 
567
 
568
+ console.log(JSON.stringify(data));
569
  },
570
  error: function (errorMessage) {
571
  if(errorMessage.status == 401) alert('Access denied');
584
  });
585
  };
586
  var site_id = <?php echo $site_id; ?>;
587
+ var order_id = <?php echo $_order->getIncrementId(); ?>;
588
 
589
  getOrder(site_id, order_id);
590
 
595
  var request_data = {
596
  'email_to' : '<?php echo $this->escapeHtml($_order->getCustomerEmail()) ?>',
597
  'customer_name' : '<?php echo $this->escapeHtml($_order->getCustomerName()) ?>',
598
+ 'order_id' : '<?php echo $_order->getIncrementId(); ?>',
599
  'stage' : 'Checkout',
600
  'comment' : $j('#ordr_pg_comments_text').text(),
601
  'answer' : $j('#esatisfaction_checkout_comment_answer').val()
628
  var request_data = {
629
  'email_to' : '<?php echo $this->escapeHtml($_order->getCustomerEmail()) ?>',
630
  'customer_name' : '<?php echo $this->escapeHtml($_order->getCustomerName()) ?>',
631
+ 'order_id' : '<?php echo $_order->getIncrementId(); ?>',
632
  'stage' : 'After sales',
633
  'comment' : $j('#ordr_pg_after_sales_comments_text').text(),
634
  'answer' : $j('#esatisfaction_after_sales_comment_answer').val()
app/design/frontend/base/default/template/esatisfaction/checkout/success_scripts.phtml CHANGED
@@ -1,11 +1,11 @@
1
  <script type="text/javascript">
2
  $$(".page-title").first().insert({ after: '<div id="checkout-questionnaire"></div>' });
3
- <?php $order_id = $this->getOrderId(); ?>
4
  <?php $token = $this->getToken(); ?>
5
  <?php $email = $this->getCustomerEmail(); ?>
6
 
7
  var _esatisf = _esatisf || [];
8
- _esatisf.push(['_responder', '<?php echo $order_id; ?>']);
9
  _esatisf.push(['_token', '<?php echo $token; ?>']);
10
  _esatisf.push(['_email', '<?php echo $email; ?>']);
11
  _esatisf.push(['_showQuestionnaire', '#checkout-questionnaire']);
1
  <script type="text/javascript">
2
  $$(".page-title").first().insert({ after: '<div id="checkout-questionnaire"></div>' });
3
+ <?php $increment_id = $this->getIncrementId(); ?>
4
  <?php $token = $this->getToken(); ?>
5
  <?php $email = $this->getCustomerEmail(); ?>
6
 
7
  var _esatisf = _esatisf || [];
8
+ _esatisf.push(['_responder', '<?php echo $increment_id; ?>']);
9
  _esatisf.push(['_token', '<?php echo $token; ?>']);
10
  _esatisf.push(['_email', '<?php echo $email; ?>']);
11
  _esatisf.push(['_showQuestionnaire', '#checkout-questionnaire']);
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Esat_Esatisfaction</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GNU General Public License (GPL)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>This extension allows you to use the e-satisfaction service. The e-satisfaction service is used by aspiring e-commerce sites in order to get feedback about the level of satisfaction their customers get when they browse and/or purhase items.</description>
11
  <notes>The first stable version of e-satisfaction extension</notes>
12
  <authors><author><name>e-satisfaction</name><user>e-satisfaction</user><email>info@e-satisfaction.com</email></author></authors>
13
- <date>2016-05-16</date>
14
- <time>11:39:22</time>
15
- <contents><target name="magecommunity"><dir name="Esat"><dir name="Esatisfaction"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Esatisfaction.php" hash="eff510e5e35b0f45df193e602fd04071"/></dir></dir><file name="Tab.php" hash="5992e2eb687d72e4a881389936545f01"/></dir><file name="Customquestions.php" hash="121e8c3e1175e5565dd2609ce00bf8f0"/><dir name="Grid"><dir name="Renderer"><dir name="Sales"><dir name="Order"><file name="Comment.php" hash="f9965ece4aa8dcae2b026eabd02a2e5b"/><file name="Customersmiley.php" hash="be7f7755cb3cb610d1f9e3936f913d1e"/><file name="Gensatisfaction.php" hash="1a98281aee26bded880acfc960f4e5e8"/><file name="Nps.php" hash="d267dd80ec32cc693fb75da8427f8e06"/><file name="Schedule.php" hash="dc9c3cf2bab9e5e470d73ea5ad9be57a"/><file name="Smiley.php" hash="cd8382516e4c2905c24f03afe0b74a38"/></dir></dir></dir></dir><dir name="Order"><dir name="View"><dir name="Tab"><file name="Esatisfaction.php" hash="26f77bba08586af90727db2b466ec4f7"/></dir></dir></dir></dir><file name="Checkoutsuccessscripts.php" hash="40a3f652bb70a30fbdbeb5055e036578"/><file name="Footerscripts.php" hash="e270c80c4f25deab201c127e94566287"/><file name="Jsinit.php" hash="84360f3821ff07ee3605d749de5aea30"/></dir><dir name="Helper"><file name="Data.php" hash="32c12fcb56ba20aa618ae7c783cc5f22"/></dir><dir name="Model"><file name="Observer.php" hash="96167182af2da33d587faa85295960ae"/><file name="Options.php" hash="0b1de043b31f4e52fcc9ef0c77129eef"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CustomerController.php" hash="a99e3bc4ed3814c0922c305f644d4e7c"/><dir name="Esatisfaction"><file name="CustomquestionsController.php" hash="93feca11cb57435d09e7aec3da556027"/><file name="SendemailsController.php" hash="2fa0ab2bb0c209c7470d10eb162be454"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="32a399db7165bec5ee1169470dbb949c"/><file name="config.xml" hash="3b37b054fc40b19917db13aecae3c2e0"/><file name="system.xml" hash="38bb2ac82caa59d004afe10880eef9eb"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="esatisfaction.xml" hash="bf0fdc94b2f6499091c24f7a5f4cb16b"/></dir><dir name="template"><dir name="esatisfaction"><file name="aggregatedorders.phtml" hash="663cd4dd1e94b45821e30379346b28d0"/><dir name="customer"><file name="js.phtml" hash="dd94efb84f73b229fa14ef7cabc8c6be"/><file name="tab.phtml" hash="917822ec91b0f3dc2bc96fdba6af0cf4"/></dir><file name="customerorders.phtml" hash="b3ef7e405a2e53781e6b69b4e622c11a"/><file name="customquestions.phtml" hash="6a10ce359031b5900886f00d64280262"/><dir name="grid"><dir name="renderer"><dir name="sales"><dir name="order"><file name="comment.phtml" hash="c5e9e79f2caad3e6f5435013dcae190e"/><file name="customer_smiley.phtml" hash="439ada55f2c10ab987c8a55b50b58463"/><file name="gensatisfaction.phtml" hash="757cfbedcdc31982dfd9fedbc1661cb2"/><file name="nps.phtml" hash="85204c45c8e861d08aaf300498cfbedd"/><file name="schedule.phtml" hash="1b6fc86bd8bf3f08f9f62495d7c21af6"/><file name="smiley.phtml" hash="4c9ad48eda0dcccf1930c8a212c74e1b"/></dir></dir></dir></dir><file name="jsinit.phtml" hash="faf1e24f0d197b4162445bda7afa715c"/><dir name="sales"><dir name="order"><dir name="tab"><file name="esatisfaction.phtml" hash="a348754ab380635ce7a3f411f3e914d9"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="esatisfaction.xml" hash="aa92695ae0184d57522cd184ea5cb2f3"/></dir><dir name="template"><dir name="esatisfaction"><dir name="checkout"><file name="success_scripts.phtml" hash="72e33c68d1d3f71f8813b7d239fcfde4"/></dir><file name="footer_scripts.phtml" hash="05e9a73b6966ea7ce297e286bbd4f629"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Esat_Esatisfaction.xml" hash="3104757341da38da8f05f77f3c2d7bc1"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Esat_Esatisfaction.csv" hash="9bb4236dbfdf3465807b3a00ecd464d0"/><dir name="template"><dir name="email"><dir name="esatisfaction"><file name="esatisfaction_order_comments_answer.html" hash="6b9f7ec91372613f9b779f508fa8cb08"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="esatisfaction"><file name="enc-base64-min.js" hash="bd7e9e63907996902ab2b66e493ff085"/><file name="hmac-sha256.js" hash="03434fa5ac377e880e801463707f5e90"/><file name="jquery-2.1.3.min.js" hash="93b379638f13a959764a67b9072da6dd"/></dir></dir></target><target name="magemedia"><dir name="esatisfaction"><file name="after_sales_icon.png" hash="763db8eec9c8efc93aa8141cdd5ec0df"/><file name="checkout_icon.png" hash="25dc0584c9f6d8ae6e3bd9ee36301062"/><file name="exclamation-20x20.png" hash="5590b1cd1560d976ba592be85d2092f5"/><file name="logo.png" hash="ffa136908575fcaf0c7366007dcceb27"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="esatisfaction"><file name="esatisfaction.css" hash="e73a843087ad7ef88a67e5fc63de1dd5"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Esat_Esatisfaction</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GNU General Public License (GPL)</license>
7
  <channel>community</channel>
10
  <description>This extension allows you to use the e-satisfaction service. The e-satisfaction service is used by aspiring e-commerce sites in order to get feedback about the level of satisfaction their customers get when they browse and/or purhase items.</description>
11
  <notes>The first stable version of e-satisfaction extension</notes>
12
  <authors><author><name>e-satisfaction</name><user>e-satisfaction</user><email>info@e-satisfaction.com</email></author></authors>
13
+ <date>2016-07-18</date>
14
+ <time>15:32:38</time>
15
+ <contents><target name="magecommunity"><dir name="Esat"><dir name="Esatisfaction"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Esatisfaction.php" hash="eff510e5e35b0f45df193e602fd04071"/></dir></dir><file name="Tab.php" hash="5992e2eb687d72e4a881389936545f01"/></dir><file name="Customquestions.php" hash="121e8c3e1175e5565dd2609ce00bf8f0"/><dir name="Grid"><dir name="Renderer"><dir name="Sales"><dir name="Order"><file name="Comment.php" hash="f9965ece4aa8dcae2b026eabd02a2e5b"/><file name="Customersmiley.php" hash="be7f7755cb3cb610d1f9e3936f913d1e"/><file name="Gensatisfaction.php" hash="1a98281aee26bded880acfc960f4e5e8"/><file name="Nps.php" hash="d267dd80ec32cc693fb75da8427f8e06"/><file name="Schedule.php" hash="dc9c3cf2bab9e5e470d73ea5ad9be57a"/><file name="Smiley.php" hash="cd8382516e4c2905c24f03afe0b74a38"/></dir></dir></dir></dir><dir name="Order"><dir name="View"><dir name="Tab"><file name="Esatisfaction.php" hash="26f77bba08586af90727db2b466ec4f7"/></dir></dir></dir></dir><file name="Checkoutsuccessscripts.php" hash="560cb5f2e25bd33460bdd95b14fc8222"/><file name="Footerscripts.php" hash="e270c80c4f25deab201c127e94566287"/><file name="Jsinit.php" hash="84360f3821ff07ee3605d749de5aea30"/></dir><dir name="Helper"><file name="Data.php" hash="32c12fcb56ba20aa618ae7c783cc5f22"/></dir><dir name="Model"><file name="Observer.php" hash="96167182af2da33d587faa85295960ae"/><file name="Options.php" hash="0b1de043b31f4e52fcc9ef0c77129eef"/><dir name="Resource"><file name="Setup.php" hash="20c155c5346852fc16f434081ba657b8"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CustomerController.php" hash="a99e3bc4ed3814c0922c305f644d4e7c"/><dir name="Esatisfaction"><file name="CustomquestionsController.php" hash="0f8e1c42189e027325bc3f71697f7880"/><file name="SaveiconController.php" hash="ebab993db87dd077a8dd3e9d803235a7"/><file name="SendemailsController.php" hash="2fa0ab2bb0c209c7470d10eb162be454"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="32a399db7165bec5ee1169470dbb949c"/><file name="config.xml" hash="53b413c389828a3bf3846009828ad3a6"/><file name="system.xml" hash="38bb2ac82caa59d004afe10880eef9eb"/></dir><dir name="sql"><dir name="esatisfaction_setup"><file name="mysql4-install-1.0.6.php" hash="28c22e8d35cf40a9913678ed83ceb5d9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="esatisfaction.xml" hash="bf0fdc94b2f6499091c24f7a5f4cb16b"/></dir><dir name="template"><dir name="esatisfaction"><file name="aggregatedorders.phtml" hash="35bb2f6e79ba7574cca23ff4b950fa80"/><dir name="customer"><file name="tab.phtml" hash="917822ec91b0f3dc2bc96fdba6af0cf4"/></dir><file name="customerorders.phtml" hash="89de89ae31b026d66bbabb59df606f5c"/><file name="customquestions.phtml" hash="8ef5989b7fd5b8fe741450e527a8f4d4"/><dir name="grid"><dir name="renderer"><dir name="sales"><dir name="order"><file name="comment.phtml" hash="3979f5ec5e626941cdf9dabd40828456"/><file name="customer_smiley.phtml" hash="77fbddb49387ebed56200219e2516260"/><file name="gensatisfaction.phtml" hash="bfda39f3660627e32bdff2444bf2da44"/><file name="nps.phtml" hash="9a292e0652d0fa3734d4267ad279792f"/><file name="schedule.phtml" hash="6f612f4357f4a8fb2f6fb04075ed3b3e"/><file name="smiley.phtml" hash="9a63764f9357ddabdf95651e5dba174c"/></dir></dir></dir></dir><file name="jsinit.phtml" hash="faf1e24f0d197b4162445bda7afa715c"/><dir name="sales"><dir name="order"><dir name="tab"><file name="esatisfaction.phtml" hash="1c54f99ee422e7ae556496a9806e8a53"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="esatisfaction.xml" hash="aa92695ae0184d57522cd184ea5cb2f3"/></dir><dir name="template"><dir name="esatisfaction"><dir name="checkout"><file name="success_scripts.phtml" hash="59fbd0978598ba7eba617a9df3bc79bf"/></dir><file name="footer_scripts.phtml" hash="05e9a73b6966ea7ce297e286bbd4f629"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Esat_Esatisfaction.xml" hash="3104757341da38da8f05f77f3c2d7bc1"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Esat_Esatisfaction.csv" hash="9bb4236dbfdf3465807b3a00ecd464d0"/><dir name="template"><dir name="email"><dir name="esatisfaction"><file name="esatisfaction_order_comments_answer.html" hash="6b9f7ec91372613f9b779f508fa8cb08"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="esatisfaction"><file name="enc-base64-min.js" hash="bd7e9e63907996902ab2b66e493ff085"/><file name="hmac-sha256.js" hash="03434fa5ac377e880e801463707f5e90"/><file name="jquery-2.1.3.min.js" hash="93b379638f13a959764a67b9072da6dd"/></dir></dir></target><target name="magemedia"><dir name="esatisfaction"><file name="after_sales_icon.png" hash="763db8eec9c8efc93aa8141cdd5ec0df"/><file name="checkout_icon.png" hash="25dc0584c9f6d8ae6e3bd9ee36301062"/><file name="exclamation-20x20.png" hash="5590b1cd1560d976ba592be85d2092f5"/><file name="logo.png" hash="ffa136908575fcaf0c7366007dcceb27"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="esatisfaction"><file name="esatisfaction.css" hash="e73a843087ad7ef88a67e5fc63de1dd5"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>