magentotosalesforce - Version 1.0

Version Notes

This extension would post real time leads from magento to salesforce automatically. This extension also has the capability to transfer abandoned shopping carts from Magento to salesforce as opportunities which would allow your sales team to track the opportunity and convert to a sale. We also have a feature where once an opportunity is converted to a sale in salesforce, it can create an order in magento. Please contact us at 302-355-0449 for further details or email me directly at _mailto:info@thylaksoft.com, buyan@talktoaprogrammer.com for further information.

Download this release

Release Info

Developer Magento Core Team
Extension magentotosalesforce
Version 1.0
Comparing to
See all releases


Version 1.0

app/code/local/Thylak/Magesalesforce/Block/Adminhtml/Magesalesforce/Magesalesforce.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Thylak_Magesalesforce_Block_Adminhtml_Magesalesforce_Magesalesforce extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ $this->setTemplate('magesalesforce/magesalesforce.phtml');
8
+ }
9
+ }
10
+
11
+
12
+
app/code/local/Thylak/Magesalesforce/Block/Adminhtml/Magesalesforce/Thanks.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Thylak_Magesalesforce_Block_Adminhtml_Magesalesforce_Thanks extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ $this->setTemplate('magesalesforce/thanks.phtml');
8
+ }
9
+ }
10
+
11
+
12
+
app/code/local/Thylak/Magesalesforce/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Thylak_Magesalesforce_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Thylak/Magesalesforce/controllers/Adminhtml/MagesalesforceController.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Thylak_Magesalesforce_Adminhtml_MagesalesforceController extends Mage_Adminhtml_Controller_action
4
+ {
5
+
6
+
7
+ public function indexAction()
8
+ {
9
+ $this->loadLayout()
10
+ ->_addContent($this->getLayout()->createBlock('magesalesforce/adminhtml_magesalesforce_magesalesforce'))
11
+ ->renderLayout();
12
+ //$this->_setActiveMenu('magesalesforce/magesalesforce');
13
+ }
14
+ public function thanksAction()
15
+ {
16
+ $this->loadLayout()
17
+ ->_addContent($this->getLayout()->createBlock('magesalesforce/adminhtml_magesalesforce_thanks'))
18
+ ->renderLayout();
19
+ //$this->_setActiveMenu('magesalesforce/magesalesforce');
20
+ }
21
+ public function savemagesalesforceAction()
22
+ {
23
+ $fname=$this->getRequest()->getPost('firstname');
24
+ $lname=$this->getRequest()->getPost('lastname');
25
+ $email=$this->getRequest()->getPost('email');
26
+ $company=$this->getRequest()->getPost('company');
27
+ $ph=$this->getRequest()->getPost('phoneno');
28
+ $desc=$this->getRequest()->getPost('description');
29
+ $qrystr = 'FirstName='.str_replace(" ","%20",$fname).'&LastName='.str_replace(" ","%20",$lname).'&Email='.str_replace(" ","%20",$email).'&CompanyName='.str_replace(" ","%20",$company).'&Phone1='.str_replace(" ","%20",$ph).'&CloseLeadComment='.str_replace(" ","%20",$desc).'&CreatedBy=139&SourceID=42';
30
+ $url = "http://www.thylaksoft.com/addLead.aspx?".$qrystr;
31
+
32
+ //$url = "http://173.15.158.230/timetracker/addlead.aspx?".$qrystr;
33
+ $ch = curl_init() or die(curl_error());
34
+ curl_setopt($ch, CURLOPT_URL,$url);
35
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
36
+ $data1=curl_exec($ch) or die(curl_error());
37
+
38
+ //echo "<font color=black face=verdana size=3>".$data1."</font>";
39
+ //echo curl_error($ch);
40
+ curl_close($ch);
41
+ $this->getResponse()->setRedirect($this->getUrl('magesalesforce/adminhtml_magesalesforce/thanks/fname/'.$fname.'/lname/'.$lname, array('_secure'=>true)));
42
+ return;
43
+ }
44
+ }
app/code/local/Thylak/Magesalesforce/etc/config.xml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!-- Config file -->
4
+
5
+ <config>
6
+ <modules>
7
+ <Thylak_Magesalesforce>
8
+ <version>0.1.0</version>
9
+ </Thylak_Magesalesforce>
10
+ </modules>
11
+ <admin>
12
+ <routers>
13
+ <magesalesforce>
14
+ <use>admin</use>
15
+ <args>
16
+ <module>Thylak_Magesalesforce</module>
17
+ <frontName>magesalesforce</frontName>
18
+ </args>
19
+ </magesalesforce>
20
+ </routers>
21
+ </admin>
22
+ <adminhtml>
23
+ <menu>
24
+ <magesalesforce module="magesalesforce">
25
+ <title>Salesforce</title>
26
+ <sort_order>71</sort_order>
27
+ <children>
28
+ <items2 module="magesalesforce">
29
+ <title>Magento to Salesforce</title>
30
+ <action>magesalesforce/adminhtml_magesalesforce/index</action>
31
+ <sort_order>20</sort_order>
32
+ </items2>
33
+ </children>
34
+ </magesalesforce>
35
+ </menu>
36
+ <acl>
37
+ <resources>
38
+ <all>
39
+ <title>Allow Everything</title>
40
+ </all>
41
+ <admin>
42
+ <children>
43
+ <Thylak_Magesalesforce>
44
+ <title>Magesalesforce Module</title>
45
+ <sort_order>10</sort_order>
46
+ </Thylak_Magesalesforce>
47
+ </children>
48
+ </admin>
49
+ </resources>
50
+ </acl>
51
+ <layout>
52
+ <updates>
53
+ <magesalesforce>
54
+ <file>magesalesforce.xml</file>
55
+ </magesalesforce>
56
+ </updates>
57
+ </layout>
58
+ </adminhtml>
59
+ <global>
60
+ <resources>
61
+ <magesalesforce_setup>
62
+ <setup>
63
+ <module>Thylak_Magesalesforce</module>
64
+ </setup>
65
+ <connection>
66
+ <use>core_setup</use>
67
+ </connection>
68
+ </magesalesforce_setup>
69
+ <magesalesforce_write>
70
+ <connection>
71
+ <use>core_write</use>
72
+ </connection>
73
+ </magesalesforce_write>
74
+ <magesalesforce_read>
75
+ <connection>
76
+ <use>core_read</use>
77
+ </connection>
78
+ </magesalesforce_read>
79
+ </resources>
80
+ <blocks>
81
+ <magesalesforce>
82
+ <class>Thylak_Magesalesforce_Block</class>
83
+ </magesalesforce>
84
+ </blocks>
85
+ <helpers>
86
+ <magesalesforce>
87
+ <class>Thylak_Magesalesforce_Helper</class>
88
+ </magesalesforce>
89
+ </helpers>
90
+ </global>
91
+ </config>
app/design/adminhtml/default/default/layout/magesalesforce.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!-- This layout file is used to route the controller and actions -->
4
+
5
+ <layout version="0.1.0">
6
+ <magesalesforce_adminhtml_magesalesforce_index>
7
+ <reference name="content">
8
+ <block type="magesalesforce/adminhtml_magesalesforce" name="magesalesforce" />
9
+ </reference>
10
+ </magesalesforce_adminhtml_magesalesforce_index>
11
+ <magesalesforce_adminhtml_magesalesforce_thanks>
12
+ <reference name="content">
13
+ <block type="magesalesforce/adminhtml_magesalesforce" name="magesalesforce_thanks" />
14
+ </reference>
15
+ </magesalesforce_adminhtml_magesalesforce_thanks>
16
+ </layout>
app/design/adminhtml/default/default/template/magesalesforce/magesalesforce.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tr>
4
+ <td><h3><?php echo 'Magento To Salesforce' ?></h3></td>
5
+ </tr>
6
+ </table>
7
+ </div>
8
+
9
+ <form name="magesalesforceform" id="magesalesforceform" method="post" action="<?php echo $this->getUrl('*/*/savemagesalesforce'); ?>" enctype="multipart/form-data">
10
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
11
+
12
+ <div id="messages">
13
+ <?php //echo $this->getMessagesBlock()->getGroupedHtml() ?>
14
+ </div>
15
+ <div class="entry-edit" style="background-color:#6f8992;">
16
+ <h4 style="color:#ffffff;"><strong>Magento To Salesforce CRM</strong></h4>
17
+ </div>
18
+ <div class="fieldset " id="base_fieldset">
19
+ <div class="hor-scroll">
20
+ <table cellspacing="0" class="form-list" style="background-color:#fafafa;">
21
+ <tbody>
22
+ <tr>
23
+ <td class="label"><label for="firstname"><?php echo Mage::helper('adminhtml')->__('Enter First Name') ?><span style="color:#d40707;">*</span></label></td>
24
+ <td class="value"><input type="text" id="firstname" name="firstname" value="" class="required-entry input-text" /></td>
25
+ </tr>
26
+ <tr>
27
+ <td class="label"><label for="lastname"><?php echo Mage::helper('adminhtml')->__('Enter Last Name') ?></label></td>
28
+ <td class="value"><input type="text" id="lastname" name="lastname" value="" class="input-text" /></td>
29
+ </tr>
30
+ <tr>
31
+ <td class="label"><label for="email"><?php echo Mage::helper('adminhtml')->__('Enter Email Id') ?><span style="color:#d40707;">*</span></label></td>
32
+ <td class="value"><input type="text" id="email" name="email" value="" class="required-entry input-text validate-email" /></td>
33
+ </tr>
34
+ <tr>
35
+ <td class="label"><label for="company"><?php echo Mage::helper('adminhtml')->__('Enter Company Name') ?><span style="color:#d40707;">*</span></label></td>
36
+ <td class="value"><input type="text" id="company" name="company" value="" class="required-entry input-text" /></td>
37
+ </tr>
38
+ <tr>
39
+ <td class="label"><label for="phoneno"><?php echo Mage::helper('adminhtml')->__('Enter Phone Number') ?><span style="color:#d40707;">*</span></label></td>
40
+ <td class="value"><input type="text" id="phoneno" name="phoneno" value="" class="required-entry input-text" /></td>
41
+ </tr>
42
+ <tr>
43
+ <td class="label"><label for="description"><?php echo Mage::helper('adminhtml')->__('Enter Description') ?><span style="color:#d40707;">*</span></label></td>
44
+ <td class="value"><textarea id="description" name="description" class="required-entry" ></textarea></td>
45
+ </tr>
46
+ <tr>
47
+ <td colspan = "2" align="right">
48
+ <div class="form-buttons"><input type="submit" id="magetosalesforce" name = "magetosalesforce" class="form-button" value="<?php echo 'Submit' ?>" title="<?php echo ' Submit' ?>" /></div>
49
+ </td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
53
+ </div>
54
+ </div>
55
+ </form>
56
+
57
+ <script type="text/javascript">
58
+ var magesalesforceform = new varienForm('magesalesforceform');
59
+ </script>
60
+
61
+
62
+
app/design/adminhtml/default/default/template/magesalesforce/thanks.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $name = $this->getRequest()->getParam('fname').' '.$this->getRequest()->getParam('lname'); ?>
2
+ <div class="content-header">
3
+ <table cellspacing="0">
4
+ <tr>
5
+ <td><h3><?php echo 'Thank You Form' ?></h3></td>
6
+ </tr>
7
+ </table>
8
+ </div>
9
+
10
+ <div style="background-color:#fafafa;">
11
+ <p>Hi <?php echo $name; ?>,</p><br>
12
+
13
+ <p>Thank you for submitting your request. A representative from Thylaksoft will contact you shortly to discuss your needs.</p><br> <p>If you need to talk to someone right away, please call us at 302-355-0449.</p><br>
14
+
15
+ <p>Thanks,</p><br>
16
+ <p>Thylaksoft LLC. </p>
17
+ </div>
18
+ <!--<div class="form-buttons" align="right"><a href="" title="Back">Back</a></div>-->
app/etc/modules/Thylak_Magesalesforce.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!-- Create a Artist module with the Namespace Thylak
4
+ Here active = true to enable the module and codepool = local
5
+ for notify that it was custom module created in local.-->
6
+
7
+ <config>
8
+ <modules>
9
+ <Thylak_Magesalesforce>
10
+ <active>true</active>
11
+ <codePool>local</codePool>
12
+ </Thylak_Magesalesforce>
13
+ </modules>
14
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>magentotosalesforce</name>
4
+ <version>1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This extension would post real time leads from magento to salesforce automatically. This extension also has the capability to transfer abandoned shopping carts from Magento to salesforce as opportunities which would allow your sales team to track the opportunity and convert to a sale. We also have a feature where once an opportunity is converted to a sale in salesforce, it can create an order in magento. Please contact us at 302-355-0449 for further details or email me directly at _mailto:info@thylaksoft.com, buyan@talktoaprogrammer.com for further information.</summary>
10
+ <description>This extension would post real time leads from magento to salesforce automatically. This extension also has the capability to transfer abandoned shopping carts from Magento to salesforce as opportunities which would allow your sales team to track the opportunity and convert to a sale. We also have a feature where once an opportunity is converted to a sale in salesforce, it can create an order in magento. Please contact us at 302-355-0449 for further details or email me directly at _mailto:info@thylaksoft.com, buyan@talktoaprogrammer.com for further information.</description>
11
+ <notes>This extension would post real time leads from magento to salesforce automatically. This extension also has the capability to transfer abandoned shopping carts from Magento to salesforce as opportunities which would allow your sales team to track the opportunity and convert to a sale. We also have a feature where once an opportunity is converted to a sale in salesforce, it can create an order in magento. Please contact us at 302-355-0449 for further details or email me directly at _mailto:info@thylaksoft.com, buyan@talktoaprogrammer.com for further information.</notes>
12
+ <authors><author><name>thylaskoft</name><user>auto-converted</user><email>buyan@talktoaprogrammer.com</email></author></authors>
13
+ <date>2010-06-25</date>
14
+ <time>15:33:18</time>
15
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magesalesforce.xml" hash="e08102c8316a2eb5820e2446b35adee3"/></dir><dir name="template"><dir name="magesalesforce"><file name="magesalesforce.phtml" hash="e9429550184635ac85d49fffda30acbe"/><file name="thanks.phtml" hash="4d3b760f207dd3e8a11a4444952bbaa7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Thylak_Magesalesforce.xml" hash="bbfb16827dc9800b7e8fe859cd11050b"/></dir></target><target name="magelocal"><dir name="Thylak"><dir name="Magesalesforce"><dir name="Block"><dir name="Adminhtml"><dir name="Magesalesforce"><file name="Magesalesforce.php" hash="ef1ba653b15b3e8cb215cf6072eeb431"/><file name="Thanks.php" hash="27d27d901eadd7d048b724e93a1b1496"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MagesalesforceController.php" hash="2ac1ba906636536ed89f61494cf449bd"/></dir></dir><dir name="etc"><file name="config.xml" hash="657e4925ab8ed986a47f959cd796e5d5"/></dir><dir name="Helper"><file name="Data.php" hash="df07dbd18479b1ff1592084b82891df3"/></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>