CommerceStack_Recommender - Version 1.2.6

Version Notes

Please contact help@commercestack.com with any feature requests, bugs, issues, or questions.

Download this release

Release Info

Developer CommerceStack
Extension CommerceStack_Recommender
Version 1.2.6
Comparing to
See all releases


Code changes from version 1.2.5 to 1.2.6

app/code/community/CommerceStack/Recommender/Helper/Data.php CHANGED
@@ -63,13 +63,7 @@ class CommerceStack_Recommender_Helper_Data extends Mage_Core_Helper_Abstract
63
  }
64
  catch(Pest_ServerError $e)
65
  {
66
- // try again
67
- sleep(10);
68
- $retries++;
69
- if($retries > 0) // 5 in production?
70
- {
71
- throw new Exception($e->getMessage(), $e->getCode(), $e);
72
- }
73
  }
74
 
75
  }
@@ -139,7 +133,7 @@ class CommerceStack_Recommender_Helper_Data extends Mage_Core_Helper_Abstract
139
  }
140
  catch(Exception $e)
141
  {
142
- throw new Exception($e->getMessage() . "response: $xml", $e->getCode(), $e);
143
  }
144
 
145
  foreach($xml as $item)
@@ -227,13 +221,14 @@ class CommerceStack_Recommender_Helper_Data extends Mage_Core_Helper_Abstract
227
  }
228
  catch(Exception $e)
229
  {
230
- throw new Exception($e->getMessage(), $e->getCode(), $e);
231
  }
232
  }
233
 
234
  public function reportException($e)
235
  {
236
  $client = Mage::helper('recommender/pest');
 
237
  $errorReport = $e->getMessage() . "\n" . $e->getTraceAsString();
238
 
239
  try
@@ -243,7 +238,7 @@ class CommerceStack_Recommender_Helper_Data extends Mage_Core_Helper_Abstract
243
  }
244
  catch(Exception $e)
245
  {
246
- throw new Exception($e->getMessage(), $e->getCode(), $e);
247
  }
248
  }
249
 
63
  }
64
  catch(Pest_ServerError $e)
65
  {
66
+ $this->reportException($e);
 
 
 
 
 
 
67
  }
68
 
69
  }
133
  }
134
  catch(Exception $e)
135
  {
136
+ throw new Exception($e->getMessage() . "response: $xml", $e->getCode());
137
  }
138
 
139
  foreach($xml as $item)
221
  }
222
  catch(Exception $e)
223
  {
224
+ $this->reportException($e);
225
  }
226
  }
227
 
228
  public function reportException($e)
229
  {
230
  $client = Mage::helper('recommender/pest');
231
+ $client->curl_opts[CURLOPT_TIMEOUT] = 3;
232
  $errorReport = $e->getMessage() . "\n" . $e->getTraceAsString();
233
 
234
  try
238
  }
239
  catch(Exception $e)
240
  {
241
+ //throw new Exception($e->getMessage(), $e->getCode(), $e);
242
  }
243
  }
244
 
app/code/community/CommerceStack/Recommender/Helper/Pest.php CHANGED
@@ -14,7 +14,7 @@ class CommerceStack_Recommender_Helper_Pest extends Mage_Core_Helper_Abstract
14
  CURLOPT_RETURNTRANSFER => true, // return result instead of echoing
15
  CURLOPT_SSL_VERIFYPEER => false, // stop cURL from verifying the peer's certificate
16
  CURLOPT_FOLLOWLOCATION => false, // follow redirects, Location: headers
17
- CURLOPT_MAXREDIRS => 10 // but dont redirect more than 10 times
18
  );
19
 
20
  public $base_url;
@@ -117,8 +117,8 @@ class CommerceStack_Recommender_Helper_Pest extends Mage_Core_Helper_Abstract
117
  }
118
  $curl = curl_init($url);
119
 
120
- foreach ($opts as $opt => $val)
121
- curl_setopt($curl, $opt, $val);
122
 
123
  $this->last_request = array(
124
  'url' => $url
14
  CURLOPT_RETURNTRANSFER => true, // return result instead of echoing
15
  CURLOPT_SSL_VERIFYPEER => false, // stop cURL from verifying the peer's certificate
16
  CURLOPT_FOLLOWLOCATION => false, // follow redirects, Location: headers
17
+ CURLOPT_MAXREDIRS => 10, // but dont redirect more than 10 times
18
  );
19
 
20
  public $base_url;
117
  }
118
  $curl = curl_init($url);
119
 
