Version Notes
Módulo de integração entre o magento e a plataforma RD Station da Resultados Digitais para criação e qualificação de leads.
Este módulo executa chamadas para a API do RDStation quando:
Um formulário de contato é enviado
Uma nova conta de cliente é criada
Um novo pedido é criado
Um cliente assina a newsletter da loja virtual
Download this release
Release Info
| Developer | Flow eCommerce |
| Extension | flowecommerce_resultadosdigitais |
| Version | 0.1.4 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.3 to 0.1.4
app/code/local/Flowecommerce/Resultadosdigitais/Model/Observer.php
CHANGED
|
@@ -49,6 +49,10 @@ class Flowecommerce_Resultadosdigitais_Model_Observer {
|
|
| 49 |
return Mage::getModel('resultadosdigitais/requestdata');
|
| 50 |
}
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
public function contactPost(Varien_Event_Observer $observer) {
|
| 53 |
if ($this->_getHelper()->isEnabled()) {
|
| 54 |
$data = $observer->getData();
|
|
@@ -58,6 +62,8 @@ class Flowecommerce_Resultadosdigitais_Model_Observer {
|
|
| 58 |
$data->setEmail($post['email']);
|
| 59 |
$data->setNome($post['name']);
|
| 60 |
$data->setTelefone($post['telephone']);
|
|
|
|
|
|
|
| 61 |
|
| 62 |
$this->_getApi()->addLeadConversion(self::LEAD_CONTACTFORM, $data);
|
| 63 |
}
|
|
@@ -147,6 +153,7 @@ class Flowecommerce_Resultadosdigitais_Model_Observer {
|
|
| 147 |
$data->setData('produto__categoria', implode(', ', $categoryNames));
|
| 148 |
$data->setData('metodo_pagamento', $order->getPayment()->getMethod());
|
| 149 |
$data->setData('metodo_entrega', $order->getShippingMethod());
|
|
|
|
| 150 |
|
| 151 |
$this->_getApi()->addLeadConversion(self::LEAD_ORDERPLACE, $data);
|
| 152 |
$this->_getApi()->markSale($customer->getEmail(), $order_value);
|
|
@@ -167,6 +174,8 @@ class Flowecommerce_Resultadosdigitais_Model_Observer {
|
|
| 167 |
$data->setAniversario($customer->getDob());
|
| 168 |
$data->setGender($this->_getGenderLabel($customer->getGender()));
|
| 169 |
$data->setCpfCnpj($customer->getTaxvat());
|
|
|
|
|
|
|
| 170 |
|
| 171 |
$this->_getApi()->addLeadConversion(self::LEAD_ACCOUNTCREATE, $data);
|
| 172 |
}
|
|
@@ -181,9 +190,11 @@ class Flowecommerce_Resultadosdigitais_Model_Observer {
|
|
| 181 |
*/
|
| 182 |
$data = $this->_getRequestDataObject();
|
| 183 |
$data->setEmail($subscriber->getEmail());
|
|
|
|
|
|
|
| 184 |
|
| 185 |
$this->_getApi()->addLeadConversion(self::LEAD_NEWSLETTERSUBSCRIBE, $data);
|
| 186 |
}
|
| 187 |
}
|
| 188 |
}
|
| 189 |
-
}
|
| 49 |
return Mage::getModel('resultadosdigitais/requestdata');
|
| 50 |
}
|
| 51 |
|
| 52 |
+
protected function _getStoreDataObject() {
|
| 53 |
+
return Mage::app()->getStore();
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
public function contactPost(Varien_Event_Observer $observer) {
|
| 57 |
if ($this->_getHelper()->isEnabled()) {
|
| 58 |
$data = $observer->getData();
|
| 62 |
$data->setEmail($post['email']);
|
| 63 |
$data->setNome($post['name']);
|
| 64 |
$data->setTelefone($post['telephone']);
|
| 65 |
+
|
| 66 |
+
$data->setData('store_name', $this->_getStoreDataObject()->getName());
|
| 67 |
|
| 68 |
$this->_getApi()->addLeadConversion(self::LEAD_CONTACTFORM, $data);
|
| 69 |
}
|
| 153 |
$data->setData('produto__categoria', implode(', ', $categoryNames));
|
| 154 |
$data->setData('metodo_pagamento', $order->getPayment()->getMethod());
|
| 155 |
$data->setData('metodo_entrega', $order->getShippingMethod());
|
| 156 |
+
$data->setData('store_name', $this->_getStoreDataObject()->getName());
|
| 157 |
|
| 158 |
$this->_getApi()->addLeadConversion(self::LEAD_ORDERPLACE, $data);
|
| 159 |
$this->_getApi()->markSale($customer->getEmail(), $order_value);
|
| 174 |
$data->setAniversario($customer->getDob());
|
| 175 |
$data->setGender($this->_getGenderLabel($customer->getGender()));
|
| 176 |
$data->setCpfCnpj($customer->getTaxvat());
|
| 177 |
+
|
| 178 |
+
$data->setData('store_name', $this->_getStoreDataObject()->getName());
|
| 179 |
|
| 180 |
$this->_getApi()->addLeadConversion(self::LEAD_ACCOUNTCREATE, $data);
|
| 181 |
}
|
| 190 |
*/
|
| 191 |
$data = $this->_getRequestDataObject();
|
| 192 |
$data->setEmail($subscriber->getEmail());
|
| 193 |
+
|
| 194 |
+
$data->setData('store_name', $this->_getStoreDataObject()->getName());
|
| 195 |
|
| 196 |
$this->_getApi()->addLeadConversion(self::LEAD_NEWSLETTERSUBSCRIBE, $data);
|
| 197 |
}
|
| 198 |
}
|
| 199 |
}
|
| 200 |
+
}
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>flowecommerce_resultadosdigitais</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -24,9 +24,9 @@ Uma nova conta de cliente é criada
|
|
| 24 |
Um novo pedido é criado
|
| 25 |
Um cliente assina a newsletter da loja virtual</notes>
|
| 26 |
<authors><author><name>Flow eCommerce</name><user>flowecommerce</user><email>contato@flowecommerce.com</email></author><author><name>Gabriel Queiroz Silva</name><user>gabrielqs</user><email>gabriel@flowecommerce.com</email></author></authors>
|
| 27 |
-
<date>2015-
|
| 28 |
-
<time>
|
| 29 |
-
<contents><target name="magelocal"><dir name="Flowecommerce"><dir name="Resultadosdigitais"><dir name="Helper"><file name="Data.php" hash="00d2ae49825e162eb99dd72a98895a61"/></dir><dir name="Model"><file name="Api.php" hash="e9657c111243ba10c79b32949f6f4d29"/><dir name="Googleanalytics"><file name="Customvar.php" hash="d163ebb5bb590dd7553ed1356c033a2c"/><file name="Tracker.php" hash="be95e10bd1df9ca5319f5a50967f2eed"/><dir name="Utm"><file name="A.php" hash="7604206d87189c56f109231c4a95f00f"/><file name="B.php" hash="e710a66f3c061f4da69e9f468c2eaf5c"/><file name="C.php" hash="27c99ca82b05b11bcba01e88f9a3e5c6"/><file name="V.php" hash="9c77ced8175034ac42b89878e26844f5"/><file name="Z.php" hash="1bb0821f8752993b737a923fcbd4b314"/></dir></dir><file name="Observer.php" hash="
|
| 30 |
<compatible/>
|
| 31 |
<dependencies><required><php><min>5.3.0</min><max>5.6.3</max></php></required></dependencies>
|
| 32 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>flowecommerce_resultadosdigitais</name>
|
| 4 |
+
<version>0.1.4</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 24 |
Um novo pedido é criado
|
| 25 |
Um cliente assina a newsletter da loja virtual</notes>
|
| 26 |
<authors><author><name>Flow eCommerce</name><user>flowecommerce</user><email>contato@flowecommerce.com</email></author><author><name>Gabriel Queiroz Silva</name><user>gabrielqs</user><email>gabriel@flowecommerce.com</email></author></authors>
|
| 27 |
+
<date>2015-07-28</date>
|
| 28 |
+
<time>09:59:10</time>
|
| 29 |
+
<contents><target name="magelocal"><dir name="Flowecommerce"><dir name="Resultadosdigitais"><dir name="Helper"><file name="Data.php" hash="00d2ae49825e162eb99dd72a98895a61"/></dir><dir name="Model"><file name="Api.php" hash="e9657c111243ba10c79b32949f6f4d29"/><dir name="Googleanalytics"><file name="Customvar.php" hash="d163ebb5bb590dd7553ed1356c033a2c"/><file name="Tracker.php" hash="be95e10bd1df9ca5319f5a50967f2eed"/><dir name="Utm"><file name="A.php" hash="7604206d87189c56f109231c4a95f00f"/><file name="B.php" hash="e710a66f3c061f4da69e9f468c2eaf5c"/><file name="C.php" hash="27c99ca82b05b11bcba01e88f9a3e5c6"/><file name="V.php" hash="9c77ced8175034ac42b89878e26844f5"/><file name="Z.php" hash="1bb0821f8752993b737a923fcbd4b314"/></dir></dir><file name="Observer.php" hash="238f47383f5d1ff054a0b30469ebc082"/><file name="Requestdata.php" hash="d97634793fae544f18e5ffda617ed745"/></dir><dir name="etc"><file name="adminhtml.xml" hash="be9b06eed9df502e9759b5cd397f9fa2"/><file name="config.xml" hash="895bd2d9a76ff3bc31811dd2129c0b9f"/><file name="system.xml" hash="da64ea97bc98fe6f42988df79c2ace1f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Flowecommerce_Resultadosdigitais.xml" hash="5d476dea8a51bda77126fa637c5f29f2"/></dir></target></contents>
|
| 30 |
<compatible/>
|
| 31 |
<dependencies><required><php><min>5.3.0</min><max>5.6.3</max></php></required></dependencies>
|
| 32 |
</package>
|
