Version Notes
Bug fixes
Download this release
Release Info
Developer | PPLSAY Commerce Ltd |
Extension | PPLSAY_Social_Discussions |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
app/code/community/PPLS/Discussions/Model/Discussions.php
CHANGED
@@ -33,7 +33,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
33 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$searchParams);
|
34 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
35 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($searchParams)));
|
36 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
37 |
|
38 |
$result = curl_exec($ch);
|
39 |
curl_close($ch);
|
@@ -79,7 +80,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
79 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$productNamesStr);
|
80 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
81 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($productNamesStr)));
|
82 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
83 |
|
84 |
$result = curl_exec($ch);
|
85 |
$jsonResult = json_decode($result,true);
|
@@ -109,7 +111,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
109 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$discussionParams);
|
110 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
111 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($discussionParams)));
|
112 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
113 |
|
114 |
$result = curl_exec($ch);
|
115 |
curl_close($ch);
|
@@ -147,7 +150,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
147 |
curl_setopt($ch,CURLOPT_POSTFIELDS,$postData);
|
148 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
149 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' .$postlength));
|
150 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
151 |
$response = curl_exec($ch);
|
152 |
|
153 |
//close connection
|
@@ -239,7 +243,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
239 |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
240 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$itemParams);
|
241 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
242 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
243 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($itemParams)));
|
244 |
|
245 |
$result = curl_exec($ch);
|
@@ -255,5 +260,25 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
255 |
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
}
|
33 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$searchParams);
|
34 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
35 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($searchParams)));
|
36 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
|
37 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,3);
|
38 |
|
39 |
$result = curl_exec($ch);
|
40 |
curl_close($ch);
|
80 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$productNamesStr);
|
81 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
82 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($productNamesStr)));
|
83 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,0.5);
|
84 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,1);
|
85 |
|
86 |
$result = curl_exec($ch);
|
87 |
$jsonResult = json_decode($result,true);
|
111 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$discussionParams);
|
112 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
113 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($discussionParams)));
|
114 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
|
115 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,3);
|
116 |
|
117 |
$result = curl_exec($ch);
|
118 |
curl_close($ch);
|
150 |
curl_setopt($ch,CURLOPT_POSTFIELDS,$postData);
|
151 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
152 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' .$postlength));
|
153 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
|
154 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,3);
|
155 |
$response = curl_exec($ch);
|
156 |
|
157 |
//close connection
|
243 |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
244 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$itemParams);
|
245 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
246 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
|
247 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,3);
|
248 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($itemParams)));
|
249 |
|
250 |
$result = curl_exec($ch);
|
260 |
|
261 |
}
|
262 |
|
263 |
+
private function initDiplableAttributes()
|
264 |
+
{
|
265 |
+
$displayAttributes = array();
|
266 |
+
$attributes = Mage::getSingleton('eav/config')
|
267 |
+
->getEntityType(Mage_Catalog_Model_Product::ENTITY)
|
268 |
+
->getAttributeCollection()
|
269 |
+
->addSetInfo();
|
270 |
+
|
271 |
+
foreach ($attributes as $attribute)
|
272 |
+
{
|
273 |
+
if ($attribute->getIsVisibleOnFront()) {
|
274 |
+
array_push($displayAttributes, $attribute->getStoreLabel());
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
$this->visibleProductAttributes=$displayAttributes;
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
}
|
283 |
|
284 |
}
|
app/code/community/PPLS/Discussions/Model/Discussions.php~
CHANGED
@@ -3,11 +3,13 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
3 |
{
|
4 |
public $defaultPPLSayURL = "http://gateway.pplsay.com/gateway";
|
5 |
public $defaultPPLSayAccountID = 109;
|
|
|
6 |
|
7 |
|
8 |
protected function _construct()
|
9 |
{
|
10 |
$this->_init('discussions/discussions');
|
|
|
11 |
}
|
12 |
|
13 |
|
@@ -33,7 +35,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
33 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$searchParams);
|
34 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
35 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($searchParams)));
|
36 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
37 |
|
38 |
$result = curl_exec($ch);
|
39 |
curl_close($ch);
|
@@ -79,7 +82,8 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
79 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$productNamesStr);
|
80 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
81 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($productNamesStr)));
|
82 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,
|
|
|
83 |
|
84 |
$result = curl_exec($ch);
|
85 |
$jsonResult = json_decode($result,true);
|
@@ -214,7 +218,7 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
214 |
|
215 |
try{
|
216 |
$product = Mage::getModel('catalog/product')->load($productId);
|
217 |
-
$productBrand = $product->
|
218 |
if($productBrand==null || $productBrand=="")
|
219 |
{
|
220 |
$productBrand = $product->getAttributeText('manufacturer');
|
@@ -255,5 +259,25 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
255 |
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
}
|
3 |
{
|
4 |
public $defaultPPLSayURL = "http://gateway.pplsay.com/gateway";
|
5 |
public $defaultPPLSayAccountID = 109;
|
6 |
+
$visibleProductAttributes;
|
7 |
|
8 |
|
9 |
protected function _construct()
|
10 |
{
|
11 |
$this->_init('discussions/discussions');
|
12 |
+
$this->initDiplableAttributes();
|
13 |
}
|
14 |
|
15 |
|
35 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$searchParams);
|
36 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
37 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($searchParams)));
|
38 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
|
39 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,3);
|
40 |
|
41 |
$result = curl_exec($ch);
|
42 |
curl_close($ch);
|
82 |
curl_setopt($ch, CURLOPT_POSTFIELDS,$productNamesStr);
|
83 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
84 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($productNamesStr)));
|
85 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,0.5);
|
86 |
+
curl_setopt($ch, CURLOPT_TIMEOUT,1);
|
87 |
|
88 |
$result = curl_exec($ch);
|
89 |
$jsonResult = json_decode($result,true);
|
218 |
|
219 |
try{
|
220 |
$product = Mage::getModel('catalog/product')->load($productId);
|
221 |
+
$productBrand = $product->getData("brand");
|
222 |
if($productBrand==null || $productBrand=="")
|
223 |
{
|
224 |
$productBrand = $product->getAttributeText('manufacturer');
|
259 |
|
260 |
}
|
261 |
|
262 |
+
private function initDiplableAttributes()
|
263 |
+
{
|
264 |
+
$displayAttributes = array();
|
265 |
+
$attributes = Mage::getSingleton('eav/config')
|
266 |
+
->getEntityType(Mage_Catalog_Model_Product::ENTITY)
|
267 |
+
->getAttributeCollection()
|
268 |
+
->addSetInfo();
|
269 |
+
|
270 |
+
foreach ($attributes as $attribute)
|
271 |
+
{
|
272 |
+
if ($attribute->getIsVisibleOnFront()) {
|
273 |
+
array_push($displayAttributes, $attribute->getStoreLabel());
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
$this->visibleProductAttributes=$displayAttributes;
|
278 |
+
|
279 |
+
|
280 |
+
|
281 |
+
}
|
282 |
|
283 |
}
|
app/code/community/PPLS/Discussions/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
-
<version>1.2.
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
+
<version>1.2.1</version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
app/code/community/PPLS/Discussions/etc/config.xml~
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
-
<version>1.2</version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
+
<version>1.2.0</version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PPLSAY_Social_Discussions</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
@@ -26,17 +26,12 @@ Visit us at: http://pplsay.com
|
|
26 |
For demo site please refer to the following link pplsay demo:
|
27 |
http://demo.pplsay.com/
|
28 |
</description>
|
29 |
-
<notes>
|
30 |
-
1. Multi languages support
|
31 |
-
2. Full support for embedding Twitter and Google+ discussions
|
32 |
-

|
33 |
-

|
34 |
-
3. Bug fixes 
|
35 |
</notes>
|
36 |
<authors><author><name>PPLSAY Commerce Ltd</name><user>pplsay</user><email>contact@pplsay.com</email></author><author><name>PPLSAY Commerce Ltd</name><user>ymatatov</user><email>ymatatov@pplsay.com</email></author></authors>
|
37 |
-
<date>2015-
|
38 |
-
<time>
|
39 |
-
<contents><target name="magecommunity"><dir name="PPLS"><dir name="Discussions"><dir name="Block"><file name="Discussions.php" hash="ba59fa56d3a766bb4df0b316424429d6"/><file name="Discussions.php~" hash="0928a09685b3bba4bd3ae081bf414416"/><file name="Virality.php" hash="89b053e0383f93c2822b7df641bf6eca"/><file name="Virality.php~" hash="89b053e0383f93c2822b7df641bf6eca"/></dir><dir name="Model"><file name="Discussions.php" hash="
|
40 |
<compatible/>
|
41 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name/><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
|
42 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PPLSAY_Social_Discussions</name>
|
4 |
+
<version>1.2.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
26 |
For demo site please refer to the following link pplsay demo:
|
27 |
http://demo.pplsay.com/
|
28 |
</description>
|
29 |
+
<notes> Bug fixes 
|
|
|
|
|
|
|
|
|
|
|
30 |
</notes>
|
31 |
<authors><author><name>PPLSAY Commerce Ltd</name><user>pplsay</user><email>contact@pplsay.com</email></author><author><name>PPLSAY Commerce Ltd</name><user>ymatatov</user><email>ymatatov@pplsay.com</email></author></authors>
|
32 |
+
<date>2015-03-17</date>
|
33 |
+
<time>06:12:51</time>
|
34 |
+
<contents><target name="magecommunity"><dir name="PPLS"><dir name="Discussions"><dir name="Block"><file name="Discussions.php" hash="ba59fa56d3a766bb4df0b316424429d6"/><file name="Discussions.php~" hash="0928a09685b3bba4bd3ae081bf414416"/><file name="Virality.php" hash="89b053e0383f93c2822b7df641bf6eca"/><file name="Virality.php~" hash="89b053e0383f93c2822b7df641bf6eca"/></dir><dir name="Model"><file name="Discussions.php" hash="2b11c857db4d9b62ce34d053d59a13e4"/><file name="Discussions.php~" hash="652564d05c82fb7633f44ffcc12c0ca1"/><file name="Observer.php" hash="c7033b540b29e847ccfdc1ee0773385f"/><file name="Observer.php~" hash="068e913c39ea60f5109a5be9455918b8"/><file name="Virality.php" hash="76bd0d650be1e40354c58a55e7e1b45c"/><file name="Virality.php~" hash="dc6798b3b775f6a111fb5725350e093f"/></dir><dir name="controllers"><file name="AjaxController.php" hash="68755c25bbe223eea5b9cbafc254894b"/><file name="AjaxController.php~" hash="49050506de09082d7032e0177bcc0a6b"/></dir><dir name="etc"><file name="config.xml" hash="9cda6f6253b5079e4a5f40ef39fe293e"/><file name="config.xml~" hash="13b1f8bddb3c3e218401d0ca4608366d"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="discussions.xml" hash="ddea3c9c8230bc6fb92d70892efb7ad9"/></dir><dir name="template"><dir name="discussions"><file name="discoverajax.phtml" hash="2898a95d02519cf8054f17ce73fe424f"/><file name="discoverajax.phtml~" hash="2898a95d02519cf8054f17ce73fe424f"/><file name="discussions.phtml" hash="867f00904e201dad100c939e4938b46a"/><file name="discussions.phtml~" hash="497b2fd0fb20cb90499b0b574327ccbe"/><file name="discussions_tab.phtml" hash="a8ba7a05bd513c39d8e23ef5aaa9a713"/><file name="discussionsajax.phtml" hash="7198009ab06cff1df67af38b1a1c2bb2"/><file name="feedbackajax.phtml" hash="87dc84f946738cf45c469355a501495d"/><file name="getdiscussionsajax.phtml" hash="8a16f98dd4eee7ffd75d72d66b071ac5"/><file name="prod_discussions.phtml~" hash="a8ba7a05bd513c39d8e23ef5aaa9a713"/><file name="prod_discussions2.phtml~" hash="501c88fbd1f8a98c7cb398e4d619ad43"/><file name="pviewajax.phtml" hash="e3874bf6cd826d3e674f8c542e2dd32c"/><file name="pviewajax.phtml~" hash="8a2a525b1cf2c5a9ee680ec043454b47"/><file name="searchdiscussionsajax.phtml" hash="710a9cf544b4280dcc979780a6b27397"/><file name="virality.phtml" hash="e24ff80a61fdb0650dd6ac9579e371e5"/><file name="virality.phtml~" hash="e24ff80a61fdb0650dd6ac9579e371e5"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="discussions"><file name="discussions.phtml" hash="b628c9e68d54b18402717adc4a9129c7"/><file name="discussions.phtml~" hash="ee53c50d252f9b72db691094f4c38294"/><file name="prod_discussions.phtml~" hash="a8ba7a05bd513c39d8e23ef5aaa9a713"/><file name="prod_discussions2.phtml~" hash="501c88fbd1f8a98c7cb398e4d619ad43"/><file name="virality.phtml~" hash="e5f7560a0fc7a498dfda94a62346a139"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="discussions"><file name="discussions.phtml" hash="b9e9115f6a44880a2bfad45b5edffcc1"/><file name="discussions.phtml~" hash="0a18e82fbfe7848c311cc265ac948be4"/><file name="prod_discussions.phtml~" hash="a8ba7a05bd513c39d8e23ef5aaa9a713"/><file name="prod_discussions2.phtml~" hash="501c88fbd1f8a98c7cb398e4d619ad43"/><file name="virality.phtml~" hash="41cd911fb7a8e96e6e12d01cea97fba1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PPLS_Discussions.xml" hash="ac7b6141ef009aa254ead448c9720e95"/></dir></target></contents>
|
35 |
<compatible/>
|
36 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name/><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
|
37 |
</package>
|