120
+ foreach ($opts as $opt => $val){
121
+ curl_setopt($curl, $opt, $val);}
122
 
123
  $this->last_request = array(
124
  'url' => $url
app/code/community/CommerceStack/Recommender/Model/AdminNotification/Feed.php CHANGED
@@ -12,7 +12,7 @@ class CommerceStack_Recommender_Model_AdminNotification_Feed extends Mage_AdminN
12
  }
13
 
14
  $client = Mage::helper('recommender/pest');
15
-
16
  $commercestackXml = $client->get('notification/');
17
 
18
  if(!$commercestackXml) return $xml;
12
  }
13
 
14
  $client = Mage::helper('recommender/pest');
15
+ $client->curl_opts[CURLOPT_TIMEOUT] = 3; // Don't hang login if server is down
16
  $commercestackXml = $client->get('notification/');
17
 
18
  if(!$commercestackXml) return $xml;
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>CommerceStack_Recommender</name>
4
- <version>1.2.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License v 3.0</license>
7
  <channel>community</channel>
@@ -16,9 +16,9 @@ Please contact help@commercestack.com with any bugs, issues, or feature requests
16
  After installing, navigate to System-&gt;Configuration-&gt;Related Products Manager to begin.</description>
17
  <notes>Please contact help@commercestack.com with any feature requests, bugs, issues, or questions.</notes>
18
  <authors><author><name>CommerceStack</name><user>dbright</user><email>dbright@commercestack.com</email></author></authors>
19
- <date>2012-06-14</date>
20
- <time>23:24:25</time>
21
- <contents><target name="magecommunity"><dir name="CommerceStack"><dir name="Recommender"><dir name="Block"><dir name="Cart"><file name="Crosssell.php" hash="0a883c70bfefa375198671d4d6680295"/></dir><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Crosssell.php" hash="4eacb2e01e0ec6ead7109fe696fc2e23"/><file name="Related.php" hash="3469e281271de8f9457f82fdc90ca104"/></dir><file name="Tabs.php" hash="aa26d6e9e585117100e983616e6a0afa"/></dir></dir></dir><dir name="Product"><dir name="List"><file name="Related.php" hash="77b7d87ca7233e14f54cf67c48182fc6"/><file name="Upsell.php" hash="25444a6ea7a2781f68e2fc0b3b249565"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Apikey.php" hash="fae5b45d9eace7c2934b9f70f5ec6c8e"/><file name="Apikeyurl.php" hash="5ce3031fd84f912b3552d7c37f2a04ac"/><file name="Cancelbutton.php" hash="070131f41c4969cf51917b486e487b26"/><file name="Updatebutton.php" hash="2a370f132bc2b6fc5d21f2f477b6115e"/></dir><file name="Form.php" hash="de1c3b70b03ac09fe1d5c7cd7613feb1"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="11fc78bfbae0c85e8acc512d3978efea"/><dir name="Pest"><file name="PestJSON.php" hash="95059011a55bd0036c5029ba5b2d0f0c"/><file name="PestXML.php" hash="7e8e2a8c75b8a58d11bef9c47b4e960d"/></dir><file name="Pest.php" hash="15ac0a66957144f848b067c11710204d"/></dir><dir name="Model"><dir name="AdminNotification"><file name="Feed.php" hash="bf32debf65f8e5ca5371843333730b02"/></dir><dir name="Product"><file name="Link.php" hash="0e08ed99339e2acd77cce3e738cdbfae"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><dir name="Link"><dir name="Product"><file name="Collection.php" hash="0b92801bb560760dce1b2d3ab3f7aa18"/></dir></dir><file name="Link.php" hash="0910e13e6a3b3cac3573a4ea1df59e9f"/></dir></dir></dir><dir name="Mysql4"><file name="Setup.php" hash="79f3bcb4122135514d6f68f3db50b9f1"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Upsellsource.php" hash="34ed5e3c61bd288340b7de3809953ad3"/></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="05af8f614f7822b480b9b9e55b25d45e"/><file name="IndexController.php" hash="ef4908d883c30972e490f67d9d9cbe3d"/><file name="ProductController.php" hash="fb4235ad3604eaeaee7e8e0e1fe71f04"/></dir><dir name="etc"><file name="config.xml" hash="21029b68d03d56b641dccb95a7d983a4"/><file name="system.xml" hash="089389d636f112dbead01f1be6c656a8"/></dir><dir name="sql"><dir name="recommender_setup"><file name="mysql4-install-0.9.3.php" hash="d72ccc127f8f2ccef5216e7eaf62babc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="recommender.xml" hash="f19e768264b836355637a61d6a1463f5"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="commercestack"><dir name="adminhtml"><file name="recommender.js" hash="6e99f78c4b6e495401cdb4ece6f699ca"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CommerceStack_Recommender.xml" hash="c0faaf57bb93c70fe6ba45e68c96fc11"/></dir></target></contents>
22
  <compatible/>
