Version Notes
- Added responsive layout support
- Fixed Magento 1.9 CSS issues
Download this release
Release Info
Developer | PPLSAY Commerce Ltd |
Extension | PPLSAY_Social_Discussions |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- app/code/community/PPLS/Discussions/Block/Discussions.php +54 -6
- app/code/community/PPLS/Discussions/Block/Discussions.php~ +115 -0
- app/code/community/PPLS/Discussions/Block/Virality.php +3 -4
- app/code/community/PPLS/Discussions/Block/Virality.php~ +6 -5
- app/code/community/PPLS/Discussions/Model/Discussions.php +142 -98
- app/code/community/PPLS/Discussions/Model/Discussions.php~ +126 -95
- app/code/community/PPLS/Discussions/Model/Observer.php +23 -2
- app/code/community/PPLS/Discussions/Model/Observer.php~ +25 -3
- app/code/community/PPLS/Discussions/Model/Virality.php +8 -5
- app/code/community/PPLS/Discussions/Model/Virality.php~ +8 -5
- app/code/community/PPLS/Discussions/controllers/DiscussionsController.php +0 -184
- app/code/community/PPLS/Discussions/etc/config.xml +11 -17
- app/code/community/PPLS/Discussions/etc/config.xml~ +11 -28
- app/design/frontend/base/default/layout/discussions.xml +10 -204
- app/design/frontend/base/default/template/discussions/discussions.phtml +18 -12
- app/design/frontend/base/default/template/discussions/discussions.phtml~ +40 -0
- app/design/frontend/base/default/template/discussions/discussions_tab.phtml +4 -0
- app/design/frontend/base/default/template/discussions/prod_discussions.phtml~ +4 -0
- app/design/frontend/base/default/template/discussions/prod_discussions2.phtml~ +34 -0
- app/design/frontend/base/default/template/discussions/product/tabs.phtml +0 -39
- app/design/frontend/base/default/template/discussions/product/tabs.phtml~ +0 -39
- app/design/frontend/base/default/template/discussions/product/view.phtml +0 -180
- app/design/frontend/base/default/template/discussions/product/virality.phtml +0 -11
- app/design/frontend/base/default/template/discussions/virality.phtml +3 -4
- app/design/frontend/base/default/template/discussions/virality.phtml~ +3 -4
- app/design/frontend/default/default/template/discussions/discussions.phtml +49 -0
- app/design/frontend/default/default/template/discussions/discussions.phtml~ +49 -0
- app/design/frontend/default/default/template/discussions/prod_discussions.phtml~ +4 -0
- app/design/frontend/default/default/template/discussions/prod_discussions2.phtml~ +34 -0
- app/design/frontend/default/default/template/discussions/virality.phtml~ +12 -0
- app/design/frontend/rwd/default/template/discussions/discussions.phtml +39 -0
- app/design/frontend/rwd/default/template/discussions/discussions.phtml~ +39 -0
- app/design/frontend/rwd/default/template/discussions/prod_discussions.phtml~ +4 -0
- app/design/frontend/rwd/default/template/discussions/prod_discussions2.phtml~ +34 -0
- app/design/frontend/rwd/default/template/discussions/virality.phtml~ +12 -0
- package.xml +19 -23
app/code/community/PPLS/Discussions/Block/Discussions.php
CHANGED
@@ -9,19 +9,38 @@ class PPLS_Discussions_Block_Discussions extends Mage_Core_Block_Template
|
|
9 |
}
|
10 |
|
11 |
public function getDiscussions()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
{
|
13 |
$model = Mage::getSingleton('discussions/discussions');
|
14 |
|
15 |
$searchParams =$model->getSearchParams();
|
16 |
if(null==$searchParams)
|
17 |
{
|
18 |
-
$myProductName =$
|
19 |
-
$
|
|
|
20 |
}
|
21 |
|
22 |
-
return $
|
23 |
-
|
24 |
}
|
|
|
|
|
25 |
public function getURLparams()
|
26 |
{
|
27 |
$model = Mage::getSingleton('discussions/discussions');
|
@@ -30,7 +49,7 @@ class PPLS_Discussions_Block_Discussions extends Mage_Core_Block_Template
|
|
30 |
$rows =$model->getRows();
|
31 |
$sort =$model->getSort();
|
32 |
$filters =$model->getFilters();
|
33 |
-
$myProductName =$
|
34 |
|
35 |
return "?productName=".$myProductName."&from=".$from."&rows=".$rows."&sort=".$sort."&filters=".$filters;
|
36 |
|
@@ -42,7 +61,29 @@ class PPLS_Discussions_Block_Discussions extends Mage_Core_Block_Template
|
|
42 |
|
43 |
$myProductName =$model->getProductName();
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
}
|
48 |
|
@@ -67,6 +108,13 @@ class PPLS_Discussions_Block_Discussions extends Mage_Core_Block_Template
|
|
67 |
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
|
72 |
}
|
9 |
}
|
10 |
|
11 |
public function getDiscussions()
|
12 |
+
{
|
13 |
+
$model = Mage::getSingleton('discussions/discussions');
|
14 |
+
$sparams = $this->generateSearchParams();
|
15 |
+
|
16 |
+
return $model->getDiscussionsVer1($sparams,false);
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
public function productView()
|
21 |
+
{
|
22 |
+
$model = Mage::getSingleton('discussions/discussions');
|
23 |
+
$sparams = $this->generateSearchParams();
|
24 |
+
|
25 |
+
return $model->getDiscussionsVer1($sparams,true);
|
26 |
+
}
|
27 |
+
|
28 |
+
public function generateSearchParams()
|
29 |
{
|
30 |
$model = Mage::getSingleton('discussions/discussions');
|
31 |
|
32 |
$searchParams =$model->getSearchParams();
|
33 |
if(null==$searchParams)
|
34 |
{
|
35 |
+
$myProductName =$this->getProductName();
|
36 |
+
$myProductId =$this->getProductId();
|
37 |
+
$searchParams="{\"item_name\":\"".$myProductName."\",\"accountItemId\":$myProductId}";
|
38 |
}
|
39 |
|
40 |
+
return $searchParams;
|
|
|
41 |
}
|
42 |
+
|
43 |
+
|
44 |
public function getURLparams()
|
45 |
{
|
46 |
$model = Mage::getSingleton('discussions/discussions');
|
49 |
$rows =$model->getRows();
|
50 |
$sort =$model->getSort();
|
51 |
$filters =$model->getFilters();
|
52 |
+
$myProductName =$this->getProductName();
|
53 |
|
54 |
return "?productName=".$myProductName."&from=".$from."&rows=".$rows."&sort=".$sort."&filters=".$filters;
|
55 |
|
61 |
|
62 |
$myProductName =$model->getProductName();
|
63 |
|
64 |
+
if($myProductName==null && $this->getParentBlock()->getProduct()!=null)
|
65 |
+
{
|
66 |
+
|
67 |
+
$myProductName=$this->getParentBlock()->getProduct()->getName();
|
68 |
+
}
|
69 |
+
|
70 |
+
return $myProductName;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getProductId()
|
75 |
+
{
|
76 |
+
$model = Mage::getSingleton('discussions/discussions');
|
77 |
+
|
78 |
+
$myProductId =$model->getProductId();
|
79 |
+
|
80 |
+
if($myProductId==null && $this->getParentBlock()->getProduct()!=null)
|
81 |
+
{
|
82 |
+
|
83 |
+
$myProductId=$this->getParentBlock()->getProduct()->getId();
|
84 |
+
}
|
85 |
+
|
86 |
+
return $myProductId;
|
87 |
|
88 |
}
|
89 |
|
108 |
|
109 |
}
|
110 |
|
111 |
+
public function getPPLSayCdnURL()
|
112 |
+
{
|
113 |
+
$model = Mage::getSingleton('discussions/discussions');
|
114 |
+
|
115 |
+
return $model->getPPLSayCDNBaseURL();
|
116 |
+
|
117 |
+
}
|
118 |
|
119 |
|
120 |
}
|
app/code/community/PPLS/Discussions/Block/Discussions.php~
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class PPLS_Discussions_Block_Discussions extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
$this->setTemplate('discussions/discussions.phtml');
|
8 |
+
parent::__construct();
|
9 |
+
}
|
10 |
+
|
11 |
+
public function getDiscussions()
|
12 |
+
{
|
13 |
+
$model = Mage::getSingleton('discussions/discussions');
|
14 |
+
$sparams = $this->generateSearchParams();
|
15 |
+
|
16 |
+
return $model->getDiscussionsVer1($sparams,false);
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
public function productView()
|
21 |
+
{
|
22 |
+
$model = Mage::getSingleton('discussions/discussions');
|
23 |
+
$sparams = $this->generateSearchParams();
|
24 |
+
|
25 |
+
return $model->getDiscussionsVer1($sparams,true);
|
26 |
+
}
|
27 |
+
|
28 |
+
public function generateSearchParams()
|
29 |
+
{
|
30 |
+
$model = Mage::getSingleton('discussions/discussions');
|
31 |
+
|
32 |
+
$searchParams =$model->getSearchParams();
|
33 |
+
if(null==$searchParams)
|
34 |
+
{
|
35 |
+
$myProductName =$this->getProductName();
|
36 |
+
$myProductId =$this->getProductId();
|
37 |
+
$searchParams="{\"item_name\":\"".$myProductName."\",\"accountItemId\":$myProductId}";
|
38 |
+
}
|
39 |
+
|
40 |
+
return $searchParams;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
public function getURLparams()
|
45 |
+
{
|
46 |
+
$model = Mage::getSingleton('discussions/discussions');
|
47 |
+
|
48 |
+
$from =$model->getFrom();
|
49 |
+
$rows =$model->getRows();
|
50 |
+
$sort =$model->getSort();
|
51 |
+
$filters =$model->getFilters();
|
52 |
+
$myProductName =$this->getProductName();
|
53 |
+
|
54 |
+
return "?productName=".$myProductName."&from=".$from."&rows=".$rows."&sort=".$sort."&filters=".$filters;
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getProductName()
|
59 |
+
{
|
60 |
+
$model = Mage::getSingleton('discussions/discussions');
|
61 |
+
|
62 |
+
$myProductName =$model->getProductName();
|
63 |
+
|
64 |
+
if($myProductName==null && $this->getParentBlock()->getProduct()!=null)
|
65 |
+
{
|
66 |
+
|
67 |
+
$myProductName=$this->getParentBlock()->getProduct()->getName();
|
68 |
+
}
|
69 |
+
|
70 |
+
return $myProductName;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getProductId()
|
75 |
+
{
|
76 |
+
$model = Mage::getSingleton('discussions/discussions');
|
77 |
+
|
78 |
+
$myProductId =$model->getProductId();
|
79 |
+
|
80 |
+
if($myProductId==null && $this->getParentBlock()->getProduct()!=null)
|
81 |
+
{
|
82 |
+
|
83 |
+
$myProductId=$this->getParentBlock()->getProduct()->getId();
|
84 |
+
}
|
85 |
+
|
86 |
+
return $myProductId;
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
public function getDiscussionByID()
|
91 |
+
{
|
92 |
+
$model = Mage::getSingleton('discussions/discussions');
|
93 |
+
|
94 |
+
$discussionParams =$model->getDiscussionParams();
|
95 |
+
|
96 |
+
return $model->getDiscussionById($discussionParams);
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
public function sendFeedback()
|
102 |
+
{
|
103 |
+
$model = Mage::getSingleton('discussions/discussions');
|
104 |
+
|
105 |
+
$feedbackParams =$model->getFeedbackParams();
|
106 |
+
|
107 |
+
return $model->sendFeedback($feedbackParams);
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
|
app/code/community/PPLS/Discussions/Block/Virality.php
CHANGED
@@ -37,7 +37,7 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
37 |
|
38 |
}
|
39 |
|
40 |
-
if($thisProductDiscussionCount["status"]==
|
41 |
{
|
42 |
$this->sendToDiscovery($product,$model);
|
43 |
return;
|
@@ -45,7 +45,7 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
45 |
}
|
46 |
else
|
47 |
{
|
48 |
-
if($thisProductDiscussionCount["status"]==
|
49 |
{
|
50 |
$content = $thisProductDiscussionCount["content"];
|
51 |
$this->count=$content["count"];
|
@@ -83,7 +83,6 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
83 |
public function getProductUrl($productId)
|
84 |
{
|
85 |
$_product = Mage::getModel('catalog/product')->load($productId);
|
86 |
-
|
87 |
-
return Mage::getBaseUrl()."discussions/discussions/list/id/".$productId."/category/".$_categories[0];
|
88 |
}
|
89 |
}
|
37 |
|
38 |
}
|
39 |
|
40 |
+
if($thisProductDiscussionCount["status"]=="NOT_FOUND_ITEM" && $discussionCounts==null)
|
41 |
{
|
42 |
$this->sendToDiscovery($product,$model);
|
43 |
return;
|
45 |
}
|
46 |
else
|
47 |
{
|
48 |
+
if($thisProductDiscussionCount["status"]=="SUCCESS")
|
49 |
{
|
50 |
$content = $thisProductDiscussionCount["content"];
|
51 |
$this->count=$content["count"];
|
83 |
public function getProductUrl($productId)
|
84 |
{
|
85 |
$_product = Mage::getModel('catalog/product')->load($productId);
|
86 |
+
return $_product->getProductUrl();
|
|
|
87 |
}
|
88 |
}
|
app/code/community/PPLS/Discussions/Block/Virality.php~
CHANGED
@@ -37,7 +37,7 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
37 |
|
38 |
}
|
39 |
|
40 |
-
if($thisProductDiscussionCount["status"]==
|
41 |
{
|
42 |
$this->sendToDiscovery($product,$model);
|
43 |
return;
|
@@ -45,7 +45,7 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
45 |
}
|
46 |
else
|
47 |
{
|
48 |
-
if($thisProductDiscussionCount["status"]==
|
49 |
{
|
50 |
$content = $thisProductDiscussionCount["content"];
|
51 |
$this->count=$content["count"];
|
@@ -59,7 +59,8 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
59 |
|
60 |
$productID = $product->getId();
|
61 |
|
62 |
-
//check if the item was already sent for discovery
|
|
|
63 |
if(Mage::getModel('core/cookie')->get($productID)==null)
|
64 |
{
|
65 |
$productBrand = $product->getAttributeText('manufacturer');
|
@@ -82,7 +83,7 @@ class PPLS_Discussions_Block_Virality extends Mage_Core_Block_Template
|
|
82 |
public function getProductUrl($productId)
|
83 |
{
|
84 |
$_product = Mage::getModel('catalog/product')->load($productId);
|
85 |
-
|
86 |
-
return
|
87 |
}
|
88 |
}
|
37 |
|
38 |
}
|
39 |
|
40 |
+
if($thisProductDiscussionCount["status"]=="NOT_FOUND_ITEM" && $discussionCounts==null)
|
41 |
{
|
42 |
$this->sendToDiscovery($product,$model);
|
43 |
return;
|
45 |
}
|
46 |
else
|
47 |
{
|
48 |
+
if($thisProductDiscussionCount["status"]=="SUCCESS")
|
49 |
{
|
50 |
$content = $thisProductDiscussionCount["content"];
|
51 |
$this->count=$content["count"];
|
59 |
|
60 |
$productID = $product->getId();
|
61 |
|
62 |
+
//check if the item was already sent for discovery.
|
63 |
+
//After sending to discovery we will store it on cookie
|
64 |
if(Mage::getModel('core/cookie')->get($productID)==null)
|
65 |
{
|
66 |
$productBrand = $product->getAttributeText('manufacturer');
|
83 |
public function getProductUrl($productId)
|
84 |
{
|
85 |
$_product = Mage::getModel('catalog/product')->load($productId);
|
86 |
+
//$_categories = $_product->getCategoryIds();
|
87 |
+
return $_product->getProductUrl();
|
88 |
}
|
89 |
}
|
app/code/community/PPLS/Discussions/Model/Discussions.php
CHANGED
@@ -1,154 +1,198 @@
|
|
1 |
<?php
|
2 |
class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
3 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('discussions/discussions');
|
8 |
-
}
|
9 |
|
10 |
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
{
|
15 |
-
try{
|
16 |
-
$account_id= Mage::getModel('core/variable')->loadByCode('ppls_account_id')->getData('store_plain_value');
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
$searchParams = "{\"account_id\":\"".$account_id."\" ,".substr($searchParams, 1);
|
21 |
|
22 |
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$result = curl_exec($ch);
|
31 |
-
curl_close($ch);
|
32 |
-
return $result;
|
33 |
|
34 |
-
|
|
|
|
|
35 |
|
|
|
|
|
|
|
|
|
36 |
return "";
|
37 |
}
|
38 |
-
return "";
|
39 |
-
}
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
-
|
47 |
-
//
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
53 |
$productNames[$_itemId] = $_item->getName();
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
-
|
60 |
|
61 |
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
$result = curl_exec($ch);
|
70 |
-
$jsonResult = json_decode($result,true);
|
71 |
-
curl_close($ch);
|
72 |
-
Mage::getSingleton('core/session')->setDisccussionCounts($jsonResult);
|
73 |
-
|
74 |
-
} catch (Exception $e) {
|
75 |
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
-
return $this;
|
79 |
-
}
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
87 |
|
88 |
-
$discussionParams = "{\"account_id\":\"".$account_id."\" ,".substr($discussionParams, 1);
|
89 |
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
$ch = curl_init($client_url);
|
93 |
-
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
94 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS,$discussionParams);
|
95 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
96 |
-
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($discussionParams)));
|
97 |
-
|
98 |
-
$result = curl_exec($ch);
|
99 |
-
curl_close($ch);
|
100 |
-
return $result;
|
101 |
|
102 |
-
} catch (Exception $e) {
|
103 |
return null;
|
104 |
}
|
105 |
-
|
106 |
-
|
107 |
-
return null;
|
108 |
-
}
|
109 |
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
116 |
|
117 |
-
$client_url = Mage::getModel('core/variable')->loadByCode('ppls_web_services_url')->getData('store_plain_value').'/rest/conversations/ver1/feedback';
|
118 |
-
$postData = "{\"account_id\":\"".$account_id."\" ,".substr($feedbackParams, 1);
|
119 |
|
|
|
|
|
120 |
|
|
|
|
|
121 |
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
-
|
126 |
-
|
127 |
|
128 |
-
|
129 |
-
curl_setopt($ch,CURLOPT_URL,$client_url);
|
130 |
-
curl_setopt($ch,CURLOPT_POST,$postlength);
|
131 |
-
curl_setopt($ch,CURLOPT_POSTFIELDS,$postData);
|
132 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
133 |
-
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' .$postlength));
|
134 |
-
$response = curl_exec($ch);
|
135 |
|
136 |
-
|
137 |
-
|
|
|
138 |
|
139 |
-
return $response;
|
140 |
|
141 |
-
} catch (Exception $e) {
|
142 |
return null;
|
143 |
}
|
144 |
-
|
145 |
-
|
146 |
-
return null;
|
147 |
-
}
|
148 |
-
|
149 |
|
150 |
|
|
|
|
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
}
|
1 |
<?php
|
2 |
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 |
|
14 |
|
15 |
|
16 |
+
public function getDiscussionsVer1($searchParams,$isProductView)
|
17 |
+
{
|
18 |
+
try{
|
19 |
+
$callName = "content/";
|
20 |
+
if($isProductView)
|
21 |
+
$callName="pview/";
|
22 |
+
$locale = Mage::app()->getLocale()->getLocaleCode();
|
23 |
+
$account_id= $this->getPPLSayAccount();
|
24 |
|
25 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/'.$callName;
|
|
|
|
|
|
|
26 |
|
27 |
+
$searchParams = "{\"account_id\":\"".$account_id."\" ,\"locale\":\"".$local."\",".substr($searchParams, 1);
|
|
|
|
|
28 |
|
29 |
|
30 |
|
31 |
+
$ch = curl_init($client_url);
|
32 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
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 |
|
37 |
+
$result = curl_exec($ch);
|
38 |
+
curl_close($ch);
|
39 |
+
return $result;
|
40 |
|
41 |
+
} catch (Exception $e) {
|
42 |
+
|
43 |
+
return "";
|
44 |
+
}
|
45 |
return "";
|
46 |
}
|
|
|
|
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
+
|
54 |
+
//This functions generates discussions counts and stores the result on session.
|
55 |
+
//Note session in this case (php limit) is request limited => each request will refresh counts even if it's pagenation
|
56 |
+
public function generateDiscussionCounts($collection)
|
57 |
+
{
|
58 |
+
$counts = array();
|
59 |
+
$productNames = array();
|
60 |
+
foreach ($collection->getItems() as $_itemId => $_item) {
|
61 |
$productNames[$_itemId] = $_item->getName();
|
62 |
+
}
|
63 |
+
try{
|
64 |
+
$productNamesStr = json_encode($productNames);
|
65 |
+
$account_id=$this->getPPLSayAccount();
|
66 |
|
67 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/multi_count_by_id/'.$account_id;
|
68 |
|
69 |
|
70 |
|
71 |
+
$ch = curl_init($client_url);
|
72 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
73 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,$productNamesStr);
|
74 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
75 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($productNamesStr)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
$result = curl_exec($ch);
|
78 |
+
$jsonResult = json_decode($result,true);
|
79 |
+
curl_close($ch);
|
80 |
+
Mage::getSingleton('core/session')->setDisccussionCounts($jsonResult);
|
81 |
+
|
82 |
+
} catch (Exception $e) {
|
83 |
+
|
84 |
+
return null;
|
85 |
+
}
|
86 |
+
return $this;
|
87 |
}
|
|
|
|
|
88 |
|
89 |
+
public function getDiscussionByID($discussionParams)
|
90 |
+
{
|
91 |
+
try{
|
92 |
+
|
93 |
+
$account_id= $this->getPPLSayAccount();
|
94 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/discussion';
|
95 |
+
|
96 |
+
$discussionParams = "{\"account_id\":\"".$account_id."\" ,".substr($discussionParams, 1);
|
97 |
|
|
|
98 |
|
99 |
|
100 |
+
$ch = curl_init($client_url);
|
101 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
102 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,$discussionParams);
|
103 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
104 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($discussionParams)));
|
105 |
+
|
106 |
+
$result = curl_exec($ch);
|
107 |
+
curl_close($ch);
|
108 |
+
return $result;
|
109 |
+
|
110 |
+
} catch (Exception $e) {
|
111 |
+
return null;
|
112 |
+
}
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
|
|
115 |
return null;
|
116 |
}
|
|
|
|
|
|
|
|
|
117 |
|
118 |
|
119 |
+
public function sendFeedback($feedbackParams)
|
120 |
+
{
|
121 |
+
try{
|
122 |
+
|
123 |
+
$account_id= $this->getPPLSayAccount();
|
124 |
+
|
125 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/feedback';
|
126 |
+
$postData = "{\"account_id\":\"".$account_id."\" ,".substr($feedbackParams, 1);
|
127 |
+
|
128 |
|
|
|
|
|
129 |
|
130 |
+
//Get length of post
|
131 |
+
$postlength = strlen($postData );
|
132 |
|
133 |
+
//open connection
|
134 |
+
$ch = curl_init();
|
135 |
|
136 |
+
//set the url, number of POST vars, POST data
|
137 |
+
curl_setopt($ch,CURLOPT_URL,$client_url);
|
138 |
+
curl_setopt($ch,CURLOPT_POST,$postlength);
|
139 |
+
curl_setopt($ch,CURLOPT_POSTFIELDS,$postData);
|
140 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
141 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' .$postlength));
|
142 |
+
$response = curl_exec($ch);
|
143 |
|
144 |
+
//close connection
|
145 |
+
curl_close($ch);
|
146 |
|
147 |
+
return $response;
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
+
} catch (Exception $e) {
|
150 |
+
return null;
|
151 |
+
}
|
152 |
|
|
|
153 |
|
|
|
154 |
return null;
|
155 |
}
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
|
158 |
+
public function getPPLSayBaseURL()
|
159 |
+
{
|
160 |
|
161 |
+
$baseURL = trim(Mage::getModel('core/variable')->loadByCode('ppls_web_services_url')->getData('store_plain_value'));
|
162 |
+
if($baseURL==null || $baseURL=="")
|
163 |
+
{
|
164 |
+
$baseURL = $this->defaultPPLSayURL;
|
165 |
+
}
|
166 |
+
else if(substr($baseURL, -1)=="/")
|
167 |
+
{
|
168 |
+
$baseURL=substr($baseURL, 0, -1);
|
169 |
+
}
|
170 |
+
return $baseURL;
|
171 |
+
}
|
172 |
|
173 |
+
public function getPPLSayCDNBaseURL()
|
174 |
+
{
|
175 |
+
|
176 |
+
$baseURL = trim(Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value'));
|
177 |
+
if($baseURL==null || $baseURL=="")
|
178 |
+
{
|
179 |
+
$baseURL = $this->defaultPPLSayURL;
|
180 |
+
}
|
181 |
+
else if(substr($baseURL, -1)=="/")
|
182 |
+
{
|
183 |
+
$baseURL=substr($baseURL, 0, -1);
|
184 |
+
}
|
185 |
+
return $baseURL;
|
186 |
+
}
|
187 |
+
public function getPPLSayAccount()
|
188 |
+
{
|
189 |
+
|
190 |
+
$accountID = trim(Mage::getModel('core/variable')->loadByCode('ppls_account_id')->getData('store_plain_value'));
|
191 |
+
if($accountID==null || $accountID=="")
|
192 |
+
{
|
193 |
+
$accountID = $this->defaultPPLSayAccountID;
|
194 |
+
}
|
195 |
+
return $accountID;
|
196 |
+
}
|
197 |
|
198 |
}
|
app/code/community/PPLS/Discussions/Model/Discussions.php~
CHANGED
@@ -1,42 +1,49 @@
|
|
1 |
<?php
|
2 |
class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
3 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
protected function _construct()
|
6 |
-
{
|
7 |
-
$this->_init('discussions/discussions');
|
8 |
-
}
|
9 |
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
|
|
12 |
|
13 |
-
|
14 |
-
{
|
15 |
-
try{
|
16 |
-
$account_id= Mage::getModel('core/variable')->loadByCode('ppls_account_id')->getData('store_plain_value');
|
17 |
|
18 |
-
$client_url = Mage::getModel('core/variable')->loadByCode('ppls_web_services_url')->getData('store_plain_value').'/rest/conversations/ver1/content/';
|
19 |
-
|
20 |
-
$searchParams = "{\"account_id\":\"".$account_id."\" ,".substr($searchParams, 1);
|
21 |
|
22 |
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
28 |
-
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($searchParams)));
|
29 |
-
|
30 |
-
$result = curl_exec($ch);
|
31 |
-
curl_close($ch);
|
32 |
-
return $result;
|
33 |
|
34 |
-
|
35 |
|
|
|
|
|
36 |
return "";
|
37 |
}
|
38 |
-
return "";
|
39 |
-
}
|
40 |
|
41 |
|
42 |
|
@@ -44,110 +51,134 @@ class PPLS_Discussions_Model_Discussions extends Mage_Core_Model_Abstract
|
|
44 |
|
45 |
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
52 |
$productNames[$_itemId] = $_item->getName();
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
|
58 |
-
|
59 |
|
60 |
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
$result = curl_exec($ch);
|
69 |
-
$jsonResult = json_decode($result,true);
|
70 |
-
curl_close($ch);
|
71 |
-
Mage::getSingleton('core/session')->setDisccussionCounts($jsonResult);
|
72 |
-
|
73 |
-
} catch (Exception $e) {
|
74 |
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
-
return $this;
|
78 |
-
}
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
|
87 |
-
|
88 |
|
89 |
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
} catch (Exception $e) {
|
102 |
return null;
|
103 |
}
|
104 |
-
|
105 |
-
|
106 |
-
return null;
|
107 |
-
}
|
108 |
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
|
116 |
-
|
117 |
-
|
118 |
|
119 |
|
120 |
|
121 |
-
|
122 |
-
|
123 |
|
124 |
-
|
125 |
-
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
-
return $response;
|
139 |
|
140 |
-
} catch (Exception $e) {
|
141 |
return null;
|
142 |
}
|
143 |
-
|
144 |
-
|
145 |
-
return null;
|
146 |
-
}
|
147 |
|
148 |
|
|
|
|
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
|
|
|
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
}
|
1 |
<?php
|
2 |
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 |
|
|
|
|
|
|
|
|
|
14 |
|
15 |
|
16 |
+
public function getDiscussionsVer1($searchParams,$isProductView)
|
17 |
+
{
|
18 |
+
try{
|
19 |
+
$callName = "content/";
|
20 |
+
if($isProductView)
|
21 |
+
$callName="pview/";
|
22 |
+
$locale = Mage::app()->getLocale()->getLocaleCode();
|
23 |
+
$account_id= $this->getPPLSayAccount();
|
24 |
|
25 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/'.$callName;
|
26 |
|
27 |
+
$searchParams = "{\"account_id\":\"".$account_id."\" ,\"locale\":\"".$local."\",".substr($searchParams, 1);
|
|
|
|
|
|
|
28 |
|
|
|
|
|
|
|
29 |
|
30 |
|
31 |
+
$ch = curl_init($client_url);
|
32 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
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 |
|
37 |
+
$result = curl_exec($ch);
|
38 |
+
curl_close($ch);
|
39 |
+
return $result;
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
} catch (Exception $e) {
|
42 |
|
43 |
+
return "";
|
44 |
+
}
|
45 |
return "";
|
46 |
}
|
|
|
|
|
47 |
|
48 |
|
49 |
|
51 |
|
52 |
|
53 |
|
54 |
+
//This functions generates discussions counts and stores the result on session.
|
55 |
+
//Note session in this case (php limit) is request limited => each request will refresh counts even if it's pagenation
|
56 |
+
public function generateDiscussionCounts($collection)
|
57 |
+
{
|
58 |
+
$counts = array();
|
59 |
+
$productNames = array();
|
60 |
+
foreach ($collection->getItems() as $_itemId => $_item) {
|
61 |
$productNames[$_itemId] = $_item->getName();
|
62 |
+
}
|
63 |
+
try{
|
64 |
+
$productNamesStr = json_encode($productNames);
|
65 |
+
$account_id=$this->getPPLSayAccount();
|
66 |
|
67 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/multi_count_by_id/'.$account_id;
|
68 |
|
69 |
|
70 |
|
71 |
+
$ch = curl_init($client_url);
|
72 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
73 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,$productNamesStr);
|
74 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
75 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($productNamesStr)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
$result = curl_exec($ch);
|
78 |
+
$jsonResult = json_decode($result,true);
|
79 |
+
curl_close($ch);
|
80 |
+
Mage::getSingleton('core/session')->setDisccussionCounts($jsonResult);
|
81 |
+
|
82 |
+
} catch (Exception $e) {
|
83 |
+
|
84 |
+
return null;
|
85 |
+
}
|
86 |
+
return $this;
|
87 |
}
|
|
|
|
|
88 |
|
89 |
+
public function getDiscussionByID($discussionParams)
|
90 |
+
{
|
91 |
+
try{
|
92 |
+
|
93 |
+
$account_id= $this->getPPLSayAccount();
|
94 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/discussion';
|
95 |
|
96 |
+
$discussionParams = "{\"account_id\":\"".$account_id."\" ,".substr($discussionParams, 1);
|
97 |
|
98 |
|
99 |
|
100 |
+
$ch = curl_init($client_url);
|
101 |
+
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
102 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,$discussionParams);
|
103 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
104 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($discussionParams)));
|
105 |
+
|
106 |
+
$result = curl_exec($ch);
|
107 |
+
curl_close($ch);
|
108 |
+
return $result;
|
109 |
+
|
110 |
+
} catch (Exception $e) {
|
111 |
+
return null;
|
112 |
+
}
|
113 |
+
|
114 |
|
|
|
115 |
return null;
|
116 |
}
|
|
|
|
|
|
|
|
|
117 |
|
118 |
|
119 |
+
public function sendFeedback($feedbackParams)
|
120 |
+
{
|
121 |
+
try{
|
122 |
+
|
123 |
+
$account_id= $this->getPPLSayAccount();
|
124 |
|
125 |
+
$client_url = $this->getPPLSayBaseURL().'/rest/conversations/ver1/feedback';
|
126 |
+
$postData = "{\"account_id\":\"".$account_id."\" ,".substr($feedbackParams, 1);
|
127 |
|
128 |
|
129 |
|
130 |
+
//Get length of post
|
131 |
+
$postlength = strlen($postData );
|
132 |
|
133 |
+
//open connection
|
134 |
+
$ch = curl_init();
|
135 |
|
136 |
+
//set the url, number of POST vars, POST data
|
137 |
+
curl_setopt($ch,CURLOPT_URL,$client_url);
|
138 |
+
curl_setopt($ch,CURLOPT_POST,$postlength);
|
139 |
+
curl_setopt($ch,CURLOPT_POSTFIELDS,$postData);
|
140 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
141 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' .$postlength));
|
142 |
+
$response = curl_exec($ch);
|
143 |
|
144 |
+
//close connection
|
145 |
+
curl_close($ch);
|
146 |
+
|
147 |
+
return $response;
|
148 |
+
|
149 |
+
} catch (Exception $e) {
|
150 |
+
return null;
|
151 |
+
}
|
152 |
|
|
|
153 |
|
|
|
154 |
return null;
|
155 |
}
|
|
|
|
|
|
|
|
|
156 |
|
157 |
|
158 |
+
public function getPPLSayBaseURL()
|
159 |
+
{
|
160 |
|
161 |
+
$baseURL = trim(Mage::getModel('core/variable')->loadByCode('ppls_web_services_url')->getData('store_plain_value'));
|
162 |
+
if($baseURL==null || $baseURL=="")
|
163 |
+
{
|
164 |
+
$baseURL = $this->defaultPPLSayURL;
|
165 |
+
}
|
166 |
+
else if(substr($baseURL, -1)=="/")
|
167 |
+
{
|
168 |
+
$baseURL=substr($baseURL, 0, -1);
|
169 |
+
}
|
170 |
+
return $baseURL;
|
171 |
+
}
|
172 |
|
173 |
+
public function getPPLSayAccount()
|
174 |
+
{
|
175 |
|
176 |
+
$accountID = trim(Mage::getModel('core/variable')->loadByCode('ppls_account_id')->getData('store_plain_value'));
|
177 |
+
if($accountID==null || $accountID=="")
|
178 |
+
{
|
179 |
+
$accountID = $this->defaultPPLSayAccountID;
|
180 |
+
}
|
181 |
+
return $accountID;
|
182 |
+
}
|
183 |
|
184 |
}
|
app/code/community/PPLS/Discussions/Model/Observer.php
CHANGED
@@ -17,10 +17,10 @@ The flow: product_price load event=> insertBlock observer => virality.phtml =>
|
|
17 |
/*get Block type*/
|
18 |
$_type = $_block->getType();
|
19 |
$_template = $_block->getTemplate();
|
20 |
-
$virality_block=$_block->getLayout()->createBlock('discussions/virality');
|
21 |
-
$virality_block->setTemplate('discussions/virality.phtml');
|
22 |
/*Check block type*/
|
23 |
if ($_type == 'catalog/product_price' && $_template!='catalog/product/view/tierprices.phtml') {
|
|
|
|
|
24 |
/*Clone block instance*/
|
25 |
$_child = clone $_block;
|
26 |
/*set another type for block*/
|
@@ -31,6 +31,27 @@ The flow: product_price load event=> insertBlock observer => virality.phtml =>
|
|
31 |
$_block->setTemplate('discussions/virality.phtml');
|
32 |
$_block->setChild('virality',$virality_block);
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
}
|
36 |
|
17 |
/*get Block type*/
|
18 |
$_type = $_block->getType();
|
19 |
$_template = $_block->getTemplate();
|
|
|
|
|
20 |
/*Check block type*/
|
21 |
if ($_type == 'catalog/product_price' && $_template!='catalog/product/view/tierprices.phtml') {
|
22 |
+
$virality_block=$_block->getLayout()->createBlock('discussions/virality');
|
23 |
+
$virality_block->setTemplate('discussions/virality.phtml');
|
24 |
/*Clone block instance*/
|
25 |
$_child = clone $_block;
|
26 |
/*set another type for block*/
|
31 |
$_block->setTemplate('discussions/virality.phtml');
|
32 |
$_block->setChild('virality',$virality_block);
|
33 |
}
|
34 |
+
|
35 |
+
if($_type =='catalog/product_view_tabs')
|
36 |
+
{
|
37 |
+
$product = $_block->getParentBlock()->getProduct();
|
38 |
+
$model = Mage::getSingleton('discussions/discussions');
|
39 |
+
$model->setProductName($product->getName());
|
40 |
+
$model->setProductId($product->getId());
|
41 |
+
|
42 |
+
$discussions_block=$_block->getLayout()->createBlock('discussions/discussions');
|
43 |
+
$discussions_block->setTemplate('discussions/discussions_tab.phtml');
|
44 |
+
/*Clone block instance*/
|
45 |
+
$_child = clone $_block;
|
46 |
+
/*set another type for block*/
|
47 |
+
$_child->setType('discussions/block');
|
48 |
+
/*set child for block*/
|
49 |
+
$_block->setChild('child', $_child);
|
50 |
+
/*set our template*/
|
51 |
+
$_block->setTemplate('discussions/discussions_tab.phtml');
|
52 |
+
$_block->setChild('discussions',$discussions_block);
|
53 |
+
|
54 |
+
}
|
55 |
|
56 |
}
|
57 |
|
app/code/community/PPLS/Discussions/Model/Observer.php~
CHANGED
@@ -17,10 +17,10 @@ The flow: product_price load event=> insertBlock observer => virality.phtml =>
|
|
17 |
/*get Block type*/
|
18 |
$_type = $_block->getType();
|
19 |
$_template = $_block->getTemplate();
|
20 |
-
$virality_block=$_block->getLayout()->createBlock('discussions/virality');
|
21 |
-
$virality_block->setTemplate('discussions/virality.phtml');
|
22 |
/*Check block type*/
|
23 |
if ($_type == 'catalog/product_price' && $_template!='catalog/product/view/tierprices.phtml') {
|
|
|
|
|
24 |
/*Clone block instance*/
|
25 |
$_child = clone $_block;
|
26 |
/*set another type for block*/
|
@@ -31,15 +31,37 @@ The flow: product_price load event=> insertBlock observer => virality.phtml =>
|
|
31 |
$_block->setTemplate('discussions/virality.phtml');
|
32 |
$_block->setChild('virality',$virality_block);
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
}
|
36 |
|
37 |
|
38 |
/* Observer listening to event of product collection load- usually loaded on catalog view page
|
39 |
When list of products loaded we want to calculate vitality count and power of each product.
|
40 |
-
The flow: observer => discussions model
|
41 |
The output of generateDiscussionCounts is stored on session as map of product id and pair of (count and power)
|
42 |
When product block is loaded the insertBlock event is fired ->see the above event description
|
|
|
43 |
*/
|
44 |
|
45 |
public function getDiscussionCounts(Varien_Event_Observer $observer)
|
17 |
/*get Block type*/
|
18 |
$_type = $_block->getType();
|
19 |
$_template = $_block->getTemplate();
|
|
|
|
|
20 |
/*Check block type*/
|
21 |
if ($_type == 'catalog/product_price' && $_template!='catalog/product/view/tierprices.phtml') {
|
22 |
+
$virality_block=$_block->getLayout()->createBlock('discussions/virality');
|
23 |
+
$virality_block->setTemplate('discussions/virality.phtml');
|
24 |
/*Clone block instance*/
|
25 |
$_child = clone $_block;
|
26 |
/*set another type for block*/
|
31 |
$_block->setTemplate('discussions/virality.phtml');
|
32 |
$_block->setChild('virality',$virality_block);
|
33 |
}
|
34 |
+
|
35 |
+
if($_type =='catalog/product_view_tabs')
|
36 |
+
{
|
37 |
+
$product = $_block->getParentBlock()->getProduct();
|
38 |
+
$model = Mage::getSingleton('discussions/discussions');
|
39 |
+
$model->setProductName($product->getName());
|
40 |
+
$model->setProductId($product->getId());
|
41 |
+
|
42 |
+
$discussions_block=$_block->getLayout()->createBlock('discussions/discussions');
|
43 |
+
$discussions_block->setTemplate('discussions/prod_discussions.phtml');
|
44 |
+
/*Clone block instance*/
|
45 |
+
$_child = clone $_block;
|
46 |
+
/*set another type for block*/
|
47 |
+
$_child->setType('discussions/block');
|
48 |
+
/*set child for block*/
|
49 |
+
$_block->setChild('child', $_child);
|
50 |
+
/*set our template*/
|
51 |
+
$_block->setTemplate('discussions/prod_discussions.phtml');
|
52 |
+
$_block->setChild('discussions',$discussions_block);
|
53 |
+
|
54 |
+
}
|
55 |
|
56 |
}
|
57 |
|
58 |
|
59 |
/* Observer listening to event of product collection load- usually loaded on catalog view page
|
60 |
When list of products loaded we want to calculate vitality count and power of each product.
|
61 |
+
The flow: observer => discussions model => store on session
|
62 |
The output of generateDiscussionCounts is stored on session as map of product id and pair of (count and power)
|
63 |
When product block is loaded the insertBlock event is fired ->see the above event description
|
64 |
+
Note:session in this case (php limit) is stateless and request limited => each request will refresh counts even if it's pagenation
|
65 |
*/
|
66 |
|
67 |
public function getDiscussionCounts(Varien_Event_Observer $observer)
|
app/code/community/PPLS/Discussions/Model/Virality.php
CHANGED
@@ -10,10 +10,12 @@ class PPLS_Discussions_Model_Virality extends Mage_Core_Model_Abstract
|
|
10 |
public function discoverItem($productID,$productName,$productBrand,$productCategory)
|
11 |
{
|
12 |
try{
|
13 |
-
$
|
14 |
-
$client_url = Mage::getModel('core/variable')->loadByCode('ppls_web_services_url')->getData('store_plain_value').'/rest/conversations/ver1/discoverItems/'.$accountID;
|
15 |
|
16 |
-
$
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
|
@@ -41,8 +43,9 @@ class PPLS_Discussions_Model_Virality extends Mage_Core_Model_Abstract
|
|
41 |
public function initVirality($product)
|
42 |
{
|
43 |
try{
|
44 |
-
$
|
45 |
-
$
|
|
|
46 |
$ch = curl_init($client_url);
|
47 |
|
48 |
curl_setopt($ch, CURLOPT_HEADER, 0);
|
10 |
public function discoverItem($productID,$productName,$productBrand,$productCategory)
|
11 |
{
|
12 |
try{
|
13 |
+
$discussionsModel = Mage::getSingleton('discussions/discussions');
|
|
|
14 |
|
15 |
+
$accountID= $discussionsModel->getPPLSayAccount();
|
16 |
+
$client_url = $discussionsModel->getPPLSayBaseURL().'/rest/conversations/ver1/discoverItems/'.$accountID;
|
17 |
+
|
18 |
+
$itemParams = "[{\"accountItemID\":\"$productID\",\"accountItemName\":\"$productName\",\"accountBrand\":\"$productBrand\",\"accountCategory\":\"$productCategory\"}]";
|
19 |
|
20 |
|
21 |
|
43 |
public function initVirality($product)
|
44 |
{
|
45 |
try{
|
46 |
+
$discussionsModel = Mage::getSingleton('discussions/discussions');
|
47 |
+
$account_id= $discussionsModel->getPPLSayAccount();
|
48 |
+
$client_url = $discussionsModel->getPPLSayBaseURL().'/rest/conversations/count-by-id/'.$product->getId().'/'.$account_id;
|
49 |
$ch = curl_init($client_url);
|
50 |
|
51 |
curl_setopt($ch, CURLOPT_HEADER, 0);
|
app/code/community/PPLS/Discussions/Model/Virality.php~
CHANGED
@@ -10,10 +10,12 @@ class PPLS_Discussions_Model_Virality extends Mage_Core_Model_Abstract
|
|
10 |
public function discoverItem($productID,$productName,$productBrand,$productCategory)
|
11 |
{
|
12 |
try{
|
13 |
-
$
|
14 |
-
$client_url = Mage::getModel('core/variable')->loadByCode('ppls_web_services_url')->getData('store_plain_value').'/rest/conversations/ver1/discoverItems/'.$accountID;
|
15 |
|
16 |
-
$
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
|
@@ -41,8 +43,9 @@ class PPLS_Discussions_Model_Virality extends Mage_Core_Model_Abstract
|
|
41 |
public function initVirality($product)
|
42 |
{
|
43 |
try{
|
44 |
-
$
|
45 |
-
$
|
|
|
46 |
$ch = curl_init($client_url);
|
47 |
|
48 |
curl_setopt($ch, CURLOPT_HEADER, 0);
|
10 |
public function discoverItem($productID,$productName,$productBrand,$productCategory)
|
11 |
{
|
12 |
try{
|
13 |
+
$discussionsModel = Mage::getSingleton('discussions/discussions');
|
|
|
14 |
|
15 |
+
$accountID= $discussionsModel->getPPLSayAccount();
|
16 |
+
$client_url = $discussionsModel->getPPLSayBaseURL().'/rest/conversations/ver1/discoverItems/'.$accountID;
|
17 |
+
|
18 |
+
$itemParams = "[{\"accountItemID\":\"$productID\",\"accountItemName\":\"$productName\",\"accountBrand\":\"$productBrand\",\"accountCategory\":\"$productCategory\"}]";
|
19 |
|
20 |
|
21 |
|
43 |
public function initVirality($product)
|
44 |
{
|
45 |
try{
|
46 |
+
$discussionsModel = Mage::getSingleton('discussions/discussions');
|
47 |
+
$account_id= $discussionsModel->getPPLSayAccount();
|
48 |
+
$client_url = $discussionsModel->getPPLSayBaseURL().'/rest/conversations/count-by-id/'.$product->getId().'/'.$account_id;
|
49 |
$ch = curl_init($client_url);
|
50 |
|
51 |
curl_setopt($ch, CURLOPT_HEADER, 0);
|
app/code/community/PPLS/Discussions/controllers/DiscussionsController.php
DELETED
@@ -1,184 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class PPLS_Discussions_DiscussionsController extends Mage_Core_Controller_Front_Action
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
* Action list where need check enabled cookie
|
6 |
-
*
|
7 |
-
* @var array
|
8 |
-
*/
|
9 |
-
protected $_designProductSettingsApplied = array('post');
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
public function listAction()
|
14 |
-
{
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
if ($product = $this->_initProduct()) {
|
19 |
-
Mage::register('productId', $product->getId());
|
20 |
-
|
21 |
-
$design = Mage::getSingleton('catalog/design');
|
22 |
-
$settings = $design->getDesignSettings($product);
|
23 |
-
if ($settings->getCustomDesign()) {
|
24 |
-
$design->applyCustomDesign($settings->getCustomDesign());
|
25 |
-
}
|
26 |
-
$this->_initProductLayout($product);
|
27 |
-
|
28 |
-
// update breadcrumbs
|
29 |
-
if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
|
30 |
-
$breadcrumbsBlock->addCrumb('product', array(
|
31 |
-
'label' => $product->getName(),
|
32 |
-
'link' => $product->getProductUrl(),
|
33 |
-
'readonly' => true,
|
34 |
-
));
|
35 |
-
$breadcrumbsBlock->addCrumb('discussions', array('label' => Mage::helper('review')->__('Product Discussions')));
|
36 |
-
}
|
37 |
-
$model = Mage::getSingleton('discussions/discussions');
|
38 |
-
$model->setFrom(0);
|
39 |
-
$model->setRows(10);
|
40 |
-
$model->setSort('relevance_score');
|
41 |
-
$model->setFilters('no');
|
42 |
-
$model->setProductName($product->getName());
|
43 |
-
|
44 |
-
$this->renderLayout();
|
45 |
-
} elseif (!$this->getResponse()->isRedirect()) {
|
46 |
-
$this->_forward('noRoute');
|
47 |
-
}
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Initialize requested product object
|
58 |
-
*
|
59 |
-
* @return Mage_Catalog_Model_Product
|
60 |
-
*/
|
61 |
-
protected function _initProduct()
|
62 |
-
{
|
63 |
-
$categoryId = (int) $this->getRequest()->getParam('category', false);
|
64 |
-
$productId = (int) $this->getRequest()->getParam('id');
|
65 |
-
|
66 |
-
$params = new Varien_Object();
|
67 |
-
$params->setCategoryId($categoryId);
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
return Mage::helper('catalog/product')->initProduct($productId, $this, $params);
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Load product model with data by passed id.
|
76 |
-
* Return false if product was not loaded or has incorrect status.
|
77 |
-
*
|
78 |
-
* @param int $productId
|
79 |
-
* @return bool|Mage_Catalog_Model_Product
|
80 |
-
*/
|
81 |
-
protected function _loadProduct($productId)
|
82 |
-
{
|
83 |
-
if (!$productId) {
|
84 |
-
return false;
|
85 |
-
}
|
86 |
-
|
87 |
-
$product = Mage::getModel('catalog/product')
|
88 |
-
->setStoreId(Mage::app()->getStore()->getId())
|
89 |
-
->load($productId);
|
90 |
-
/* @var $product Mage_Catalog_Model_Product */
|
91 |
-
if (!$product->getId() || !$product->isVisibleInCatalog() || !$product->isVisibleInSiteVisibility()) {
|
92 |
-
return false;
|
93 |
-
}
|
94 |
-
|
95 |
-
Mage::register('current_product', $product);
|
96 |
-
Mage::register('product', $product);
|
97 |
-
|
98 |
-
return $product;
|
99 |
-
}
|
100 |
-
/**
|
101 |
-
* Load specific layout handles by product type id
|
102 |
-
*
|
103 |
-
*/
|
104 |
-
protected function _initProductLayout($product)
|
105 |
-
{
|
106 |
-
Mage::helper('catalog/product_view')->initProductLayout($product, $this);
|
107 |
-
return $this;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Recursively apply custom design settings to product if it's container
|
112 |
-
* category custom_use_for_products option is setted to 1.
|
113 |
-
* If not or product shows not in category - applyes product's internal settings
|
114 |
-
*
|
115 |
-
* @deprecated after 1.4.2.0-beta1, functionality moved to Mage_Catalog_Model_Design
|
116 |
-
* @param Mage_Catalog_Model_Category|Mage_Catalog_Model_Product $object
|
117 |
-
* @param Mage_Core_Model_Layout_Update $update
|
118 |
-
*/
|
119 |
-
protected function _applyCustomDesignSettings($object, $update)
|
120 |
-
{
|
121 |
-
if ($object instanceof Mage_Catalog_Model_Category) {
|
122 |
-
// lookup the proper category recursively
|
123 |
-
if ($object->getCustomUseParentSettings()) {
|
124 |
-
$parentCategory = $object->getParentCategory();
|
125 |
-
if ($parentCategory && $parentCategory->getId() && $parentCategory->getLevel() > 1) {
|
126 |
-
$this->_applyCustomDesignSettings($parentCategory, $update);
|
127 |
-
}
|
128 |
-
return;
|
129 |
-
}
|
130 |
-
|
131 |
-
// don't apply to the product
|
132 |
-
if (!$object->getCustomApplyToProducts()) {
|
133 |
-
return;
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
-
if ($this->_designProductSettingsApplied) {
|
138 |
-
return;
|
139 |
-
}
|
140 |
-
|
141 |
-
$date = $object->getCustomDesignDate();
|
142 |
-
if (array_key_exists('from', $date) && array_key_exists('to', $date)
|
143 |
-
&& Mage::app()->getLocale()->isStoreDateInInterval(null, $date['from'], $date['to'])
|
144 |
-
) {
|
145 |
-
if ($object->getPageLayout()) {
|
146 |
-
$this->_designProductSettingsApplied['layout'] = $object->getPageLayout();
|
147 |
-
}
|
148 |
-
$this->_designProductSettingsApplied['update'] = $object->getCustomLayoutUpdate();
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
|
153 |
-
/**
|
154 |
-
* View product gallery action
|
155 |
-
*/
|
156 |
-
public function galleryAction()
|
157 |
-
{
|
158 |
-
if (!$this->_initProduct()) {
|
159 |
-
if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) {
|
160 |
-
$this->_redirect('');
|
161 |
-
} elseif (!$this->getResponse()->isRedirect()) {
|
162 |
-
$this->_forward('noRoute');
|
163 |
-
}
|
164 |
-
return;
|
165 |
-
}
|
166 |
-
$this->loadLayout();
|
167 |
-
$this->renderLayout();
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Display product image action
|
172 |
-
*
|
173 |
-
* @deprecated
|
174 |
-
*/
|
175 |
-
public function imageAction()
|
176 |
-
{
|
177 |
-
/*
|
178 |
-
* All logic has been cut to avoid possible malicious usage of the method
|
179 |
-
*/
|
180 |
-
$this->_forward('noRoute');
|
181 |
-
}
|
182 |
-
|
183 |
-
|
184 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/PPLS/Discussions/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
-
<version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
@@ -44,22 +44,6 @@
|
|
44 |
</ppls_discussions>
|
45 |
</observers>
|
46 |
</catalog_block_product_list_collection>
|
47 |
-
<catalog_block_product_list_collection>
|
48 |
-
<observers>
|
49 |
-
<ppls_discussions>
|
50 |
-
<type>model</type>
|
51 |
-
<class>discussions/observer</class>
|
52 |
-
<method>getDiscussionCounts</method>
|
53 |
-
</ppls_discussions>
|
54 |
-
</observers>
|
55 |
-
</catalog_block_product_list_collection>
|
56 |
-
<observers>
|
57 |
-
<ppls_discussions>
|
58 |
-
<type>model</type>
|
59 |
-
<class>discussions/observer</class>
|
60 |
-
<method>getDiscussionCounts</method>
|
61 |
-
</ppls_discussions>
|
62 |
-
</observers>
|
63 |
</events>
|
64 |
<routers>
|
65 |
<discussions>
|
@@ -70,6 +54,16 @@
|
|
70 |
</args>
|
71 |
</discussions>
|
72 |
</routers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
</frontend>
|
74 |
</config>
|
75 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
+
<version>1.1.1</version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
44 |
</ppls_discussions>
|
45 |
</observers>
|
46 |
</catalog_block_product_list_collection>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
</events>
|
48 |
<routers>
|
49 |
<discussions>
|
54 |
</args>
|
55 |
</discussions>
|
56 |
</routers>
|
57 |
+
<translate>
|
58 |
+
<modules>
|
59 |
+
<translations>
|
60 |
+
<files>
|
61 |
+
<default>PPLS_Discussions.csv</default>
|
62 |
+
</files>
|
63 |
+
</translations>
|
64 |
+
</modules>
|
65 |
+
</translate>
|
66 |
+
|
67 |
</frontend>
|
68 |
</config>
|
69 |
|
app/code/community/PPLS/Discussions/etc/config.xml~
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
-
<version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
@@ -44,33 +44,6 @@
|
|
44 |
</ppls_discussions>
|
45 |
</observers>
|
46 |
</catalog_block_product_list_collection>
|
47 |
-
<catalog_block_product_list_collection>
|
48 |
-
<observers>
|
49 |
-
<ppls_discussions>
|
50 |
-
<type>model</type>
|
51 |
-
<class>discussions/observer</class>
|
52 |
-
<method>getDiscussionCounts</method>
|
53 |
-
</ppls_discussions>
|
54 |
-
</observers>
|
55 |
-
</catalog_block_product_list_collection>
|
56 |
-
<observers>
|
57 |
-
<ppls_discussions>
|
58 |
-
<type>model</type>
|
59 |
-
<class>discussions/observer</class>
|
60 |
-
<method>getDiscussionCounts</method>
|
61 |
-
</ppls_discussions>
|
62 |
-
</observers>
|
63 |
-
</catalog_block_product_list_collection>
|
64 |
-
>
|
65 |
-
>
|
66 |
-
<observers>
|
67 |
-
<ppls_discussions>
|
68 |
-
<type>model</type>
|
69 |
-
<class>discussions/observer</class>
|
70 |
-
<method>getDiscussionCounts</method>
|
71 |
-
</ppls_discussions>
|
72 |
-
</observers>
|
73 |
-
</catalog_block_product_list_collection>
|
74 |
</events>
|
75 |
<routers>
|
76 |
<discussions>
|
@@ -81,6 +54,16 @@
|
|
81 |
</args>
|
82 |
</discussions>
|
83 |
</routers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
</frontend>
|
85 |
</config>
|
86 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<PPLS_Discussions>
|
5 |
+
<version>1.1.1</version>
|
6 |
</PPLS_Discussions>
|
7 |
</modules>
|
8 |
<global>
|
44 |
</ppls_discussions>
|
45 |
</observers>
|
46 |
</catalog_block_product_list_collection>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
</events>
|
48 |
<routers>
|
49 |
<discussions>
|
54 |
</args>
|
55 |
</discussions>
|
56 |
</routers>
|
57 |
+
<translate>
|
58 |
+
<modules>
|
59 |
+
<translations>
|
60 |
+
<files>
|
61 |
+
<default>PPLS_Discussions.csv</default>
|
62 |
+
</files>
|
63 |
+
</translations>
|
64 |
+
</modules>
|
65 |
+
</translate>
|
66 |
+
|
67 |
</frontend>
|
68 |
</config>
|
69 |
|
app/design/frontend/base/default/layout/discussions.xml
CHANGED
@@ -1,209 +1,5 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<layout version="0.1.0">
|
3 |
-
<discussions_discussions_list>
|
4 |
-
<reference name="root">
|
5 |
-
<action method="setTemplate">
|
6 |
-
<template>page/2columns-right.phtml</template>
|
7 |
-
</action>
|
8 |
-
</reference>
|
9 |
-
<reference name="head">
|
10 |
-
|
11 |
-
<action method="addJs">
|
12 |
-
<script>varien/product.js</script>
|
13 |
-
</action>
|
14 |
-
<action method="addJs">
|
15 |
-
<script>varien/configurable.js</script>
|
16 |
-
</action>
|
17 |
-
<action method="addItem">
|
18 |
-
<type>js_css</type>
|
19 |
-
<name>calendar/calendar-win2k-1.css</name>
|
20 |
-
<params /><!--<if/><condition>can_load_calendar_js</condition> -->
|
21 |
-
</action>
|
22 |
-
|
23 |
-
<action method="addItem">
|
24 |
-
<type>js</type>
|
25 |
-
<name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition> -->
|
26 |
-
</action>
|
27 |
-
<action method="addItem">
|
28 |
-
<type>js</type>
|
29 |
-
<name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition> -->
|
30 |
-
</action>
|
31 |
-
<block type="core/text" name="google.cdn.jquery">
|
32 |
-
<action method="setText">
|
33 |
-
<text><![CDATA[
|
34 |
-
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
35 |
-
<script type="text/javascript">var $j=jQuery.noConflict();</script>
|
36 |
-
<!-- Latest compiled and minified CSS -->
|
37 |
-
<link rel="stylesheet"
|
38 |
-
href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.css">
|
39 |
-
|
40 |
-
<!-- Optional theme -->
|
41 |
-
<link rel="stylesheet"
|
42 |
-
href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.css">
|
43 |
-
|
44 |
-
<!-- Latest compiled and minified JavaScript -->
|
45 |
-
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.js"></script>
|
46 |
-
|
47 |
-
]]>
|
48 |
-
</text>
|
49 |
-
</action>
|
50 |
-
</block>
|
51 |
-
</reference>
|
52 |
-
<reference name="content">
|
53 |
-
<block type="catalog/product_view" name="product.info"
|
54 |
-
template="discussions/product/view.phtml">
|
55 |
-
<block type="catalog/product_view_media" name="product.info.media"
|
56 |
-
as="media" template="catalog/product/view/media.phtml" />
|
57 |
-
|
58 |
-
|
59 |
-
<block type="core/text_list" name="alert.urls" as="alert_urls"
|
60 |
-
translate="label">
|
61 |
-
<label>Alert Urls</label>
|
62 |
-
</block>
|
63 |
-
|
64 |
-
<action method="setTierPriceTemplate">
|
65 |
-
<template>catalog/product/view/tierprices.phtml</template>
|
66 |
-
</action>
|
67 |
-
|
68 |
-
<block type="catalog/product_list_upsell" name="product.info.upsell"
|
69 |
-
as="upsell_products" template="catalog/product/list/upsell.phtml"> <action
|
70 |
-
method="setColumnCount"> <columns>4</columns> </action> <action method="setItemLimit">
|
71 |
-
<type>upsell</type> <limit>4</limit> </action> </block>
|
72 |
-
|
73 |
-
<block type="catalog/product_view_additional" name="product.info.additional"
|
74 |
-
as="product_additional_data" />
|
75 |
-
<block type="catalog/product_view" name="product.info.addto"
|
76 |
-
as="addto" template="catalog/product/view/addto.phtml" />
|
77 |
-
<block type="catalog/product_view" name="product.info.addtocart"
|
78 |
-
as="addtocart" template="catalog/product/view/addtocart.phtml" />
|
79 |
-
|
80 |
-
<!-- -->
|
81 |
-
<block type="core/text_list" name="product.info.extrahint" as="extrahint"
|
82 |
-
translate="label">
|
83 |
-
<label>Product View Extra Hint</label>
|
84 |
-
</block>
|
85 |
-
|
86 |
-
<block type="catalog/product_view" name="product.info.options.wrapper"
|
87 |
-
as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml"
|
88 |
-
translate="label">
|
89 |
-
<label>Info Column Options Wrapper</label>
|
90 |
-
<block type="core/template" name="options_js"
|
91 |
-
template="catalog/product/view/options/js.phtml" />
|
92 |
-
<block type="catalog/product_view_options" name="product.info.options"
|
93 |
-
as="product_options" template="catalog/product/view/options.phtml">
|
94 |
-
<action method="addOptionRenderer">
|
95 |
-
<type>text</type>
|
96 |
-
<block>catalog/product_view_options_type_text</block>
|
97 |
-
<template>catalog/product/view/options/type/text.phtml</template>
|
98 |
-
</action>
|
99 |
-
<action method="addOptionRenderer">
|
100 |
-
<type>file</type>
|
101 |
-
<block>catalog/product_view_options_type_file</block>
|
102 |
-
<template>catalog/product/view/options/type/file.phtml</template>
|
103 |
-
</action>
|
104 |
-
<action method="addOptionRenderer">
|
105 |
-
<type>select</type>
|
106 |
-
<block>catalog/product_view_options_type_select</block>
|
107 |
-
<template>catalog/product/view/options/type/select.phtml
|
108 |
-
</template>
|
109 |
-
</action>
|
110 |
-
<action method="addOptionRenderer">
|
111 |
-
<type>date</type>
|
112 |
-
<block>catalog/product_view_options_type_date</block>
|
113 |
-
<template>catalog/product/view/options/type/date.phtml</template>
|
114 |
-
</action>
|
115 |
-
</block>
|
116 |
-
<block type="core/html_calendar" name="html_calendar" as="html_calendar"
|
117 |
-
template="page/js/calendar.phtml" />
|
118 |
-
</block>
|
119 |
-
<block type="catalog/product_view" name="product.info.options.wrapper.bottom"
|
120 |
-
as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml"
|
121 |
-
translate="label">
|
122 |
-
<label>Bottom Block Options Wrapper</label>
|
123 |
-
<action method="insert">
|
124 |
-
<block>product.tierprices</block>
|
125 |
-
</action>
|
126 |
-
<block type="catalog/product_view" name="product.clone_prices"
|
127 |
-
as="prices" template="catalog/product/view/price_clone.phtml" />
|
128 |
-
<action method="append">
|
129 |
-
<block>product.info.addtocart</block>
|
130 |
-
</action>
|
131 |
-
<action method="append">
|
132 |
-
<block>product.info.addto</block>
|
133 |
-
</action>
|
134 |
-
</block>
|
135 |
-
<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="discussions/product/tabs.phtml">
|
136 |
-
<action method="addTab" translate="title" module="catalog">
|
137 |
-
<alias>discussions</alias>
|
138 |
-
<title>Product Discussions</title>
|
139 |
-
<block>discussions/discussions</block>
|
140 |
-
<template>discussions/discussions.phtml</template>
|
141 |
-
</action>
|
142 |
-
<action method="addTab" translate="title" module="catalog">
|
143 |
-
<alias>description</alias>
|
144 |
-
<title>Product Description</title>
|
145 |
-
<block>catalog/product_view_description</block>
|
146 |
-
<template>catalog/product/view/description.phtml</template>
|
147 |
-
</action>
|
148 |
-
<action method="addTab" translate="title" module="catalog">
|
149 |
-
<alias>additional</alias>
|
150 |
-
<title>Additional Information</title>
|
151 |
-
<block>catalog/product_view_attributes</block>
|
152 |
-
<template>catalog/product/view/attributes.phtml</template>
|
153 |
-
</action>
|
154 |
-
</block>
|
155 |
-
|
156 |
-
<block type="core/template_facade" name="product.info.container1"
|
157 |
-
as="container1">
|
158 |
-
<action method="setDataByKey">
|
159 |
-
<key>alias_in_layout</key>
|
160 |
-
<value>container1</value>
|
161 |
-
</action>
|
162 |
-
<action method="setDataByKeyFromRegistry">
|
163 |
-
<key>options_container</key>
|
164 |
-
<key_in_registry>product</key_in_registry>
|
165 |
-
</action>
|
166 |
-
<action method="append">
|
167 |
-
<block>product.info.options.wrapper</block>
|
168 |
-
</action>
|
169 |
-
<action method="append">
|
170 |
-
<block>product.info.options.wrapper.bottom</block>
|
171 |
-
</action>
|
172 |
-
</block>
|
173 |
-
<block type="core/template_facade" name="product.info.container2"
|
174 |
-
as="container2">
|
175 |
-
<action method="setDataByKey">
|
176 |
-
<key>alias_in_layout</key>
|
177 |
-
<value>container2</value>
|
178 |
-
</action>
|
179 |
-
<action method="setDataByKeyFromRegistry">
|
180 |
-
<key>options_container</key>
|
181 |
-
<key_in_registry>product</key_in_registry>
|
182 |
-
</action>
|
183 |
-
<action method="append">
|
184 |
-
<block>product.info.options.wrapper</block>
|
185 |
-
</action>
|
186 |
-
<action method="append">
|
187 |
-
<block>product.info.options.wrapper.bottom</block>
|
188 |
-
</action>
|
189 |
-
</block>
|
190 |
-
<action method="unsetCallChild">
|
191 |
-
<child>container1</child>
|
192 |
-
<call>ifEquals</call>
|
193 |
-
<if>0</if>
|
194 |
-
<key>alias_in_layout</key>
|
195 |
-
<key>options_container</key>
|
196 |
-
</action>
|
197 |
-
<action method="unsetCallChild">
|
198 |
-
<child>container2</child>
|
199 |
-
<call>ifEquals</call>
|
200 |
-
<if>0</if>
|
201 |
-
<key>alias_in_layout</key>
|
202 |
-
<key>options_container</key>
|
203 |
-
</action>
|
204 |
-
</block>
|
205 |
-
</reference>
|
206 |
-
</discussions_discussions_list>
|
207 |
<discussions_ajax_index>
|
208 |
<block type="discussions/discussions" name="root" output="toHtml" template="discussions/discussionsajax.phtml" />
|
209 |
</discussions_ajax_index>
|
@@ -216,6 +12,16 @@
|
|
216 |
<discussions_ajax_feedback>
|
217 |
<block type="discussions/discussions" name="root" output="toHtml" template="discussions/feedbackajax.phtml" />
|
218 |
</discussions_ajax_feedback>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
</layout>
|
220 |
|
221 |
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<layout version="0.1.0">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<discussions_ajax_index>
|
4 |
<block type="discussions/discussions" name="root" output="toHtml" template="discussions/discussionsajax.phtml" />
|
5 |
</discussions_ajax_index>
|
12 |
<discussions_ajax_feedback>
|
13 |
<block type="discussions/discussions" name="root" output="toHtml" template="discussions/feedbackajax.phtml" />
|
14 |
</discussions_ajax_feedback>
|
15 |
+
|
16 |
+
<catalog_product_view>
|
17 |
+
<reference name="product.info">
|
18 |
+
<block type="discussions/discussions" name="product.discussions" as="discussions" template="discussions/discussions.phtml">
|
19 |
+
<action method="addToParentGroup"><group>detailed_info</group></action>
|
20 |
+
<action method="setTitle" translate="value"><value>Product Discussions</value></action>
|
21 |
+
</block>
|
22 |
+
</reference>
|
23 |
+
</catalog_product_view>
|
24 |
+
|
25 |
</layout>
|
26 |
|
27 |
|
app/design/frontend/base/default/template/discussions/discussions.phtml
CHANGED
@@ -1,34 +1,40 @@
|
|
1 |
-
<div id="PPLSAYContainer">
|
2 |
<script type="text/javascript">
|
3 |
//uploading ppls js and css
|
4 |
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
5 |
var productName = "<?php echo $this->getProductName();?>";
|
|
|
6 |
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
7 |
var pplsCSS=document.createElement('link');
|
|
|
|
|
|
|
8 |
pplsCSS.setAttribute("rel", "stylesheet");
|
9 |
pplsCSS.setAttribute("type", "text/css");
|
10 |
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
11 |
-
|
12 |
var bsCSS=document.createElement('link');
|
13 |
bsCSS.setAttribute("rel", "stylesheet");
|
14 |
bsCSS.setAttribute("type", "text/css");
|
15 |
-
bsCSS.setAttribute("href", ppls_cdn_url + "/css/
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
bsJS.setAttribute("src", ppls_cdn_url+ "/js/bootstrap.min.js");
|
20 |
-
document.getElementsByTagName("head")[0].appendChild(bsJS);
|
21 |
-
|
22 |
-
$j(document).ready(function() {
|
23 |
-
conversationsObj = <?php echo $this->getDiscussions(); ?>;
|
24 |
var pplsJS=document.createElement('script');
|
25 |
pplsJS.setAttribute("type","text/javascript");
|
26 |
-
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/conversationsRenderer.js");
|
27 |
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
28 |
|
29 |
});
|
30 |
|
31 |
|
32 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</div>
|
34 |
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row">
|
2 |
<script type="text/javascript">
|
3 |
//uploading ppls js and css
|
4 |
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
5 |
var productName = "<?php echo $this->getProductName();?>";
|
6 |
+
var productID = "<?php echo $this->getProductId();?>";
|
7 |
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
8 |
var pplsCSS=document.createElement('link');
|
9 |
+
var headElem = document.getElementsByTagName("head")[0];
|
10 |
+
var packageName = "<?php echo Mage::getSingleton('core/design_package')->getPackageName();?>";
|
11 |
+
var themeName = "<?php echo Mage::getSingleton('core/design_package')->getTheme('frontend');?>";
|
12 |
pplsCSS.setAttribute("rel", "stylesheet");
|
13 |
pplsCSS.setAttribute("type", "text/css");
|
14 |
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
15 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
16 |
var bsCSS=document.createElement('link');
|
17 |
bsCSS.setAttribute("rel", "stylesheet");
|
18 |
bsCSS.setAttribute("type", "text/css");
|
19 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
20 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
21 |
+
jQuery(document).ready(function() {
|
22 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
|
|
|
|
|
|
|
|
|
|
23 |
var pplsJS=document.createElement('script');
|
24 |
pplsJS.setAttribute("type","text/javascript");
|
25 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/default/conversationsRenderer.js");
|
26 |
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
27 |
|
28 |
});
|
29 |
|
30 |
|
31 |
</script>
|
32 |
+
</div>
|
33 |
+
<div id="PPLSAYLink" class="row" style="padding-left: 15px;">
|
34 |
+
<a href="http://pplsay.com" onclick = "window.open(this.href, 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
|
35 |
+
<span class="pplsay-label" style="font-weight:bold;font-size:13px">Powered by:</span>
|
36 |
+
<img style="" src="<?php echo $this->getPPLSayCdnURL();?>/images/logoLink.png" style="border:0;" alt="PPLSAY - Connecting to Crowd Voice">
|
37 |
+
</a>
|
38 |
+
</div>
|
39 |
</div>
|
40 |
|
app/design/frontend/base/default/template/discussions/discussions.phtml~
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row">
|
2 |
+
<script type="text/javascript">
|
3 |
+
//uploading ppls js and css
|
4 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
5 |
+
var productName = "<?php echo $this->getProductName();?>";
|
6 |
+
var productID = "<?php echo $this->getProductId();?>";
|
7 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
8 |
+
var pplsCSS=document.createElement('link');
|
9 |
+
var headElem = document.getElementsByTagName("head")[0];
|
10 |
+
var packageName = "<?php echo Mage::getSingleton('core/design_package')->getPackageName();?>";
|
11 |
+
var themeName = "<?php echo Mage::getSingleton('core/design_package')->getTheme('frontend');?>";
|
12 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
13 |
+
pplsCSS.setAttribute("type", "text/css");
|
14 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
15 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
16 |
+
var bsCSS=document.createElement('link');
|
17 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
18 |
+
bsCSS.setAttribute("type", "text/css");
|
19 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
20 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
21 |
+
jQuery(document).ready(function() {
|
22 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
23 |
+
var pplsJS=document.createElement('script');
|
24 |
+
pplsJS.setAttribute("type","text/javascript");
|
25 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/default/conversationsRenderer.js");
|
26 |
+
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
27 |
+
|
28 |
+
});
|
29 |
+
|
30 |
+
|
31 |
+
</script>
|
32 |
+
</div>
|
33 |
+
<div id="PPLSAYLink" class="row" style="padding-left: 15px;">
|
34 |
+
<a href="http://pplsay.com" onclick = "window.open(this.href, 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
|
35 |
+
<span class="pplsay-label" style="font-weight:bold;font-size:13px">Powered by:</span>
|
36 |
+
<img style="" src="<?php echo $this->getPPLSayCdnURL();?>/images/logoBigger.png" style="border:0;" alt="PPLSAY - Connecting to Crowd Voice">
|
37 |
+
</a>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
app/design/frontend/base/default/template/discussions/discussions_tab.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php $this->getChild('child')->addTab("Discussions","Product Discussions","discussions/discussions","discussions/discussions.phtml"); ?>
|
2 |
+
<?php echo $this->getChildHtml('child') ?>
|
3 |
+
|
4 |
+
|
app/design/frontend/base/default/template/discussions/prod_discussions.phtml~
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php $this->getChild('child')->addTab("Discussions","Product Discussions","discussions/discussions","discussions/discussions.phtml"); ?>
|
2 |
+
<?php echo $this->getChildHtml('child') ?>
|
3 |
+
|
4 |
+
|
app/design/frontend/base/default/template/discussions/prod_discussions2.phtml~
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row" style="padding-left: 1em; padding-right: 1em;" >
|
2 |
+
<script type="text/javascript">
|
3 |
+
var $j=jQuery.noConflict();
|
4 |
+
//uploading ppls js and css
|
5 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
6 |
+
var productName = "<?php echo $this->getProductName();?>";
|
7 |
+
var productID = "<?php echo $this->getProductName();?>";
|
8 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
9 |
+
var pplsCSS=document.createElement('link');
|
10 |
+
var headElem = document.getElementsByTagName("head")[0];
|
11 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
12 |
+
pplsCSS.setAttribute("type", "text/css");
|
13 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
14 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
15 |
+
var bsCSS=document.createElement('link');
|
16 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
17 |
+
bsCSS.setAttribute("type", "text/css");
|
18 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
19 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
20 |
+
|
21 |
+
$j(document).ready(function() {
|
22 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
23 |
+
var pplsJS=document.createElement('script');
|
24 |
+
pplsJS.setAttribute("type","text/javascript");
|
25 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/conversationsRenderer.js");
|
26 |
+
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
27 |
+
|
28 |
+
});
|
29 |
+
|
30 |
+
|
31 |
+
</script>
|
32 |
+
</div></div>
|
33 |
+
|
34 |
+
|
app/design/frontend/base/default/template/discussions/product/tabs.phtml
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<div style="width:inherit">
|
2 |
-
<ul class="nav nav-tabs" id="myTabs" style="width:inherit">
|
3 |
-
<?php foreach ($this->getTabs() as $_index => $_tab): ?>
|
4 |
-
<?php if($this->getChildHtml($_tab['alias'])): ?>
|
5 |
-
<li id="product_tabs_<?php echo $_tab['alias'] ?>" class="<?php echo !$_index?' active first':(($_index==count($this->getTabs())-1)?' last':'')?>"><a href="#product_tabs_<?php echo $_tab['alias'] ?>_contents" data-toggle="tab"><?php echo $_tab['title']?></a></li>
|
6 |
-
<?php endif; ?>
|
7 |
-
<?php endforeach; ?>
|
8 |
-
</ul>
|
9 |
-
<div class="tab-content">
|
10 |
-
|
11 |
-
<?php foreach ($this->getTabs() as $_index => $_tab): ?>
|
12 |
-
<?php if($this->getChildHtml($_tab['alias']) and $_index==0): ?>
|
13 |
-
<div class="tab-pane active" id="product_tabs_<?php echo $_tab['alias'] ?>_contents"><?php echo $this->getChildHtml($_tab['alias']) ?></div>
|
14 |
-
<?php endif; ?>
|
15 |
-
<?php if($this->getChildHtml($_tab['alias']) and $_index!=0 ): ?>
|
16 |
-
<div class="tab-pane" id="product_tabs_<?php echo $_tab['alias'] ?>_contents"><?php echo $this->getChildHtml($_tab['alias']) ?></div>
|
17 |
-
<?php endif; ?>
|
18 |
-
<?php endforeach; ?>
|
19 |
-
</div>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<script>
|
23 |
-
$j('#myTabs').bind('show', function(e) {
|
24 |
-
|
25 |
-
// identify the tab-pane
|
26 |
-
paneID = $j(e.target).attr('href');
|
27 |
-
|
28 |
-
// get the value of the custom data attribute to use as the iframe source
|
29 |
-
src = $j(paneID).attr('data-src');
|
30 |
-
|
31 |
-
//if the iframe on the selected tab-pane hasn't been loaded yet...
|
32 |
-
if($j(paneID+" iframe").attr("src")=="")
|
33 |
-
{
|
34 |
-
// update the iframe src attribute using the custom data-attribute value
|
35 |
-
$j(paneID+" iframe").attr("src",src);
|
36 |
-
}
|
37 |
-
});
|
38 |
-
</script>
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/discussions/product/tabs.phtml~
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<div style="width:inherit">
|
2 |
-
<ul class="nav nav-tabs" id="myTabs" style="inherit">
|
3 |
-
<?php foreach ($this->getTabs() as $_index => $_tab): ?>
|
4 |
-
<?php if($this->getChildHtml($_tab['alias'])): ?>
|
5 |
-
<li id="product_tabs_<?php echo $_tab['alias'] ?>" class="<?php echo !$_index?' active first':(($_index==count($this->getTabs())-1)?' last':'')?>"><a href="#product_tabs_<?php echo $_tab['alias'] ?>_contents" data-toggle="tab"><?php echo $_tab['title']?></a></li>
|
6 |
-
<?php endif; ?>
|
7 |
-
<?php endforeach; ?>
|
8 |
-
</ul>
|
9 |
-
<div class="tab-content">
|
10 |
-
|
11 |
-
<?php foreach ($this->getTabs() as $_index => $_tab): ?>
|
12 |
-
<?php if($this->getChildHtml($_tab['alias']) and $_index==0): ?>
|
13 |
-
<div class="tab-pane active" id="product_tabs_<?php echo $_tab['alias'] ?>_contents"><?php echo $this->getChildHtml($_tab['alias']) ?></div>
|
14 |
-
<?php endif; ?>
|
15 |
-
<?php if($this->getChildHtml($_tab['alias']) and $_index!=0 ): ?>
|
16 |
-
<div class="tab-pane" id="product_tabs_<?php echo $_tab['alias'] ?>_contents"><?php echo $this->getChildHtml($_tab['alias']) ?></div>
|
17 |
-
<?php endif; ?>
|
18 |
-
<?php endforeach; ?>
|
19 |
-
</div>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<script>
|
23 |
-
$j('#myTabs').bind('show', function(e) {
|
24 |
-
|
25 |
-
// identify the tab-pane
|
26 |
-
paneID = $j(e.target).attr('href');
|
27 |
-
|
28 |
-
// get the value of the custom data attribute to use as the iframe source
|
29 |
-
src = $j(paneID).attr('data-src');
|
30 |
-
|
31 |
-
//if the iframe on the selected tab-pane hasn't been loaded yet...
|
32 |
-
if($j(paneID+" iframe").attr("src")=="")
|
33 |
-
{
|
34 |
-
// update the iframe src attribute using the custom data-attribute value
|
35 |
-
$j(paneID+" iframe").attr("src",src);
|
36 |
-
}
|
37 |
-
});
|
38 |
-
</script>
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/discussions/product/view.phtml
DELETED
@@ -1,180 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Product view template
|
29 |
-
*
|
30 |
-
* @see Mage_Catalog_Block_Product_View
|
31 |
-
* @see Mage_Review_Block_Product_View
|
32 |
-
*/
|
33 |
-
?>
|
34 |
-
<?php $_helper = $this->helper('catalog/output'); ?>
|
35 |
-
<?php $_product = $this->getProduct(); ?>
|
36 |
-
<script type="text/javascript">
|
37 |
-
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
|
38 |
-
</script>
|
39 |
-
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
40 |
-
<div class="product-view">
|
41 |
-
<div class="product-essential">
|
42 |
-
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
|
43 |
-
<div class="no-display">
|
44 |
-
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
45 |
-
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
46 |
-
</div>
|
47 |
-
<div class="product-shop">
|
48 |
-
<div class="product-name">
|
49 |
-
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
|
50 |
-
</div>
|
51 |
-
|
52 |
-
<?php if ($this->canEmailToFriend()): ?>
|
53 |
-
<p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
|
54 |
-
<?php endif; ?>
|
55 |
-
|
56 |
-
<!--<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>-->
|
57 |
-
<?php echo $this->getChildHtml('alert_urls') ?>
|
58 |
-
<?php if (trim($this->getChildHtml('product_type_data'))==""): ?>
|
59 |
-
<?php if ($_product->isAvailable()): ?>
|
60 |
-
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
|
61 |
-
<?php else: ?>
|
62 |
-
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
|
63 |
-
<?php endif; ?>
|
64 |
-
<?php echo $this->getPriceHtml($_product) ?>
|
65 |
-
|
66 |
-
<?php endif; ?>
|
67 |
-
<?php echo $this->getChildHtml('product_type_data') ?>
|
68 |
-
<?php echo $this->getTierPriceHtml() ?>
|
69 |
-
<?php echo $this->getChildHtml('extrahint') ?>
|
70 |
-
|
71 |
-
<?php if (!$this->hasOptions()):?>
|
72 |
-
<div class="add-to-box">
|
73 |
-
<?php if($_product->isSaleable()): ?>
|
74 |
-
<?php echo $this->getChildHtml('addtocart') ?>
|
75 |
-
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
|
76 |
-
<span class="or"><?php echo $this->__('OR') ?></span>
|
77 |
-
<?php endif; ?>
|
78 |
-
<?php endif; ?>
|
79 |
-
<?php echo $this->getChildHtml('addto') ?>
|
80 |
-
</div>
|
81 |
-
<?php echo $this->getChildHtml('extra_buttons') ?>
|
82 |
-
<?php elseif (!$_product->isSaleable()): ?>
|
83 |
-
<div class="add-to-box">
|
84 |
-
<?php echo $this->getChildHtml('addto') ?>
|
85 |
-
</div>
|
86 |
-
<?php endif; ?>
|
87 |
-
<?php if ($_product->getShortDescription()):?>
|
88 |
-
<div class="short-description">
|
89 |
-
<h2><?php echo $this->__('Quick Overview') ?></h2>
|
90 |
-
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
|
91 |
-
</div>
|
92 |
-
<?php endif;?>
|
93 |
-
|
94 |
-
<?php echo $this->getChildHtml('other');?>
|
95 |
-
|
96 |
-
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
97 |
-
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
|
98 |
-
<?php endif;?>
|
99 |
-
|
100 |
-
</div>
|
101 |
-
|
102 |
-
<div class="product-img-box">
|
103 |
-
<?php echo $this->getChildHtml('media') ?>
|
104 |
-
</div>
|
105 |
-
|
106 |
-
<div class="clearer"></div>
|
107 |
-
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
108 |
-
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
|
109 |
-
<?php endif;?>
|
110 |
-
</form>
|
111 |
-
<script type="text/javascript">
|
112 |
-
//<![CDATA[
|
113 |
-
|
114 |
-
var productAddToCartForm = new VarienForm('product_addtocart_form');
|
115 |
-
productAddToCartForm.submit = function(button, url) {
|
116 |
-
if (this.validator.validate()) {
|
117 |
-
var form = this.form;
|
118 |
-
var oldUrl = form.action;
|
119 |
-
|
120 |
-
if (url) {
|
121 |
-
form.action = url;
|
122 |
-
}
|
123 |
-
var e = null;
|
124 |
-
try {
|
125 |
-
this.form.submit();
|
126 |
-
} catch (e) {
|
127 |
-
}
|
128 |
-
this.form.action = oldUrl;
|
129 |
-
if (e) {
|
130 |
-
throw e;
|
131 |
-
}
|
132 |
-
|
133 |
-
if (button && button != 'undefined') {
|
134 |
-
button.disabled = true;
|
135 |
-
}
|
136 |
-
}
|
137 |
-
}.bind(productAddToCartForm);
|
138 |
-
|
139 |
-
productAddToCartForm.submitLight = function(button, url){
|
140 |
-
if(this.validator) {
|
141 |
-
var nv = Validation.methods;
|
142 |
-
delete Validation.methods['required-entry'];
|
143 |
-
delete Validation.methods['validate-one-required'];
|
144 |
-
delete Validation.methods['validate-one-required-by-name'];
|
145 |
-
// Remove custom datetime validators
|
146 |
-
for (var methodName in Validation.methods) {
|
147 |
-
if (methodName.match(/^validate-datetime-.*/i)) {
|
148 |
-
delete Validation.methods[methodName];
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
if (this.validator.validate()) {
|
153 |
-
if (url) {
|
154 |
-
this.form.action = url;
|
155 |
-
}
|
156 |
-
this.form.submit();
|
157 |
-
}
|
158 |
-
Object.extend(Validation.methods, nv);
|
159 |
-
}
|
160 |
-
}.bind(productAddToCartForm);
|
161 |
-
//]]>
|
162 |
-
|
163 |
-
</script>
|
164 |
-
</div>
|
165 |
-
<?php echo $this->getChildHtml('info_tabs') ?>
|
166 |
-
<div class="product-collateral">
|
167 |
-
|
168 |
-
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
|
169 |
-
<div class="box-collateral <?php echo "box-{$alias}"?>">
|
170 |
-
<?php if ($title = $this->getChildData($alias, 'title')):?>
|
171 |
-
<h2><?php echo $this->escapeHtml($title); ?></h2>
|
172 |
-
<?php endif;?>
|
173 |
-
<?php echo $html; ?>
|
174 |
-
</div>
|
175 |
-
<?php endforeach;?>
|
176 |
-
<?php echo $this->getChildHtml('upsell_products') ?>
|
177 |
-
<?php echo $this->getChildHtml('product_additional_data') ?>
|
178 |
-
</div>
|
179 |
-
</div>
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/discussions/product/virality.phtml
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct()->getId())?>
|
2 |
-
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
-
<div class="ppls_virality" style="width:140px;height:20px;">
|
4 |
-
|
5 |
-
<img style="width:70px;height:14px;" src="<?php echo $this->getChild('virality')->getLink() ?>"><span style="margin-left:5px">(<?php echo $this->getChild('virality')->count?>)</span>
|
6 |
-
</div>
|
7 |
-
<?php endif; ?>
|
8 |
-
<?php echo $this->getChildHtml('child') ?>
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/discussions/virality.phtml
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct())?>
|
2 |
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
-
<div class="ppls_virality" style="
|
4 |
-
<a href="<?php echo $this->getChild('virality')->getProductUrl($this->getChild('child')->getProduct()->getId())
|
5 |
-
<img style="width:
|
6 |
</div>
|
7 |
<?php endif; ?>
|
8 |
-
<!--<span style="color:red;"><h1><?php echo $this->getChild('virality')->debug; ?> </h1></span>-->
|
9 |
<?php echo $this->getChildHtml('child') ?>
|
10 |
|
11 |
|
1 |
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct())?>
|
2 |
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
+
<div class="ppls_virality" style="height:20px;line-height: normal;" title="Click to see product discussions from social networks">
|
4 |
+
<a id="PPLSayDiscussionsLink" href="<?php echo $this->getChild('virality')->getProductUrl($this->getChild('child')->getProduct()->getId())?>#PPLSAYContainer">
|
5 |
+
<img style="max-width:65px;width:60%;height:14px;float:left" src="<?php echo $this->getChild('virality')->getLink() ?>"><span style="float:left;margin-left:0.5em;width:30%;max-width:50px;line-height: normal;font-size:13px">(<?php echo $this->getChild('virality')->count?>)</span></a>
|
6 |
</div>
|
7 |
<?php endif; ?>
|
|
|
8 |
<?php echo $this->getChildHtml('child') ?>
|
9 |
|
10 |
|
app/design/frontend/base/default/template/discussions/virality.phtml~
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct())?>
|
2 |
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
-
<div class="ppls_virality" style="
|
4 |
-
<a href="<?php echo $this->getChild('virality')->getProductUrl($this->getChild('child')->getProduct()->getId())
|
5 |
-
<img style="width:
|
6 |
</div>
|
7 |
<?php endif; ?>
|
8 |
-
<span style="color:red;"><h1><?php echo $this->getChild('virality')->debug; ?> </h1></span>
|
9 |
<?php echo $this->getChildHtml('child') ?>
|
10 |
|
11 |
|
1 |
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct())?>
|
2 |
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
+
<div class="ppls_virality" style="height:20px;line-height: normal;" title="Click to see product discussions from socila networks">
|
4 |
+
<a id="PPLSayDiscussionsLink" href="<?php echo $this->getChild('virality')->getProductUrl($this->getChild('child')->getProduct()->getId())?>#PPLSAYContainer">
|
5 |
+
<img style="max-width:65px;width:60%;height:14px;float:left" src="<?php echo $this->getChild('virality')->getLink() ?>"><span style="float:left;margin-left:0.5em;width:30%;max-width:50px;line-height: normal;font-size:13px">(<?php echo $this->getChild('virality')->count?>)</span></a>
|
6 |
</div>
|
7 |
<?php endif; ?>
|
|
|
8 |
<?php echo $this->getChildHtml('child') ?>
|
9 |
|
10 |
|
app/design/frontend/default/default/template/discussions/discussions.phtml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
|
2 |
+
<script type="text/javascript">
|
3 |
+
//<![CDATA[
|
4 |
+
var jQuery= jQuery.noConflict();
|
5 |
+
//]]>
|
6 |
+
</script>
|
7 |
+
<?php echo $this->getCssJsHtml() ?>
|
8 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row">
|
9 |
+
<script type="text/javascript">
|
10 |
+
//uploading ppls js and css
|
11 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
12 |
+
var productName = "<?php echo $this->getProductName();?>";
|
13 |
+
var productID = "<?php echo $this->getProductId();?>";
|
14 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
15 |
+
var pplsCSS=document.createElement('link');
|
16 |
+
var headElem = document.getElementsByTagName("head")[0];
|
17 |
+
var packageName = "<?php echo Mage::getSingleton('core/design_package')->getPackageName();?>";
|
18 |
+
var themeName = "<?php echo Mage::getSingleton('core/design_package')->getTheme('frontend');?>";
|
19 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
20 |
+
pplsCSS.setAttribute("type", "text/css");
|
21 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
22 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
23 |
+
var bsCSS=document.createElement('link');
|
24 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
25 |
+
bsCSS.setAttribute("type", "text/css");
|
26 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
27 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
28 |
+
|
29 |
+
jQuery(document).ready(function() {
|
30 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
31 |
+
var pplsJS=document.createElement('script');
|
32 |
+
pplsJS.setAttribute("type","text/javascript");
|
33 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/default/conversationsRenderer.js");
|
34 |
+
headElem.appendChild(pplsJS);
|
35 |
+
|
36 |
+
});
|
37 |
+
|
38 |
+
|
39 |
+
</script>
|
40 |
+
</div>
|
41 |
+
<div id="PPLSAYLink" class="row" style="padding-left: 15px;">
|
42 |
+
<a href="http://pplsay.com" onclick = "window.open(this.href, 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
|
43 |
+
<span class="pplsay-label" style="font-weight: bold;font-size:13px">Powered by:</span>
|
44 |
+
<img style="" src="<?php echo $this->getPPLSayCdnURL();?>/images/logoLink.png" style="border:0;" alt="PPLSAY - Connecting to Crowd Voice">
|
45 |
+
</a>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
|
app/design/frontend/default/default/template/discussions/discussions.phtml~
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
|
2 |
+
<script type="text/javascript">
|
3 |
+
//<![CDATA[
|
4 |
+
var jQuery= jQuery.noConflict();
|
5 |
+
//]]>
|
6 |
+
</script>
|
7 |
+
<?php echo $this->getCssJsHtml() ?>
|
8 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row">
|
9 |
+
<script type="text/javascript">
|
10 |
+
//uploading ppls js and css
|
11 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
12 |
+
var productName = "<?php echo $this->getProductName();?>";
|
13 |
+
var productID = "<?php echo $this->getProductId();?>";
|
14 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
15 |
+
var pplsCSS=document.createElement('link');
|
16 |
+
var headElem = document.getElementsByTagName("head")[0];
|
17 |
+
var packageName = "<?php echo Mage::getSingleton('core/design_package')->getPackageName();?>";
|
18 |
+
var themeName = "<?php echo Mage::getSingleton('core/design_package')->getTheme('frontend');?>";
|
19 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
20 |
+
pplsCSS.setAttribute("type", "text/css");
|
21 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
22 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
23 |
+
var bsCSS=document.createElement('link');
|
24 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
25 |
+
bsCSS.setAttribute("type", "text/css");
|
26 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
27 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
28 |
+
|
29 |
+
jQuery(document).ready(function() {
|
30 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
31 |
+
var pplsJS=document.createElement('script');
|
32 |
+
pplsJS.setAttribute("type","text/javascript");
|
33 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/default/conversationsRenderer.js");
|
34 |
+
headElem.appendChild(pplsJS);
|
35 |
+
|
36 |
+
});
|
37 |
+
|
38 |
+
|
39 |
+
</script>
|
40 |
+
</div>
|
41 |
+
<div id="PPLSAYLink" class="row" style="padding-left: 15px;">
|
42 |
+
<a href="http://pplsay.com" onclick = "window.open(this.href, 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
|
43 |
+
<span class="pplsay-label" style="font-weight: bold;font-size:13px">Powered by:</span>
|
44 |
+
<img style="" src="<?php echo $this->getPPLSayCdnURL();?>/images/logoLink.png" style="border:0;" alt="PPLSAY - Connecting to Crowd Voice">
|
45 |
+
</a>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
|
app/design/frontend/default/default/template/discussions/prod_discussions.phtml~
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php $this->getChild('child')->addTab("Discussions","Product Discussions","discussions/discussions","discussions/discussions.phtml"); ?>
|
2 |
+
<?php echo $this->getChildHtml('child') ?>
|
3 |
+
|
4 |
+
|
app/design/frontend/default/default/template/discussions/prod_discussions2.phtml~
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row" style="padding-left: 1em; padding-right: 1em;" >
|
2 |
+
<script type="text/javascript">
|
3 |
+
var $j=jQuery.noConflict();
|
4 |
+
//uploading ppls js and css
|
5 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
6 |
+
var productName = "<?php echo $this->getProductName();?>";
|
7 |
+
var productID = "<?php echo $this->getProductName();?>";
|
8 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
9 |
+
var pplsCSS=document.createElement('link');
|
10 |
+
var headElem = document.getElementsByTagName("head")[0];
|
11 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
12 |
+
pplsCSS.setAttribute("type", "text/css");
|
13 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
14 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
15 |
+
var bsCSS=document.createElement('link');
|
16 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
17 |
+
bsCSS.setAttribute("type", "text/css");
|
18 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
19 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
20 |
+
|
21 |
+
$j(document).ready(function() {
|
22 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
23 |
+
var pplsJS=document.createElement('script');
|
24 |
+
pplsJS.setAttribute("type","text/javascript");
|
25 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/conversationsRenderer.js");
|
26 |
+
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
27 |
+
|
28 |
+
});
|
29 |
+
|
30 |
+
|
31 |
+
</script>
|
32 |
+
</div></div>
|
33 |
+
|
34 |
+
|
app/design/frontend/default/default/template/discussions/virality.phtml~
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct())?>
|
2 |
+
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
+
<div class="ppls_virality" style="height:20px;line-height: normal;">
|
4 |
+
<a id="PPLSayDiscussionsLink" href="<?php echo $this->getChild('virality')->getProductUrl($this->getChild('child')->getProduct()->getId())?>">
|
5 |
+
<img style="max-width:65px;width:60%;height:14px;float:left" src="<?php echo $this->getChild('virality')->getLink() ?>"><span style="float:left;margin-left:0.5em;width:30%;max-width:50px;line-height: normal;font-size:13px">(<?php echo $this->getChild('virality')->count?>)</span></a>
|
6 |
+
</div>
|
7 |
+
<?php endif; ?>
|
8 |
+
<!--<span style="color:red;"><h1><?php echo $this->getChild('virality')->debug; ?> </h1></span>-->
|
9 |
+
<?php echo $this->getChildHtml('child') ?>
|
10 |
+
|
11 |
+
|
12 |
+
|
app/design/frontend/rwd/default/template/discussions/discussions.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row">
|
2 |
+
<script type="text/javascript">
|
3 |
+
//uploading ppls js and css
|
4 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
5 |
+
var productName = "<?php echo $this->getProductName();?>";
|
6 |
+
var productID = "<?php echo $this->getProductId();?>";
|
7 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
8 |
+
var pplsCSS=document.createElement('link');
|
9 |
+
var headElem = document.getElementsByTagName("head")[0];
|
10 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
11 |
+
pplsCSS.setAttribute("type", "text/css");
|
12 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
13 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
14 |
+
var bsCSS=document.createElement('link');
|
15 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
16 |
+
bsCSS.setAttribute("type", "text/css");
|
17 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
18 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
19 |
+
|
20 |
+
jQuery(document).ready(function() {
|
21 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
22 |
+
var pplsJS=document.createElement('script');
|
23 |
+
pplsJS.setAttribute("type","text/javascript");
|
24 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/rwd/conversationsRenderer.js");
|
25 |
+
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
26 |
+
|
27 |
+
});
|
28 |
+
|
29 |
+
|
30 |
+
</script>
|
31 |
+
</div>
|
32 |
+
<div id="PPLSAYLink" class="row" style="padding-left: 15px;">
|
33 |
+
<a href="http://pplsay.com" onclick = "window.open(this.href, 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
|
34 |
+
<span class="pplsay-label" style="font-weight: bold;font-size:13px">Powered by:</span>
|
35 |
+
<img style="" src="<?php echo $this->getPPLSayCdnURL();?>/images/logoLink.png" style="border:0;" alt="PPLSAY - Connecting to Crowd Voice">
|
36 |
+
</a>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
|
app/design/frontend/rwd/default/template/discussions/discussions.phtml~
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row">
|
2 |
+
<script type="text/javascript">
|
3 |
+
//uploading ppls js and css
|
4 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
5 |
+
var productName = "<?php echo $this->getProductName();?>";
|
6 |
+
var productID = "<?php echo $this->getProductId();?>";
|
7 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
8 |
+
var pplsCSS=document.createElement('link');
|
9 |
+
var headElem = document.getElementsByTagName("head")[0];
|
10 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
11 |
+
pplsCSS.setAttribute("type", "text/css");
|
12 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
13 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
14 |
+
var bsCSS=document.createElement('link');
|
15 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
16 |
+
bsCSS.setAttribute("type", "text/css");
|
17 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
18 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
19 |
+
|
20 |
+
jQuery(document).ready(function() {
|
21 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
22 |
+
var pplsJS=document.createElement('script');
|
23 |
+
pplsJS.setAttribute("type","text/javascript");
|
24 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/rwd/conversationsRenderer.js");
|
25 |
+
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
26 |
+
|
27 |
+
});
|
28 |
+
|
29 |
+
|
30 |
+
</script>
|
31 |
+
</div>
|
32 |
+
<div id="PPLSAYLink" class="row" style="padding-left: 15px;">
|
33 |
+
<a href="http://pplsay.com" onclick = "window.open(this.href, 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
|
34 |
+
<span class="pplsay-label" style="font-weight: bold;font-size:13px">Powered by:</span>
|
35 |
+
<img style="" src="<?php echo $this->getPPLSayCdnURL();?>/images/logoLink.png" style="border:0;" alt="PPLSAY - Connecting to Crowd Voice">
|
36 |
+
</a>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
|
app/design/frontend/rwd/default/template/discussions/prod_discussions.phtml~
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php $this->getChild('child')->addTab("Discussions","Product Discussions","discussions/discussions","discussions/discussions.phtml"); ?>
|
2 |
+
<?php echo $this->getChildHtml('child') ?>
|
3 |
+
|
4 |
+
|
app/design/frontend/rwd/default/template/discussions/prod_discussions2.phtml~
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="container-fluid"><div id="PPLSAYContainer" class="row" style="padding-left: 1em; padding-right: 1em;" >
|
2 |
+
<script type="text/javascript">
|
3 |
+
var $j=jQuery.noConflict();
|
4 |
+
//uploading ppls js and css
|
5 |
+
var ppls_cdn_url = "<?php echo Mage::getModel('core/variable')->loadByCode('ppls_cdn_url')->getData('store_plain_value') ?>";
|
6 |
+
var productName = "<?php echo $this->getProductName();?>";
|
7 |
+
var productID = "<?php echo $this->getProductName();?>";
|
8 |
+
var baseUrl = "<?php echo Mage::getBaseUrl(); ?>";
|
9 |
+
var pplsCSS=document.createElement('link');
|
10 |
+
var headElem = document.getElementsByTagName("head")[0];
|
11 |
+
pplsCSS.setAttribute("rel", "stylesheet");
|
12 |
+
pplsCSS.setAttribute("type", "text/css");
|
13 |
+
pplsCSS.setAttribute("href", ppls_cdn_url + "/css/internalStyle.css");
|
14 |
+
headElem.insertBefore(pplsCSS,headElem.firstChild);
|
15 |
+
var bsCSS=document.createElement('link');
|
16 |
+
bsCSS.setAttribute("rel", "stylesheet");
|
17 |
+
bsCSS.setAttribute("type", "text/css");
|
18 |
+
bsCSS.setAttribute("href", ppls_cdn_url + "/css/pplsay_bootstrap.min.css");
|
19 |
+
headElem.insertBefore(bsCSS,headElem.firstChild);
|
20 |
+
|
21 |
+
$j(document).ready(function() {
|
22 |
+
conversationsObj = <?php echo $this->productView(); ?>;
|
23 |
+
var pplsJS=document.createElement('script');
|
24 |
+
pplsJS.setAttribute("type","text/javascript");
|
25 |
+
pplsJS.setAttribute("src", ppls_cdn_url+ "/js/conversationsRenderer.js");
|
26 |
+
document.getElementsByTagName("head")[0].appendChild(pplsJS);
|
27 |
+
|
28 |
+
});
|
29 |
+
|
30 |
+
|
31 |
+
</script>
|
32 |
+
</div></div>
|
33 |
+
|
34 |
+
|
app/design/frontend/rwd/default/template/discussions/virality.phtml~
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $this->getChild('virality')->initVirality($this->getChild('child')->getProduct())?>
|
2 |
+
<?php if ($this->getChild('virality')->count!=0): ?>
|
3 |
+
<div class="ppls_virality" style="height:20px;line-height: normal;">
|
4 |
+
<a id="PPLSayDiscussionsLink" href="<?php echo $this->getChild('virality')->getProductUrl($this->getChild('child')->getProduct()->getId())?>#PPLSAYContainer">
|
5 |
+
<img style="max-width:65px;width:60%;height:14px;float:left" src="<?php echo $this->getChild('virality')->getLink() ?>"><span style="float:left;margin-left:0.5em;width:30%;max-width:50px;line-height: normal;font-size:13px">(<?php echo $this->getChild('virality')->count?>)</span></a>
|
6 |
+
</div>
|
7 |
+
<?php endif; ?>
|
8 |
+
<!--<span style="color:red;"><h1><?php echo $this->getChild('virality')->debug; ?> </h1></span>-->
|
9 |
+
<?php echo $this->getChildHtml('child') ?>
|
10 |
+
|
11 |
+
|
12 |
+
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PPLSAY_Social_Discussions</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
@@ -11,31 +11,27 @@ PPLSAY – what people say about products in social networks
|
|
11 |
SaaS solution for online retail businesses of any size
|
12 |

|
13 |
</summary>
|
14 |
-
<description>
|
|
|
|
|
|
|
15 |
Today, millions of consumers share real life product experiences on social networks. These tweets, posts, comments and discussions contain valuable information for online retailers and their customers.
|
16 |
-
PEOPLE SAY brings online product discussions directly to your product pages. Our platform empowers your online customers by providing them with real life consumer experiences of products in your online store from around the globe. Online retailers use PEOPLE SAY to successfully increase conversion rates, enhance their customers purchasing experience, develop customer loyalty and improve their websites S.E.O.
|
17 |
-
We invite online retailers to leverage our innovative platform to obtain the most up-to-date, fresh and unbiased discussions about thousands of products.
|
18 |
-
No more need to collect or generate product reviews. Just install Free Beta version and enjoy immediate benefits. 
|
19 |
-
PPLSAY extension is super easy to install ( see installation notes) no further maintenance is required. 
|
20 |
-
</description>
|
21 |
-
<notes>Main Features: 
|
22 |
-
* Enhanced discussions relevance scoring mechanism 
|
23 |
-
* Filtering , Sorting and Search
|
24 |
-
- Discussions can be filtered by features or social network
|
25 |
-
- Added sorting by relevance, date and popularity
|
26 |
-
- Added free search on product discussions
|
27 |
-
* Feedback
|
28 |
-
- Discussion can be marked as helpful or not helpful by user
|
29 |
-
* Highlighter
|
30 |
-
- Highlights product name, search keyword
|
31 |
-
* Pagination
|
32 |
-
* Multiselct navigation for features and social network filters.
|
33 |

|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<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>
|
36 |
-
<date>2014-
|
37 |
-
<time>
|
38 |
-
<contents><target name="magecommunity"><dir name="PPLS"><dir name="Discussions"><dir name="Block"><file name="Discussions.php" hash="
|
39 |
<compatible/>
|
40 |
<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>
|
41 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PPLSAY_Social_Discussions</name>
|
4 |
+
<version>1.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
11 |
SaaS solution for online retail businesses of any size
|
12 |

|
13 |
</summary>
|
14 |
+
<description>PPLSAY Social Discussions
|
15 |
+

|
16 |
+
PPLSAY is innovative platform that connects your online store to crowd voice.
|
17 |
+

|
18 |
Today, millions of consumers share real life product experiences on social networks. These tweets, posts, comments and discussions contain valuable information for online retailers and their customers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |

|
20 |
+
PPLSAY brings online product discussions directly to your product pages. Our platform empowers your online customers by providing them with real life consumer experiences of products in your online store from around the globe. Online retailers use PPLSAY to successfully increase conversion rates, enhance their customers purchasing experience, develop customer loyalty and improve their websites SEO.
|
21 |
+

|
22 |
+
We invite online retailers to leverage our innovative platform to obtain the most up-to-date, fresh and unbiased discussions about thousands of products. No more need to collect or generate product reviews.
|
23 |
+

|
24 |
+
Visit us at: http://pplsay.com
|
25 |
+

|
26 |
+
For demo site please refer to the following link pplsay demo:
|
27 |
+
http://demo.pplsay.com/
|
28 |
+
</description>
|
29 |
+
<notes>- Added responsive layout support
|
30 |
+
- Fixed Magento 1.9 CSS issues </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>2014-06-24</date>
|
33 |
+
<time>11:47:59</time>
|
34 |
+
<contents><target name="magecommunity"><dir name="PPLS"><dir name="Discussions"><dir name="Block"><file name="Discussions.php" hash="b27a6cd3150240f9bc00a86668087e80"/><file name="Discussions.php~" hash="fbee3a0227e037a9af6028fadf52c61d"/><file name="Virality.php" hash="45913cedd9e52a60dba35ec86116451b"/><file name="Virality.php~" hash="9d4c15d1ed72359e62f77ea7235dbd86"/></dir><dir name="Model"><file name="Discussions.php" hash="259d360b583f658a0d5d96c684bc00a3"/><file name="Discussions.php~" hash="8c6c7942d622bab2bfc1fa7be08ac2f3"/><file name="Observer.php" hash="0090d37d9f59653775ab1c438610b825"/><file name="Observer.php~" hash="5f9d93319b88003a4b97b6052c4bbebf"/><file name="Virality.php" hash="e23eb32efb83f1b238e56d287621afb3"/><file name="Virality.php~" hash="e23eb32efb83f1b238e56d287621afb3"/></dir><dir name="controllers"><file name="AjaxController.php" hash="3dc80810396889a44ad5630200a5120a"/></dir><dir name="etc"><file name="config.xml" hash="2591a21ff35bc08a5c2c4b1007badcb7"/><file name="config.xml~" hash="2591a21ff35bc08a5c2c4b1007badcb7"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="discussions.xml" hash="e287cd779c0b2822d13f841906d9ceda"/></dir><dir name="template"><dir name="discussions"><file name="discussions.phtml" hash="d0c2a36c1e45a8097d9e2b64bb34683c"/><file name="discussions.phtml~" hash="191ec614612eef04dbaef660b7254ffd"/><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="searchdiscussionsajax.phtml" hash="710a9cf544b4280dcc979780a6b27397"/><file name="virality.phtml" hash="e24ff80a61fdb0650dd6ac9579e371e5"/><file name="virality.phtml~" hash="d458c32b5a7b9b8bdea7733dbf1114c6"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="discussions"><file name="discussions.phtml" hash="2cf98f4c538b94fee53071b6a3489fc3"/><file name="discussions.phtml~" hash="2cf98f4c538b94fee53071b6a3489fc3"/><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="38a8cad19ed181f8c7fb5232bce3d096"/><file name="discussions.phtml~" hash="38a8cad19ed181f8c7fb5232bce3d096"/><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>
|