Signifyd_Connect - Version 3.4.4

Version Notes

Supports all versions of Magento

Download this release

Release Info

Developer Magento Core Team
Extension Signifyd_Connect
Version 3.4.4
Comparing to
See all releases


Code changes from version 3.4.3 to 3.4.4

app/code/community/Signifyd/Connect/Block/Adminhtml/Sales/Order.php ADDED
@@ -0,0 +1,13 @@
1
+ <?php
2
+
3
+ class Signifyd_Connect_Block_Adminhtml_Sales_Order extends Mage_Adminhtml_Block_Widget_Grid_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ $this->_blockGroup = 'signifyd_connect';
8
+ $this->_controller = 'adminhtml_sales_order';
9
+ $this->_headerText = Mage::helper('signifyd_connect')->__('Signifyd Scores');
10
+ parent::__construct();
11
+ $this->_removeButton('add');
12
+ }
13
+ }
app/code/community/Signifyd/Connect/Block/Adminhtml/Sales/Order/Grid.php ADDED
@@ -0,0 +1,124 @@
1
+ <?php
2
+
3
+ class Signifyd_Connect_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('signifyd_connect_grid');
9
+ $this->setDefaultSort('increment_id');
10
+ $this->setDefaultDir('DESC');
11
+ $this->setSaveParametersInSession(true);
12
+ $this->setUseAjax(true);
13
+ }
14
+
15
+ public function oldSupport()
16
+ {
17
+ $model = Mage::getSingleton('signifyd_connect/observer');
18
+
19
+ return $model->oldSupport();
20
+ }
21
+
22
+ protected function _prepareCollection()
23
+ {
24
+ $collection = Mage::getResourceModel('sales/order_collection');
25
+
26
+ if ($this->oldSupport()) {
27
+ $collection->getSelect()->joinLeft(
28
+ array('signifyd' => Mage::getSingleton('core/resource')->getTableName('signifyd_connect_case')),
29
+ 'signifyd.order_increment = e.increment_id',
30
+ array(
31
+ 'score' => 'score',
32
+ )
33
+ );
34
+ } else {
35
+ $collection->addExpressionFieldToSelect(
36
+ 'fullname',
37
+ 'CONCAT({{customer_firstname}}, \' \', {{customer_lastname}})',
38
+ array('customer_firstname' => 'main_table.customer_firstname', 'customer_lastname' => 'main_table.customer_lastname')
39
+ );
40
+
41
+ $collection->getSelect()->joinLeft(
42
+ array('signifyd' => Mage::getSingleton('core/resource')->getTableName('signifyd_connect_case')),
43
+ 'signifyd.order_increment = main_table.increment_id',
44
+ array(
45
+ 'score' => 'score',
46
+ )
47
+ );
48
+ }
49
+
50
+ $this->setCollection($collection);
51
+ parent::_prepareCollection();
52
+ return $this;
53
+ }
54
+
55
+ protected function _prepareColumns()
56
+ {
57
+ $helper = Mage::helper('signifyd_connect');
58
+ $currency = (string) Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE);
59
+
60
+ $this->addColumn('increment_id', array(
61
+ 'header' => $helper->__('Order #'),
62
+ 'index' => 'increment_id'
63
+ ));
64
+
65
+ $this->addColumn('purchased_on', array(
66
+ 'header' => $helper->__('Purchased On'),
67
+ 'type' => 'datetime',
68
+ 'index' => 'created_at'
69
+ ));
70
+
71
+ if (!$this->oldSupport()) {
72
+ $this->addColumn('fullname', array(
73
+ 'header' => $helper->__('Name'),
74
+ 'index' => 'fullname',
75
+ 'filter_index' => 'CONCAT(customer_firstname, \' \', customer_lastname)'
76
+ ));
77
+ }
78
+
79
+ $this->addColumn('grand_total', array(
80
+ 'header' => $helper->__('Grand Total'),
81
+ 'index' => 'grand_total',
82
+ 'type' => 'currency',
83
+ 'currency_code' => $currency
84
+ ));
85
+
86
+ $this->addColumn('shipping_method', array(
87
+ 'header' => $helper->__('Shipping Method'),
88
+ 'index' => 'shipping_description'
89
+ ));
90
+
91
+ $this->addColumn('score', array(
92
+ 'header' => $helper->__('Signifyd Score'),
93
+ 'align' => 'left',
94
+ 'type' => 'text',
95
+ 'index' => 'score',
96
+ 'filter_index' => 'score',
97
+ 'renderer' => 'signifyd_connect/renderer',
98
+ 'width' => '100px',
99
+ ));
100
+
101
+ $this->addColumn('order_status', array(
102
+ 'header' => $helper->__('Status'),
103
+ 'index' => 'status',
104
+ 'type' => 'options',
105
+ 'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
106
+ ));
107
+
108
+ return parent::_prepareColumns();
109
+ }
110
+
111
+ public function getRowUrl($row)
112
+ {
113
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
114
+ return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
115
+ }
116
+
117
+ return false;
118
+ }
119
+
120
+ public function getGridUrl()
121
+ {
122
+ return $this->getUrl('*/*/grid', array('_current'=>true));
123
+ }
124
+ }
app/code/community/Signifyd/Connect/Model/Observer.php CHANGED
@@ -593,6 +593,15 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
593
public function coreBlockAbstractToHtmlBefore(Varien_Event_Observer $observer)
594
{
595
if (Mage::getStoreConfig('signifyd_connect/advanced/show_scores')) {
596
$helper = Mage::helper('signifyd_connect');
597
$block = $observer->getEvent()->getBlock();
598
593
public function coreBlockAbstractToHtmlBefore(Varien_Event_Observer $observer)
594
{
595
if (Mage::getStoreConfig('signifyd_connect/advanced/show_scores')) {
596
+ $request = Mage::app()->getRequest();
597
+ $module = $request->getModuleName();
598
+ $controller = $request->getControllerName();
599
+ $action = $request->getActionName();
600
+
601
+ if ($module != 'admin' || $controller != 'sales_order') {
602
+ return;
603
+ }
604
+
605
$helper = Mage::helper('signifyd_connect');
606
$block = $observer->getEvent()->getBlock();
607
app/code/community/Signifyd/Connect/controllers/Adminhtml/SignifydController.php ADDED
@@ -0,0 +1,21 @@
1
+ <?php
2
+
3
+ class Signifyd_Connect_Adminhtml_SignifydController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ public function indexAction()
6
+ {
7
+ $this->_title($this->__('Sales'))->_title($this->__('Signifyd Scores'));
8
+ $this->loadLayout();
9
+ $this->_setActiveMenu('sales/sales');
10
+ $this->_addContent($this->getLayout()->createBlock('signifyd_connect/adminhtml_sales_order'));
11
+ $this->renderLayout();
12
+ }
13
+
14
+ public function gridAction()
15
+ {
16
+ $this->loadLayout();
17
+ $this->getResponse()->setBody(
18
+ $this->getLayout()->createBlock('signifyd_connect/adminhtml_sales_order_grid')->toHtml()
19
+ );
20
+ }
21
+ }
app/code/community/Signifyd/Connect/etc/adminhtml.xml ADDED
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <sales>
5
+ <children>
6
+ <signifyd_connect translate="title" module="signifyd_connect">
7
+ <sort_order>50</sort_order>
8
+ <title>Signifyd Scores</title>
9
+ <action>adminhtml/signifyd/</action>
10
+ </signifyd_connect>
11
+ </children>
12
+ </sales>
13
+ </menu>
14
+ </config>
app/code/community/Signifyd/Connect/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
<config>
4
<modules>
5
<Signifyd_Connect>
6
- <version>3.4.3</version>
7
</Signifyd_Connect>
8
</modules>
9
<global>
@@ -93,6 +93,17 @@
93
</log>
94
</signifyd_connect>
95
</default>
96
<adminhtml>
97
<acl>
98
<resources>
3
<config>
4
<modules>
5
<Signifyd_Connect>
6
+ <version>3.4.4</version>
7
</Signifyd_Connect>
8
</modules>
9
<global>
93
</log>
94
</signifyd_connect>
95
</default>
96
+ <admin>
97
+ <routers>
98
+ <adminhtml>
99
+ <args>
100
+ <modules>
101
+ <signifyd_connect before="Mage_Adminhtml">Signifyd_Connect_Adminhtml</signifyd_connect>
102
+ </modules>
103
+ </args>
104
+ </adminhtml>
105
+ </routers>
106
+ </admin>
107
<adminhtml>
108
<acl>
109
<resources>
app/code/community/Signifyd/Connect/sql/signifyd_connect_setup/mysql4-upgrade-3.4.3-3.4.4.php ADDED
@@ -0,0 +1,8 @@
1
+ <?php
2
+
3
+ try {
4
+ $this->startSetup();
5
+ $this->endSetup();
6
+ } catch (Exception $e) {
7
+ Mage::log('Signifyd_Connect upgrade: ' . $e->__toString(), null, 'signifyd_connect.log');
8
+ }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Signifyd_Connect</name>
4
- <version>3.4.3</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
<channel>community</channel>
@@ -10,9 +10,9 @@
10
<description>Supports all versions of Magento</description>
11
<notes>Supports all versions of Magento</notes>
12
<authors><author><name>signifyd</name><user>auto-converted</user><email>manelis@signifyd.com</email></author></authors>
13
- <date>2014-08-08</date>
14
- <time>01:11:21</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Signifyd_Connect.xml" hash="bcd998a24567eba8a20423c40fba2adf"/></dir></target><target name="magecommunity"><dir name="Signifyd"><dir name="Connect"><dir name="Block"><file name="Renderer.php" hash="5564e9c6926afbbdade26a6fe746948a"/></dir><dir name="Helper"><file name="Data.php" hash="588992f023fe4bc648fbe3be64773208"/></dir><dir name="Model"><dir name="Resource"><dir name="Case"><file name="Collection.php" hash="b7dac9979a0c81db56294d1548570fc2"/></dir><file name="Case.php" hash="621fb50264bd0cdeba720dee6949a0bf"/></dir><file name="Case.php" hash="92e044f7414eddfe084320b4a2098cee"/><file name="Cron.php" hash="51665978bd2bcf67b493f2a2b450d1b8"/><file name="Link.php" hash="0027fc75ef766aa1f51a004305987937"/><file name="Observer.php" hash="f5cd6b4786bdac3ff31cb58d456c4050"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/></dir><dir name="controllers"><file name="ConnectController.php" hash="0fb481778eae49ac0aa30f560fa7b7c5"/></dir><dir name="etc"><file name="config.xml" hash="ab6ddb8750e7d7dac770398fb6d6c6ff"/><file name="system.xml" hash="525d089399d5abe3845ffea2e66e50ff"/></dir><dir name="sql"><dir name="signifyd_connect_setup"><file name="mysql4-install-3.1.1.php" hash="7fb2ccaf8352eea26e626ace6de53d80"/><file name="mysql4-install-3.3.0.php" hash="f61d0c018b28ae04d8d14b38556d18ad"/><file name="mysql4-install-3.4.0.php" hash="109cc5ca60974d0c4755dcb0f5ade3e7"/><file name="mysql4-upgrade-3.2.0-3.2.1.php" hash="9e36c608afd6e30e3052334e085eeff4"/><file name="mysql4-upgrade-3.2.1-3.2.2.php" hash="efcc5d46a41e549e508a693f1e77bf44"/><file name="mysql4-upgrade-3.2.2-3.2.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.2.3-3.3.0.php" hash="94b907c2cacde5fb9831408ce9a06190"/><file name="mysql4-upgrade-3.3.0-3.4.0.php" hash="6eb18705081483bb8d9c14adcdefd095"/><file name="mysql4-upgrade-3.4.0-3.4.1.php" hash="79f2064f1fa20d646e66aa3e7912d2a0"/><file name="mysql4-upgrade-3.4.1-3.4.2.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.2-3.4.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/></dir></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Signifyd_Connect</name>
4
+ <version>3.4.4</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
<channel>community</channel>
10
<description>Supports all versions of Magento</description>
11
<notes>Supports all versions of Magento</notes>
12
<authors><author><name>signifyd</name><user>auto-converted</user><email>manelis@signifyd.com</email></author></authors>
13
+ <date>2014-08-29</date>
14
+ <time>02:56:35</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Signifyd_Connect.xml" hash="bcd998a24567eba8a20423c40fba2adf"/></dir></target><target name="magecommunity"><dir name="Signifyd"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="2ecfd2ae51a53ceb099f258e7292972e"/></dir><file name="Order.php" hash="e49f869c0aa5fb3ab6b70fb5752049ac"/></dir></dir><file name="Renderer.php" hash="5564e9c6926afbbdade26a6fe746948a"/></dir><dir name="Helper"><file name="Data.php" hash="588992f023fe4bc648fbe3be64773208"/></dir><dir name="Model"><dir name="Resource"><dir name="Case"><file name="Collection.php" hash="b7dac9979a0c81db56294d1548570fc2"/></dir><file name="Case.php" hash="621fb50264bd0cdeba720dee6949a0bf"/></dir><file name="Case.php" hash="92e044f7414eddfe084320b4a2098cee"/><file name="Cron.php" hash="51665978bd2bcf67b493f2a2b450d1b8"/><file name="Link.php" hash="0027fc75ef766aa1f51a004305987937"/><file name="Observer.php" hash="dffffe1a46c865f4726e6fc0c46e88bf"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifydController.php" hash="937fa40bfd59857c738691e0fc6594e7"/></dir><file name="ConnectController.php" hash="0fb481778eae49ac0aa30f560fa7b7c5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5c498ab9a051a7fe6fd4f21167a147f6"/><file name="config.xml" hash="f49097bf687fa26fd1134692bde34b4f"/><file name="system.xml" hash="525d089399d5abe3845ffea2e66e50ff"/></dir><dir name="sql"><dir name="signifyd_connect_setup"><file name="mysql4-install-3.1.1.php" hash="7fb2ccaf8352eea26e626ace6de53d80"/><file name="mysql4-install-3.3.0.php" hash="f61d0c018b28ae04d8d14b38556d18ad"/><file name="mysql4-install-3.4.0.php" hash="109cc5ca60974d0c4755dcb0f5ade3e7"/><file name="mysql4-upgrade-3.2.0-3.2.1.php" hash="9e36c608afd6e30e3052334e085eeff4"/><file name="mysql4-upgrade-3.2.1-3.2.2.php" hash="efcc5d46a41e549e508a693f1e77bf44"/><file name="mysql4-upgrade-3.2.2-3.2.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.2.3-3.3.0.php" hash="94b907c2cacde5fb9831408ce9a06190"/><file name="mysql4-upgrade-3.3.0-3.4.0.php" hash="6eb18705081483bb8d9c14adcdefd095"/><file name="mysql4-upgrade-3.4.0-3.4.1.php" hash="79f2064f1fa20d646e66aa3e7912d2a0"/><file name="mysql4-upgrade-3.4.1-3.4.2.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.2-3.4.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.3-3.4.4.php" hash="3ceb86495f33475774d4fc8727254cfc"/></dir></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>