23
- <dependencies><required><php><min>5.2.13</min><max>5.4.0</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>CommerceStack_Recommender</name>
4
+ <version>1.2.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License v 3.0</license>
7
  <channel>community</channel>
16
  After installing, navigate to System-&gt;Configuration-&gt;Related Products Manager to begin.</description>
17
  <notes>Please contact help@commercestack.com with any feature requests, bugs, issues, or questions.</notes>
18
  <authors><author><name>CommerceStack</name><user>dbright</user><email>dbright@commercestack.com</email></author></authors>
19
+ <date>2012-07-18</date>
20
+ <time>20:11:55</time>
21
+ <contents><target name="magecommunity"><dir name="CommerceStack"><dir name="Recommender"><dir name="Block"><dir name="Cart"><file name="Crosssell.php" hash="0a883c70bfefa375198671d4d6680295"/></dir><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><file name="Crosssell.php" hash="4eacb2e01e0ec6ead7109fe696fc2e23"/><file name="Related.php" hash="3469e281271de8f9457f82fdc90ca104"/></dir><file name="Tabs.php" hash="aa26d6e9e585117100e983616e6a0afa"/></dir></dir></dir><dir name="Product"><dir name="List"><file name="Related.php" hash="77b7d87ca7233e14f54cf67c48182fc6"/><file name="Upsell.php" hash="25444a6ea7a2781f68e2fc0b3b249565"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Apikey.php" hash="fae5b45d9eace7c2934b9f70f5ec6c8e"/><file name="Apikeyurl.php" hash="5ce3031fd84f912b3552d7c37f2a04ac"/><file name="Cancelbutton.php" hash="070131f41c4969cf51917b486e487b26"/><file name="Updatebutton.php" hash="2a370f132bc2b6fc5d21f2f477b6115e"/></dir><file name="Form.php" hash="de1c3b70b03ac09fe1d5c7cd7613feb1"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fae28f902e8379389e2e98582f31a98f"/><dir name="Pest"><file name="PestJSON.php" hash="95059011a55bd0036c5029ba5b2d0f0c"/><file name="PestXML.php" hash="7e8e2a8c75b8a58d11bef9c47b4e960d"/></dir><file name="Pest.php" hash="5b178036c45fa33fe71f983a1992df61"/></dir><dir name="Model"><dir name="AdminNotification"><file name="Feed.php" hash="dbddcc8c532dc32a6701ae89b43da1dd"/></dir><dir name="Product"><file name="Link.php" hash="0e08ed99339e2acd77cce3e738cdbfae"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Product"><dir name="Link"><dir name="Product"><file name="Collection.php" hash="0b92801bb560760dce1b2d3ab3f7aa18"/></dir></dir><file name="Link.php" hash="0910e13e6a3b3cac3573a4ea1df59e9f"/></dir></dir></dir><dir name="Mysql4"><file name="Setup.php" hash="79f3bcb4122135514d6f68f3db50b9f1"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Upsellsource.php" hash="34ed5e3c61bd288340b7de3809953ad3"/></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="05af8f614f7822b480b9b9e55b25d45e"/><file name="IndexController.php" hash="ef4908d883c30972e490f67d9d9cbe3d"/><file name="ProductController.php" hash="fb4235ad3604eaeaee7e8e0e1fe71f04"/></dir><dir name="etc"><file name="config.xml" hash="21029b68d03d56b641dccb95a7d983a4"/><file name="system.xml" hash="089389d636f112dbead01f1be6c656a8"/></dir><dir name="sql"><dir name="recommender_setup"><file name="mysql4-install-0.9.3.php" hash="d72ccc127f8f2ccef5216e7eaf62babc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="recommender.xml" hash="f19e768264b836355637a61d6a1463f5"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="commercestack"><dir name="adminhtml"><file name="recommender.js" hash="6e99f78c4b6e495401cdb4ece6f699ca"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CommerceStack_Recommender.xml" hash="c0faaf57bb93c70fe6ba45e68c96fc11"/></dir></target></contents>
22
  <compatible/>
23
+ <dependencies><required><php><min>5.2.13</min><max>5.4.3</max></php></required></dependencies>
24
  </package>