Signifyd_Connect - Version 3.4.3

Version Notes

Supports all versions of Magento

Download this release

Release Info

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


Code changes from version 3.4.2 to 3.4.3

app/code/community/Signifyd/Connect/Model/Observer.php CHANGED
@@ -9,6 +9,8 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
9
  public $shipping_address = null;
10
  public $billing_address = null;
11
 
 
 
12
  public function getProducts()
13
  {
14
  $products = array();
@@ -501,7 +503,7 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
501
  }
502
 
503
  $clss = get_class($x);
504
- if ($clss == 'Mage_Sales_Model_Mysql4_Order_Collection') {
505
  $observer->setOrderGridCollection($x);
506
  return $this->salesOrderGridCollectionLoadBefore($observer);
507
  }
@@ -521,7 +523,8 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
521
  }
522
 
523
  $clss = get_class($x);
524
- if ($clss == 'Mage_Sales_Model_Mysql4_Order_Collection') {
 
525
  $observer->setOrderGridCollection($x);
526
  return $this->salesOrderGridCollectionLoadBefore($observer);
527
  }
@@ -532,6 +535,19 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
532
  return !@class_exists('Enterprise_Cms_Helper_Data');
533
  }
534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  public function belowSix()
536
  {
537
  $version = Mage::getVersion();
@@ -547,23 +563,29 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
547
 
548
  public function salesOrderGridCollectionLoadBefore($observer)
549
  {
550
- $request = Mage::app()->getRequest();
551
- $module = $request->getModuleName();
552
- $controller = $request->getControllerName();
553
- $action = $request->getActionName();
554
-
555
- if ($module != 'admin' || $controller != 'sales_order') {
556
- return;
557
- }
558
-
559
- $collection = $observer->getOrderGridCollection();
560
- $select = $collection->getSelect();
561
-
562
- if (Mage::getStoreConfig('signifyd_connect/advanced/show_scores')) {
563
- if ($this->belowSix()) {
564
- $select->joinLeft(array('signifyd'=>$collection->getTable('signifyd_connect/case')), 'signifyd.order_increment=e.increment_id', array('score'=>'score'));
565
- } else {
566
- $select->joinLeft(array('signifyd'=>$collection->getTable('signifyd_connect/case')), 'signifyd.order_increment=main_table.increment_id', array('score'=>'score'));
 
 
 
 
 
 
567
  }
568
  }
569
  }
@@ -571,7 +593,7 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
571
  public function coreBlockAbstractToHtmlBefore(Varien_Event_Observer $observer)
572
  {
573
  if (Mage::getStoreConfig('signifyd_connect/advanced/show_scores')) {
574
- $helper = Mage::helper('signifyd_connect');
575
  $block = $observer->getEvent()->getBlock();
576
 
577
  if ($block->getId() == 'sales_order_grid') {
9
  public $shipping_address = null;
10
  public $billing_address = null;
11
 
12
+ public $joins = 0;
13
+
14
  public function getProducts()
15
  {
16
  $products = array();
503
  }
504
 
505
  $clss = get_class($x);
506
+ if ($clss == 'Mage_Sales_Model_Mysql4_Order_Collection' || $clss == 'Mage_Sales_Model_Mysql4_Order_Grid_Collection') {
507
  $observer->setOrderGridCollection($x);
508
  return $this->salesOrderGridCollectionLoadBefore($observer);
509
  }
523
  }
524
 
525
  $clss = get_class($x);
526
+
527
+ if ($clss == 'Mage_Sales_Model_Mysql4_Order_Collection' || $clss == 'Mage_Sales_Model_Mysql4_Order_Grid_Collection') {
528
  $observer->setOrderGridCollection($x);
529
  return $this->salesOrderGridCollectionLoadBefore($observer);
530
  }
535
  return !@class_exists('Enterprise_Cms_Helper_Data');
536
  }
537
 
538
+ public function oldSupport()
539
+ {
540
+ $version = Mage::getVersion();
541
+
542
+ if ($this->isCe()) {
543
+ return version_compare($version, '1.4.1.0', '<');
544
+ } else {
545
+ return version_compare($version, '1.10.0.0', '<');
546
+ }
547
+
548
+ return false;
549
+ }
550
+
551
  public function belowSix()
552
  {
553
  $version = Mage::getVersion();
563
 
564
  public function salesOrderGridCollectionLoadBefore($observer)
565
  {
566
+ if ($this->joins === 0) {
567
+ $request = Mage::app()->getRequest();
568
+ $module = $request->getModuleName();
569
+ $controller = $request->getControllerName();
570
+ $action = $request->getActionName();
571
+
572
+ if ($module != 'admin' || $controller != 'sales_order') {
573
+ return;
574
+ }
575
+
576
+ $collection = $observer->getOrderGridCollection();
577
+ $select = $collection->getSelect();
578
+
579
+ if (Mage::getStoreConfig('signifyd_connect/advanced/show_scores')) {
580
+ if ($this->oldSupport()) {
581
+ $select->joinLeft(array('signifyd'=>$collection->getTable('signifyd_connect/case')), 'signifyd.order_increment=e.increment_id', array('score'=>'score'));
582
+ $this->joins++;
583
+ } else {
584
+ $select->joinLeft(array('signifyd'=>$collection->getTable('signifyd_connect/case')), 'signifyd.order_increment=main_table.increment_id', array('score'=>'score'));
585
+ $this->joins++;
586
+ }
587
+
588
+ Mage::log('joined');
589
  }
590
  }
591
  }
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
 
599
  if ($block->getId() == 'sales_order_grid') {
app/code/community/Signifyd/Connect/controllers/ConnectController.php CHANGED
@@ -132,14 +132,14 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
132
  }
133
 
134
  if (isset($this->_request['status'])) {
135
- $case->setStatus($this->_request['status']);
136
  }
137
 
138
  $case->setUpdatedAt(strftime('%Y-%m-%d %H:%M:%S', time()));
139
  $case->save();
140
 
141
  if ($this->logRequest()) {
142
- Mage::log('Case ' . $case->getId() . ' created with status ' . $case->getStatus() . ' and score ' . $case->getScore(), null, 'signifyd_connect.log');
143
  }
144
 
145
  if ($this->canHold()) {
132
  }
133
 
134
  if (isset($this->_request['status'])) {
135
+ $case->setSignifydStatus($this->_request['status']);
136
  }
137
 
138
  $case->setUpdatedAt(strftime('%Y-%m-%d %H:%M:%S', time()));
139
  $case->save();
140
 
141
  if ($this->logRequest()) {
142
+ Mage::log('Case ' . $case->getId() . ' created with status ' . $case->getSignifydStatus() . ' and score ' . $case->getScore(), null, 'signifyd_connect.log');
143
  }
144
 
145
  if ($this->canHold()) {
app/code/community/Signifyd/Connect/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Signifyd_Connect>
6
- <version>3.4.2</version>
7
  </Signifyd_Connect>
8
  </modules>
9
  <global>
@@ -122,7 +122,7 @@
122
  <observers>
123
  <signifyd_connect>
124
  <model>signifyd_connect/observer</model>
125
- <method>eavCollectionAbstractLoadBefore</method>
126
  </signifyd_connect>
127
  </observers>
128
  </eav_collection_abstract_load_before>
3
  <config>
4
  <modules>
5
  <Signifyd_Connect>
6
+ <version>3.4.3</version>
7
  </Signifyd_Connect>
8
  </modules>
9
  <global>
122
  <observers>
123
  <signifyd_connect>
124
  <model>signifyd_connect/observer</model>
125
+ <method>coreCollectionAbstractLoadBefore</method>
126
  </signifyd_connect>
127
  </observers>
128
  </eav_collection_abstract_load_before>
app/code/community/Signifyd/Connect/sql/signifyd_connect_setup/mysql4-upgrade-3.4.2-3.4.3.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.2</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-07</date>
14
- <time>02:37:17</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="a7e6bf24b7e116920bea8e4b429875d8"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/></dir><dir name="controllers"><file name="ConnectController.php" hash="876e7b8a1108edb60b4aad1daaf2ef4e"/></dir><dir name="etc"><file name="config.xml" hash="e35b830b2696567ed39c6dafaec1c9d7"/><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"/></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.3</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-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>