Version Notes
AdvancedContactForm
Download this release
Release Info
Developer | Zestard |
Extension | advancedcontactform |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
app/code/community/Zestard/Advancecontactform/controllers/IndexController.php
CHANGED
@@ -50,8 +50,8 @@ class Zestard_Advancecontactform_IndexController extends Mage_Core_Controller_Fr
|
|
50 |
/* @var $translate Mage_Core_Model_Translate */
|
51 |
$translate->setTranslateInline(false);
|
52 |
try {
|
53 |
-
$postObject = new Varien_Object();
|
54 |
-
$postObject->setData($post);
|
55 |
$error = false;
|
56 |
if (!Zend_Validate::is(trim($post['fname']) , 'NotEmpty')) {
|
57 |
$error = true;
|
@@ -83,22 +83,24 @@ class Zestard_Advancecontactform_IndexController extends Mage_Core_Controller_Fr
|
|
83 |
$contactPersons = explode(",", $post["contactperson"]);
|
84 |
foreach ($contactPersons as $key => $contactPerson)
|
85 |
{
|
86 |
-
|
87 |
-
|
88 |
-
$
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
102 |
$translate->setTranslateInline(true);
|
103 |
Mage::getSingleton('core/session')->addSuccess(Mage::helper('contacts')->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
|
104 |
$this->_redirect('*/*/index');
|
50 |
/* @var $translate Mage_Core_Model_Translate */
|
51 |
$translate->setTranslateInline(false);
|
52 |
try {
|
53 |
+
// $postObject = new Varien_Object();
|
54 |
+
// $postObject->setData($post);
|
55 |
$error = false;
|
56 |
if (!Zend_Validate::is(trim($post['fname']) , 'NotEmpty')) {
|
57 |
$error = true;
|
83 |
$contactPersons = explode(",", $post["contactperson"]);
|
84 |
foreach ($contactPersons as $key => $contactPerson)
|
85 |
{
|
86 |
+
//$mailTemplate = Mage::getModel('core/email_template');
|
87 |
+
$ident = Mage::getStoreConfig('advancecontactformsetting/advancecontactform/sender_email_identity');
|
88 |
+
$fromName = Mage::getStoreConfig('trans_email/ident_'.$ident.'/name');
|
89 |
+
$fromEmail = Mage::getStoreConfig('trans_email/ident_'.$ident.'/email');
|
90 |
+
$emailTemplate = Mage::getModel('core/email_template')->loadDefault(Mage::getStoreConfig('advancecontactformsetting/advancecontactform/advancecontactformtemplate'));
|
91 |
+
$emailTemplateVariables = $post;
|
92 |
+
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
|
93 |
+
|
94 |
+
$mail = Mage::getModel('core/email')
|
95 |
+
->setToName($post['fname'])
|
96 |
+
->setToEmail($contactPerson)
|
97 |
+
->setBody($processedTemplate)
|
98 |
+
->setSubject('Contasct Details of - '.$post['fname']. ' '.$post['lname'])
|
99 |
+
->setFromEmail($fromEmail)
|
100 |
+
->setFromName($fromName)
|
101 |
+
->setType('html');
|
102 |
+
$mail->send();
|
103 |
+
/* @var $mailTemplate Mage_Core_Model_Email_Template */ }
|
104 |
$translate->setTranslateInline(true);
|
105 |
Mage::getSingleton('core/session')->addSuccess(Mage::helper('contacts')->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
|
106 |
$this->_redirect('*/*/index');
|
app/locale/en_US/template/email/advancecontactform/advancecontactform.html
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
"var data.telephone":"Sender Telephone",
|
6 |
"var data.comment":"Comment"}
|
7 |
@-->
|
8 |
-
First Name: {{var
|
9 |
-
Last Name: {{var
|
10 |
-
Email: {{var
|
11 |
-
Home Phone Number: {{var
|
12 |
-
Comment: {{var
|
5 |
"var data.telephone":"Sender Telephone",
|
6 |
"var data.comment":"Comment"}
|
7 |
@-->
|
8 |
+
First Name: {{var fname}}<br/>
|
9 |
+
Last Name: {{var lname}}<br/>
|
10 |
+
Email: {{var email}}<br/>
|
11 |
+
Home Phone Number: {{var telephone}}<br/>
|
12 |
+
Comment: {{var comment}}<br/>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>advancedcontactform</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>Zestard</name><user>ZestardTech</user><email>support@zestard.com</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Zestard"><dir name="Advancecontactform"><dir name="Helper"><file name="Data.php" hash="d949271129e03a46e21daf7a516de831"/></dir><dir name="controllers"><file name="IndexController.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>advancedcontactform</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>AdvancedContactForm</summary>
|
10 |
+
<description>AdvancedContactForm</description>
|
11 |
+
<notes>AdvancedContactForm</notes>
|
12 |
<authors><author><name>Zestard</name><user>ZestardTech</user><email>support@zestard.com</email></author></authors>
|
13 |
+
<date>2016-06-24</date>
|
14 |
+
<time>14:38:17</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Zestard"><dir name="Advancecontactform"><dir name="Helper"><file name="Data.php" hash="d949271129e03a46e21daf7a516de831"/></dir><dir name="controllers"><file name="IndexController.php" hash="654adb12c4ca596768b57c7c0b56044e"/></dir><dir name="etc"><file name="config.xml" hash="6c8702614453462b5556e121d74cad37"/><file name="system.xml" hash="2c339ef4d31012264abe79655b12e467"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="advancecontactform.xml" hash="3a211ee456777c0316268d65259bebf2"/></dir><dir name="template"><dir name="advancecontactform"><file name="advancecontactform.phtml" hash="7e9eda6a49e04313c1ed00b651ec1172"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zestard_Advancecontactform.xml" hash="a8e91bdc9a6bdda213510593b8ee10d2"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="advancecontactform"><file name="advancecontactform.html" hash="fc6ac3f2d9e1b19f4f1b5419a4a23f4d"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="acf"><file name="zestard-logo.png" hash="fbf51108e5c6f796c5d2a6294690c352"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|