Version Notes
Extension will now push Tracking Numbers when they are added to shipments.
Download this release
Release Info
Developer | Magento Core Team |
Extension | EmailDirect_Integration |
Version | 1.2.9 |
Comparing to | |
See all releases |
Code changes from version 1.2.8 to 1.2.9
app/code/local/EmailDirect/Integration/Helper/Data.php
CHANGED
@@ -193,6 +193,23 @@ class EmailDirect_Integration_Helper_Data extends Mage_Core_Helper_Abstract
|
|
193 |
|
194 |
return $merge_vars;
|
195 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
private function processMap(&$merge_vars,$maps, $data)
|
198 |
{
|
193 |
|
194 |
return $merge_vars;
|
195 |
}
|
196 |
+
|
197 |
+
public function getTrackingMergeVars($track, $order)
|
198 |
+
{
|
199 |
+
$merge_vars = array();
|
200 |
+
$this->debugLog('getTrackMergeVars');
|
201 |
+
$maps = unserialize( $this->config('shipping_fields', $order->getStoreId()) );
|
202 |
+
|
203 |
+
if($maps)
|
204 |
+
{
|
205 |
+
$this->debugLog('MAPS:');
|
206 |
+
$this->debugLog($maps);
|
207 |
+
|
208 |
+
$this->processMap($merge_vars, $maps, $track);
|
209 |
+
}
|
210 |
+
|
211 |
+
return $merge_vars;
|
212 |
+
}
|
213 |
|
214 |
private function processMap(&$merge_vars,$maps, $data)
|
215 |
{
|
app/code/local/EmailDirect/Integration/Model/Observer.php
CHANGED
@@ -467,6 +467,27 @@ class EmailDirect_Integration_Model_Observer
|
|
467 |
}
|
468 |
}
|
469 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
public function orderSaveAfter(Varien_Event_Observer $observer)
|
471 |
{
|
472 |
$sendit = Mage::helper('emaildirect')->config('sendorder');
|
467 |
}
|
468 |
}
|
469 |
}
|
470 |
+
|
471 |
+
public function salesOrderShipmentTrackSaveAfter(Varien_Event_Observer $observer)
|
472 |
+
{
|
473 |
+
$track = $observer->getEvent()->getTrack();
|
474 |
+
|
475 |
+
//Zend_debug::dump($track);
|
476 |
+
|
477 |
+
$order = $track->getShipment()->getOrder();
|
478 |
+
$shippingMethod = $order->getShippingMethod(); // String in format of 'carrier_method'
|
479 |
+
if (!$shippingMethod)
|
480 |
+
return;
|
481 |
+
|
482 |
+
$email = $order->getCustomerEmail();
|
483 |
+
|
484 |
+
$mergeVars = array();
|
485 |
+
|
486 |
+
$mergeVars = Mage::helper('emaildirect')->getTrackingMergeVars($track, $order);
|
487 |
+
|
488 |
+
Mage::getSingleton('emaildirect/wrapper_orders')->addSubscriberTracking($email, $mergeVars);
|
489 |
+
}
|
490 |
+
|
491 |
public function orderSaveAfter(Varien_Event_Observer $observer)
|
492 |
{
|
493 |
$sendit = Mage::helper('emaildirect')->config('sendorder');
|
app/code/local/EmailDirect/Integration/Model/Wrapper/Orders.php
CHANGED
@@ -81,6 +81,36 @@ class EmailDirect_Integration_Model_Wrapper_Orders
|
|
81 |
return $rc;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
public function addOrder($order)
|
85 |
{
|
86 |
$xml = $this->getOrderXml($order, $order->getCustomerEmail());
|
81 |
return $rc;
|
82 |
}
|
83 |
|
84 |
+
public function addSubscriberTracking($mail,$mergeVars,$uselist = TRUE)
|
85 |
+
{
|
86 |
+
$store = Mage::app()->getStore();
|
87 |
+
$sourceid = Mage::helper('emaildirect')->config('sourceid',$store->getId());
|
88 |
+
$publicationid = Mage::helper('emaildirect')->config('publication',$store->getId());
|
89 |
+
|
90 |
+
if($uselist)
|
91 |
+
$listid = Mage::helper('emaildirect')->config('list',$store->getId());
|
92 |
+
else
|
93 |
+
$listid = -1;
|
94 |
+
|
95 |
+
$data = "<CustomFields>";
|
96 |
+
foreach($mergeVars as $key => $value)
|
97 |
+
{
|
98 |
+
$data .= "<CustomField><FieldName>{$key}</FieldName><Value><![CDATA[{$value}]]></Value></CustomField>";
|
99 |
+
}
|
100 |
+
$data .= "</CustomFields>";
|
101 |
+
|
102 |
+
$list_data = "";
|
103 |
+
|
104 |
+
if ($listid != -1)
|
105 |
+
$list_data = "<Lists><int>{$listid}</int></Lists>";
|
106 |
+
|
107 |
+
$xml = "<Subscriber><EmailAddress>{$mail}</EmailAddress>{$data}<SourceID>{$sourceid}</SourceID><Publications><int>{$publicationid}</int></Publications>{$list_data}<Force>true</Force></Subscriber>";
|
108 |
+
|
109 |
+
$rc = Mage::getSingleton('emaildirect/wrapper_execute')->sendCommand("subscribers","","",$xml,false);
|
110 |
+
|
111 |
+
return $rc;
|
112 |
+
}
|
113 |
+
|
114 |
public function addOrder($order)
|
115 |
{
|
116 |
$xml = $this->getOrderXml($order, $order->getCustomerEmail());
|
app/code/local/EmailDirect/Integration/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<EmailDirect_Integration>
|
5 |
-
<version>1.2.
|
6 |
</EmailDirect_Integration>
|
7 |
</modules>
|
8 |
<global>
|
@@ -187,6 +187,15 @@
|
|
187 |
</modules>
|
188 |
</translate>
|
189 |
<events>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
<admin_system_config_changed_section_emaildirect>
|
191 |
<observers>
|
192 |
<emaildirect_save_config>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<EmailDirect_Integration>
|
5 |
+
<version>1.2.9</version>
|
6 |
</EmailDirect_Integration>
|
7 |
</modules>
|
8 |
<global>
|
187 |
</modules>
|
188 |
</translate>
|
189 |
<events>
|
190 |
+
<sales_order_shipment_track_save_after>
|
191 |
+
<observers>
|
192 |
+
<googlecheckout>
|
193 |
+
<type>model</type>
|
194 |
+
<class>emaildirect/observer</class>
|
195 |
+
<method>salesOrderShipmentTrackSaveAfter</method>
|
196 |
+
</googlecheckout>
|
197 |
+
</observers>
|
198 |
+
</sales_order_shipment_track_save_after>
|
199 |
<admin_system_config_changed_section_emaildirect>
|
200 |
<observers>
|
201 |
<emaildirect_save_config>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>EmailDirect_Integration</name>
|
4 |
-
<version>1.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>EmailDirect integration for magento</summary>
|
10 |
<description>EmailDirect integration for magento</description>
|
11 |
-
<notes>Extension now
|
12 |
<authors><author><name>Kevin Linden</name><user>auto-converted</user><email>Kevin@EmailDirect.com</email></author></authors>
|
13 |
-
<date>2013-04-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="EmailDirect"><dir name="Integration"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Memberactivity.php" hash="02dd48c236fcaeeaaf112b6cbf173942"/></dir></dir></dir><dir name="Memberactivity"><file name="Grid.php" hash="c8b6d5b867078f56dc17112eccb8a2ca"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="c1723aa50546d11d8e4644bc93905acd"/></dir><dir name="Form"><dir name="Field"><file name="Addressmapfields.php" hash="be908f92dac6d326f5c2defd81a0ec1b"/><file name="Button.php" hash="5eeebb8654eb102d1e0c86792b0f4d41"/><file name="Common.php" hash="2fd2afd99ec1dd3e90f023c8664b66d3"/><file name="Mapfields.php" hash="7c1b30bf71e73af7603a64832abf02d2"/><file name="Shippingmapfields.php" hash="13f478f1794275543e52a6684690edaa"/></dir></dir><file name="Account.php" hash="3289f9687d16f1df81ea8cb5dbaebc99"/></dir><dir name="Convert"><dir name="Profile"><file name="Export.php" hash="a1c7cb8c788062a2e2bde92599bf2919"/></dir></dir></dir></dir><dir name="Checkout"><file name="Subscribe.php" hash="e79060600f511308acf6c802be4ade3f"/></dir><dir name="Customer"><dir name="Account"><dir name="Dashboard"><file name="Info.php" hash="61aec01f715bb1fa96e9d57ea839fc18"/></dir><file name="Lists.php" hash="fd043743461c6e6278a0476be1f0017d"/></dir><file name="Newsletter.php" hash="99614d12c08728454ac373db1f2370d8"/></dir><dir name="Email"><dir name="Order"><dir name="Items"><dir name="Order"><file name="Default.php" hash="8d70e1810d6f9ffabc026f1477f9ea9b"/><file name="Grouped.php" hash="c6f7a34722d4dc6e17afb83fe572d164"/></dir></dir><file name="Items.php" hash="771dd865fae0ad4954d8efda93cb9389"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>EmailDirect_Integration</name>
|
4 |
+
<version>1.2.9</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>EmailDirect integration for magento</summary>
|
10 |
<description>EmailDirect integration for magento</description>
|
11 |
+
<notes>Extension will now push Tracking Numbers when they are added to shipments.</notes>
|
12 |
<authors><author><name>Kevin Linden</name><user>auto-converted</user><email>Kevin@EmailDirect.com</email></author></authors>
|
13 |
+
<date>2013-04-04</date>
|
14 |
+
<time>00:40:49</time>
|
15 |
+
<contents><target name="magelocal"><dir name="EmailDirect"><dir name="Integration"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Memberactivity.php" hash="02dd48c236fcaeeaaf112b6cbf173942"/></dir></dir></dir><dir name="Memberactivity"><file name="Grid.php" hash="c8b6d5b867078f56dc17112eccb8a2ca"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="c1723aa50546d11d8e4644bc93905acd"/></dir><dir name="Form"><dir name="Field"><file name="Addressmapfields.php" hash="be908f92dac6d326f5c2defd81a0ec1b"/><file name="Button.php" hash="5eeebb8654eb102d1e0c86792b0f4d41"/><file name="Common.php" hash="2fd2afd99ec1dd3e90f023c8664b66d3"/><file name="Mapfields.php" hash="7c1b30bf71e73af7603a64832abf02d2"/><file name="Shippingmapfields.php" hash="13f478f1794275543e52a6684690edaa"/></dir></dir><file name="Account.php" hash="3289f9687d16f1df81ea8cb5dbaebc99"/></dir><dir name="Convert"><dir name="Profile"><file name="Export.php" hash="a1c7cb8c788062a2e2bde92599bf2919"/></dir></dir></dir></dir><dir name="Checkout"><file name="Subscribe.php" hash="e79060600f511308acf6c802be4ade3f"/></dir><dir name="Customer"><dir name="Account"><dir name="Dashboard"><file name="Info.php" hash="61aec01f715bb1fa96e9d57ea839fc18"/></dir><file name="Lists.php" hash="fd043743461c6e6278a0476be1f0017d"/></dir><file name="Newsletter.php" hash="99614d12c08728454ac373db1f2370d8"/></dir><dir name="Email"><dir name="Order"><dir name="Items"><dir name="Order"><file name="Default.php" hash="8d70e1810d6f9ffabc026f1477f9ea9b"/><file name="Grouped.php" hash="c6f7a34722d4dc6e17afb83fe572d164"/></dir></dir><file name="Items.php" hash="771dd865fae0ad4954d8efda93cb9389"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="da887f0607bb115bc36e3f888dc09784"/></dir><dir name="Model"><dir name="Custom"><file name="Collection.php" hash="36cac586b65ea06208b2f419f2472fed"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Export"><file name="Batch.php" hash="15452ded72243a699df5d844d55be03e"/></dir><file name="Abandoned.php" hash="7d8090a39de7dbfa1da0bf91906cf051"/><file name="Abandonedlist.php" hash="02579b2052e51c08f43944272504d418"/><file name="Additionallist.php" hash="2cef8c52aa96496bc21991ddff498ee1"/><file name="Checkoutsubscribe.php" hash="f61bf1d4d07950735c6a8979ef973ae0"/><file name="List.php" hash="4dee4e09bde8fc59abb95e097683c0aa"/><file name="Maxtimes.php" hash="a9596823d86d198ac04aebda7f0f7cd8"/><file name="Publication.php" hash="9e70e04ca599a7d808416c17e028df2c"/><file name="Source.php" hash="1d744b9d98b2f6a72c051f76307b4207"/><file name="Time.php" hash="86c0f7c207ada9a0544d024aacfd9940"/></dir></dir></dir><dir name="Wrapper"><file name="Abandoned.php" hash="36596e0163463e4c4dbcf241a345512c"/><file name="Database.php" hash="299e97253a66306c092f6df725a1840d"/><file name="Execute.php" hash="d8c0a2946540396790369de027e24994"/><file name="Ftp.php" hash="13d4214335e36a1174e5c53bdaafd743"/><file name="Lists.php" hash="1b6b799138cecbf22739d72259232b90"/><file name="Orders.php" hash="c1171eb596606af87af17839b09bd485"/><file name="Publications.php" hash="1908c314209f9cb3d1c6b265cf07bbdd"/><file name="Relays.php" hash="b8d5b394582c65846f0da75133ea2732"/><file name="Sources.php" hash="569e1a953b3fc5611e12be95de35555f"/><file name="Suscribers.php" hash="e86874c31f4afc28e710d82380348d7f"/></dir><file name="Observer.php" hash="688e3570a0026d1d44fa42702e50c829"/></dir><dir name="controllers"><dir name="Admin"><file name="ExportController.php" hash="d23ab90df4910a7ae4f9c5c491e8fd33"/></dir><dir name="Customer"><file name="AccountController.php" hash="e53818ca3db2df13d16cb9419799ede0"/></dir><file name="AbandonedController.php" hash="c0569a81b853d6153e487549a0a67002"/><file name="ExportController.php" hash="d34f5f1842db64f5eb1f18b4938c8c29"/></dir><dir name="etc"><file name="adminhtml.xml" hash="896c10d8a3f932346e7d301052b1b6a6"/><file name="config.xml" hash="c005f53d936c548ee55c1aa41f2092da"/><file name="system.xml" hash="ad884626b4d1eae73beecdbb8d0ea869"/></dir><dir name="sql"><dir name="emaildirect_setup"><file name="mysql4-install-1.0.0.php" hash="a1e6c6e6bb0653698171c7c6dd7d53a1"/><file name="mysql4-upgrade-1.0.13-1.0.14.php" hash="7891e513c4c01931c0c5ee00585c2f34"/><file name="mysql4-upgrade-1.0.19-1.2.0.php" hash="194ac6c94dd8433c4a3227ff7ffd4708"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="emaildirect"><file name="emaildirect-connected-ebizmarts-title.png" hash="faf3858f23eafe3a89cce144fef6bd2a"/><file name="emaildirect-section-background.png" hash="c205ce454fe63280d7d7dd74428b7ea4"/><file name="emaildirect-tab.png" hash="9ddb077b74a7078ac509d79b024631a1"/><file name="emaildirect.css" hash="db1abaa6a68523af8049781757852af9"/><file name="emaildirect.js" hash="ce03dd6f51ea529fc4acdc5116f4e030"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="emaildirect"><dir name="images"><file name="bkg_block-title.gif" hash="f8c1f130ad69464fe7aff2f589b2ec75"/><file name="dotted_divider.gif" hash="260ebae91ffb1b7c663906b29a069925"/><file name="emaildirect-tile.png" hash="86a0ed36169ab9691480fc995ab674a8"/><file name="i_block-subscribe.gif" hash="9e5fee06a543742045118a95f2debcb8"/></dir><file name="integration.js" hash="d8c8d5bf0ddb4f6ead23bec8a2814475"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="emaildirect.xml" hash="b6304e77a394a5756fb0e8260282f0d0"/></dir><dir name="template"><dir name="emaildirect"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="da6adeef06766bbaada93244607bef73"/></dir><dir name="form"><dir name="field"><file name="array.phtml" hash="d6af9f840f4dda9c73d106e167ec1bc6"/><file name="button.phtml" hash="74e83344fc8ce6a4bc480828dcf0fd0b"/></dir></dir></dir><dir name="convert"><dir name="profile"><file name="export.phtml" hash="86339d17e83bd8dcc2a268b3ace3d9e7"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="emaildirect.xml" hash="0a9d6391a114efc879cd0a4690bfc980"/></dir><dir name="template"><dir name="emaildirect"><dir name="boxes"><file name="additionalNewsletter.phtml" hash="0f9d1b59ea045aae31710451f39695f4"/><file name="additionalNewsletterBox.phtml" hash="441b952761083466eaf931e5f7590694"/><file name="generalNewsletter.phtml" hash="fe109f8490e235b98da9d823a5d34ab7"/><file name="generalNewsletterBox.phtml" hash="d98f4fe4582134c0c00cb51490abfbf4"/><file name="generalNewsletterMediumBox.phtml" hash="db51750f55d41dae4b36ec47bc3a0931"/></dir><dir name="checkout"><file name="subscribe.phtml" hash="cfc5c70f68327277616cc6d08cdb2fc8"/></dir><dir name="customer"><dir name="account"><dir name="dashboard"><file name="info.phtml" hash="ccebdd94f03c03368f6b33780e68875b"/></dir><file name="lists.phtml" hash="c808667ec668455b39c76dfd400b2abb"/></dir></dir><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="2d65f3d02b9baa08969d68f2a2cca348"/></dir></dir><file name="items.phtml" hash="e6b15e6460010c5acae66017d177bfb9"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="newsletter_subscr_success_emaildirect.html" hash="f6afb69d207bbc3f8920e7a72ac9dd07"/><file name="newsletter_unsub_success_emaildirect.html" hash="bd9f97e8f5485180d4420097b5200ef4"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EmailDirect_Integration.xml" hash="2d2666e6d9cd8d40a4974d5e242721d6"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|