Version Notes
optin guest customer
Download this release
Release Info
| Developer | KremsaDigital |
| Extension | StarSMP_Customers_Tracking_Integration |
| Version | 1.0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.5 to 1.0.6
app/code/community/KremsaDigital/StarSocial/Model/Observer.php
CHANGED
|
@@ -23,6 +23,22 @@ class KremsaDigital_StarSocial_Model_Observer {
|
|
| 23 |
$track->optin($data);
|
| 24 |
}
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
public function optinAfterLogout($observer) {
|
| 27 |
$track = Mage::getModel('starsocial/track');
|
| 28 |
$track->logout();
|
| 23 |
$track->optin($data);
|
| 24 |
}
|
| 25 |
|
| 26 |
+
public function optinAfterSaveOrder($observer) {
|
| 27 |
+
$order = $observer->getEvent()->getOrder();
|
| 28 |
+
$isGuest = (boolean)$order->getCustomerIsGuest();
|
| 29 |
+
if ($isGuest) {
|
| 30 |
+
$order_data = $order->getBillingAddress()->getData();
|
| 31 |
+
|
| 32 |
+
$track = Mage::getModel('starsocial/track');
|
| 33 |
+
$data = array(
|
| 34 |
+
'email'=>$order_data['email'],
|
| 35 |
+
"first_name" => $order_data['firstname'],
|
| 36 |
+
"last_name" => $order_data['lastname'],
|
| 37 |
+
);
|
| 38 |
+
$track->optin($data);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
public function optinAfterLogout($observer) {
|
| 43 |
$track = Mage::getModel('starsocial/track');
|
| 44 |
$track->logout();
|
app/code/community/KremsaDigital/StarSocial/etc/config.xml
CHANGED
|
@@ -55,6 +55,14 @@
|
|
| 55 |
</trackCheckoutComplete>
|
| 56 |
</observers>
|
| 57 |
</checkout_onepage_controller_success_action>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
</events>
|
| 59 |
</frontend>
|
| 60 |
|
| 55 |
</trackCheckoutComplete>
|
| 56 |
</observers>
|
| 57 |
</checkout_onepage_controller_success_action>
|
| 58 |
+
<sales_order_save_after>
|
| 59 |
+
<observers>
|
| 60 |
+
<optinAfterSaveOrder>
|
| 61 |
+
<class>KremsaDigital_StarSocial_Model_Observer</class>
|
| 62 |
+
<method>optinAfterSaveOrder</method>
|
| 63 |
+
</optinAfterSaveOrder>
|
| 64 |
+
</observers>
|
| 65 |
+
</sales_order_save_after>
|
| 66 |
</events>
|
| 67 |
</frontend>
|
| 68 |
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>StarSMP_Customers_Tracking_Integration</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -21,11 +21,11 @@ StarSMP Universal Tag Features: 
|
|
| 21 |
- add custom tracking codes
|
| 22 |
- automatically deploys to your Magento e-shop
|
| 23 |
- control access to your tracking codes</description>
|
| 24 |
-
<notes>
|
| 25 |
<authors><author><name>KremsaDigital</name><user>kremsa_design</user><email>kremsa.office.sk@gmail.com</email></author></authors>
|
| 26 |
-
<date>2014-10-
|
| 27 |
-
<time>
|
| 28 |
-
<contents><target name="magecommunity"><dir name="KremsaDigital"><dir name="StarSocial"><dir name="Helper"><file name="Data.php" hash="85963ac4a639c694b7db915ef5905c44"/></dir><dir name="Model"><file name="Observer.php" hash="
|
| 29 |
<compatible/>
|
| 30 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 31 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>StarSMP_Customers_Tracking_Integration</name>
|
| 4 |
+
<version>1.0.6</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 21 |
- add custom tracking codes
|
| 22 |
- automatically deploys to your Magento e-shop
|
| 23 |
- control access to your tracking codes</description>
|
| 24 |
+
<notes>optin guest customer</notes>
|
| 25 |
<authors><author><name>KremsaDigital</name><user>kremsa_design</user><email>kremsa.office.sk@gmail.com</email></author></authors>
|
| 26 |
+
<date>2014-10-16</date>
|
| 27 |
+
<time>19:15:17</time>
|
| 28 |
+
<contents><target name="magecommunity"><dir name="KremsaDigital"><dir name="StarSocial"><dir name="Helper"><file name="Data.php" hash="85963ac4a639c694b7db915ef5905c44"/></dir><dir name="Model"><file name="Observer.php" hash="6d4acd24a0b80e70dc7ea57143dacd13"/><file name="Track.php" hash="3de832a0f158cd173a036b93eb0dd028"/></dir><dir name="etc"><file name="adminhtml.xml" hash="735e6dfffa1e18830ec0f9a061eaa480"/><file name="config.xml" hash="61597357d6b60c410183b07ba296129b"/><file name="system.xml" hash="5c4f4fdb3735ea7c3396dcf681509e86"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="KremsaDesign_StarSocial.xml" hash="f07ad022b4e7aaa1c67f0bd9d2458f99"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="StarSocial.xml" hash="44aa76355559f1ab659e76fa5767dbd2"/></dir><dir name="template"><dir name="starsocial"><file name="tags-checkout.phtml" hash="f1986a33e545c1246ad07fa7fa5d2a4b"/><file name="tags.phtml" hash="833114f709760c4b7dd578675a9d564e"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="KremsaDigital"><dir name="StarSocial"><file name="channel.html" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="smp_login.php" hash="6edf68fb880bee500976a3a1a833a2fe"/></dir></dir></dir></target><target name="magelib"><dir name="KremsaDigital"><dir name="StarSocial"><file name="starsmp.php" hash="d6c0f4ca17813c9ce955fab7b10cb40a"/></dir></dir></target></contents>
|
| 29 |
<compatible/>
|
| 30 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 31 |
</package>
|
