Version Notes
Send your transactional e-mails through the Campaign Commander NMP platform
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Campaign_Commander_Transactional_Email_1_5 |
| Version | 1.1.6 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.5 to 1.1.6
- app/code/{local → community}/Emv/Core/Block/Adminhtml/Account/Edit.php +0 -0
- app/code/{local → community}/Emv/Core/Block/Adminhtml/Account/Edit/Form.php +0 -0
- app/code/{local → community}/Emv/Core/Block/Adminhtml/Account/Grid.php +0 -0
- app/code/{local → community}/Emv/Core/Block/Adminhtml/Accounts.php +0 -0
- app/code/{local → community}/Emv/Core/Exception.php +0 -0
- app/code/{local → community}/Emv/Core/Helper/Config.php +0 -0
- app/code/{local → community}/Emv/Core/Helper/Data.php +0 -0
- app/code/{local → community}/Emv/Core/Model/Account.php +0 -0
- app/code/{local → community}/Emv/Core/Model/Mysql4/Account.php +4 -2
- app/code/{local → community}/Emv/Core/Model/Mysql4/Account/Collection.php +0 -0
- app/code/{local → community}/Emv/Core/Model/Resource/Setup.php +0 -0
- app/code/{local → community}/Emv/Core/Model/Service/Soap/Api.php +0 -0
- app/code/{local → community}/Emv/Core/Model/Service/Soap/Config.php +0 -0
- app/code/{local → community}/Emv/Core/Model/Service/Soap/SoapClient.php +0 -0
- app/code/{local → community}/Emv/Core/Model/System/Config/Source/Account.php +1 -1
- app/code/{local → community}/Emv/Core/controllers/Adminhtml/AccountController.php +0 -0
- app/code/{local → community}/Emv/Core/etc/adminhtml.xml +0 -0
- app/code/{local → community}/Emv/Core/etc/config.xml +0 -0
- app/code/{local → community}/Emv/Core/etc/system.xml +0 -0
- app/code/{local → community}/Emv/Core/sql/emvcore_setup/mysql4-install-0.1.0.php +0 -0
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Edit.php +0 -0
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Edit/Attributes.php +0 -0
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Edit/Form.php +0 -0
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Grid.php +0 -0
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/New.php +0 -0
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/New/Form.php +3 -1
- app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emts.php +0 -0
- app/code/community/Emv/Emt/Helper/Data.php +24 -0
- app/code/{local → community}/Emv/Emt/Helper/Emvtemplate.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Attribute.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Emt.php +19 -10
- app/code/{local → community}/Emv/Emt/Model/Mage/Core/Email/Template.php +0 -0
- app/code/{local/Emv/Emt/Helper/Data.php → community/Emv/Emt/Model/MageTemplate.php} +9 -23
- app/code/{local → community}/Emv/Emt/Model/Mailmode.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Mysql4/Attribute.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Mysql4/Attribute/Collection.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Mysql4/Emt.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Mysql4/Emt/Collection.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Mysql4/Mailmode.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Mysql4/Mailmode/Collection.php +0 -0
- app/code/{local → community}/Emv/Emt/Model/Resource/Setup.php +0 -0
- app/code/{local → community}/Emv/Emt/controllers/Adminhtml/EmtController.php +13 -1
- app/code/{local → community}/Emv/Emt/etc/adminhtml.xml +0 -0
- app/code/{local → community}/Emv/Emt/etc/config.xml +0 -0
- app/code/{local → community}/Emv/Emt/sql/emvemt_setup/mysql4-install-0.1.0.php +2 -12
- app/etc/modules/Emv_Core.xml +1 -1
- app/etc/modules/Emv_Emt.xml +1 -1
- app/locale/en_US/Emv_Core.csv +2 -1
- app/locale/en_US/Emv_Emt.csv +1 -0
- app/locale/fr_FR/Emv_Core.csv +2 -1
- app/locale/fr_FR/Emv_Emt.csv +2 -1
- package.xml +4 -4
app/code/{local → community}/Emv/Core/Block/Adminhtml/Account/Edit.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Block/Adminhtml/Account/Edit/Form.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Block/Adminhtml/Account/Grid.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Block/Adminhtml/Accounts.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Exception.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Helper/Config.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Helper/Data.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/Account.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/Mysql4/Account.php
RENAMED
|
@@ -22,7 +22,8 @@ class Emv_Core_Model_Mysql4_Account extends Mage_Core_Model_Mysql4_Abstract
|
|
| 22 |
$accountTable = $this->getTable('emvcore/account');
|
| 23 |
$select = $this->_getReadAdapter()->select();
|
| 24 |
$select->from($accountTable);
|
| 25 |
-
$select->where("{$accountTable}.name =
|
|
|
|
| 26 |
return $this->_getReadAdapter()->fetchRow($select);
|
| 27 |
}
|
| 28 |
|
|
@@ -31,7 +32,8 @@ class Emv_Core_Model_Mysql4_Account extends Mage_Core_Model_Mysql4_Abstract
|
|
| 31 |
$accountTable = $this->getTable('emvcore/account');
|
| 32 |
$select = $this->_getReadAdapter()->select();
|
| 33 |
$select->from($accountTable);
|
| 34 |
-
$select->where("{$accountTable}.manager_key =
|
|
|
|
| 35 |
return $this->_getReadAdapter()->fetchRow($select);
|
| 36 |
}
|
| 37 |
}
|
| 22 |
$accountTable = $this->getTable('emvcore/account');
|
| 23 |
$select = $this->_getReadAdapter()->select();
|
| 24 |
$select->from($accountTable);
|
| 25 |
+
$select->where("{$accountTable}.name = ?", addslashes($account->getName()));
|
| 26 |
+
$select->where("{$accountTable}.id != ?", $account->getId());
|
| 27 |
return $this->_getReadAdapter()->fetchRow($select);
|
| 28 |
}
|
| 29 |
|
| 32 |
$accountTable = $this->getTable('emvcore/account');
|
| 33 |
$select = $this->_getReadAdapter()->select();
|
| 34 |
$select->from($accountTable);
|
| 35 |
+
$select->where("{$accountTable}.manager_key = ?", addslashes($account->getManager_key()));
|
| 36 |
+
$select->where("{$accountTable}.id != ?", $account->getId());
|
| 37 |
return $this->_getReadAdapter()->fetchRow($select);
|
| 38 |
}
|
| 39 |
}
|
app/code/{local → community}/Emv/Core/Model/Mysql4/Account/Collection.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/Resource/Setup.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/Service/Soap/Api.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/Service/Soap/Config.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/Service/Soap/SoapClient.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/Model/System/Config/Source/Account.php
RENAMED
|
@@ -13,7 +13,7 @@ class Emv_Core_Model_System_Config_Source_Account
|
|
| 13 |
);
|
| 14 |
}
|
| 15 |
|
| 16 |
-
array_unshift($options, array('value'=>'', 'label'=> Mage::helper('
|
| 17 |
|
| 18 |
return $options;
|
| 19 |
}
|
| 13 |
);
|
| 14 |
}
|
| 15 |
|
| 16 |
+
array_unshift($options, array('value'=>'', 'label'=> Mage::helper('emvcore')->__('--Please Select--')));
|
| 17 |
|
| 18 |
return $options;
|
| 19 |
}
|
app/code/{local → community}/Emv/Core/controllers/Adminhtml/AccountController.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/etc/adminhtml.xml
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/etc/config.xml
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/etc/system.xml
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Core/sql/emvcore_setup/mysql4-install-0.1.0.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Edit.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Edit/Attributes.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Edit/Form.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/Grid.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/New.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emt/New/Form.php
RENAMED
|
@@ -57,7 +57,9 @@ class Emv_Emt_Block_Adminhtml_Emt_New_Form extends Mage_Adminhtml_Block_Widget_F
|
|
| 57 |
'onchange' => $onchange,
|
| 58 |
));
|
| 59 |
|
| 60 |
-
$
|
|
|
|
|
|
|
| 61 |
|
| 62 |
if($mageTemplate->getSize() == 0)
|
| 63 |
{
|
| 57 |
'onchange' => $onchange,
|
| 58 |
));
|
| 59 |
|
| 60 |
+
$accountId = $emvAccount->getFirstItem()->getId();
|
| 61 |
+
|
| 62 |
+
$mageTemplate = Mage::getModel('emvemt/magetemplate')->getNotMappedMageTemplateCollection($accountId);
|
| 63 |
|
| 64 |
if($mageTemplate->getSize() == 0)
|
| 65 |
{
|
app/code/{local → community}/Emv/Emt/Block/Adminhtml/Emts.php
RENAMED
|
File without changes
|
app/code/community/Emv/Emt/Helper/Data.php
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
*
|
| 4 |
+
* @category
|
| 5 |
+
* @package
|
| 6 |
+
* @author cservieres <info@x2i.fr>
|
| 7 |
+
* @version 1.0 eaGUID{528B8F2F-9AE2-4ac2-9593-847C94BBB789}
|
| 8 |
+
*/
|
| 9 |
+
class Emv_Emt_Helper_Data extends Mage_Core_Helper_Abstract
|
| 10 |
+
{
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Encode the mixed $valueToEncode into the JSON format
|
| 14 |
+
*
|
| 15 |
+
* @param mixed $valueToEncode
|
| 16 |
+
* @return string
|
| 17 |
+
*/
|
| 18 |
+
public function jsonEncode($valueToEncode)
|
| 19 |
+
{
|
| 20 |
+
$json = Zend_Json::encode($valueToEncode);
|
| 21 |
+
|
| 22 |
+
return $json;
|
| 23 |
+
}
|
| 24 |
+
}
|
app/code/{local → community}/Emv/Emt/Helper/Emvtemplate.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Attribute.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Emt.php
RENAMED
|
@@ -59,11 +59,11 @@ class Emv_Emt_Model_Emt extends Mage_Core_Model_Abstract
|
|
| 59 |
|
| 60 |
if(is_array($return))
|
| 61 |
{
|
| 62 |
-
$
|
| 63 |
}
|
| 64 |
else
|
| 65 |
{
|
| 66 |
-
$
|
| 67 |
}
|
| 68 |
|
| 69 |
if (!Zend_Validate::is($this->getEmvSendMailModeId(), 'NotEmpty')) {
|
|
@@ -139,26 +139,35 @@ class Emv_Emt_Model_Emt extends Mage_Core_Model_Abstract
|
|
| 139 |
return null;
|
| 140 |
}
|
| 141 |
|
| 142 |
-
|
| 143 |
-
$emts
|
| 144 |
-
|
| 145 |
-
$emts->addAccountFilter($accountId)
|
| 146 |
-
->addMageTemplateFilter($templateId)
|
| 147 |
-
->getMailModeName();
|
| 148 |
$emt = $emts->getFirstItem();
|
| 149 |
|
| 150 |
return $emt->getName();
|
| 151 |
}
|
| 152 |
|
| 153 |
public function getEmvEmt($mageTemplateId, $accountId)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
{
|
| 155 |
/* @var $emts Emv_Emt_Model_Mysql4_Emt_Collection */
|
| 156 |
$emts = $this->getCollection();
|
| 157 |
|
| 158 |
$emts->addAccountFilter($accountId)
|
| 159 |
->addMageTemplateFilter($mageTemplateId);
|
| 160 |
-
$emt = $emts->getFirstItem();
|
| 161 |
|
| 162 |
-
return $
|
| 163 |
}
|
| 164 |
}
|
| 59 |
|
| 60 |
if(is_array($return))
|
| 61 |
{
|
| 62 |
+
$errors = $this->validateNewForm();
|
| 63 |
}
|
| 64 |
else
|
| 65 |
{
|
| 66 |
+
$errors = array();
|
| 67 |
}
|
| 68 |
|
| 69 |
if (!Zend_Validate::is($this->getEmvSendMailModeId(), 'NotEmpty')) {
|
| 139 |
return null;
|
| 140 |
}
|
| 141 |
|
| 142 |
+
$emts = $this->_getEmtFromTemplateIdAndAccountId($templateId, $accountId);
|
| 143 |
+
$emts->getMailModeName();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
$emt = $emts->getFirstItem();
|
| 145 |
|
| 146 |
return $emt->getName();
|
| 147 |
}
|
| 148 |
|
| 149 |
public function getEmvEmt($mageTemplateId, $accountId)
|
| 150 |
+
{
|
| 151 |
+
$emts = $this->_getEmtFromTemplateIdAndAccountId($mageTemplateId, $accountId);
|
| 152 |
+
$emt = $emts->getFirstItem();
|
| 153 |
+
|
| 154 |
+
return $emt;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
/**
|
| 158 |
+
*
|
| 159 |
+
* @param int $mageTemplateId
|
| 160 |
+
* @param int $accountId
|
| 161 |
+
* @return Emv_Emt_Model_Mysql4_Emt_Collection
|
| 162 |
+
*/
|
| 163 |
+
protected function _getEmtFromTemplateIdAndAccountId($mageTemplateId, $accountId)
|
| 164 |
{
|
| 165 |
/* @var $emts Emv_Emt_Model_Mysql4_Emt_Collection */
|
| 166 |
$emts = $this->getCollection();
|
| 167 |
|
| 168 |
$emts->addAccountFilter($accountId)
|
| 169 |
->addMageTemplateFilter($mageTemplateId);
|
|
|
|
| 170 |
|
| 171 |
+
return $emts;
|
| 172 |
}
|
| 173 |
}
|
app/code/{local → community}/Emv/Emt/Model/Mage/Core/Email/Template.php
RENAMED
|
File without changes
|
app/code/{local/Emv/Emt/Helper/Data.php → community/Emv/Emt/Model/MageTemplate.php}
RENAMED
|
@@ -1,35 +1,21 @@
|
|
| 1 |
<?php
|
| 2 |
-
/**
|
| 3 |
-
*
|
| 4 |
-
* @category
|
| 5 |
-
* @package
|
| 6 |
-
* @author cservieres <info@x2i.fr>
|
| 7 |
-
* @version 1.0 eaGUID{528B8F2F-9AE2-4ac2-9593-847C94BBB789}
|
| 8 |
-
*/
|
| 9 |
-
class Emv_Emt_Helper_Data extends Mage_Core_Helper_Abstract
|
| 10 |
-
{
|
| 11 |
-
|
| 12 |
-
/**
|
| 13 |
-
* Encode the mixed $valueToEncode into the JSON format
|
| 14 |
-
*
|
| 15 |
-
* @param mixed $valueToEncode
|
| 16 |
-
* @return string
|
| 17 |
-
*/
|
| 18 |
-
public function jsonEncode($valueToEncode)
|
| 19 |
-
{
|
| 20 |
-
$json = Zend_Json::encode($valueToEncode);
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
public function getNotMappedMageTemplateCollection($emvAccountId)
|
| 26 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
/* @var $magentoTemplates Mage_Core_Model_Mysql4_Email_Template_Collection */
|
| 28 |
$magentoTemplates = Mage::getResourceModel('core/email_template_collection');
|
| 29 |
|
| 30 |
$emt = Mage::getResourceModel('emvemt/emt_collection');
|
| 31 |
$emt->addFieldToFilter('emv_account_id', $emvAccountId);
|
| 32 |
-
$emt->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns('mage_template_id')->where("emv_account_id = $emvAccountId
|
| 33 |
|
| 34 |
$magentoTemplates->addFieldToFilter('template_id', array('nin' => $emt->getSelect()));
|
| 35 |
|
|
@@ -37,4 +23,4 @@ class Emv_Emt_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 37 |
|
| 38 |
return $magentoTemplates;
|
| 39 |
}
|
| 40 |
-
}
|
| 1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
class Emv_Emt_Model_MageTemplate extends Mage_Core_Model_Abstract
|
| 4 |
+
{
|
| 5 |
|
| 6 |
public function getNotMappedMageTemplateCollection($emvAccountId)
|
| 7 |
{
|
| 8 |
+
if(!is_numeric($emvAccountId))
|
| 9 |
+
{
|
| 10 |
+
return;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
/* @var $magentoTemplates Mage_Core_Model_Mysql4_Email_Template_Collection */
|
| 14 |
$magentoTemplates = Mage::getResourceModel('core/email_template_collection');
|
| 15 |
|
| 16 |
$emt = Mage::getResourceModel('emvemt/emt_collection');
|
| 17 |
$emt->addFieldToFilter('emv_account_id', $emvAccountId);
|
| 18 |
+
$emt->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns('mage_template_id')->where("emv_account_id = ?", $emvAccountId);
|
| 19 |
|
| 20 |
$magentoTemplates->addFieldToFilter('template_id', array('nin' => $emt->getSelect()));
|
| 21 |
|
| 23 |
|
| 24 |
return $magentoTemplates;
|
| 25 |
}
|
| 26 |
+
}
|
app/code/{local → community}/Emv/Emt/Model/Mailmode.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Mysql4/Attribute.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Mysql4/Attribute/Collection.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Mysql4/Emt.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Mysql4/Emt/Collection.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Mysql4/Mailmode.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Mysql4/Mailmode/Collection.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/Model/Resource/Setup.php
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/controllers/Adminhtml/EmtController.php
RENAMED
|
@@ -96,6 +96,17 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
|
|
| 96 |
|
| 97 |
public function newAction()
|
| 98 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
$this->_initAction();
|
| 100 |
$this->_addContent($this->getLayout()->createBlock('emvemt/adminhtml_emt_new'));
|
| 101 |
$this->renderLayout();
|
|
@@ -107,6 +118,7 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
|
|
| 107 |
public function getEmvTemplateSelectAjaxAction()
|
| 108 |
{
|
| 109 |
$data = $this->getRequest()->getPost();
|
|
|
|
| 110 |
$dateFormatIso = Mage::app()->getLocale()->getDateFormat(
|
| 111 |
Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
|
| 112 |
);
|
|
@@ -191,7 +203,7 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
|
|
| 191 |
$data = $this->getRequest()->getPost();
|
| 192 |
|
| 193 |
/* @var $magentoTemplates Mage_Core_Model_Mysql4_Email_Template_Collection */
|
| 194 |
-
$magentoTemplates = Mage::
|
| 195 |
|
| 196 |
if($magentoTemplates->getSize() == 0)
|
| 197 |
{
|
| 96 |
|
| 97 |
public function newAction()
|
| 98 |
{
|
| 99 |
+
|
| 100 |
+
// Check if an emv account is set
|
| 101 |
+
$emvAccount = Mage::getResourceModel('emvcore/account_collection');
|
| 102 |
+
$accountId = $emvAccount->getFirstItem()->getId();
|
| 103 |
+
if(null === $accountId)
|
| 104 |
+
{
|
| 105 |
+
$this->_getSession()->addError(Mage::helper('emvemt')->__('A Campaign Commander account has not been set.'));
|
| 106 |
+
$this->_redirect('*/*/index');
|
| 107 |
+
return;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
$this->_initAction();
|
| 111 |
$this->_addContent($this->getLayout()->createBlock('emvemt/adminhtml_emt_new'));
|
| 112 |
$this->renderLayout();
|
| 118 |
public function getEmvTemplateSelectAjaxAction()
|
| 119 |
{
|
| 120 |
$data = $this->getRequest()->getPost();
|
| 121 |
+
$data = Mage::helper('core')->escapeHtml($data);
|
| 122 |
$dateFormatIso = Mage::app()->getLocale()->getDateFormat(
|
| 123 |
Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
|
| 124 |
);
|
| 203 |
$data = $this->getRequest()->getPost();
|
| 204 |
|
| 205 |
/* @var $magentoTemplates Mage_Core_Model_Mysql4_Email_Template_Collection */
|
| 206 |
+
$magentoTemplates = Mage::getModel('emvemt/magetemplate')->getNotMappedMageTemplateCollection($data['emvAccount']);
|
| 207 |
|
| 208 |
if($magentoTemplates->getSize() == 0)
|
| 209 |
{
|
app/code/{local → community}/Emv/Emt/etc/adminhtml.xml
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/etc/config.xml
RENAMED
|
File without changes
|
app/code/{local → community}/Emv/Emt/sql/emvemt_setup/mysql4-install-0.1.0.php
RENAMED
|
@@ -33,18 +33,8 @@ CREATE TABLE {$installer->getTable('emvemt/attribute')}
|
|
| 33 |
`mage_attribute` VARCHAR(200) NOT NULL,
|
| 34 |
PRIMARY KEY (`id`)
|
| 35 |
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Relation table between for attribute mapping in emt';
|
| 36 |
-
");
|
| 37 |
-
|
| 38 |
-
$model = Mage::getModel('emvemt/mailmode');
|
| 39 |
|
| 40 |
-
$
|
| 41 |
-
|
| 42 |
-
$model->save();
|
| 43 |
-
$data = array ('name' => 'emv create');
|
| 44 |
-
$model->setData($data);
|
| 45 |
-
$model->save();
|
| 46 |
-
$data = array ('name' => 'emv send');
|
| 47 |
-
$model->setData($data);
|
| 48 |
-
$model->save();
|
| 49 |
|
| 50 |
$installer->endSetup();
|
| 33 |
`mage_attribute` VARCHAR(200) NOT NULL,
|
| 34 |
PRIMARY KEY (`id`)
|
| 35 |
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Relation table between for attribute mapping in emt';
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
INSERT INTO {$installer->getTable('emvemt/mailmode')} (`name`) VALUES ('classic'), ('emv create'), ('emv send');
|
| 38 |
+
");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
$installer->endSetup();
|
app/etc/modules/Emv_Core.xml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<modules>
|
| 4 |
<Emv_Core>
|
| 5 |
<active>true</active>
|
| 6 |
-
<codePool>
|
| 7 |
</Emv_Core>
|
| 8 |
</modules>
|
| 9 |
</config>
|
| 3 |
<modules>
|
| 4 |
<Emv_Core>
|
| 5 |
<active>true</active>
|
| 6 |
+
<codePool>community</codePool>
|
| 7 |
</Emv_Core>
|
| 8 |
</modules>
|
| 9 |
</config>
|
app/etc/modules/Emv_Emt.xml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<modules>
|
| 4 |
<Emv_Emt>
|
| 5 |
<active>true</active>
|
| 6 |
-
<codePool>
|
| 7 |
<depends>
|
| 8 |
<Emv_Core />
|
| 9 |
</depends>
|
| 3 |
<modules>
|
| 4 |
<Emv_Emt>
|
| 5 |
<active>true</active>
|
| 6 |
+
<codePool>community</codePool>
|
| 7 |
<depends>
|
| 8 |
<Emv_Core />
|
| 9 |
</depends>
|
app/locale/en_US/Emv_Core.csv
CHANGED
|
@@ -35,4 +35,5 @@
|
|
| 35 |
"API Manager key is required.","API Manager key is required."
|
| 36 |
"System","System"
|
| 37 |
"This EMV account is invalid.","This Campaign Commander account is invalid."
|
| 38 |
-
"Cound not connect to Campaign Commander WebService.","Cound not connect to Campaign Commander WebService."
|
|
|
| 35 |
"API Manager key is required.","API Manager key is required."
|
| 36 |
"System","System"
|
| 37 |
"This EMV account is invalid.","This Campaign Commander account is invalid."
|
| 38 |
+
"Cound not connect to Campaign Commander WebService.","Cound not connect to Campaign Commander WebService."
|
| 39 |
+
"--Please Select--","--Please Select--"
|
app/locale/en_US/Emv_Emt.csv
CHANGED
|
@@ -50,3 +50,4 @@
|
|
| 50 |
"emv create","Campaign Commander Template"
|
| 51 |
"emv send","EMV send"
|
| 52 |
"There is no Magento templates not mapped with this account.","There is no Magento templates not mapped with this account."
|
|
|
| 50 |
"emv create","Campaign Commander Template"
|
| 51 |
"emv send","EMV send"
|
| 52 |
"There is no Magento templates not mapped with this account.","There is no Magento templates not mapped with this account."
|
| 53 |
+
"A Campaign Commander account has not been set.","A Campaign Commander account has not been set."
|
app/locale/fr_FR/Emv_Core.csv
CHANGED
|
@@ -35,4 +35,5 @@
|
|
| 35 |
"API Manager key is required.","La clé API Manager est obligatoire."
|
| 36 |
"System","Système"
|
| 37 |
"This EMV account is invalid.","Ce Compte Campaign Commander est invalide."
|
| 38 |
-
"Cound not connect to Campaign Commander WebService.","Connexion au webservice Campaign Commander impossible."
|
|
|
| 35 |
"API Manager key is required.","La clé API Manager est obligatoire."
|
| 36 |
"System","Système"
|
| 37 |
"This EMV account is invalid.","Ce Compte Campaign Commander est invalide."
|
| 38 |
+
"Cound not connect to Campaign Commander WebService.","Connexion au webservice Campaign Commander impossible."
|
| 39 |
+
"--Please Select--","--Votre choix--"
|
app/locale/fr_FR/Emv_Emt.csv
CHANGED
|
@@ -49,4 +49,5 @@
|
|
| 49 |
"classic","Classic"
|
| 50 |
"emv create","Campaign Commander Template"
|
| 51 |
"emv send","EMV send"
|
| 52 |
-
"There is no Magento templates not mapped with this account.","Il n'y a aucun templates Magento non mappé avec ce compte."
|
|
|
| 49 |
"classic","Classic"
|
| 50 |
"emv create","Campaign Commander Template"
|
| 51 |
"emv send","EMV send"
|
| 52 |
+
"There is no Magento templates not mapped with this account.","Il n'y a aucun templates Magento non mappé avec ce compte."
|
| 53 |
+
"A Campaign Commander account has not been set.","Il n'y a aucun compte Campaign Commander de configuré."
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Campaign_Commander_Transactional_Email_1_5</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>Send your transactional e-mails through the Campaign Commander NMP platform</description>
|
| 11 |
<notes>Send your transactional e-mails through the Campaign Commander NMP platform</notes>
|
| 12 |
<authors><author><name>Luis Diaz</name><user>auto-converted</user><email>ldiaz@emailvision.com</email></author></authors>
|
| 13 |
-
<date>2011-12-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magelocale"><dir name="en_US"><file name="Emv_Core.csv" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Campaign_Commander_Transactional_Email_1_5</name>
|
| 4 |
+
<version>1.1.6</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>Send your transactional e-mails through the Campaign Commander NMP platform</description>
|
| 11 |
<notes>Send your transactional e-mails through the Campaign Commander NMP platform</notes>
|
| 12 |
<authors><author><name>Luis Diaz</name><user>auto-converted</user><email>ldiaz@emailvision.com</email></author></authors>
|
| 13 |
+
<date>2011-12-15</date>
|
| 14 |
+
<time>16:38:58</time>
|
| 15 |
+
<contents><target name="magelocale"><dir name="en_US"><file name="Emv_Core.csv" hash="4a68f62b3bb6003f38632e8726c41d73"/><file name="Emv_Emt.csv" hash="ecf6e05e0ab3d15f287fe0cd5c215d6b"/></dir><dir name="fr_FR"><file name="Emv_Core.csv" hash="5d7c94b493825d9efb5ef60178bdab50"/><file name="Emv_Emt.csv" hash="b37a29928c50587b6cda097a5ca56034"/></dir></target><target name="mageetc"><dir name="modules"><file name="Emv_Core.xml" hash="e25dd0ea40fad09e0d1f6260f46e65ac"/><file name="Emv_Emt.xml" hash="d1e26edb25bce0b78e6c14792c07ac03"/></dir></target><target name="magecommunity"><dir name="Emv"><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="Account"><dir name="Edit"><file name="Form.php" hash="9e090720d3b7fc7406d2e4d4f95dbc90"/></dir><file name="Edit.php" hash="34bc1566c3693acccaa4c8e40b31cb5c"/><file name="Grid.php" hash="3d175f0e1b7ccc7dec1c9ffa30cacb76"/></dir><file name="Accounts.php" hash="3f35eecb2bf23417c0fab4746bda6d0c"/></dir></dir><dir name="Helper"><file name="Config.php" hash="455cd67728b1e6876e9fd8d55ca3253b"/><file name="Data.php" hash="896b9955cc2d6b27b9eca4d2508b7169"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Account"><file name="Collection.php" hash="39c1a08471b3bdd0563f3002a32a4db8"/></dir><file name="Account.php" hash="cea2093a18291b7dd24e25b6f8ce0da0"/></dir><dir name="Resource"><file name="Setup.php" hash="6fc36453ff6c01ac0534731816355bd0"/></dir><dir name="Service"><dir name="Soap"><file name="Api.php" hash="817c8f39a730d70aa848b9d8467166a5"/><file name="Config.php" hash="11eb39167cb8354f2da28215c16476e8"/><file name="SoapClient.php" hash="32117ab80f05f6e15b03edc879f806c1"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Account.php" hash="cbc4ee876efd1abcdaa5c57cc08714c2"/></dir></dir></dir><file name="Account.php" hash="a8a6c2c45ab0979666d09732e8d3eda2"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AccountController.php" hash="91447d74999979c278b65dd85f5c06d8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2e84807c5c503bd91ed673dfb5f579bd"/><file name="config.xml" hash="340537c059d97aede3a3a16eac148d76"/><file name="system.xml" hash="4e14237f7d69bd20a8f4fd7fded54ba7"/></dir><dir name="sql"><dir name="emvcore_setup"><file name="mysql4-install-0.1.0.php" hash="7bc6d6e7c03398c40008d89ed86e27bc"/></dir></dir><file name="Exception.php" hash="227e1046ebceb99af7bc2b441bb4997d"/></dir><dir name="Emt"><dir name="Block"><dir name="Adminhtml"><dir name="Emt"><dir name="Edit"><file name="Attributes.php" hash="12f3edf142d47e8dbc3136ae34c4ef78"/><file name="Form.php" hash="7ff998d35df74c4733f06a9fa6ddcae4"/></dir><dir name="New"><file name="Form.php" hash="c0f3983077afd04640c15b78ebe38c3d"/></dir><file name="Edit.php" hash="be44792b12374f6d6f4c5687fd5e04b0"/><file name="Grid.php" hash="68a88335f6725d1fc818bf4519e01603"/><file name="New.php" hash="6ac499b1064c29fd6893c61cb29209c4"/></dir><file name="Emts.php" hash="b0e91f038bfea92da099a94cb5c232a3"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3bcd2a0563cf4a604cefac0a41884819"/><file name="Emvtemplate.php" hash="cb78d69cdb6381e8be31883bc6259088"/></dir><dir name="Model"><dir name="Mage"><dir name="Core"><dir name="Email"><file name="Template.php" hash="f56a6b786c40c19dbec9088b758c5fcf"/></dir></dir></dir><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="c2ce4b9b9f2b2c2cb7343be46df8e9f4"/></dir><dir name="Emt"><file name="Collection.php" hash="ab8126814474a5c7616f1fd9b40796e5"/></dir><dir name="Mailmode"><file name="Collection.php" hash="98b8005f11a230829c8b1664d9222f2c"/></dir><file name="Attribute.php" hash="13fe2d1ca2efa66b4184da68a629135c"/><file name="Emt.php" hash="9a5e2265b2e5841f07cb175229f79971"/><file name="Mailmode.php" hash="7585af6b9d102fc52788ac0083d338ae"/></dir><dir name="Resource"><file name="Setup.php" hash="62b3de559b3484cec6767a174cda42e9"/></dir><file name="Attribute.php" hash="430f2ba97ded59d319fcd8579555c53c"/><file name="Emt.php" hash="51ad525e79f8d3939bba7b5a5ec69f2f"/><file name="MageTemplate.php" hash="66051e8c63d2012c022d7bf45a3e880b"/><file name="Mailmode.php" hash="d77ce590e7302f0115dcd2075468595c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="EmtController.php" hash="0df8988c09f6389faf1da367ce917c8b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="46610ec63dd5443130e59dbc900e3541"/><file name="config.xml" hash="9b5014f12d22537204379ea4faa0da2f"/></dir><dir name="sql"><dir name="emvemt_setup"><file name="mysql4-install-0.1.0.php" hash="a7d12df049f2c1377a072fa7899dcb6c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="emt"><file name="attributes.phtml" hash="8dd462fe2ad5ec5e995fe8b04ab8680b"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
