Konduto - Version 1.4.0

Version Notes

- Improved layout compatibility with other modules

Download this release

Release Info

Developer Konduto
Extension Konduto
Version 1.4.0
Comparing to
See all releases


Code changes from version 1.3.1 to 1.4.0

app/code/community/Konduto/Score/.DS_Store DELETED
Binary file
app/code/community/Konduto/Score/Block/Adminhtml/Order/Grid.php CHANGED
@@ -20,18 +20,14 @@ class Konduto_Score_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Sale
20
 
21
  protected function _prepareColumns() {
22
  if (Mage::getStoreConfig("scoreoptions/messages/activate")) {
23
- $this->addColumnAfter('score', array(
24
- 'header' => Mage::helper('sales')->__('Score'),
25
- 'index' => 'score',
26
- ), 'status');
27
  $this->addColumnAfter('recommendation', array(
28
  'header' => Mage::helper('sales')->__('Recommendation'),
29
  'index' => 'recommendation',
30
- ), 'score');
31
  return parent::_prepareColumns();
32
  } else {
33
  return parent::_prepareColumns();
34
  }
35
  }
36
 
37
- }
20
 
21
  protected function _prepareColumns() {
22
  if (Mage::getStoreConfig("scoreoptions/messages/activate")) {
 
 
 
 
23
  $this->addColumnAfter('recommendation', array(
24
  'header' => Mage::helper('sales')->__('Recommendation'),
25
  'index' => 'recommendation',
26
+ ), 'status');
27
  return parent::_prepareColumns();
28
  } else {
29
  return parent::_prepareColumns();
30
  }
31
  }
32
 
