Version Notes
Choose the widget that will pop up on each type of your e-commerce pages:
- All: the chat widget will pop up on every page of the website
- Categories: the chat widget will pop up in the category listing (i.e. apparel, shoes, accessories…)
- Product: the chat widget will pop up on each product page
- Funnel: the chat widget will pop up in the cart and checkout pages
- Others: all the pages that aren't products,categories or funnel (like profile, wishlist)
Download this release
Release Info
Developer | a.laciura@sostanza.it |
Extension | Sostanza_LiveHelp |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- app/code/community/Sostanza/Livehelp/Block/Functions.php +44 -6
- app/code/community/Sostanza/Livehelp/Model/Config/Source/GetCool.php +35 -0
- app/code/community/Sostanza/Livehelp/controllers/IndexController.php +4 -2
- app/code/community/Sostanza/Livehelp/etc/config.xml +1 -1
- app/code/community/Sostanza/Livehelp/etc/system.xml +48 -13
- app/design/frontend/base/default/template/livehelp/widget.phtml +92 -24
- package.xml +11 -6
app/code/community/Sostanza/Livehelp/Block/Functions.php
CHANGED
@@ -2,19 +2,26 @@
|
|
2 |
|
3 |
class Sostanza_Livehelp_Block_Functions extends Mage_Core_Block_Template
|
4 |
{
|
|
|
5 |
protected $_livehelpID = false;
|
6 |
protected $_method = false;
|
7 |
protected $_dynamic = false;
|
8 |
-
protected $
|
9 |
-
protected $
|
|
|
|
|
|
|
10 |
protected $_cart = false;
|
11 |
protected $_trackorder = false;
|
12 |
protected $LHinfo = false;
|
13 |
-
|
|
|
|
|
14 |
public function isActive()
|
15 |
{
|
16 |
return Mage::getStoreConfigFlag('livehelp/widget/active') && $this->getLivehelpID();
|
17 |
-
}
|
|
|
18 |
public function getLivehelpID()
|
19 |
{
|
20 |
if ($this->_livehelpID === false)
|
@@ -22,25 +29,56 @@ class Sostanza_Livehelp_Block_Functions extends Mage_Core_Block_Template
|
|
22 |
|
23 |
return $this->_livehelpID;
|
24 |
}
|
|
|
25 |
public function getDynamic()
|
26 |
{
|
27 |
if ($this->_dynamic === false)
|
28 |
$this->_dynamic = Mage::getStoreConfig('livehelp/advancedconfig/filter');
|
29 |
return $this->_dynamic;
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
public function getCart()
|
32 |
{
|
33 |
if ($this->_cart === false)
|
34 |
$this->_cart = Mage::getStoreConfig('livehelp/advancedconfig/cart');
|
35 |
return $this->_cart;
|
36 |
-
}
|
|
|
37 |
public function trackOrder()
|
38 |
{
|
39 |
if ($this->_trackorder === false)
|
40 |
$this->_trackorder = Mage::getStoreConfig('livehelp/advancedconfig/trackorder');
|
41 |
return $this->_trackorder;
|
42 |
}
|
43 |
-
|
44 |
public function trackCustomerOrder(){
|
45 |
$sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
46 |
$oOrder = Mage::getModel('sales/order')->load($sOrderId);
|
2 |
|
3 |
class Sostanza_Livehelp_Block_Functions extends Mage_Core_Block_Template
|
4 |
{
|
5 |
+
//inizializzo tutto a false
|
6 |
protected $_livehelpID = false;
|
7 |
protected $_method = false;
|
8 |
protected $_dynamic = false;
|
9 |
+
protected $_viewTUTTO = false;
|
10 |
+
protected $_viewGEN= false;
|
11 |
+
protected $_viewCAT= false;
|
12 |
+
protected $_viewPROD= false;
|
13 |
+
protected $_viewFUNNEL= false;
|
14 |
protected $_cart = false;
|
15 |
protected $_trackorder = false;
|
16 |
protected $LHinfo = false;
|
17 |
+
|
18 |
+
|
19 |
+
//controlla se il plugin è stato abilitato dall'utente
|
20 |
public function isActive()
|
21 |
{
|
22 |
return Mage::getStoreConfigFlag('livehelp/widget/active') && $this->getLivehelpID();
|
23 |
+
}
|
24 |
+
//recupera l ID Livehelp
|
25 |
public function getLivehelpID()
|
26 |
{
|
27 |
if ($this->_livehelpID === false)
|
29 |
|
30 |
return $this->_livehelpID;
|
31 |
}
|
32 |
+
//vecchia funzione che recuperava l'id del widget dinamico (forse obsoleta con ultima release)
|
33 |
public function getDynamic()
|
34 |
{
|
35 |
if ($this->_dynamic === false)
|
36 |
$this->_dynamic = Mage::getStoreConfig('livehelp/advancedconfig/filter');
|
37 |
return $this->_dynamic;
|
38 |
}
|
39 |
+
//recupera ID widget del menu a tendina "all"
|
40 |
+
public function getGEN()
|
41 |
+
{
|
42 |
+
if ($this->_viewGEN === false)
|
43 |
+
$this->_viewGEN = Mage::getStoreConfig('livehelp/advancedconfig/viewGEN');
|
44 |
+
return $this->_viewGEN;
|
45 |
+
}
|
46 |
+
//recupera ID widget del menu a tendina "categoria"
|
47 |
+
public function getCAT()
|
48 |
+
{
|
49 |
+
if ($this->_viewCAT === false)
|
50 |
+
$this->_viewCAT = Mage::getStoreConfig('livehelp/advancedconfig/viewCAT');
|
51 |
+
return $this->_viewCAT;
|
52 |
+
}
|
53 |
+
//recupera ID widget del menu a tendina "prodotto"
|
54 |
+
public function getPROD()
|
55 |
+
{
|
56 |
+
if ($this->_viewPROD === false)
|
57 |
+
$this->_viewPROD = Mage::getStoreConfig('livehelp/advancedconfig/viewPROD');
|
58 |
+
return $this->_viewPROD;
|
59 |
+
}
|
60 |
+
//recupera ID widget del menu a tendina "funnel", quindi carrello e checkout
|
61 |
+
public function getFUNNEL()
|
62 |
+
{
|
63 |
+
if ($this->_viewFUNNEL === false)
|
64 |
+
$this->_viewFUNNEL = Mage::getStoreConfig('livehelp/advancedconfig/viewFUNNEL');
|
65 |
+
return $this->_viewFUNNEL;
|
66 |
+
}
|
67 |
+
//controlla se è attivata l'opzione di visualizzazione carrello
|
68 |
public function getCart()
|
69 |
{
|
70 |
if ($this->_cart === false)
|
71 |
$this->_cart = Mage::getStoreConfig('livehelp/advancedconfig/cart');
|
72 |
return $this->_cart;
|
73 |
+
}
|
74 |
+
//controlla se è attivata l'opzione di tracking ordini
|
75 |
public function trackOrder()
|
76 |
{
|
77 |
if ($this->_trackorder === false)
|
78 |
$this->_trackorder = Mage::getStoreConfig('livehelp/advancedconfig/trackorder');
|
79 |
return $this->_trackorder;
|
80 |
}
|
81 |
+
//creazione dell'iframe livehelp per il tracking ordini se trackorder() è attivato
|
82 |
public function trackCustomerOrder(){
|
83 |
$sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
84 |
$oOrder = Mage::getModel('sales/order')->load($sOrderId);
|
app/code/community/Sostanza/Livehelp/Model/Config/Source/GetCool.php
CHANGED
@@ -16,9 +16,43 @@ class Sostanza_Livehelp_Model_Config_Source_GetCool
|
|
16 |
return $this->_livehelpID;
|
17 |
|
18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
public function toOptionArray()
|
21 |
{
|
|
|
|
|
|
|
|
|
22 |
$curl = curl_init();
|
23 |
|
24 |
$id=$this->getLivehelpID();
|
@@ -31,6 +65,7 @@ $resp = curl_exec($curl);
|
|
31 |
|
32 |
curl_close($curl);
|
33 |
$resp= substr_replace($resp ,"",-1);
|
|
|
34 |
$asArr = explode(',', $resp);
|
35 |
|
36 |
foreach( $asArr as $val ){
|
16 |
return $this->_livehelpID;
|
17 |
|
18 |
}
|
19 |
+
public function getDynamic()
|
20 |
+
{
|
21 |
+
if ($this->_dynamic === false)
|
22 |
+
$this->_dynamic = Mage::getStoreConfig('livehelp/advancedconfig/filter');
|
23 |
+
return $this->_dynamic;
|
24 |
+
}
|
25 |
+
public function getGEN()
|
26 |
+
{
|
27 |
+
if ($this->_viewGEN === false)
|
28 |
+
$this->_viewGEN = Mage::getStoreConfig('livehelp/advancedconfig/viewGEN');
|
29 |
+
return $this->_viewGEN;
|
30 |
+
}
|
31 |
+
public function getCAT()
|
32 |
+
{
|
33 |
+
if ($this->_viewCAT === false)
|
34 |
+
$this->_viewCAT = Mage::getStoreConfig('livehelp/advancedconfig/viewCAT');
|
35 |
+
return $this->_viewCAT;
|
36 |
+
}
|
37 |
+
public function getPROD()
|
38 |
+
{
|
39 |
+
if ($this->_viewPROD === false)
|
40 |
+
$this->_viewPROD = Mage::getStoreConfig('livehelp/advancedconfig/viewPROD');
|
41 |
+
return $this->_viewPROD;
|
42 |
+
}
|
43 |
+
public function getFUNNEL()
|
44 |
+
{
|
45 |
+
if ($this->_viewFUNNEL === false)
|
46 |
+
$this->_viewFUNNEL = Mage::getStoreConfig('livehelp/advancedconfig/viewFUNNEL');
|
47 |
+
return $this->_viewFUNNEL;
|
48 |
+
}
|
49 |
|
50 |
public function toOptionArray()
|
51 |
{
|
52 |
+
if ($this->getFUNNEL()!="0" || $this->getPROD()!="0" || $this->getGEN()!="0" || $this->getCAT()!="0"){
|
53 |
+
Mage::getConfig()->saveConfig('livehelp/advancedconfig/filter', '0');
|
54 |
+
}
|
55 |
+
|
56 |
$curl = curl_init();
|
57 |
|
58 |
$id=$this->getLivehelpID();
|
65 |
|
66 |
curl_close($curl);
|
67 |
$resp= substr_replace($resp ,"",-1);
|
68 |
+
$resp=$resp.",0=>Choose a widget...";
|
69 |
$asArr = explode(',', $resp);
|
70 |
|
71 |
foreach( $asArr as $val ){
|
app/code/community/Sostanza/Livehelp/controllers/IndexController.php
CHANGED
@@ -4,7 +4,7 @@ class Sostanza_Livehelp_IndexController extends Mage_Core_Controller_Front_Actio
|
|
4 |
{
|
5 |
public function getcartlhinfoAction()
|
6 |
{
|
7 |
-
|
8 |
if(isset($_GET["LH_SID"]))
|
9 |
{
|
10 |
|
@@ -23,7 +23,9 @@ class Sostanza_Livehelp_IndexController extends Mage_Core_Controller_Front_Actio
|
|
23 |
|
24 |
|
25 |
$this->_redirectUrl($MAGENTOcart);
|
26 |
-
}
|
|
|
|
|
27 |
$session_id = Mage::getSingleton("core/session")->getEncryptedSessionId(); // get our session
|
28 |
echo Mage::getUrl()."livehelp/index/getcartlhinfo/?LH_SID=".$session_id;
|
29 |
}
|
4 |
{
|
5 |
public function getcartlhinfoAction()
|
6 |
{
|
7 |
+
//se il controller è stato richiamato da Livehelp setta il cookie frontend e fa il redirect al carrello utente
|
8 |
if(isset($_GET["LH_SID"]))
|
9 |
{
|
10 |
|
23 |
|
24 |
|
25 |
$this->_redirectUrl($MAGENTOcart);
|
26 |
+
}
|
27 |
+
//altrimenti recupera la sessione utente da passare all'operatore
|
28 |
+
else{
|
29 |
$session_id = Mage::getSingleton("core/session")->getEncryptedSessionId(); // get our session
|
30 |
echo Mage::getUrl()."livehelp/index/getcartlhinfo/?LH_SID=".$session_id;
|
31 |
}
|
app/code/community/Sostanza/Livehelp/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Sostanza_Livehelp>
|
5 |
-
<version>1.2
|
6 |
</Sostanza_Livehelp>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Sostanza_Livehelp>
|
5 |
+
<version>1.6.2</version>
|
6 |
</Sostanza_Livehelp>
|
7 |
</modules>
|
8 |
<global>
|
app/code/community/Sostanza/Livehelp/etc/system.xml
CHANGED
@@ -67,21 +67,9 @@
|
|
67 |
<widget_method>2</widget_method>
|
68 |
</depends>
|
69 |
<comment>
|
70 |
-
<![CDATA[If you have set a list of dynamic widget in <a href="http://server.livehelp.it" target=blank>Livehelp® dashboard</a>, you
|
71 |
</comment>
|
72 |
<fields>
|
73 |
-
<filter module="livehelp" translate="label comment">
|
74 |
-
<label>Choose a dynamic js widget</label>
|
75 |
-
<frontend_type>select</frontend_type>
|
76 |
-
<source_model>livehelp/config_source_GetCool</source_model>
|
77 |
-
<comment>
|
78 |
-
<![CDATA[The list of your widgets. <b>Click "Save Config"</b> if you don't see any widget.]]>
|
79 |
-
</comment>
|
80 |
-
<sort_order>1</sort_order>
|
81 |
-
<show_in_default>2</show_in_default>
|
82 |
-
<show_in_website>1</show_in_website>
|
83 |
-
<show_in_store>1</show_in_store>
|
84 |
-
</filter>
|
85 |
<cart module="livehelp" translate="label">
|
86 |
<label>Let agents view/edit cart details</label>
|
87 |
<frontend_type>select</frontend_type>
|
@@ -103,6 +91,53 @@
|
|
103 |
<show_in_website>1</show_in_website>
|
104 |
<show_in_store>1</show_in_store>
|
105 |
</trackorder>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</fields>
|
107 |
</advancedconfig>
|
108 |
</groups>
|
67 |
<widget_method>2</widget_method>
|
68 |
</depends>
|
69 |
<comment>
|
70 |
+
<![CDATA[If you have set a list of dynamic widget in <a href="http://server.livehelp.it" target=blank>Livehelp® dashboard</a>, choose the widget that will pop up on each type of your e-commerce pages:<br>- <b>All</b>: the chat widget will pop up on every page of the website.<br>- <b>Categories</b>: the chat widget will pop up in the category listing (i.e. apparel, shoes, accessories…).<br>- <b>Product</b>: the chat widget will pop up on each product page.<br>- <b>Funnel</b>: the chat widget will pop up in the cart and checkout pages.<br>- <b>Others</b>: all the pages that aren't products,categories or funnel.<br><br>If you would like the chat widget to appear through the whole website, just choose the widget for the ALL select and leave the others unselected.]]>
|
71 |
</comment>
|
72 |
<fields>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
<cart module="livehelp" translate="label">
|
74 |
<label>Let agents view/edit cart details</label>
|
75 |
<frontend_type>select</frontend_type>
|
91 |
<show_in_website>1</show_in_website>
|
92 |
<show_in_store>1</show_in_store>
|
93 |
</trackorder>
|
94 |
+
|
95 |
+
<filter module="livehelp" translate="label">
|
96 |
+
|
97 |
+
<label>All</label>
|
98 |
+
<frontend_type>select</frontend_type>
|
99 |
+
<source_model>livehelp/config_source_GetCool</source_model>
|
100 |
+
<sort_order>4</sort_order>
|
101 |
+
<show_in_default>1</show_in_default>
|
102 |
+
<show_in_website>1</show_in_website>
|
103 |
+
<show_in_store>1</show_in_store>
|
104 |
+
</filter>
|
105 |
+
<viewGEN module="livehelp" translate="label">
|
106 |
+
<label>Others</label>
|
107 |
+
<frontend_type>select</frontend_type>
|
108 |
+
<source_model>livehelp/config_source_GetCool</source_model>
|
109 |
+
<sort_order>5</sort_order>
|
110 |
+
<show_in_default>1</show_in_default>
|
111 |
+
<show_in_website>1</show_in_website>
|
112 |
+
<show_in_store>1</show_in_store>
|
113 |
+
</viewGEN>
|
114 |
+
<viewCAT module="livehelp" translate="label">
|
115 |
+
<label>Categories</label>
|
116 |
+
<frontend_type>select</frontend_type>
|
117 |
+
<source_model>livehelp/config_source_GetCool</source_model>
|
118 |
+
<sort_order>6</sort_order>
|
119 |
+
<show_in_default>1</show_in_default>
|
120 |
+
<show_in_website>1</show_in_website>
|
121 |
+
<show_in_store>1</show_in_store>
|
122 |
+
</viewCAT>
|
123 |
+
<viewPROD module="livehelp" translate="label">
|
124 |
+
<label>Product</label>
|
125 |
+
<frontend_type>select</frontend_type>
|
126 |
+
<source_model>livehelp/config_source_GetCool</source_model>
|
127 |
+
<sort_order>7</sort_order>
|
128 |
+
<show_in_default>1</show_in_default>
|
129 |
+
<show_in_website>1</show_in_website>
|
130 |
+
<show_in_store>1</show_in_store>
|
131 |
+
</viewPROD>
|
132 |
+
<viewFUNNEL module="livehelp" translate="label">
|
133 |
+
<label>Funnel</label>
|
134 |
+
<frontend_type>select</frontend_type>
|
135 |
+
<source_model>livehelp/config_source_GetCool</source_model>
|
136 |
+
<sort_order>8</sort_order>
|
137 |
+
<show_in_default>1</show_in_default>
|
138 |
+
<show_in_website>1</show_in_website>
|
139 |
+
<show_in_store>1</show_in_store>
|
140 |
+
</viewFUNNEL>
|
141 |
</fields>
|
142 |
</advancedconfig>
|
143 |
</groups>
|
app/design/frontend/base/default/template/livehelp/widget.phtml
CHANGED
@@ -1,34 +1,102 @@
|
|
1 |
<?php
|
2 |
//get the page
|
|
|
3 |
$success= Mage::app()->getRequest()->getActionName();
|
4 |
if ($this->isActive()){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
$
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
{
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
//voglio tracciare gli ordini conclusi grazie alla chat
|
15 |
-
|
16 |
-
{
|
17 |
-
if ($success=="success")
|
18 |
{
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}?>
|
1 |
<?php
|
2 |
//get the page
|
3 |
+
|
4 |
$success= Mage::app()->getRequest()->getActionName();
|
5 |
if ($this->isActive()){
|
6 |
+
//$view=0;
|
7 |
+
$confronto=$this->getViewLH();
|
8 |
+
$view=false;
|
9 |
+
$tutto=$this->getDynamic();
|
10 |
+
$gen=$this->getGEN();
|
11 |
+
$cat=$this->getCAT();
|
12 |
+
$prod=$this->getPROD();
|
13 |
+
$funnel=$this->getFUNNEL();
|
14 |
+
$module ='';
|
15 |
+
$controller='';
|
16 |
+
$action='';
|
17 |
+
|
18 |
+
if( ($funnel=="0" && $prod=="0" && $cat=="0" && $gen=="0") && $tutto!="0"){
|
19 |
+
$view=true;
|
20 |
+
$idLH=$tutto;
|
21 |
+
}else{
|
22 |
+
|
23 |
+
if($funnel!="0"){
|
24 |
|
25 |
+
$request = $this->getRequest();
|
26 |
+
$module = $request->getModuleName();
|
27 |
+
$controller = $request->getControllerName();
|
28 |
+
$action = $request->getActionName();
|
29 |
+
if($module == 'checkout' && ($controller == 'cart' || $controller == 'onepage') && $action == 'index' || ($success=="success")){
|
30 |
+
|
31 |
+
$view=true;
|
32 |
+
$idLH=$funnel;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
if($prod!="0"){
|
36 |
+
$product=Mage::registry('product');
|
37 |
+
if ($product && $product->getId()) {
|
38 |
+
$view=true;
|
39 |
+
|
40 |
+
$idLH=$prod;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
if($cat!="0"){
|
44 |
+
$category = Mage::registry('current_category');
|
45 |
+
$product=Mage::registry('product');
|
46 |
+
if (($category && $category->getId())&&!($product && $product->getId())) {
|
47 |
+
$view=true;
|
48 |
+
|
49 |
+
$idLH=$cat;
|
50 |
}
|
51 |
+
}
|
52 |
+
if($gen!="0"){
|
53 |
+
|
54 |
+
$category = Mage::registry('current_category');
|
55 |
+
$product=Mage::registry('product');
|
56 |
+
$request = $this->getRequest();
|
57 |
+
$module = $request->getModuleName();
|
58 |
+
$controller = $request->getControllerName();
|
59 |
+
$action = $request->getActionName();
|
60 |
+
|
61 |
+
if(!($module == 'checkout' && ($controller == 'cart' || $controller == 'onepage') && $action == 'index' || ($success=="success")) && (!($category && $category->getId()) &&!($product && $product->getId()))){
|
62 |
|
63 |
+
$view=true;
|
64 |
+
$idLH=$gen;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
//voglio tracciare gli ordini conclusi grazie alla chat
|
69 |
+
if ($this->trackOrder()!="0")
|
|
|
|
|
70 |
{
|
71 |
+
if ($success=="success")
|
72 |
+
{
|
73 |
+
echo $this->trackCustomerOrder();
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
if($view==true){
|
78 |
+
|
79 |
+
$MAGENTOcart="";
|
80 |
+
|
81 |
+
//vuole vedere cosa c'� nel carrello o l'id dell'utente se loggato
|
82 |
+
if ($this->getCart()!="0")
|
83 |
+
{
|
84 |
+
$MAGENTOcart=Mage::getUrl()."livehelp/index/getcartlhinfo";
|
85 |
+
}
|
86 |
+
|
87 |
+
?>
|
88 |
+
<!-- Start LiveHelp Magento activation widget - http://www.livehelp.it -->
|
89 |
+
<script type="text/javascript">
|
90 |
+
var LHmagento='<?php echo $MAGENTOcart ?>';
|
91 |
+
var LHinfo='';
|
92 |
+
function LHready(){if(document.readyState == "complete"){(function(){ var lh=document.createElement("script");
|
93 |
+
lh.type="text/javascript"; lh.async=true;
|
94 |
+
lh.src="//server.livehelp.it/widgetjs/<?php echo $this->getLivehelpID(); ?>/<?php echo $idLH; ?>.js?x=" + 1*new Date();
|
95 |
+
var node=document.getElementsByTagName("script")[0];
|
96 |
+
node.parentNode.insertBefore(lh,node);
|
97 |
+
})();} else {setTimeout('LHready()',150);}} LHready();
|
98 |
+
</script>
|
99 |
+
<?php
|
100 |
+
}
|
101 |
+
|
102 |
}?>
|
package.xml
CHANGED
@@ -1,18 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Sostanza_LiveHelp</name>
|
4 |
-
<version>1.6.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Livehelp live chat support</summary>
|
10 |
<description>LiveHelp® is the customer care service in which the company operator answers to customers' and prospects' questions directly in a real-time chat.</description>
|
11 |
-
<notes>
|
|
|
|
|
|
|
|
|
|
|
12 |
<authors><author><name>a.laciura@sostanza.it</name><user>alaciura</user><email>a.laciura@sostanza.it</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Sostanza"><dir name="Livehelp"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Buttons.php" hash="f451d7bd1d3407bde94d62e883e4ff03"/></dir></dir></dir><file name="Functions.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.1.0</min><max>5.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Sostanza_LiveHelp</name>
|
4 |
+
<version>1.6.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Livehelp live chat support</summary>
|
10 |
<description>LiveHelp® is the customer care service in which the company operator answers to customers' and prospects' questions directly in a real-time chat.</description>
|
11 |
+
<notes>Choose the widget that will pop up on each type of your e-commerce pages:
|
12 |
+
- All: the chat widget will pop up on every page of the website
|
13 |
+
- Categories: the chat widget will pop up in the category listing (i.e. apparel, shoes, accessories…)
|
14 |
+
- Product: the chat widget will pop up on each product page
|
15 |
+
- Funnel: the chat widget will pop up in the cart and checkout pages
|
16 |
+
- Others: all the pages that aren't products,categories or funnel (like profile, wishlist)</notes>
|
17 |
<authors><author><name>a.laciura@sostanza.it</name><user>alaciura</user><email>a.laciura@sostanza.it</email></author></authors>
|
18 |
+
<date>2016-08-02</date>
|
19 |
+
<time>09:25:38</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="Sostanza"><dir name="Livehelp"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Source"><file name="Buttons.php" hash="f451d7bd1d3407bde94d62e883e4ff03"/></dir></dir></dir><file name="Functions.php" hash="9cf7f675cad8fa2c65bf2e16aa5aa295"/></dir><dir name="Helper"><file name="Data.php" hash="350213592a87639adb3c550335b8bec6"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="GetCool.php" hash="4858dae16b90fb28bf274dca22568ef7"/></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="c529ffdacdc549c46213a2d7c93692f3"/></dir><dir name="etc"><file name="adminhtml.xml" hash="de3981ba2172cc18f178e9e55c71232b"/><file name="config.xml" hash="8ec6e96750cf86b4bc060e60d4e906dc"/><file name="system.xml" hash="1ed781268acf23a15a0129a177fb863e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="livehelp.xml" hash="4cada04c2d968e0721a69c5287678889"/></dir><dir name="template"><dir name="livehelp"><file name="widget.phtml" hash="8cafadff854e839595496b54f8131d68"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sostanza_Livehelp.xml" hash="e233123489b59007400da8a42e60b0fa"/></dir></target></contents>
|
21 |
<compatible/>
|
22 |
+
<dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
|
23 |
</package>
|