Version Notes
Bugs Fixed:
1) Unable to send contacts of Abandoned carts to INinbox.
2) After admin Login, it showed blank page instead of redirecting to Admin Startup Page.
Download this release
Release Info
Developer | INinbox.com |
Extension | INinbox_Emailmarketing |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
app/code/local/Ininbox/Emailmarketing/Model/Observer.php
CHANGED
@@ -467,9 +467,9 @@ class Ininbox_Emailmarketing_Model_Observer
|
|
467 |
$customerAttributeValue = $currentCustomer->getData($customerAttribute);
|
468 |
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
469 |
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
470 |
-
$
|
471 |
else
|
472 |
-
$
|
473 |
}
|
474 |
|
475 |
$params['params']['Contacts'][$count++] = $array;
|
@@ -603,9 +603,9 @@ class Ininbox_Emailmarketing_Model_Observer
|
|
603 |
$customerAttributeValue = $currentCustomer->getData($customerAttribute);
|
604 |
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
605 |
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
606 |
-
$
|
607 |
else
|
608 |
-
$
|
609 |
}
|
610 |
}
|
611 |
|
@@ -647,9 +647,9 @@ class Ininbox_Emailmarketing_Model_Observer
|
|
647 |
$count = 0;
|
648 |
foreach ($quoteIds as $quoteId)
|
649 |
{
|
650 |
-
$
|
651 |
-
$
|
652 |
-
$
|
653 |
|
654 |
$array = array();
|
655 |
foreach($ininboxMappedCustomFields as $mappedField)
|
@@ -657,12 +657,12 @@ class Ininbox_Emailmarketing_Model_Observer
|
|
657 |
$customerAttribute = 'customer_' . $mappedField['customer_attributes'];
|
658 |
$ininboxCustomField = $mappedField['ininbox_custom_fields'];
|
659 |
|
660 |
-
$customerAttributeValue = $
|
661 |
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
662 |
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
663 |
-
$
|
664 |
else
|
665 |
-
$
|
666 |
}
|
667 |
|
668 |
$params['params']['Contacts'][$count++] = $array;
|
@@ -675,7 +675,7 @@ class Ininbox_Emailmarketing_Model_Observer
|
|
675 |
$params['params']['ListIDs'] = array_map('intval', explode(',', $ininboxGroupList));
|
676 |
|
677 |
$result = Mage::getModel('emailmarketing/ininbox_contact')->import($params);
|
678 |
-
|
679 |
if(isset($result['Code']) && isset($result['Message']))
|
680 |
{
|
681 |
$error_message = Mage::helper('adminhtml')->__('ERROR (' . $result['Code'] . '): ' . $result['Message']);
|
@@ -729,41 +729,46 @@ class Ininbox_Emailmarketing_Model_Observer
|
|
729 |
|
730 |
public function addIninboxContactForAbandonedCarts($currentQuote, $ininboxGroupList)
|
731 |
{
|
|
|
732 |
try
|
733 |
{
|
734 |
-
|
735 |
-
$ininboxMappedCustomFields = unserialize(Mage::helper('emailmarketing')->getConfig($group = 'field_mapping', $field = 'field'));
|
736 |
-
|
737 |
-
$ininboxResubscriber = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_misc_settings', $field = 'update_subscriber') ? true : false;
|
738 |
-
$ininboxSendConfirmationEmail = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_misc_settings', $field = 'confirm_email') ? true : false;
|
739 |
-
$ininboxAddContactToAutoresponderCycle = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_misc_settings', $field = 'send_autoresponder') ? true : false;
|
740 |
-
|
741 |
-
foreach($ininboxMappedCustomFields as $mappedField)
|
742 |
{
|
743 |
-
$
|
744 |
-
$
|
745 |
|
746 |
-
$
|
747 |
-
$
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
$
|
765 |
-
|
766 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
}
|
768 |
catch (Exception $e) {
|
769 |
$error_message = Mage::helper('adminhtml')->__('ERROR: Error in importing contacts to INinbox. <br />' . $e->getMessage());
|
467 |
$customerAttributeValue = $currentCustomer->getData($customerAttribute);
|
468 |
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
469 |
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
470 |
+
$array[$ininboxCustomField] = $customerAttributeValue;
|
471 |
else
|
472 |
+
$array['CustomFields'][] = array('Key' => $ininboxCustomField, 'Value' => $customerAttributeValue);
|
473 |
}
|
474 |
|
475 |
$params['params']['Contacts'][$count++] = $array;
|
603 |
$customerAttributeValue = $currentCustomer->getData($customerAttribute);
|
604 |
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
605 |
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
606 |
+
$array[$ininboxCustomField] = $customerAttributeValue;
|
607 |
else
|
608 |
+
$array['CustomFields'][] = array('Key' => $ininboxCustomField, 'Value' => $customerAttributeValue);
|
609 |
}
|
610 |
}
|
611 |
|
647 |
$count = 0;
|
648 |
foreach ($quoteIds as $quoteId)
|
649 |
{
|
650 |
+
$currentQuote = Mage::getResourceModel('sales/quote_collection')->addFieldToFilter('entity_id', $quoteId)->getFirstItem();
|
651 |
+
$currentQuote->setData('ininbox_is_abandoned', 1);
|
652 |
+
$currentQuote->save();
|
653 |
|
654 |
$array = array();
|
655 |
foreach($ininboxMappedCustomFields as $mappedField)
|
657 |
$customerAttribute = 'customer_' . $mappedField['customer_attributes'];
|
658 |
$ininboxCustomField = $mappedField['ininbox_custom_fields'];
|
659 |
|
660 |
+
$customerAttributeValue = $currentQuote->getData($customerAttribute);
|
661 |
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
662 |
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
663 |
+
$array[$ininboxCustomField] = $customerAttributeValue;
|
664 |
else
|
665 |
+
$array['CustomFields'][] = array('Key' => $ininboxCustomField, 'Value' => $customerAttributeValue);
|
666 |
}
|
667 |
|
668 |
$params['params']['Contacts'][$count++] = $array;
|
675 |
$params['params']['ListIDs'] = array_map('intval', explode(',', $ininboxGroupList));
|
676 |
|
677 |
$result = Mage::getModel('emailmarketing/ininbox_contact')->import($params);
|
678 |
+
|
679 |
if(isset($result['Code']) && isset($result['Message']))
|
680 |
{
|
681 |
$error_message = Mage::helper('adminhtml')->__('ERROR (' . $result['Code'] . '): ' . $result['Message']);
|
729 |
|
730 |
public function addIninboxContactForAbandonedCarts($currentQuote, $ininboxGroupList)
|
731 |
{
|
732 |
+
$error_message = true;
|
733 |
try
|
734 |
{
|
735 |
+
if(!is_null($currentQuote))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
736 |
{
|
737 |
+
$ininboxPredefinedCustomFields = Mage::getModel('emailmarketing/system_config_source_field_list')->getPredefinedCustomList();
|
738 |
+
$ininboxMappedCustomFields = unserialize(Mage::helper('emailmarketing')->getConfig($group = 'field_mapping', $field = 'field'));
|
739 |
|
740 |
+
$ininboxResubscriber = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_misc_settings', $field = 'update_subscriber') ? true : false;
|
741 |
+
$ininboxSendConfirmationEmail = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_misc_settings', $field = 'confirm_email') ? true : false;
|
742 |
+
$ininboxAddContactToAutoresponderCycle = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_misc_settings', $field = 'send_autoresponder') ? true : false;
|
743 |
+
|
744 |
+
foreach($ininboxMappedCustomFields as $mappedField)
|
745 |
+
{
|
746 |
+
$customerAttribute = 'customer_' . $mappedField['customer_attributes'];
|
747 |
+
$ininboxCustomField = $mappedField['ininbox_custom_fields'];
|
748 |
+
|
749 |
+
|
750 |
+
$customerAttributeValue = $currentQuote->getData($customerAttribute);
|
751 |
+
$customerAttributeValue = is_null($customerAttributeValue) ? '': $customerAttributeValue;
|
752 |
+
if(array_key_exists($ininboxCustomField, $ininboxPredefinedCustomFields))
|
753 |
+
$params['params'][$ininboxCustomField] = $customerAttributeValue;
|
754 |
+
else
|
755 |
+
$params['params']['CustomFields'][] = array('Key' => $ininboxCustomField, 'Value' => $customerAttributeValue);
|
756 |
+
}
|
757 |
+
|
758 |
+
$params['params']['Resubscribe'] = $ininboxResubscriber;
|
759 |
+
$params['params']['SendConfirmationEmail'] = $ininboxSendConfirmationEmail;
|
760 |
+
$params['params']['AddContactToAutoresponderCycle'] = $ininboxAddContactToAutoresponderCycle;
|
761 |
+
|
762 |
+
$params['params']['ListIDs'] = array_map('intval', explode(',', $ininboxGroupList));
|
763 |
+
|
764 |
+
$result = Mage::getModel('emailmarketing/ininbox_contact')->add($params);
|
765 |
+
|
766 |
+
if(isset($result['Code']) && isset($result['Message']))
|
767 |
+
{
|
768 |
+
$error_message = Mage::helper('adminhtml')->__('ERROR (' . $result['Code'] . '): ' . $result['Message']);
|
769 |
+
Mage::log($error_message, null, $this->_logFile);
|
770 |
+
}
|
771 |
+
}
|
772 |
}
|
773 |
catch (Exception $e) {
|
774 |
$error_message = Mage::helper('adminhtml')->__('ERROR: Error in importing contacts to INinbox. <br />' . $e->getMessage());
|
app/code/local/Ininbox/Emailmarketing/controllers/Adminhtml/IndexController.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Ininbox_Emailmarketing_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
|
3 |
-
{
|
4 |
-
function indexAction()
|
5 |
-
{
|
6 |
-
$ininboxAbandonedCartsEnabled = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_settings', $field = 'add_to_list_enabled');
|
7 |
-
$ininboxAbandonedCartsList = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_settings', $field = 'abandoned_list');
|
8 |
-
$ininboxAbandonedCartsTime = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_settings', $field = 'abandoned_time');
|
9 |
-
$ininboxAbandonedCartsCaptureRegistered = Mage::helper('emailmarketing')->getConfig($group = 'abandoned_carts_settings', $field = 'register_capture');
|
10 |
-
|
11 |
-
if($ininboxAbandonedCartsEnabled)
|
12 |
-
{
|
13 |
-
$adapter = Mage::getSingleton('core/resource')->getConnection('sales_read');
|
14 |
-
$minutes = $ininboxAbandonedCartsTime;
|
15 |
-
$from = $adapter->getDateSubSql(
|
16 |
-
$adapter->quote(now()),
|
17 |
-
$minutes,
|
18 |
-
Varien_Db_Adapter_Interface::INTERVAL_MINUTE
|
19 |
-
);
|
20 |
-
$quotes = Mage::getResourceModel('sales/quote_collection')
|
21 |
-
->addFieldToFilter('reserved_order_id', array('null' => true))
|
22 |
-
->addFieldToFilter('customer_email', array('neq' => null))
|
23 |
-
->addFieldToFilter('updated_at', array('to' => $from));
|
24 |
-
|
25 |
-
if(!$ininboxAbandonedCartsCaptureRegistered)
|
26 |
-
$quotes->addFieldToFilter('customer_is_guest', array('eq' => true));
|
27 |
-
|
28 |
-
if($quotes->count() > 0)
|
29 |
-
{
|
30 |
-
foreach($quotes as $quote)
|
31 |
-
Mage::getModel('emailmarketing/observer')->addIninboxContactForAbandonedCarts($quote, $ininboxAbandonedCartsList);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Ininbox/Emailmarketing/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ininbox_Emailmarketing>
|
5 |
-
<version>2.0.
|
6 |
</Ininbox_Emailmarketing>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ininbox_Emailmarketing>
|
5 |
+
<version>2.0.1</version>
|
6 |
</Ininbox_Emailmarketing>
|
7 |
</modules>
|
8 |
<frontend>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>INinbox_Emailmarketing</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -41,13 +41,13 @@ You can create your free INinbox account today <a href="https://www.ininbox.c
|
|
41 |
<br />
|
42 |
<strong>Is there support available for this Extension?</strong><br />
|
43 |
This is an official INinbox extension. If you need support you can contact INspired support here <a href="http://www.INinbox.com/support">http://www.INinbox.com/support</a></description>
|
44 |
-
<notes>
|
45 |
-
|
46 |
-
|
47 |
<authors><author><name>INinbox.com</name><user>INinbox</user><email>inspiredsupport@ininbox.com</email></author></authors>
|
48 |
-
<date>2014-04-
|
49 |
-
<time>
|
50 |
-
<contents><target name="magelocal"><dir name="Ininbox"><dir name="Emailmarketing"><dir name="Block"><dir name="Adminhtml"><dir name="AbandonedCarts"><file name="Grid.php" hash="973852b0d8995e7cde8ac9ba4f1bb304"/></dir><file name="AbandonedCarts.php" hash="50fd509e9ab91bd8c0f999b19db91cf7"/><dir name="Customer"><file name="Grid.php" hash="86d1a54eae6be39062ba283dded1fc74"/></dir><file name="Menu.php" hash="d4392133285bca70425219a11ca073e0"/><dir name="Newsletter"><dir name="Subscriber"><file name="Grid.php" hash="181d4c1264cec1046c3fce78959fd170"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="26bb2b0670797ad9f00313efd3a40c6d"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="0ddf67423a255dea6607235a54491ff6"/></dir></dir></dir></dir><file name="Field.php" hash="beed8fad3c2700554d81d56b06f2b84f"/><file name="Select.php" hash="d116f5d18322d15def9f41416c489cc9"/></dir><dir name="Helper"><file name="Data.php" hash="5527375ebf9d821f021568c75ff6a10e"/></dir><dir name="Model"><dir name="Ininbox"><file name="Base.php" hash="2d2217079b82973ab6dd5d5622e3693b"/><file name="Contact.php" hash="5d85cf8a8fa36059685f9b27721e7dbb"/><file name="Customfield.php" hash="4b97fb0acbcb7f0f44b3102448f0ba61"/><file name="General.php" hash="84be3f680d5050f89f6fd8a5225c0a41"/><file name="Group.php" hash="901d6a5a34c3ef49b7ab518eb276d0bd"/><file name=".goutputstream-QK2YCX" hash="dd0eae4a36ed0679651000ed78636cd9"/></dir><file name="Observer.php" hash="
|
51 |
<compatible/>
|
52 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
53 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>INinbox_Emailmarketing</name>
|
4 |
+
<version>2.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
41 |
<br />
|
42 |
<strong>Is there support available for this Extension?</strong><br />
|
43 |
This is an official INinbox extension. If you need support you can contact INspired support here <a href="http://www.INinbox.com/support">http://www.INinbox.com/support</a></description>
|
44 |
+
<notes>Bugs Fixed:
|
45 |
+
1) Unable to send contacts of Abandoned carts to INinbox.
|
46 |
+
2) After admin Login, it showed blank page instead of redirecting to Admin Startup Page.</notes>
|
47 |
<authors><author><name>INinbox.com</name><user>INinbox</user><email>inspiredsupport@ininbox.com</email></author></authors>
|
48 |
+
<date>2014-04-26</date>
|
49 |
+
<time>12:01:20</time>
|
50 |
+
<contents><target name="magelocal"><dir name="Ininbox"><dir name="Emailmarketing"><dir name="Block"><dir name="Adminhtml"><dir name="AbandonedCarts"><file name="Grid.php" hash="973852b0d8995e7cde8ac9ba4f1bb304"/></dir><file name="AbandonedCarts.php" hash="50fd509e9ab91bd8c0f999b19db91cf7"/><dir name="Customer"><file name="Grid.php" hash="86d1a54eae6be39062ba283dded1fc74"/></dir><file name="Menu.php" hash="d4392133285bca70425219a11ca073e0"/><dir name="Newsletter"><dir name="Subscriber"><file name="Grid.php" hash="181d4c1264cec1046c3fce78959fd170"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="26bb2b0670797ad9f00313efd3a40c6d"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="0ddf67423a255dea6607235a54491ff6"/></dir></dir></dir></dir><file name="Field.php" hash="beed8fad3c2700554d81d56b06f2b84f"/><file name="Select.php" hash="d116f5d18322d15def9f41416c489cc9"/></dir><dir name="Helper"><file name="Data.php" hash="5527375ebf9d821f021568c75ff6a10e"/></dir><dir name="Model"><dir name="Ininbox"><file name="Base.php" hash="2d2217079b82973ab6dd5d5622e3693b"/><file name="Contact.php" hash="5d85cf8a8fa36059685f9b27721e7dbb"/><file name="Customfield.php" hash="4b97fb0acbcb7f0f44b3102448f0ba61"/><file name="General.php" hash="84be3f680d5050f89f6fd8a5225c0a41"/><file name="Group.php" hash="901d6a5a34c3ef49b7ab518eb276d0bd"/><file name=".goutputstream-QK2YCX" hash="dd0eae4a36ed0679651000ed78636cd9"/></dir><file name="Observer.php" hash="fd6a43a5f61dbfcc388a00398ad7ba4b"/><dir name="Sales"><file name="Order.php" hash="48e4aa009cfd082760e25b73c9962b72"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Customer"><file name="Attribute.php" hash="f6463ebff0b1db14d31f8eb0e14afc55"/></dir><dir name="Field"><file name="List.php" hash="e06aca5e8283a8e6a3ceb3c1967b3850"/></dir><dir name="Group"><file name="List.php" hash="4e993ce28bc761454080d94bb542636a"/></dir><dir name="Order"><file name="Status.php" hash="ee9074964634be50e8f9774c75d642a1"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="7ef76d434c3f9a29724ec53176ac06f4"/><dir name="Adminhtml"><file name="AbandonedCartsController.php" hash="17e73dec3c5aaa06b2fc8c053c1dda77"/><file name="ButtonController.php" hash="afabf8082be3321a7075418dd6b61fea"/><file name="CustomerController.php" hash="f55eda498c79e532f931b2b6a25f2c1f"/><file name="MassactionController.php" hash="f40e87bfa0ffd33eb9c4cdd3ec9ca458"/></dir><file name="ManageController.php" hash="a1afb00c33151ca164ce6a69d08d276f"/><file name="SubscriberController.php" hash="c1ccc8f3c75be9de1f3b2e26a7f730c8"/></dir><dir name="etc"><file name="config.xml" hash="1916131b11efd607708af92ebf21ffb7"/><file name="system.xml" hash="cd9763602329263ecaff9cd161dea3f6"/></dir><dir name="sql"><dir name="emailmarketing_setup"><file name="mysql4-install-0.1.0.php" hash="90441bd504fcde8f0a292e53385ccd53"/><file name="mysql4-upgrade-0.1.0-1.2.1.php" hash="e8b63f7abfe1f414357a630def284140"/><file name="mysql4-upgrade-1.2.1-2.0.0.php" hash="d81c181e4c81a3e259d7e8b56d8451c7"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ininbox_Emailmarketing.xml" hash="ad90bc3dde0b7f34463702f9e8e8041d"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="ininbox"><dir name="css"><file name="ininbox.css" hash="f3bcef1095d4657aa830aa43e0d3d815"/></dir><dir name="images"><file name="ininbox.png" hash="ad2cecd7c657e4bd2c6d9f99f60389d2"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ininbox.xml" hash="eab17d72e6cf575936bdf69d34153f20"/></dir><dir name="template"><dir name="ininbox"><dir name="system"><dir name="config"><file name="button.phtml" hash="07ad763cd0bc79c18677d10b77b62e13"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
51 |
<compatible/>
|
52 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
53 |
</package>
|