33
+ }
app/code/community/Konduto/Score/Block/Product/View.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- class Konduto_Score_Block_Product_View extends Mage_Catalog_Block_Product_View {
4
-
5
- protected function _prepareLayout() {
6
-
7
- parent::_prepareLayout();
8
- $headBlock = $this->getLayout()->getBlock('head');
9
- if ($headBlock) {
10
- $product = $this->getProduct();
11
- if (!$headBlock->getChild('meta_kdt')) {
12
- $text = $this->getLayout()->createBlock('core/text', 'meta_kdt');
13
- $text->setText('<meta property="kdt:product1" content="sku = ' . $product->getSku() . ', name='.$product->getName().'"/>');
14
- $headBlock->append($text);
15
- }
16
- }
17
- return $this;
18
- }
19
-
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Konduto/Score/Block/Sales/Order/View/Score.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Konduto_Score_Block_Sales_Order_View_Score extends Mage_Adminhtml_Block_Sales_Order_View_Info {
4
+
5
+ protected $score = '-';
6
+ protected $recomend = '-';
7
+
8
+ protected function getScore() {
9
+ $order_id = $this->getOrder()->getId();
10
+ $data = Mage::getModel('score/score')->getCollection()->addFieldToFilter('order_no', $order_id);
11
+ $response = $data->getData();
12
+ $req = $response[0]['response'];
13
+ $resp_arr = json_decode($req, true);
14
+ if (isset($resp_arr['order']['score'])) {
15
+ $this->score = $resp_arr['order']['score'];
16
+ }
17
+ if (isset($resp_arr['order']['recommendation'])) {
18
+ $this->recomend = $resp_arr['order']['recommendation'];
19
+ }
20
+ }
21
+
22
+ }
app/code/community/Konduto/Score/Model/Observer.php CHANGED
@@ -1,6 +1,28 @@
1
  <?php
2
  class Konduto_Score_Model_Observer {
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  public function getScore(Varien_Event_Observer $evt) {
5
  $helper = Mage::helper('score/order');
6
  $order = $evt->getEvent()->getOrder();
1
  <?php
2
  class Konduto_Score_Model_Observer {
3
 
4
+ private static $tags = array(
5
+ 'catalogsearch_result_index',
6
+ 'catalogsearch_advanced_result',
7
+ 'customer_account_forgotpassword',
8
+ 'customer_account_create',
9
+ 'checkout_onepage_index',
10
+ 'checkout_cart_index',
11
+ 'customer_account_index',
12
+ 'catalog_category_default',
13
+ 'catalog_product_view',
14
+ 'cms_index_index',
15
+ 'catalog_category_view'
16
+ );
17
+
18
+ public function setTag(Varien_Event_Observer $evt) {
19
+ $handles = $evt->getLayout()->getUpdate()->getHandles();
20
+ $tags = array_intersect($handles, self::$tags);
21
+ $tag = array_pop($tags);
22
+ $evt->getEvent()->getLayout()->getUpdate()->addHandle('konduto_js');
23
+ $evt->getEvent()->getLayout()->getUpdate()->addHandle('konduto_'.$tag);
24
+ }
25
+
26
  public function getScore(Varien_Event_Observer $evt) {
27
  $helper = Mage::helper('score/order');
28
  $order = $evt->getEvent()->getOrder();
app/code/community/Konduto/Score/Model/System/Save.php CHANGED
@@ -8,7 +8,7 @@ class Konduto_Score_Model_System_Save extends Mage_Core_Model_Config_Data {
8
  if ($fields['activate']['value'] == 1) {
9
  if ($fields['mode']['value'] == 1) {
10
  $productionpublickey = $fields['productionpublickey']['value'];
11
- $productionprikey = $fields['productionprikey']['value'];
12
  if ($productionpublickey == NULL || $productionpublickey == ' ' || !(isset($productionpublickey))) {
13
  Mage::throwException(Mage::helper('core')->__('Production Public key is required'));
14
  die;
8
  if ($fields['activate']['value'] == 1) {
9
  if ($fields['mode']['value'] == 1) {
10
  $productionpublickey = $fields['productionpublickey']['value'];
11
+ $productionprikey = $fields['productionprikey']['value'];
12
  if ($productionpublickey == NULL || $productionpublickey == ' ' || !(isset($productionpublickey))) {
13
  Mage::throwException(Mage::helper('core')->__('Production Public key is required'));
14
  die;
app/code/community/Konduto/Score/etc/config.xml CHANGED
@@ -111,11 +111,6 @@
111
  <sales_order_grid>Konduto_Score_Block_Adminhtml_Order_Grid</sales_order_grid>
112
  </rewrite>
113
  </adminhtml>
114
- <catalog>
115
- <rewrite>
116
- <product_view>Konduto_Score_Block_Product_View</product_view>
117
- </rewrite>
118
- </catalog>
119
  </blocks>
120
  <helpers>
121
  <score>
@@ -123,6 +118,15 @@
123
  </score>
124
  </helpers>
125
  <events>
 
 
 
 
 
 
 
 
 
126
  <sales_order_place_before>
127
  <observers>
128
  <get_konduto_score>
111
  <sales_order_grid>Konduto_Score_Block_Adminhtml_Order_Grid</sales_order_grid>
112
  </rewrite>
113
  </adminhtml>
 
 
 
 
 
114
  </blocks>
115
  <helpers>
116
  <score>
118
  </score>
119
  </helpers>
120
  <events>
121
+ <controller_action_layout_load_before>
122
+ <observers>
123
+ <tag_konduto>
124
+ <type>singleton</type>
125
+ <class>Konduto_Score_Model_Observer</class>
126
+ <method>setTag</method>
127
+ </tag_konduto>
128
+ </observers>
129
+ </controller_action_layout_load_before>
130
  <sales_order_place_before>
131
  <observers>
132
  <get_konduto_score>
app/design/adminhtml/default/default/layout/score.xml CHANGED
@@ -1,17 +1,19 @@
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
 
3
  <score_adminhtml_score_index>
4
  <reference name="content">
5
  <block type="score/adminhtml_score" name="score" />
6
  </reference>
7
  </score_adminhtml_score_index>
8
 
9
-
10
  <adminhtml_sales_order_view>
11
  <reference name="order_info">
12
  <action method="setTemplate">
13
  <template>score/sales/order/view/info.phtml</template>
14
  </action>
 
15
  </reference>
16
  </adminhtml_sales_order_view>
 
17
  </layout>
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
+
4
  <score_adminhtml_score_index>
5
  <reference name="content">
6
  <block type="score/adminhtml_score" name="score" />
7
  </reference>
8
  </score_adminhtml_score_index>
9
 
 
10
  <adminhtml_sales_order_view>
11
  <reference name="order_info">
12
  <action method="setTemplate">
13
  <template>score/sales/order/view/info.phtml</template>
14
  </action>
15
+ <block type="score/sales_order_view_score" name="score_sales_order_view_score" template="score/sales/order/view/score.phtml"/>
16
  </reference>
17
  </adminhtml_sales_order_view>
18
+
19
  </layout>
app/design/adminhtml/default/default/template/score/sales/order/view/info.phtml CHANGED
@@ -32,98 +32,73 @@ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium',
32
  <div class="box-left">
33
  <!--Order Information-->
34
  <div class="entry-edit">
35
- <?php
36
- if ($_order->getEmailSent()):
37
  $_email = Mage::helper('sales')->__('the order confirmation email was sent');
38
  else:
39
  $_email = Mage::helper('sales')->__('the order confirmation email is not sent');
40
- endif;
41
- ?>
42
  <div class="entry-edit-head">
43
- <?php if ($this->getNoUseOrderLink()): ?>
44
- <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?> (<?php echo $_email ?>)</h4>
45
- <?php else: ?>
46
- <a href="<?php echo $this->getViewUrl($_order->getId()) ?>"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?></a>
47
- <strong>(<?php echo $_email ?>)</strong>
48
- <?php endif; ?>
49
  </div>
50
  <div class="fieldset">
51
  <table cellspacing="0" class="form-list">
52
- <tr>
53
- <td class="label"><label><?php echo Mage::helper('sales')->__('Order Date') ?></label></td>
54
- <td class="value"><strong><?php echo $orderAdminDate ?></strong></td>
55
- </tr>
56
- <?php if ($orderAdminDate != $orderStoreDate): ?>
57
- <tr>
58
- <td class="label"><label><?php echo Mage::helper('sales')->__('Order Date (%s)', $_order->getCreatedAtStoreDate()->getTimezone()) ?></label></td>
59
- <td class="value"><strong><?php echo $orderStoreDate ?></strong></td>
60
- </tr>
61
- <?php endif; ?>
62
- <tr>
63
- <td class="label"><label><?php echo Mage::helper('sales')->__('Order Status') ?></label></td>
64
- <td class="value"><strong><span id="order_status"><?php echo $_order->getStatusLabel() ?></span></strong></td>
65
- </tr>
66
- <tr>
67
- <td class="label"><label><?php echo Mage::helper('sales')->__('Purchased From') ?></label></td>
68
- <td class="value"><strong><?php echo $this->getOrderStoreName() ?></strong></td>
69
- </tr>
70
- <?php if ($_order->getRelationChildId()): ?>
71
- <tr>
72
- <td class="label"><label><?php echo Mage::helper('sales')->__('Link to the New Order') ?></label></td>
73
- <td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationChildId()) ?>">
74
- <?php echo $_order->getRelationChildRealId() ?>
75
- </a></td>
76
- </tr>
77
- <?php endif; ?>
78
- <?php if ($_order->getRelationParentId()): ?>
79
- <tr>
80
- <td class="label"><label><?php echo Mage::helper('sales')->__('Link to the Previous Order') ?></label></td>
81
- <td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationParentId()) ?>">
82
- <?php echo $_order->getRelationParentRealId() ?>
83
- </a></td>
84
- </tr>
85
- <?php endif; ?>
86
- <?php
87
- $magentoVersion = Mage::getVersion();
88
- if (version_compare($magentoVersion, '1.7.0.2', '>=')) {
89
- ?>
90
- <?php if ($_order->getRemoteIp() && $this->shouldDisplayCustomerIp()): ?>
91
- <tr>
92
- <td class="label"><label><?php echo Mage::helper('sales')->__('Placed from IP') ?></label></td>
93
- <td class="value"><strong><?php
94
- echo $_order->getRemoteIp();
95
- echo ($_order->getXForwardedFor()) ? ' (' . $this->escapeHtml($_order->getXForwardedFor()) . ')' : '';
96
- ?></strong></td>
97
- </tr>
98
- <?php endif; ?>
99
- <?php
100
- } else {
101
- if ($_order->getRemoteIp()):
102
- ?>
103
- <tr>
104
- <td class="label"><label><?php echo Mage::helper('sales')->__('Placed from IP') ?></label></td>
105
- <td class="value"><strong><?php
106
- echo $_order->getRemoteIp();
107
- echo ($_order->getXForwardedFor()) ? ' (' . $_order->getXForwardedFor() . ')' : '';
108
- ?></strong></td>
109
- </tr>
110
- <?php
111
- endif;
112
- }
113
- ?>
114
-
115
- <?php if ($_order->getGlobalCurrencyCode() != $_order->getBaseCurrencyCode()): ?>
116
- <tr>
117
- <td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getGlobalCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
118
- <td class="value"><strong><?php echo $_order->getBaseToGlobalRate() ?></strong></td>
119
- </tr>
120
- <?php endif; ?>
121
- <?php if ($_order->getBaseCurrencyCode() != $_order->getOrderCurrencyCode()): ?>
122
- <tr>
123
- <td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getOrderCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
124
- <td class="value"><strong><?php echo $_order->getBaseToOrderRate() ?></strong></td>
125
- </tr>
126
- <?php endif; ?>
127
  </table>
128
  </div>
129
  </div>
@@ -133,37 +108,37 @@ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium',
133
  <div class="entry-edit">
134
  <div class="entry-edit-head">
135
  <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Account Information') ?></h4>
136
- <div class="tools"><?php echo $this->getAccountEditLink() ?></div>
137
  </div>
138
  <div class="fieldset">
139
  <div class="hor-scroll">
140
  <table cellspacing="0" class="form-list">
141
- <tr>
142
- <td class="label"><label><?php echo Mage::helper('sales')->__('Customer Name') ?></label></td>
143
- <td class="value">
144
- <?php if ($_customerUrl = $this->getCustomerViewUrl()) : ?>
145
- <a href="<?php echo $_customerUrl ?>" target="_blank"><strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong></a>
146
- <?php else: ?>
147
- <strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong>
148
- <?php endif; ?>
149
- </td>
150
- </tr>
151
- <tr>
152
- <td class="label"><label><?php echo Mage::helper('sales')->__('Email') ?></label></td>
153
- <td class="value"><a href="mailto:<?php echo $_order->getCustomerEmail() ?>"><strong><?php echo $_order->getCustomerEmail() ?></strong></a></td>
154
- </tr>
155
- <?php if ($_groupName = $this->getCustomerGroupName()) : ?>
156
- <tr>
157
- <td class="label"><label><?php echo Mage::helper('sales')->__('Customer Group') ?></label></td>
158
- <td class="value"><strong><?php echo $_groupName ?></strong></td>
159
- </tr>
160
  <?php endif; ?>
161
- <?php foreach ($this->getCustomerAccountData() as $data): ?>
162
- <tr>
163
- <td class="label"><label><?php echo $data['label'] ?></label></td>
164
- <td class="value"><strong><?php echo $data['value'] ?></strong></td>
165
- </tr>
166
- <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
167
  </table>
168
  </div>
169
  </div>
@@ -176,7 +151,7 @@ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium',
176
  <div class="entry-edit">
177
  <div class="entry-edit-head">
178
  <h4 class="icon-head head-billing-address"><?php echo Mage::helper('sales')->__('Billing Address') ?></h4>
179
- <div class="tools"><?php echo $this->getAddressEditLink($_order->getBillingAddress()) ?></div>
180
  </div>
181
  <fieldset>
182
  <address><?php echo $_order->getBillingAddress()->getFormated(true) ?></address>
@@ -184,50 +159,19 @@ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium',
184
  </div>
185
  </div>
186
  <?php if (!$this->getOrder()->getIsVirtual()): ?>
187
- <div class="box-right">
188
- <!--Shipping Address-->
189
- <div class="entry-edit">
190
- <div class="entry-edit-head">
191
- <h4 class="icon-head head-shipping-address"><?php echo Mage::helper('sales')->__('Shipping Address') ?></h4>
192
- <div class="tools"><?php echo $this->getAddressEditLink($_order->getShippingAddress()) ?></div>
193
- </div>
194
- <fieldset>
195
- <address><?php echo $_order->getShippingAddress()->getFormated(true) ?></address>
196
- </fieldset>
197
  </div>
 
 
 
198
  </div>
199
- <div class="clear"></div>
 
200
  <?php endif; ?>
201
- <?php if (Mage::getStoreConfig("scoreoptions/messages/activate")) { ?>
202
- <div class="box-left">
203
- <!--score data-->
204
- <div class="entry-edit">
205
- <div class="entry-edit-head">
206
- <h4 class="icon-head"><?php echo Mage::helper('sales')->__('Konduto score') ?></h4>
207
- </div>
208
- <fieldset>
209
- <?php
210
- $order_id = $_order->getId();
211
- $data = Mage::getModel('score/score')->getCollection()->addFieldToFilter('order_no', $order_id);
212
- $response = $data->getData();
213
- $req = $response[0]['response'];
214
- $resp_arr = json_decode($req, true);
215
- if (isset($resp_arr['order']['score'])) {
216
- $score = $resp_arr['order']['score'];
217
- } else {
218
- $score = '';
219
- }
220
- if (isset($resp_arr['order']['recommendation'])) {
221
- $recomend = $resp_arr['order']['recommendation'];
222
- } else {
223
- $recomend = '';
224
- }
225
- echo '<b>Konduto score:</b> ' . $score . "<br>";
226
- echo '<b>Konduto recommndation:</b> ' . $recomend;
227
- ?>
228
- </fieldset>
229
- </div>
230
- </div>
231
- <div class="clear"></div>
232
- <?php }
233
- ?>
32
  <div class="box-left">
33
  <!--Order Information-->
34
  <div class="entry-edit">
35
+ <?php if ($_order->getEmailSent()):
 
36
  $_email = Mage::helper('sales')->__('the order confirmation email was sent');
37
  else:
38
  $_email = Mage::helper('sales')->__('the order confirmation email is not sent');
39
+ endif; ?>
 
40
  <div class="entry-edit-head">
41
+ <?php if ($this->getNoUseOrderLink()): ?>
42
+ <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?> (<?php echo $_email ?>)</h4>
43
+ <?php else: ?>
44
+ <a href="<?php echo $this->getViewUrl($_order->getId()) ?>"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?></a>
45
+ <strong>(<?php echo $_email ?>)</strong>
46
+ <?php endif; ?>
47
  </div>
48
  <div class="fieldset">
49
  <table cellspacing="0" class="form-list">
50
+ <tr>
51
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Order Date') ?></label></td>
52
+ <td class="value"><strong><?php echo $orderAdminDate ?></strong></td>
53
+ </tr>
54
+ <?php if ($orderAdminDate != $orderStoreDate):?>
55
+ <tr>
56
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Order Date (%s)', $_order->getCreatedAtStoreDate()->getTimezone()) ?></label></td>
57
+ <td class="value"><strong><?php echo $orderStoreDate ?></strong></td>
58
+ </tr>
59
+ <?php endif;?>
60
+ <tr>
61
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Order Status') ?></label></td>
62
+ <td class="value"><strong><span id="order_status"><?php echo $_order->getStatusLabel() ?></span></strong></td>
63
+ </tr>
64
+ <tr>
65
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Purchased From') ?></label></td>
66
+ <td class="value"><strong><?php echo $this->getOrderStoreName() ?></strong></td>
67
+ </tr>
68
+ <?php if($_order->getRelationChildId()): ?>
69
+ <tr>
70
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Link to the New Order') ?></label></td>
71
+ <td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationChildId()) ?>">
72
+ <?php echo $_order->getRelationChildRealId() ?>
73
+ </a></td>
74
+ </tr>
75
+ <?php endif; ?>
76
+ <?php if($_order->getRelationParentId()): ?>
77
+ <tr>
78
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Link to the Previous Order') ?></label></td>
79
+ <td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationParentId()) ?>">
80
+ <?php echo $_order->getRelationParentRealId() ?>
81
+ </a></td>
82
+ </tr>
83
+ <?php endif; ?>
84
+ <?php if($_order->getRemoteIp() && $this->shouldDisplayCustomerIp()): ?>
85
+ <tr>
86
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Placed from IP') ?></label></td>
87
+ <td class="value"><strong><?php echo $_order->getRemoteIp(); echo ($_order->getXForwardedFor())?' (' . $this->escapeHtml($_order->getXForwardedFor()) . ')':''; ?></strong></td>
88
+ </tr>
89
+ <?php endif; ?>
90
+ <?php if($_order->getGlobalCurrencyCode() != $_order->getBaseCurrencyCode()): ?>
91
+ <tr>
92
+ <td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getGlobalCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
93
+ <td class="value"><strong><?php echo $_order->getBaseToGlobalRate() ?></strong></td>
94
+ </tr>
95
+ <?php endif; ?>
96
+ <?php if($_order->getBaseCurrencyCode() != $_order->getOrderCurrencyCode()): ?>
97
+ <tr>
98
+ <td class="label"><label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getOrderCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label></td>
99
+ <td class="value"><strong><?php echo $_order->getBaseToOrderRate() ?></strong></td>
100
+ </tr>
101
+ <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  </table>
103
  </div>
104
  </div>
108
  <div class="entry-edit">
109
  <div class="entry-edit-head">
110
  <h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Account Information') ?></h4>
111
+ <div class="tools"><?php echo $this->getAccountEditLink()?></div>
112
  </div>
113
  <div class="fieldset">
114
  <div class="hor-scroll">
115
  <table cellspacing="0" class="form-list">
116
+ <tr>
117
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Customer Name') ?></label></td>
118
+ <td class="value">
119
+ <?php if ($_customerUrl=$this->getCustomerViewUrl()) : ?>
120
+ <a href="<?php echo $_customerUrl ?>" target="_blank"><strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong></a>
121
+ <?php else: ?>
122
+ <strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong>
 
 
 
 
 
 
 
 
 
 
 
 
123
  <?php endif; ?>
124
+ </td>
125
+ </tr>
126
+ <tr>
127
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Email') ?></label></td>
128
+ <td class="value"><a href="mailto:<?php echo $_order->getCustomerEmail() ?>"><strong><?php echo $_order->getCustomerEmail() ?></strong></a></td>
129
+ </tr>
130
+ <?php if ($_groupName = $this->getCustomerGroupName()) : ?>
131
+ <tr>
132
+ <td class="label"><label><?php echo Mage::helper('sales')->__('Customer Group') ?></label></td>
133
+ <td class="value"><strong><?php echo $_groupName ?></strong></td>
134
+ </tr>
135
+ <?php endif; ?>
136
+ <?php foreach ($this->getCustomerAccountData() as $data):?>
137
+ <tr>
138
+ <td class="label"><label><?php echo $data['label'] ?></label></td>
139
+ <td class="value"><strong><?php echo $data['value'] ?></strong></td>
140
+ </tr>
141
+ <?php endforeach;?>
142
  </table>
143
  </div>
144
  </div>
151
  <div class="entry-edit">
152
  <div class="entry-edit-head">
153
  <h4 class="icon-head head-billing-address"><?php echo Mage::helper('sales')->__('Billing Address') ?></h4>
154
+ <div class="tools"><?php echo $this->getAddressEditLink($_order->getBillingAddress())?></div>
155
  </div>
156
  <fieldset>
157
  <address><?php echo $_order->getBillingAddress()->getFormated(true) ?></address>
159
  </div>
160
  </div>
161
  <?php if (!$this->getOrder()->getIsVirtual()): ?>
162
+ <div class="box-right">
163
+ <!--Shipping Address-->
164
+ <div class="entry-edit">
165
+ <div class="entry-edit-head">
166
+ <h4 class="icon-head head-shipping-address"><?php echo Mage::helper('sales')->__('Shipping Address') ?></h4>
167
+ <div class="tools"><?php echo $this->getAddressEditLink($_order->getShippingAddress())?></div>
 
 
 
 
168
  </div>
169
+ <fieldset>
170
+ <address><?php echo $_order->getShippingAddress()->getFormated(true) ?></address>
171
+ </fieldset>
172
  </div>
173
+ </div>
174
+ <div class="clear"></div>
175
  <?php endif; ?>
176
+ <!-- KONDUTO SCORE BLOCK -->
177
+ <?php echo $this->getChildHtml('score_sales_order_view_score'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/score/sales/order/view/score.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::getStoreConfig("scoreoptions/messages/activate")): ?>
2
+ <div class="box-left">
3
+ <!--score data-->
4
+ <div class="entry-edit">
5
+ <div class="entry-edit-head">
6
+ <h4 class="icon-head"><?php echo Mage::helper('sales')->__('Konduto Analysis') ?></h4>
7
+ </div>
8
+ <fieldset>
9
+ <?php
10
+ $this->getScore();
11
+ echo '<b>'.Mage::helper('sales')->__('Score').':</b> ' . $this->score . "<br>";
12
+ echo '<b>'.Mage::helper('sales')->__('Recommendation').':</b> ' . Mage::helper('sales')->__($this->recomend);
13
+ ?>
14
+ </fieldset>
15
+ </div>
16
+ </div>
17
+ <div class="clear"></div>
18
+ <?php endif; ?>
app/design/frontend/{default → base}/default/layout/score.xml RENAMED
@@ -1,90 +1,103 @@
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
- <default>
 
4
  <reference name="footer">
5
  <block type="core/template" name="scorejs" template="score/score.phtml" before="-"/>
6
  </reference>
7
- </default>
8
-
9
-
10
- <catalog_product_view>
 
 
 
 
 
 
 
 
 
 
 
11
  <reference name="head">
12
  <block type="core/text" name="product_kdt">
13
  <action method="setText">
14
  <text>
15
- <![CDATA[<meta name"kdt:page" content="product"/>]]>
16
  </text>
17
  </action>
18
  </block>
 
19
  </reference>
20
- </catalog_product_view>
21
 
22
- <catalogsearch_result_index>
23
  <reference name="head">
24
  <block type="core/text" name="search_kdt">
25
  <action method="setText">
26
  <text>
27
- <![CDATA[<meta name"kdt:page" content="search"/>]]>
28
  </text>
29
  </action>
30
  </block>
31
  </reference>
32
- </catalogsearch_result_index>
33
 
34
- <catalogsearch_advanced_result>
35
  <reference name="head">
36
  <block type="core/text" name="search_kdt">
37
  <action method="setText">
38
  <text>
39
- <![CDATA[<meta name"kdt:page" content="search"/>]]>
40
  </text>
41
  </action>
42
  </block>
43
  </reference>
44
- </catalogsearch_advanced_result>
45
 
46
- <customer_account_forgotpassword>
47
  <reference name="head">
48
  <block type="core/text" name="password_kdt">
49
  <action method="setText">
50
  <text>
51
- <![CDATA[<meta name"kdt:page" content="password_reset"/>]]>
52
  </text>
53
  </action>
54
  </block>
55
  </reference>
56
- </customer_account_forgotpassword>
57
 
58
- <customer_account_create>
59
  <reference name="head">
60
  <block type="core/text" name="acccreate_kdt">
61
  <action method="setText">
62
  <text>
63
- <![CDATA[<meta name"kdt:page" content="account_creation"/>]]>
64
  </text>
65
  </action>
66
  </block>
67
  </reference>
68
- </customer_account_create>
69
 
70
- <checkout_onepage_index>
71
  <reference name="head">
72
  <block type="core/text" name="checkout_kdt">
73
  <action method="setText">
74
  <text>
75
- <![CDATA[<meta name"kdt:page" content="checkout"/>]]>
76
  </text>
77
  </action>
78
  </block>
79
  </reference>
80
- </checkout_onepage_index>
81
 
82
- <checkout_cart_index>
83
  <reference name="head">
84
  <block type="core/text" name="cart_kdt">
85
  <action method="setText">
86
  <text>
87
- <![CDATA[<meta name"kdt:page" content="cart"/>]]>
88
  </text>
89
  </action>
90
  </block>
@@ -92,29 +105,42 @@
92
  <reference name="footer">
93
  <block type="core/template" name="scoreIdjs" template="score/getId.phtml" after="-"/>
94
  </reference>
95
- </checkout_cart_index>
96
 
97
- <customer_account_index>
98
  <reference name="head">
99
  <block type="core/text" name="acc_kdt">
100
  <action method="setText">
101
  <text>
102
- <![CDATA[<meta name"kdt:page" content="account"/>]]>
103
  </text>
104
  </action>
105
  </block>
106
  </reference>
107
- </customer_account_index>
108
 
109
- <catalog_category_default>
 
 
 
 
 
 
 
 
 
 
 
 
110
  <reference name="head">
111
  <block type="core/text" name="category_kdt">
112
  <action method="setText">
113
  <text>
114
- <![CDATA[<meta name"kdt:page" content="category"/>]]>
115
  </text>
116
  </action>
117
  </block>
118
  </reference>
119
- </catalog_category_default>
 
120
  </layout>
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
+
4
+ <konduto_js>
5
  <reference name="footer">
6
  <block type="core/template" name="scorejs" template="score/score.phtml" before="-"/>
7
  </reference>
8
+ </konduto_js>
9
+
10
+ <konduto_cms_index_index>
11
+ <reference name="head">
12
+ <block type="core/text" name="home_kdt">
13
+ <action method="setText">
14
+ <text>
15
+ <![CDATA[<meta name="kdt:page" content="home"/>]]>
16
+ </text>
17
+ </action>
18
+ </block>
19
+ </reference>
20
+ </konduto_cms_index_index>
21
+
22
+ <konduto_catalog_product_view>
23
  <reference name="head">
24
  <block type="core/text" name="product_kdt">
25
  <action method="setText">
26
  <text>
27
+ <![CDATA[<meta name="kdt:page" content="product"/>]]>
28
  </text>
29
  </action>
30
  </block>
31
+ <block type="core/template" name="productdescr_kdt" template="score/product.phtml"/>
32
  </reference>
33
+ </konduto_catalog_product_view>
34
 
35
+ <konduto_catalogsearch_result_index>
36
  <reference name="head">
37
  <block type="core/text" name="search_kdt">
38
  <action method="setText">
39
  <text>
40
+ <![CDATA[<meta name="kdt:page" content="search"/>]]>
41
  </text>
42
  </action>
43
  </block>
44
  </reference>
45
+ </konduto_catalogsearch_result_index>
46
 
47
+ <konduto_catalogsearch_advanced_result>
48
  <reference name="head">
49
  <block type="core/text" name="search_kdt">
50
  <action method="setText">
51
  <text>
52
+ <![CDATA[<meta name="kdt:page" content="search"/>]]>
53
  </text>
54
  </action>
55
  </block>
56
  </reference>
57
+ </konduto_catalogsearch_advanced_result>
58
 
59
+ <konduto_customer_account_forgotpassword>
60
  <reference name="head">
61
  <block type="core/text" name="password_kdt">
62
  <action method="setText">
63
  <text>
64
+ <![CDATA[<meta name="kdt:page" content="password_reset"/>]]>
65
  </text>
66
  </action>
67
  </block>
68
  </reference>
69
+ </konduto_customer_account_forgotpassword>
70
 
71
+ <konduto_customer_account_create>
72
  <reference name="head">
73
  <block type="core/text" name="acccreate_kdt">
74
  <action method="setText">
75
  <text>
76
+ <![CDATA[<meta name="kdt:page" content="account_creation"/>]]>
77
  </text>
78
  </action>
79
  </block>
80
  </reference>
81
+ </konduto_customer_account_create>
82
 
83
+ <konduto_checkout_onepage_index>
84
  <reference name="head">
85
  <block type="core/text" name="checkout_kdt">
86
  <action method="setText">
87
  <text>
88
+ <![CDATA[<meta name="kdt:page" content="checkout"/>]]>
89
  </text>
90
  </action>
91
  </block>
92
  </reference>
93
+ </konduto_checkout_onepage_index>
94
 
95
+ <konduto_checkout_cart_index>
96
  <reference name="head">
97
  <block type="core/text" name="cart_kdt">
98
  <action method="setText">
99
  <text>
100
+ <![CDATA[<meta name="kdt:page" content="basket"/>]]>
101
  </text>
102
  </action>
103
  </block>
105
  <reference name="footer">
106
  <block type="core/template" name="scoreIdjs" template="score/getId.phtml" after="-"/>
107
  </reference>
108
+ </konduto_checkout_cart_index>
109
 
110
+ <konduto_customer_account_index>
111
  <reference name="head">
112
  <block type="core/text" name="acc_kdt">
113
  <action method="setText">
114
  <text>
115
+ <![CDATA[<meta name="kdt:page" content="account"/>]]>
116
  </text>
117
  </action>
118
  </block>
119
  </reference>
120
+ </konduto_customer_account_index>
121
 
122
+ <konduto_catalog_category_default>
123
+ <reference name="head">
124
+ <block type="core/text" name="category_kdt">
125
+ <action method="setText">
126
+ <text>
127
+ <![CDATA[<meta name="kdt:page" content="category"/>]]>
128
+ </text>
129
+ </action>
130
+ </block>
131
+ </reference>
132
+ </konduto_catalog_category_default>
133
+
134
+ <konduto_catalog_category_view>
135
  <reference name="head">
136
  <block type="core/text" name="category_kdt">
137
  <action method="setText">
138
  <text>
139
+ <![CDATA[<meta name="kdt:page" content="category"/>]]>
140
  </text>
141
  </action>
142
  </block>
143
  </reference>
144
+ </konduto_catalog_category_view>
145
+
146
  </layout>
app/design/frontend/{default → base}/default/template/score/getId.phtml RENAMED
File without changes
app/design/frontend/base/default/template/score/product.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php if ($product = Mage::registry('current_product')): ?>
2
+ <meta property="kdt:product" content="sku=<?php echo $product->getSku(); ?>,name=<?php echo $product->getName(); ?>"/>
3
+ <?php endif; ?>
app/design/frontend/{default → base}/default/template/score/score.phtml RENAMED
File without changes
app/locale/pt_BR/Konduto_Score.csv CHANGED
@@ -9,6 +9,10 @@
9
  "Score", "Pontuação"
10
  "Recommendation", "Recomendação"
11
  "Konduto Analyze", "Analisar pela Konduto"
 
 
 
 
12
  "Sandbox", "Teste"
13
  "Production", "Produção",
14
  "Analysis Mode", "Modo de Análise"
9
  "Score", "Pontuação"
10
  "Recommendation", "Recomendação"
11
  "Konduto Analyze", "Analisar pela Konduto"
12
+ "Konduto Analysis", "Análise da Konduto"
13
+ "DECLINE","NEGAR"
14
+ "APPROVE","APROVAR"
15
+ "REVIEW","REVISAR"
16
  "Sandbox", "Teste"
17
  "Production", "Produção",
18
  "Analysis Mode", "Modo de Análise"
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Konduto</name>
4
- <version>1.3.1</version>
5
  <stability>stable</stability>
6
  <license>OSLv3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Konduto fraud detection service integration</summary>
10
  <description>Konduto is a fraud detection service that helps e-commerce merchants spot fraud with Buying Behavior</description>
11
- <notes>- Bugfixes</notes>
12
  <authors><author><name>Konduto</name><user>konduto</user><email>magentoconnect@konduto.com</email></author><author><name>Excellence Technologies</name><user>manish</user><email>manish@excellencetechnologies.in</email></author></authors>
13
- <date>2014-09-16</date>
14
- <time>12:48:56</time>
15
- <contents><target name="magecommunity"><dir name="Konduto"><dir name="Score"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><file name="Grid.php" hash="befb067ef6c9badc9879fa3e27b5b690"/></dir></dir><dir name="Product"><file name="View.php" hash="26e9a7dda59bf978431e2cf564c59da1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4eb1e86fb4c5f3833f5d055d594b6a16"/><file name="Order.php" hash="953e22602d419ce41d13e5d5903ce8c2"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Score"><file name="Collection.php" hash="2dedf14be82d224d6d8f56fe1a4fa5fc"/></dir><file name="Score.php" hash="938cbb8ae489bc9b0c39e75ca0f180f1"/></dir><file name="Observer.php" hash="1e63bfe563d1e28a4554a17ee2246f7f"/><file name="Score.php" hash="d9f8efdb0b45bbb00c0faf62e23c2b26"/><dir name="System"><file name="Review.php" hash="141b400a28bf7f280f2bddf582eb4949"/><file name="Save.php" hash="bf9ea71ab97abc105b5b31577d128e4b"/><file name="Select.php" hash="7af3a6cc2f51f3c503385406d381307a"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ScoreController.php" hash="7d4fbada790473cd7a5a896ef15c0795"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="df125e243e6163fcd0a4c1401c0e18c6"/><file name="config.xml" hash="57701175b205f3a621f28b77b800f695"/><file name="system.xml" hash="9946ce3210bb4b8a3cbe9761ad2604e1"/></dir><dir name="sql"><dir name="score_setup"><file name="mysql4-install-0.1.0.php" hash="81b07a2cfb4bb6910166e1f6cfa9a838"/></dir></dir><file name=".DS_Store" hash="ed5404ee4fca157855a4d89ccbfb01d6"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Konduto_Score.xml" hash="c549e42d553ccdeeb1e1ff8e7af82194"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="score.xml" hash="ce8033fbd64586bbe5ae8c2b2a6c2e3c"/></dir><dir name="template"><dir name="score"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="928ede4ea46893156290655727b862cf"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="score.xml" hash="2c92434bd76a1ccb2023a2db9a122949"/></dir><dir name="template"><dir name="score"><file name="score.phtml" hash="7a031dbc59e542264fc3c7386b0e1a06"/><file name="getId.phtml" hash="e3df324fdf29fa9c48ed02a799458d51"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Konduto_Score.csv" hash="bcaaffafb83622e99489afb39c688a50"/></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5.1.0</min><max>1.8.1.0</max></package><extension><name>gd</name><min>2.0.28</min><max>3.0</max></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Konduto</name>
4
+ <version>1.4.0</version>
5
  <stability>stable</stability>
6
  <license>OSLv3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Konduto fraud detection service integration</summary>
10
  <description>Konduto is a fraud detection service that helps e-commerce merchants spot fraud with Buying Behavior</description>
11
+ <notes>- Improved layout compatibility with other modules</notes>
12
  <authors><author><name>Konduto</name><user>konduto</user><email>magentoconnect@konduto.com</email></author><author><name>Excellence Technologies</name><user>manish</user><email>manish@excellencetechnologies.in</email></author></authors>
13
+ <date>2014-09-19</date>
14
+ <time>21:15:48</time>
15
+ <contents><target name="magecommunity"><dir name="Konduto"><dir name="Score"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><file name="Grid.php" hash="7ca27f1f6cfb61b5658ecf6bfdf83466"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="View"><file name="Score.php" hash="5690f0e18f102bf2a1747708e81d2d6f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4eb1e86fb4c5f3833f5d055d594b6a16"/><file name="Order.php" hash="953e22602d419ce41d13e5d5903ce8c2"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Score"><file name="Collection.php" hash="2dedf14be82d224d6d8f56fe1a4fa5fc"/></dir><file name="Score.php" hash="938cbb8ae489bc9b0c39e75ca0f180f1"/></dir><file name="Observer.php" hash="7ac25d54857ce561266422f6d39bc985"/><file name="Score.php" hash="d9f8efdb0b45bbb00c0faf62e23c2b26"/><dir name="System"><file name="Review.php" hash="141b400a28bf7f280f2bddf582eb4949"/><file name="Save.php" hash="8e059419faa31fe0f5592651436ff092"/><file name="Select.php" hash="7af3a6cc2f51f3c503385406d381307a"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ScoreController.php" hash="7d4fbada790473cd7a5a896ef15c0795"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="df125e243e6163fcd0a4c1401c0e18c6"/><file name="config.xml" hash="679c14a9f0fe98d034a5cf1d5cb6989b"/><file name="system.xml" hash="9946ce3210bb4b8a3cbe9761ad2604e1"/></dir><dir name="sql"><dir name="score_setup"><file name="mysql4-install-0.1.0.php" hash="81b07a2cfb4bb6910166e1f6cfa9a838"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Konduto_Score.csv" hash="58c42a8ccf3b8c982546f11336cde45b"/></dir></target><target name="mageetc"><dir name="modules"><file name="Konduto_Score.xml" hash="c549e42d553ccdeeb1e1ff8e7af82194"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="score.xml" hash="435c86b572cddcc6f92a683709acb22d"/></dir><dir name="template"><dir name="score"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="26738627adec425585f59334aea405bb"/><file name="score.phtml" hash="d119d621d868c815f705c615bd1b1db2"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="score.xml" hash="ebf71497e044f4d4cc84a09d952f637d"/></dir><dir name="template"><dir name="score"><file name="getId.phtml" hash="e3df324fdf29fa9c48ed02a799458d51"/><file name="product.phtml" hash="70f95845a94de6aee51a7711633bebc5"/><file name="score.phtml" hash="7a031dbc59e542264fc3c7386b0e1a06"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5.1.0</min><max>1.8.1.0</max></package></required></dependencies>
18
  </package>