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.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.7 to 1.2.0
- app/code/community/Emv/Core/Model/Service/Soap/Api.php +0 -2
- app/code/community/Emv/Emt/Block/Adminhtml/Emt/Edit/Attributes.php +21 -6
- app/code/community/Emv/Emt/Constants.php +7 -0
- app/code/community/Emv/Emt/Helper/Emvtemplate.php +10 -0
- app/code/community/Emv/Emt/Model/Mage/Core/Email/Template.php +15 -3
- app/code/community/Emv/Emt/Model/Mysql4/Attribute/Collection.php +6 -0
- app/code/community/Emv/Emt/controllers/Adminhtml/EmtController.php +20 -1
- app/code/community/Emv/Emt/etc/config.xml +2 -2
- app/code/community/Emv/Emt/sql/emvemt_setup/mysql4-upgrade-0.1.0-0.2.0.php +16 -0
- app/design/adminhtml/default/default/template/emt/attributes.phtml +66 -28
- app/locale/en_US/Emv_Emt.csv +2 -0
- app/locale/fr_FR/Emv_Emt.csv +2 -0
- package.xml +4 -4
app/code/community/Emv/Core/Model/Service/Soap/Api.php
CHANGED
@@ -309,8 +309,6 @@ class Emv_Core_Model_Service_Soap_Api
|
|
309 |
public function sendEmv($emvTemplate, $variable, $mail, $content = '')
|
310 |
{
|
311 |
try {
|
312 |
-
|
313 |
-
|
314 |
if(!is_array($mail))
|
315 |
{
|
316 |
$mail = array($mail);
|
309 |
public function sendEmv($emvTemplate, $variable, $mail, $content = '')
|
310 |
{
|
311 |
try {
|
|
|
|
|
312 |
if(!is_array($mail))
|
313 |
{
|
314 |
$mail = array($mail);
|
app/code/community/Emv/Emt/Block/Adminhtml/Emt/Edit/Attributes.php
CHANGED
@@ -8,15 +8,25 @@ class Emv_Emt_Block_Adminhtml_Emt_Edit_Attributes extends Mage_Adminhtml_Block_W
|
|
8 |
|
9 |
protected function _prepareLayout()
|
10 |
{
|
11 |
-
$this->setChild('
|
12 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
13 |
->setData(array(
|
14 |
-
'label' => Mage::helper('emvemt')->__('Add New Attribute'),
|
15 |
'class' => 'add',
|
16 |
-
'id' => '
|
17 |
-
'on_click' => 'emvAttribute.
|
18 |
))
|
19 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$this->setChild('delete_button',
|
21 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
22 |
->setData(array(
|
@@ -47,13 +57,18 @@ class Emv_Emt_Block_Adminhtml_Emt_Edit_Attributes extends Mage_Adminhtml_Block_W
|
|
47 |
public function getMageAttributesInputHtml()
|
48 |
{
|
49 |
$input = '<input type="text" id="'.$this->getFieldId().'_{{index}}_mage_attribute" name="'.
|
50 |
-
$this->getFieldName().'[{{index}}][mage_attribute]" size="50" />';
|
51 |
return $input;
|
52 |
}
|
53 |
|
54 |
public function getAddButtonHtml()
|
55 |
{
|
56 |
-
return $this->getChildHtml('
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
public function getDeleteButtonHtml()
|
8 |
|
9 |
protected function _prepareLayout()
|
10 |
{
|
11 |
+
$this->setChild('add_button_emv_dyn',
|
12 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
13 |
->setData(array(
|
14 |
+
'label' => Mage::helper('emvemt')->__('Add New EMV DYN Attribute'),
|
15 |
'class' => 'add',
|
16 |
+
'id' => 'add_new_attribute_emv_dyn',
|
17 |
+
'on_click' => 'emvAttribute.addEmvDyn();'
|
18 |
))
|
19 |
);
|
20 |
+
$this->setChild('add_button_emv_content',
|
21 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
22 |
+
->setData(array(
|
23 |
+
'label' => Mage::helper('emvemt')->__('Add New EMV CONTENT Attribute'),
|
24 |
+
'class' => 'add',
|
25 |
+
'id' => 'add_new_attribute_emv_content',
|
26 |
+
'on_click' => 'emvAttribute.addEmvContent();'
|
27 |
+
))
|
28 |
+
);
|
29 |
+
|
30 |
$this->setChild('delete_button',
|
31 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
32 |
->setData(array(
|
57 |
public function getMageAttributesInputHtml()
|
58 |
{
|
59 |
$input = '<input type="text" id="'.$this->getFieldId().'_{{index}}_mage_attribute" name="'.
|
60 |
+
$this->getFieldName().'[{{index}}][mage_attribute]" size="50" maxlength="200" />';
|
61 |
return $input;
|
62 |
}
|
63 |
|
64 |
public function getAddButtonHtml()
|
65 |
{
|
66 |
+
return $this->getChildHtml('add_button_emv_dyn');
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getAddEmvContentButtonHtml()
|
70 |
+
{
|
71 |
+
return $this->getChildHtml('add_button_emv_content');
|
72 |
}
|
73 |
|
74 |
public function getDeleteButtonHtml()
|
app/code/community/Emv/Emt/Constants.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
interface Emv_Emt_Constants
|
3 |
+
{
|
4 |
+
const ATTRIBUTE_TYPE_EMV_CONTENT = 'EMV_CONTENT';
|
5 |
+
|
6 |
+
const ATTRIBUTE_TYPE_EMV_DYN = 'EMV_DYN';
|
7 |
+
}
|
app/code/community/Emv/Emt/Helper/Emvtemplate.php
CHANGED
@@ -13,6 +13,16 @@ class Emv_Emt_Helper_Emvtemplate extends Mage_Core_Helper_Abstract
|
|
13 |
return $attributes[1];
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
/**
|
17 |
* Convert an array of mapping to an array understandable by the webservice method sendObject
|
18 |
* @param array $attributes
|
13 |
return $attributes[1];
|
14 |
}
|
15 |
|
16 |
+
/**
|
17 |
+
* Return an array of strings between [EMV CONTENT] and [EMV /CONTENT]
|
18 |
+
*/
|
19 |
+
public function getEmvAttributesContentFromText($text)
|
20 |
+
{
|
21 |
+
preg_match_all('/\[EMV\sCONTENT\](.*)\[EMV\s\/CONTENT\]/U', $text, $attributes);
|
22 |
+
|
23 |
+
return $attributes[1];
|
24 |
+
}
|
25 |
+
|
26 |
/**
|
27 |
* Convert an array of mapping to an array understandable by the webservice method sendObject
|
28 |
* @param array $attributes
|
app/code/community/Emv/Emt/Model/Mage/Core/Email/Template.php
CHANGED
@@ -51,15 +51,27 @@ class Emv_Emt_Model_Mage_Core_Email_Template extends Mage_Core_Model_Email_Templ
|
|
51 |
|
52 |
/* @var $attributes Emv_Emt_Model_Mysql4_Attribute_Collection */
|
53 |
$attributes = Mage::getResourceModel('emvemt/attribute_collection');
|
54 |
-
$
|
|
|
|
|
55 |
|
56 |
// get magento template variable value
|
57 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
//Send the email
|
60 |
$emvTemplate = $emvApiModel->getTemplateById($emvTemplateId);
|
61 |
$emvApiModel->sendEmv($emvTemplate,
|
62 |
-
Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($
|
|
|
63 |
} catch (Exception $e) {
|
64 |
Mage::log('Error with CC trying do send mail in classic mode', null,
|
65 |
Mage::helper('emvcore')->LOG_FILE);
|
51 |
|
52 |
/* @var $attributes Emv_Emt_Model_Mysql4_Attribute_Collection */
|
53 |
$attributes = Mage::getResourceModel('emvemt/attribute_collection');
|
54 |
+
$mappedEmvDynAttributes = $attributes->addEmtFilter($emvemt->getId())
|
55 |
+
->addAttributeTypeFilter(Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_DYN)
|
56 |
+
->load()->getMapping();
|
57 |
|
58 |
// get magento template variable value
|
59 |
+
$realValueEmvDynAttributes = $this->prepareAttributes($mappedEmvDynAttributes, $vars);
|
60 |
+
|
61 |
+
/* @var $attributes Emv_Emt_Model_Mysql4_Attribute_Collection */
|
62 |
+
$attributes2 = Mage::getResourceModel('emvemt/attribute_collection');
|
63 |
+
$mappedEmvContentAttributes = $attributes2->addEmtFilter($emvemt->getId())
|
64 |
+
->addAttributeTypeFilter(Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_CONTENT)
|
65 |
+
->load()->getMapping();
|
66 |
+
|
67 |
+
// get magento template variable value
|
68 |
+
$realValueEmvContentAttributes = $this->prepareAttributes($mappedEmvContentAttributes, $vars);
|
69 |
|
70 |
//Send the email
|
71 |
$emvTemplate = $emvApiModel->getTemplateById($emvTemplateId);
|
72 |
$emvApiModel->sendEmv($emvTemplate,
|
73 |
+
Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($realValueEmvDynAttributes),
|
74 |
+
$email, Mage::helper('emvemt/emvtemplate')->_attributesToWebServiceRequest($realValueEmvContentAttributes));
|
75 |
} catch (Exception $e) {
|
76 |
Mage::log('Error with CC trying do send mail in classic mode', null,
|
77 |
Mage::helper('emvcore')->LOG_FILE);
|
app/code/community/Emv/Emt/Model/Mysql4/Attribute/Collection.php
CHANGED
@@ -13,6 +13,12 @@ class Emv_Emt_Model_Mysql4_Attribute_Collection extends Mage_Core_Model_Mysql4_C
|
|
13 |
return $this;
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
/**
|
17 |
* Return mapped attributes in an array of array (key is Campaign Commander attribute name, value is
|
18 |
* magento attribute name).
|
13 |
return $this;
|
14 |
}
|
15 |
|
16 |
+
public function addAttributeTypeFilter($attributeType)
|
17 |
+
{
|
18 |
+
$this->getSelect()->where('main_table.emv_attribute_type = ?', $attributeType);
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
|
22 |
/**
|
23 |
* Return mapped attributes in an array of array (key is Campaign Commander attribute name, value is
|
24 |
* magento attribute name).
|
app/code/community/Emv/Emt/controllers/Adminhtml/EmtController.php
CHANGED
@@ -230,6 +230,15 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
|
|
230 |
{
|
231 |
$data = $this->getRequest()->getPost();
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
if(isset($data['emvTemplateId']))
|
234 |
{
|
235 |
$options = array('' => $this->__('Custom attribute, no mapping'));
|
@@ -269,7 +278,16 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
|
|
269 |
$text .= $template->subject;
|
270 |
}
|
271 |
|
272 |
-
$attributes =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
foreach ($attributes as $attribute)
|
275 |
{
|
@@ -369,6 +387,7 @@ class Emv_Emt_Adminhtml_EmtController extends Mage_Adminhtml_Controller_Action
|
|
369 |
|
370 |
$attributeModel = Mage::getModel('emvemt/attribute')
|
371 |
->setEmvAttribute($attrInfo['emv_attribute'])
|
|
|
372 |
->setMageAttribute($attrInfo['mage_attribute'])
|
373 |
->setEmvEmtId($modelId);
|
374 |
|
230 |
{
|
231 |
$data = $this->getRequest()->getPost();
|
232 |
|
233 |
+
$data['emv_attribute_type'] = Mage::helper('core')->escapeHtml($data['emv_attribute_type']);
|
234 |
+
$data['emvTemplateId'] = Mage::helper('core')->escapeHtml($data['emvTemplateId']);
|
235 |
+
$data['index'] = Mage::helper('core')->escapeHtml($data['index']);
|
236 |
+
$data['accountId'] = Mage::helper('core')->escapeHtml($data['accountId']);
|
237 |
+
if(key_exists('default_value', $data))
|
238 |
+
{
|
239 |
+
$data['default_value'] = Mage::helper('core')->escapeHtml($data['default_value']);
|
240 |
+
}
|
241 |
+
|
242 |
if(isset($data['emvTemplateId']))
|
243 |
{
|
244 |
$options = array('' => $this->__('Custom attribute, no mapping'));
|
278 |
$text .= $template->subject;
|
279 |
}
|
280 |
|
281 |
+
$attributes = array();
|
282 |
+
|
283 |
+
if(Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_CONTENT == $data['emv_attribute_type'])
|
284 |
+
{
|
285 |
+
$attributes = Mage::helper('emvemt/emvtemplate')->getEmvAttributesContentFromText($text);
|
286 |
+
}
|
287 |
+
elseif(Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_DYN == $data['emv_attribute_type'])
|
288 |
+
{
|
289 |
+
$attributes = Mage::helper('emvemt/emvtemplate')->getEmvAttributesFromText($text);
|
290 |
+
}
|
291 |
|
292 |
foreach ($attributes as $attribute)
|
293 |
{
|
387 |
|
388 |
$attributeModel = Mage::getModel('emvemt/attribute')
|
389 |
->setEmvAttribute($attrInfo['emv_attribute'])
|
390 |
+
->setEmvAttributeType($attrInfo['emv_attribute_type'])
|
391 |
->setMageAttribute($attrInfo['mage_attribute'])
|
392 |
->setEmvEmtId($modelId);
|
393 |
|
app/code/community/Emv/Emt/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Emv_Emt>
|
5 |
-
<version>0.
|
6 |
</Emv_Emt>
|
7 |
</modules>
|
8 |
<global>
|
@@ -17,7 +17,7 @@
|
|
17 |
</emvemt>
|
18 |
</helpers>
|
19 |
<models>
|
20 |
-
|
21 |
<rewrite>
|
22 |
<email_template>Emv_Emt_Model_Mage_Core_Email_Template</email_template>
|
23 |
</rewrite>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Emv_Emt>
|
5 |
+
<version>0.2.0</version>
|
6 |
</Emv_Emt>
|
7 |
</modules>
|
8 |
<global>
|
17 |
</emvemt>
|
18 |
</helpers>
|
19 |
<models>
|
20 |
+
<core>
|
21 |
<rewrite>
|
22 |
<email_template>Emv_Emt_Model_Mage_Core_Email_Template</email_template>
|
23 |
</rewrite>
|
app/code/community/Emv/Emt/sql/emvemt_setup/mysql4-upgrade-0.1.0-0.2.0.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $installer Emv_Emt_Model_Resource_Setup */
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
ALTER TABLE {$installer->getTable('emvemt/attribute')}
|
9 |
+
ADD COLUMN `emv_attribute_type` VARCHAR(200) NOT NULL AFTER emv_emt_id
|
10 |
+
");
|
11 |
+
|
12 |
+
$installer->run("
|
13 |
+
UPDATE {$installer->getTable('emvemt/attribute')} SET `emv_attribute_type` = '".Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_DYN."'
|
14 |
+
");
|
15 |
+
|
16 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/template/emt/attributes.phtml
CHANGED
@@ -7,12 +7,32 @@ Emv.Attribute.prototype = {
|
|
7 |
top : '',
|
8 |
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
9 |
templateText : '',
|
|
|
10 |
itemsCount : 0,
|
11 |
-
initialize : function(template) {
|
12 |
this.templateText = template;
|
|
|
13 |
this.top = $('emv_attribute_top');
|
14 |
},
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
add : function(data) {
|
17 |
|
18 |
if($('emv_template_id').value == null)
|
@@ -27,17 +47,26 @@ Emv.Attribute.prototype = {
|
|
27 |
this.top = $('emv_attribute_top');
|
28 |
|
29 |
data.index = this.itemsCount++;
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
Element.insert(this.top, {'after':this.template.evaluate(data)});
|
32 |
this.top = $(this.idLabel + '_' + data.index);
|
33 |
|
34 |
var url = '<?php echo $this->getUrl('emvemt/emt/getEmvAttributesSelectAjax'); ?>';
|
35 |
new Ajax.Updater('emv_attributes_col_'+data.index, url, {parameters:
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
method: 'post'});
|
42 |
|
43 |
//set selected type
|
@@ -58,36 +87,45 @@ Emv.Attribute.prototype = {
|
|
58 |
}
|
59 |
}
|
60 |
|
61 |
-
var
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
80 |
'</div>';
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
var selectEmvAttributes = '';
|
83 |
var optionIndex = 0;
|
84 |
-
emvAttribute = new Emv.Attribute(attributesSelectTemplate);
|
85 |
</script>
|
86 |
|
87 |
<div class="entry-edit custom-options bundle" id="emv_attributes_container">
|
88 |
<div class="entry-edit-head">
|
89 |
<h4><?php echo $this->__('Attributes') ?></h4>
|
90 |
-
<div class="right"><?php echo $this->getAddButtonHtml() ?></div>
|
91 |
</div>
|
92 |
|
93 |
<div id="emv_attribute" class="box">
|
7 |
top : '',
|
8 |
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
9 |
templateText : '',
|
10 |
+
templateEmvContentText : '',
|
11 |
itemsCount : 0,
|
12 |
+
initialize : function(template, templateEmvContent) {
|
13 |
this.templateText = template;
|
14 |
+
this.templateEmvContentText = templateEmvContent;
|
15 |
this.top = $('emv_attribute_top');
|
16 |
},
|
17 |
|
18 |
+
addEmvDyn : function(data)
|
19 |
+
{
|
20 |
+
if(!data){
|
21 |
+
data = {};
|
22 |
+
}
|
23 |
+
data.emv_attribute_type = '<?php echo Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_DYN; ?>';
|
24 |
+
this.add(data);
|
25 |
+
},
|
26 |
+
|
27 |
+
addEmvContent : function(data)
|
28 |
+
{
|
29 |
+
if(!data){
|
30 |
+
data = {};
|
31 |
+
}
|
32 |
+
data.emv_attribute_type = '<?php echo Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_CONTENT; ?>';
|
33 |
+
this.add(data);
|
34 |
+
},
|
35 |
+
|
36 |
add : function(data) {
|
37 |
|
38 |
if($('emv_template_id').value == null)
|
47 |
this.top = $('emv_attribute_top');
|
48 |
|
49 |
data.index = this.itemsCount++;
|
50 |
+
|
51 |
+
if(data.emv_attribute_type == '<?php echo Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_CONTENT; ?>')
|
52 |
+
{
|
53 |
+
this.template = new Template(this.templateEmvContentText, this.templateSyntax);
|
54 |
+
}
|
55 |
+
else
|
56 |
+
{
|
57 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
58 |
+
}
|
59 |
Element.insert(this.top, {'after':this.template.evaluate(data)});
|
60 |
this.top = $(this.idLabel + '_' + data.index);
|
61 |
|
62 |
var url = '<?php echo $this->getUrl('emvemt/emt/getEmvAttributesSelectAjax'); ?>';
|
63 |
new Ajax.Updater('emv_attributes_col_'+data.index, url, {parameters:
|
64 |
+
{ accountId : $('emv_account_id').value,
|
65 |
+
emvTemplateId: $('emv_template_id').value ,
|
66 |
+
emv_attribute_type: data.emv_attribute_type ,
|
67 |
+
index : data.index,
|
68 |
+
default_value : data.emv_attribute
|
69 |
+
},
|
70 |
method: 'post'});
|
71 |
|
72 |
//set selected type
|
87 |
}
|
88 |
}
|
89 |
|
90 |
+
var attributesSelectBeginTemplate = '<div id="<?php echo $this->getFieldId() ?>_{{index}}" class="option-box"> ' +
|
91 |
+
'<table class="option-header" style="width:auto;" cellpadding="0" cellspacing="0">' +
|
92 |
+
'<thead>' +
|
93 |
+
'<tr>' +
|
94 |
+
'<th> </th>' +
|
95 |
+
'<th class="opt-type"><?php echo Mage::helper('emvemt')->__('Attribute') ?></th>' +
|
96 |
+
'<th class="opt-req"><?php echo Mage::helper('emvemt')->__('Campaign Commander Attribute') ?></th>' +
|
97 |
+
'</tr>' +
|
98 |
+
'</thead>' +
|
99 |
+
'<tbody>' +
|
100 |
+
'<tr>' +
|
101 |
+
'<td> <?php echo $this->getDeleteButtonHtml() ?></td>' +
|
102 |
+
'<td><?php echo $this->getMageAttributesInputHtml() ?>' +
|
103 |
+
'<input type="hidden" name="<?php echo $this->getFieldName() ?>[{{index}}][delete]" value="" class="delete">';
|
104 |
+
|
105 |
+
var attributesSelectEndTemplate = '</td>' +
|
106 |
+
'<td id="emv_attributes_col_{{index}}"></td>' +
|
107 |
+
'</tr>' +
|
108 |
+
'</tbody>' +
|
109 |
+
'</table>' +
|
110 |
'</div>';
|
111 |
|
112 |
+
var attributesSelectTemplate = attributesSelectBeginTemplate +
|
113 |
+
'<input type="hidden" name="<?php echo $this->getFieldName() ?>[{{index}}][emv_attribute_type]" value="<?php echo Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_DYN; ?>">' +
|
114 |
+
attributesSelectEndTemplate;
|
115 |
+
|
116 |
+
var attributesEmvContentSelectTemplate = attributesSelectBeginTemplate +
|
117 |
+
'<input type="hidden" name="<?php echo $this->getFieldName() ?>[{{index}}][emv_attribute_type]" value="<?php echo Emv_Emt_Constants::ATTRIBUTE_TYPE_EMV_CONTENT; ?>">' +
|
118 |
+
attributesSelectEndTemplate;
|
119 |
+
|
120 |
var selectEmvAttributes = '';
|
121 |
var optionIndex = 0;
|
122 |
+
emvAttribute = new Emv.Attribute(attributesSelectTemplate, attributesEmvContentSelectTemplate);
|
123 |
</script>
|
124 |
|
125 |
<div class="entry-edit custom-options bundle" id="emv_attributes_container">
|
126 |
<div class="entry-edit-head">
|
127 |
<h4><?php echo $this->__('Attributes') ?></h4>
|
128 |
+
<div class="right"><?php echo $this->getAddButtonHtml() ?> <?php echo $this->getAddEmvContentButtonHtml() ?></div>
|
129 |
</div>
|
130 |
|
131 |
<div id="emv_attribute" class="box">
|
app/locale/en_US/Emv_Emt.csv
CHANGED
@@ -23,6 +23,8 @@
|
|
23 |
"Attribute","Attribute"
|
24 |
"Attributes","Attributes"
|
25 |
"Add New Attribute","Add New Attribute"
|
|
|
|
|
26 |
"Remove","Remove"
|
27 |
"Custom attribute, no mapping","Custom attribute, no mapping"
|
28 |
"Attributes Mapping","Attributes Mapping"
|
23 |
"Attribute","Attribute"
|
24 |
"Attributes","Attributes"
|
25 |
"Add New Attribute","Add New Attribute"
|
26 |
+
"Add New EMV DYN Attribute","Add New EMV DYN Attribute"
|
27 |
+
"Add New EMV CONTENT Attribute","Add New EMV CONTENT Attribute"
|
28 |
"Remove","Remove"
|
29 |
"Custom attribute, no mapping","Custom attribute, no mapping"
|
30 |
"Attributes Mapping","Attributes Mapping"
|
app/locale/fr_FR/Emv_Emt.csv
CHANGED
@@ -23,6 +23,8 @@
|
|
23 |
"Attribute","Attribut"
|
24 |
"Attributes","Attributs"
|
25 |
"Add New Attribute","Ajouter Attribut"
|
|
|
|
|
26 |
"Remove","Supprimer"
|
27 |
"Custom attribute, no mapping","Attribut spécifique, pas de mappage"
|
28 |
"Attributes Mapping","Mappage des attributs"
|
23 |
"Attribute","Attribut"
|
24 |
"Attributes","Attributs"
|
25 |
"Add New Attribute","Ajouter Attribut"
|
26 |
+
"Add New EMV DYN Attribute","Ajouter Attribut EMV DYN"
|
27 |
+
"Add New EMV CONTENT Attribute","Ajouter Attribut EMV CONTENT"
|
28 |
"Remove","Supprimer"
|
29 |
"Custom attribute, no mapping","Attribut spécifique, pas de mappage"
|
30 |
"Attributes Mapping","Mappage des attributs"
|
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.
|
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>2012-02-
|
14 |
-
<time>17:
|
15 |
-
<contents><target name="magelocale"><dir name="en_US"><file name="Emv_Core.csv" hash="4a68f62b3bb6003f38632e8726c41d73"/><file name="Emv_Emt.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.2.0</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>2012-02-20</date>
|
14 |
+
<time>17:19:16</time>
|
15 |
+
<contents><target name="magelocale"><dir name="en_US"><file name="Emv_Core.csv" hash="4a68f62b3bb6003f38632e8726c41d73"/><file name="Emv_Emt.csv" hash="9550fdad59ad6d262f3da8aa09e5b88e"/></dir><dir name="fr_FR"><file name="Emv_Core.csv" hash="5d7c94b493825d9efb5ef60178bdab50"/><file name="Emv_Emt.csv" hash="42e00b78ebb2c8ac9181f98566015506"/></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="83105a6b3d1775629dce4134bce2315d"/><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="cc2a88773ca64fe7e88b0f460b3b05fc"/><file name="Form.php" hash="7ff998d35df74c4733f06a9fa6ddcae4"/></dir><dir name="New"><file name="Form.php" hash="f2f06b70d36dc2eefe9d4bf7f49ab633"/></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="5e8ebfdb935fc132917aba8426e9b0cc"/></dir><dir name="Model"><dir name="Mage"><dir name="Core"><dir name="Email"><file name="Template.php" hash="cdbc280d75df51aa4c4fd258157832b5"/></dir></dir></dir><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="a029255fdb8ccb45250959e08bd7f304"/></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="e0d5dcab55e6b147ab8f3e7867f48fb8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="46610ec63dd5443130e59dbc900e3541"/><file name="config.xml" hash="837cdaf661abefaefba7fca6ab421419"/></dir><dir name="sql"><dir name="emvemt_setup"><file name="mysql4-install-0.1.0.php" hash="a7d12df049f2c1377a072fa7899dcb6c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="34df942808b7609c10077b493e87f2c2"/></dir></dir><file name="Constants.php" hash="89e516eb1ad83482283537dc7911a2c6"/></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="b6508fa8b577e1fe2ae56c635f2ca923"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|