Version Notes
CloudGento moudles enables to register CloudGento Free Trail
Download this release
Release Info
Developer | Magento Core Team |
Extension | CloudGento_FreeTrail |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Cloudconversion/CloudGento/Block/Adminhtml/Registration.php +24 -0
- app/code/local/Cloudconversion/CloudGento/Block/Adminhtml/Registration/Form.php +484 -0
- app/code/local/Cloudconversion/CloudGento/Block/Fail.php +10 -0
- app/code/local/Cloudconversion/CloudGento/Block/Success.php +10 -0
- app/code/local/Cloudconversion/CloudGento/Helper/Data.php +5 -0
- app/code/local/Cloudconversion/CloudGento/Model/Api.php +48 -0
- app/code/local/Cloudconversion/CloudGento/Model/Registrationformresponserenderer.php +11 -0
- app/code/local/Cloudconversion/CloudGento/controllers/Adminhtml/RegistrationController.php +44 -0
- app/code/local/Cloudconversion/CloudGento/controllers/IndexController.php +19 -0
- app/code/local/Cloudconversion/CloudGento/etc/config.xml +85 -0
- app/design/adminhtml/default/default/layout/cloudgento.xml +31 -0
- app/design/adminhtml/default/default/template/cloudgento/register.phtml +15 -0
- app/design/adminhtml/default/default/template/cloudgento/registration_fail.phtml +4 -0
- app/design/adminhtml/default/default/template/cloudgento/registration_success.phtml +9 -0
- app/etc/modules/Cloudconversion_CloudGento.xml +9 -0
- package.xml +20 -0
- skin/adminhtml/default/default/cloudgento/CloudGento-Raindrop.png +0 -0
- skin/adminhtml/default/default/cloudgento/header.css +48 -0
- skin/adminhtml/default/default/cloudgento/header.png +0 -0
- skin/adminhtml/default/default/cloudgento/img160_smb_conf_step1.gif +0 -0
- skin/adminhtml/default/default/cloudgento/img160_smb_conf_step2.gif +0 -0
- skin/adminhtml/default/default/cloudgento/img160_smb_conf_step3.gif +0 -0
- skin/adminhtml/default/default/cloudgento/register.js +11 -0
- skin/adminhtml/default/default/cloudgento/topmenu.css +6 -0
app/code/local/Cloudconversion/CloudGento/Block/Adminhtml/Registration.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Block_Adminhtml_Registration extends Mage_Adminhtml_Block_Widget_Form_Container {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
parent::__construct();
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'cloudgento';
|
9 |
+
$this->_controller = 'adminhtml_registration';
|
10 |
+
$this->_updateButton('save', 'label', Mage::helper('cloudgento')->__('Submit'));
|
11 |
+
}
|
12 |
+
|
13 |
+
public function getHeaderText() {
|
14 |
+
return Mage::helper('cloudgento')->__('Register');
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _prepareLayout() {
|
18 |
+
if ($this->_blockGroup && $this->_controller) {
|
19 |
+
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_form'));
|
20 |
+
}
|
21 |
+
return parent::_prepareLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/local/Cloudconversion/CloudGento/Block/Adminhtml/Registration/Form.php
ADDED
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Block_Adminhtml_Registration_Form extends Mage_Adminhtml_Block_Widget_Form {
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('cloudgento/register.phtml');
|
8 |
+
}
|
9 |
+
|
10 |
+
protected function _prepareForm() {
|
11 |
+
|
12 |
+
$admin = Mage::getSingleton('admin/session');
|
13 |
+
$data = array(
|
14 |
+
'process_form' => 'true',
|
15 |
+
'SubscriptionAgreement' => 'on',
|
16 |
+
'Country' => 'US',
|
17 |
+
'UserUsername' => 'test@3trialforce.com',
|
18 |
+
'LeadSource' => 'Trialforce',
|
19 |
+
'formName' => 'eCommSourceFeb2011',
|
20 |
+
'Lead.Partner_Account__c' => '0013000000NPSDv',
|
21 |
+
'successPage' => $this->getUrl('*/index/registrationSuccess'),
|
22 |
+
'failPage' => $this->getUrl('*/index/registrationFail'),
|
23 |
+
'Lead.Referrer_Company__c' => 'Cloud Conversion',
|
24 |
+
'Product_Interest__c' => 'eCommSource EE',
|
25 |
+
'CompanyLanguage' => 'en_US',
|
26 |
+
'FirstName' => $admin->getUser()->getFirstname(),
|
27 |
+
'LastName' => $admin->getUser()->getLastname(),
|
28 |
+
'Email' => $admin->getUser()->getEmail(),
|
29 |
+
|
30 |
+
);
|
31 |
+
|
32 |
+
$form = new Varien_Data_Form(array(
|
33 |
+
'id' => 'edit_form',
|
34 |
+
'action' => $this->getUrl('*/*/post'),
|
35 |
+
'method' => 'post',
|
36 |
+
'enctype' => 'application/x-www-form-urlencoded',
|
37 |
+
));
|
38 |
+
|
39 |
+
$form->setUseContainer(true);
|
40 |
+
|
41 |
+
$this->setForm($form);
|
42 |
+
|
43 |
+
$fieldset = $form->addFieldset('about_you', array(
|
44 |
+
'legend' => Mage::helper('cloudgento')->__('About You')
|
45 |
+
));
|
46 |
+
|
47 |
+
|
48 |
+
$fieldset->addField('process_form', 'hidden', array(
|
49 |
+
'name' => 'register_data[process_form]',
|
50 |
+
));
|
51 |
+
|
52 |
+
$fieldset->addField('UserUsername', 'hidden', array(
|
53 |
+
'name' => 'register_data[UserUsername]',
|
54 |
+
));
|
55 |
+
|
56 |
+
$fieldset->addField('LeadSource', 'hidden', array(
|
57 |
+
'name' => 'register_data[LeadSource]',
|
58 |
+
));
|
59 |
+
|
60 |
+
$fieldset->addField('Lead.Partner_Account__c', 'hidden', array(
|
61 |
+
'name' => 'register_data[Lead.Partner_Account__c]',
|
62 |
+
));
|
63 |
+
|
64 |
+
$fieldset->addField('successPage', 'hidden', array(
|
65 |
+
'name' => 'register_data[successPage]',
|
66 |
+
));
|
67 |
+
|
68 |
+
$fieldset->addField('failPage', 'hidden', array(
|
69 |
+
'name' => 'register_data[failPage]',
|
70 |
+
));
|
71 |
+
|
72 |
+
$fieldset->addField('Lead.Referrer_Company__c', 'hidden', array(
|
73 |
+
'name' => 'register_data[Lead.Referrer_Company__c]',
|
74 |
+
));
|
75 |
+
|
76 |
+
$fieldset->addField('Product_Interest__c', 'hidden', array(
|
77 |
+
'name' => 'register_data[Product_Interest__c]',
|
78 |
+
));
|
79 |
+
|
80 |
+
$fieldset->addField('CompanyLanguage', 'hidden', array(
|
81 |
+
'name' => 'register_data[CompanyLanguage]',
|
82 |
+
));
|
83 |
+
|
84 |
+
$fieldset->addField('formName', 'hidden', array(
|
85 |
+
'name' => 'register_data[formName]',
|
86 |
+
));
|
87 |
+
|
88 |
+
$fieldset->addField('FirstName', 'text', array(
|
89 |
+
'label' => Mage::helper('cloudgento')->__('FirstName'),
|
90 |
+
'class' => 'required-entry',
|
91 |
+
'required' => true,
|
92 |
+
'name' => 'register_data[FirstName]',
|
93 |
+
));
|
94 |
+
|
95 |
+
$fieldset->addField('LastName', 'text', array(
|
96 |
+
'label' => Mage::helper('cloudgento')->__('LastName'),
|
97 |
+
'class' => 'required-entry',
|
98 |
+
'required' => true,
|
99 |
+
'name' => 'register_data[LastName]',
|
100 |
+
));
|
101 |
+
|
102 |
+
$fieldset->addField('Title', 'text', array(
|
103 |
+
'label' => Mage::helper('cloudgento')->__('Title'),
|
104 |
+
'class' => 'required-entry',
|
105 |
+
'required' => true,
|
106 |
+
'name' => 'register_data[Title]',
|
107 |
+
));
|
108 |
+
|
109 |
+
$fieldset->addField('Email', 'text', array(
|
110 |
+
'label' => Mage::helper('cloudgento')->__('Email'),
|
111 |
+
'class' => 'required-entry validate-email',
|
112 |
+
'required' => true,
|
113 |
+
'name' => 'register_data[Email]',
|
114 |
+
));
|
115 |
+
|
116 |
+
$fieldset->addField('Phone', 'text', array(
|
117 |
+
'label' => Mage::helper('cloudgento')->__('Phone'),
|
118 |
+
'class' => 'required-entry',
|
119 |
+
'required' => true,
|
120 |
+
'name' => 'register_data[Phone]',
|
121 |
+
));
|
122 |
+
|
123 |
+
$fieldset = $form->addFieldset('about_company', array(
|
124 |
+
'legend' => Mage::helper('cloudgento')->__('Your Company')
|
125 |
+
));
|
126 |
+
|
127 |
+
$fieldset->addField('Company', 'text', array(
|
128 |
+
'label' => Mage::helper('cloudgento')->__('Company'),
|
129 |
+
'class' => 'required-entry',
|
130 |
+
'required' => true,
|
131 |
+
'name' => 'register_data[Company]',
|
132 |
+
));
|
133 |
+
|
134 |
+
$fieldset->addField('NumberOfEmployees', 'select', array(
|
135 |
+
'label' => Mage::helper('cloudgento')->__('NumberOfEmployees'),
|
136 |
+
'class' => 'required-entry',
|
137 |
+
'required' => true,
|
138 |
+
'name' => 'register_data[NumberOfEmployees]',
|
139 |
+
'values' => array(
|
140 |
+
"" => Mage::helper('cloudgento')->__('-- Select One --'),
|
141 |
+
5 => Mage::helper('cloudgento')->__('Less than 8 employees'),
|
142 |
+
15 => Mage::helper('cloudgento')->__('8 - 20 employees'),
|
143 |
+
60 => Mage::helper('cloudgento')->__('21 - 100 employees'),
|
144 |
+
150 => Mage::helper('cloudgento')->__('101 - 200 employees'),
|
145 |
+
300 => Mage::helper('cloudgento')->__('201 - 400 employees'),
|
146 |
+
450 => Mage::helper('cloudgento')->__('401 - 500 employees'),
|
147 |
+
625 => Mage::helper('cloudgento')->__('501 - 750 employees'),
|
148 |
+
875 => Mage::helper('cloudgento')->__('751 - 1,000 employees'),
|
149 |
+
1500 => Mage::helper('cloudgento')->__('1,000 - 2,000 employees'),
|
150 |
+
5000 => Mage::helper('cloudgento')->__('More than 2,000'),
|
151 |
+
),
|
152 |
+
));
|
153 |
+
|
154 |
+
$fieldset->addField('Country', 'select', array(
|
155 |
+
'label' => Mage::helper('cloudgento')->__('Country'),
|
156 |
+
'class' => 'required-entry',
|
157 |
+
'required' => true,
|
158 |
+
'name' => 'register_data[Country]',
|
159 |
+
'onchange' => 'registrationFormDependencyCheck()',
|
160 |
+
'values' => array(
|
161 |
+
'' => Mage::helper('cloudgento')->__('-- Select One --'),
|
162 |
+
'AF' => Mage::helper('cloudgento')->__('Afghanistan'),
|
163 |
+
'AL' => Mage::helper('cloudgento')->__('Albania'),
|
164 |
+
'DZ' => Mage::helper('cloudgento')->__('Algeria'),
|
165 |
+
'AS' => Mage::helper('cloudgento')->__('American Samoa'),
|
166 |
+
'AD' => Mage::helper('cloudgento')->__('Andorra'),
|
167 |
+
'AI' => Mage::helper('cloudgento')->__('Anguilla'),
|
168 |
+
'AQ' => Mage::helper('cloudgento')->__('Antarctica'),
|
169 |
+
'AG' => Mage::helper('cloudgento')->__('Antigua And Barbuda'),
|
170 |
+
'AR' => Mage::helper('cloudgento')->__('Argentina'),
|
171 |
+
'AM' => Mage::helper('cloudgento')->__('Armenia'),
|
172 |
+
'AW' => Mage::helper('cloudgento')->__('Aruba'),
|
173 |
+
'AU' => Mage::helper('cloudgento')->__('Australia'),
|
174 |
+
'AT' => Mage::helper('cloudgento')->__('Austria'),
|
175 |
+
'AZ' => Mage::helper('cloudgento')->__('Ayerbaijan'),
|
176 |
+
'BS' => Mage::helper('cloudgento')->__('Bahamas, The'),
|
177 |
+
'BH' => Mage::helper('cloudgento')->__('Bahrain'),
|
178 |
+
'BD' => Mage::helper('cloudgento')->__('Bangladesh'),
|
179 |
+
'BB' => Mage::helper('cloudgento')->__('Barbados'),
|
180 |
+
'BY' => Mage::helper('cloudgento')->__('Belarus'),
|
181 |
+
'BZ' => Mage::helper('cloudgento')->__('Belize'),
|
182 |
+
'BE' => Mage::helper('cloudgento')->__('Belgium'),
|
183 |
+
'BJ' => Mage::helper('cloudgento')->__('Benin'),
|
184 |
+
'BM' => Mage::helper('cloudgento')->__('Bermuda'),
|
185 |
+
'BT' => Mage::helper('cloudgento')->__('Bhutan'),
|
186 |
+
'BO' => Mage::helper('cloudgento')->__('Bolivia'),
|
187 |
+
'BV' => Mage::helper('cloudgento')->__('Bouvet Is'),
|
188 |
+
'BA' => Mage::helper('cloudgento')->__('Bosnia and Herzegovina'),
|
189 |
+
'BW' => Mage::helper('cloudgento')->__('Botswana'),
|
190 |
+
'BR' => Mage::helper('cloudgento')->__('Brazil'),
|
191 |
+
'IO' => Mage::helper('cloudgento')->__('British Indian Ocean Territory'),
|
192 |
+
'BN' => Mage::helper('cloudgento')->__('Brunei'),
|
193 |
+
'BG' => Mage::helper('cloudgento')->__('Bulgaria'),
|
194 |
+
'BF' => Mage::helper('cloudgento')->__('Burkina Faso'),
|
195 |
+
'BI' => Mage::helper('cloudgento')->__('Burundi'),
|
196 |
+
'KH' => Mage::helper('cloudgento')->__('Cambodia'),
|
197 |
+
'CM' => Mage::helper('cloudgento')->__('Cameroon'),
|
198 |
+
'CA' => Mage::helper('cloudgento')->__('Canada'),
|
199 |
+
'CV' => Mage::helper('cloudgento')->__('Cape Verde'),
|
200 |
+
'KY' => Mage::helper('cloudgento')->__('Cayman Is'),
|
201 |
+
'CF' => Mage::helper('cloudgento')->__('Central African Republic'),
|
202 |
+
'TD' => Mage::helper('cloudgento')->__('Chad'),
|
203 |
+
'CL' => Mage::helper('cloudgento')->__('Chile'),
|
204 |
+
'CN' => Mage::helper('cloudgento')->__('China'),
|
205 |
+
'HK' => Mage::helper('cloudgento')->__('China (Hong Kong S.A.R.)'),
|
206 |
+
'MO' => Mage::helper('cloudgento')->__('China (Macau S.A.R.)'),
|
207 |
+
'CX' => Mage::helper('cloudgento')->__('Christmas Is'),
|
208 |
+
'CC' => Mage::helper('cloudgento')->__('Cocos (Keeling) Is'),
|
209 |
+
'CO' => Mage::helper('cloudgento')->__('Colombia'),
|
210 |
+
'KM' => Mage::helper('cloudgento')->__('Comoros'),
|
211 |
+
'CK' => Mage::helper('cloudgento')->__('Cook Islands'),
|
212 |
+
'CR' => Mage::helper('cloudgento')->__('Costa Rica'),
|
213 |
+
'CI' => Mage::helper('cloudgento')->__('Cote D\'Ivoire(Ivory Coast)'),
|
214 |
+
'HR' => Mage::helper('cloudgento')->__('Croatia(Hrvatska)'),
|
215 |
+
'CY' => Mage::helper('cloudgento')->__('Cyprus'),
|
216 |
+
'CZ' => Mage::helper('cloudgento')->__('Czech Republic'),
|
217 |
+
'CD' => Mage::helper('cloudgento')->__('Democratic Republic of the Congo'),
|
218 |
+
'DK' => Mage::helper('cloudgento')->__('Denmark'),
|
219 |
+
'DM' => Mage::helper('cloudgento')->__('Dominica'),
|
220 |
+
'DO' => Mage::helper('cloudgento')->__('Dominican Republic'),
|
221 |
+
'DJ' => Mage::helper('cloudgento')->__('Djibouti'),
|
222 |
+
'TP' => Mage::helper('cloudgento')->__('East Timor'),
|
223 |
+
'EC' => Mage::helper('cloudgento')->__('Ecuador'),
|
224 |
+
'EG' => Mage::helper('cloudgento')->__('Egypt'),
|
225 |
+
'SV' => Mage::helper('cloudgento')->__('El Salvador'),
|
226 |
+
'GQ' => Mage::helper('cloudgento')->__('Equatorial Guinea'),
|
227 |
+
'ER' => Mage::helper('cloudgento')->__('Eritrea'),
|
228 |
+
'EE' => Mage::helper('cloudgento')->__('Estonia'),
|
229 |
+
'ET' => Mage::helper('cloudgento')->__('Ethiopia'),
|
230 |
+
'FK' => Mage::helper('cloudgento')->__('Falkland Is(Is Malvinas)'),
|
231 |
+
'FO' => Mage::helper('cloudgento')->__('Faroe Islands'),
|
232 |
+
'FJ' => Mage::helper('cloudgento')->__('Fiji Islands'),
|
233 |
+
'FI' => Mage::helper('cloudgento')->__('Finland'),
|
234 |
+
'FR' => Mage::helper('cloudgento')->__('France'),
|
235 |
+
'GF' => Mage::helper('cloudgento')->__('French Guiana'),
|
236 |
+
'PF' => Mage::helper('cloudgento')->__('French Polynesia'),
|
237 |
+
'TF' => Mage::helper('cloudgento')->__('French Southern Territories'),
|
238 |
+
'MK' => Mage::helper('cloudgento')->__('F.Y.R.O. Macedonia'),
|
239 |
+
'GA' => Mage::helper('cloudgento')->__('Gabon'),
|
240 |
+
'GM' => Mage::helper('cloudgento')->__('Gambia, The'),
|
241 |
+
'GE' => Mage::helper('cloudgento')->__('Georgia'),
|
242 |
+
'DE' => Mage::helper('cloudgento')->__('Germany'),
|
243 |
+
'GH' => Mage::helper('cloudgento')->__('Ghana'),
|
244 |
+
'GI' => Mage::helper('cloudgento')->__('Gibraltar'),
|
245 |
+
'GR' => Mage::helper('cloudgento')->__('Greece'),
|
246 |
+
'GL' => Mage::helper('cloudgento')->__('Greenland'),
|
247 |
+
'GD' => Mage::helper('cloudgento')->__('Grenada'),
|
248 |
+
'GP' => Mage::helper('cloudgento')->__('Guadeloupe'),
|
249 |
+
'GU' => Mage::helper('cloudgento')->__('Guam'),
|
250 |
+
'GT' => Mage::helper('cloudgento')->__('Guatemala'),
|
251 |
+
'GN' => Mage::helper('cloudgento')->__('Guinea'),
|
252 |
+
'GW' => Mage::helper('cloudgento')->__('Guinea-Bissau'),
|
253 |
+
'GY' => Mage::helper('cloudgento')->__('Guyana'),
|
254 |
+
'HT' => Mage::helper('cloudgento')->__('Haiti'),
|
255 |
+
'HM' => Mage::helper('cloudgento')->__('Heard and McDonald Is'),
|
256 |
+
'HN' => Mage::helper('cloudgento')->__('Honduras'),
|
257 |
+
'HU' => Mage::helper('cloudgento')->__('Hungary'),
|
258 |
+
'IS' => Mage::helper('cloudgento')->__('Iceland'),
|
259 |
+
'IN' => Mage::helper('cloudgento')->__('India'),
|
260 |
+
'ID' => Mage::helper('cloudgento')->__('Indonesia'),
|
261 |
+
'IE' => Mage::helper('cloudgento')->__('Ireland'),
|
262 |
+
'IL' => Mage::helper('cloudgento')->__('Israel'),
|
263 |
+
'IT' => Mage::helper('cloudgento')->__('Italy'),
|
264 |
+
'JM' => Mage::helper('cloudgento')->__('Jamaica'),
|
265 |
+
'JP' => Mage::helper('cloudgento')->__('Japan'),
|
266 |
+
'JO' => Mage::helper('cloudgento')->__('Jordan'),
|
267 |
+
'KZ' => Mage::helper('cloudgento')->__('Kayakhstan'),
|
268 |
+
'KE' => Mage::helper('cloudgento')->__('Kenya'),
|
269 |
+
'KI' => Mage::helper('cloudgento')->__('Kiribati'),
|
270 |
+
'KR' => Mage::helper('cloudgento')->__('Korea, South'),
|
271 |
+
'KW' => Mage::helper('cloudgento')->__('Kuwait'),
|
272 |
+
'KG' => Mage::helper('cloudgento')->__('Kyrgyzstan'),
|
273 |
+
'LA' => Mage::helper('cloudgento')->__('Laos'),
|
274 |
+
'LV' => Mage::helper('cloudgento')->__('Latvia'),
|
275 |
+
'LB' => Mage::helper('cloudgento')->__('Lebanon'),
|
276 |
+
'LS' => Mage::helper('cloudgento')->__('Lesotho'),
|
277 |
+
'LR' => Mage::helper('cloudgento')->__('Liberia'),
|
278 |
+
'LI' => Mage::helper('cloudgento')->__('Liechtenstein'),
|
279 |
+
'LT' => Mage::helper('cloudgento')->__('Lithuania'),
|
280 |
+
'LU' => Mage::helper('cloudgento')->__('Luxembourg'),
|
281 |
+
'MG' => Mage::helper('cloudgento')->__('Madagascar'),
|
282 |
+
'MW' => Mage::helper('cloudgento')->__('Malawi'),
|
283 |
+
'MY' => Mage::helper('cloudgento')->__('Malaysia'),
|
284 |
+
'MV' => Mage::helper('cloudgento')->__('Maldives'),
|
285 |
+
'ML' => Mage::helper('cloudgento')->__('Mali'),
|
286 |
+
'MT' => Mage::helper('cloudgento')->__('Malta'),
|
287 |
+
'MH' => Mage::helper('cloudgento')->__('Marshall Is'),
|
288 |
+
'MR' => Mage::helper('cloudgento')->__('Mauritania'),
|
289 |
+
'MU' => Mage::helper('cloudgento')->__('Mauritius'),
|
290 |
+
'MQ' => Mage::helper('cloudgento')->__('Martinique'),
|
291 |
+
'YT' => Mage::helper('cloudgento')->__('Mayotte'),
|
292 |
+
'MX' => Mage::helper('cloudgento')->__('Mexico'),
|
293 |
+
'FM' => Mage::helper('cloudgento')->__('Micronesia'),
|
294 |
+
'MD' => Mage::helper('cloudgento')->__('Moldova'),
|
295 |
+
'MC' => Mage::helper('cloudgento')->__('Monaco'),
|
296 |
+
'MN' => Mage::helper('cloudgento')->__('Mongolia'),
|
297 |
+
'MS' => Mage::helper('cloudgento')->__('Montserrat'),
|
298 |
+
'MA' => Mage::helper('cloudgento')->__('Morocco'),
|
299 |
+
'MZ' => Mage::helper('cloudgento')->__('Mozambique'),
|
300 |
+
'MM' => Mage::helper('cloudgento')->__('Myanmar'),
|
301 |
+
'NA' => Mage::helper('cloudgento')->__('Namibia'),
|
302 |
+
'NR' => Mage::helper('cloudgento')->__('Nauru'),
|
303 |
+
'NP' => Mage::helper('cloudgento')->__('Nepal'),
|
304 |
+
'NL' => Mage::helper('cloudgento')->__('Netherlands, The'),
|
305 |
+
'AN' => Mage::helper('cloudgento')->__('Netherlands Antilles'),
|
306 |
+
'NC' => Mage::helper('cloudgento')->__('New Caledonia'),
|
307 |
+
'NZ' => Mage::helper('cloudgento')->__('New Zealand'),
|
308 |
+
'NI' => Mage::helper('cloudgento')->__('Nicaragua'),
|
309 |
+
'NE' => Mage::helper('cloudgento')->__('Niger'),
|
310 |
+
'NG' => Mage::helper('cloudgento')->__('Nigeria'),
|
311 |
+
'NU' => Mage::helper('cloudgento')->__('Niue'),
|
312 |
+
'NO' => Mage::helper('cloudgento')->__('Norway'),
|
313 |
+
'NF' => Mage::helper('cloudgento')->__('Norfolk Island'),
|
314 |
+
'MP' => Mage::helper('cloudgento')->__('Northern Mariana Is'),
|
315 |
+
'OM' => Mage::helper('cloudgento')->__('Oman'),
|
316 |
+
'PK' => Mage::helper('cloudgento')->__('Pakistan'),
|
317 |
+
'PW' => Mage::helper('cloudgento')->__('Palau'),
|
318 |
+
'PA' => Mage::helper('cloudgento')->__('Panama'),
|
319 |
+
'PG' => Mage::helper('cloudgento')->__('Papua new Guinea'),
|
320 |
+
'PY' => Mage::helper('cloudgento')->__('Paraguay'),
|
321 |
+
'PE' => Mage::helper('cloudgento')->__('Peru'),
|
322 |
+
'PH' => Mage::helper('cloudgento')->__('Philippines'),
|
323 |
+
'PN' => Mage::helper('cloudgento')->__('Pitcairn Island'),
|
324 |
+
'PL' => Mage::helper('cloudgento')->__('Poland'),
|
325 |
+
'PT' => Mage::helper('cloudgento')->__('Portugal'),
|
326 |
+
'PR' => Mage::helper('cloudgento')->__('Puerto Rico'),
|
327 |
+
'QA' => Mage::helper('cloudgento')->__('Qatar'),
|
328 |
+
'CG' => Mage::helper('cloudgento')->__('Republic of the Congo'),
|
329 |
+
'RE' => Mage::helper('cloudgento')->__('Reunion'),
|
330 |
+
'RO' => Mage::helper('cloudgento')->__('Romania'),
|
331 |
+
'RU' => Mage::helper('cloudgento')->__('Russia'),
|
332 |
+
'SH' => Mage::helper('cloudgento')->__('Saint Helena'),
|
333 |
+
'KN' => Mage::helper('cloudgento')->__('Saint Kitts And Nevis'),
|
334 |
+
'LC' => Mage::helper('cloudgento')->__('Saint Lucia'),
|
335 |
+
'PM' => Mage::helper('cloudgento')->__('Saint Pierre and Miquelon'),
|
336 |
+
'VC' => Mage::helper('cloudgento')->__('Saint Vincent And The Grenadines'),
|
337 |
+
'WS' => Mage::helper('cloudgento')->__('Samoa'),
|
338 |
+
'WM' => Mage::helper('cloudgento')->__('San Marino'),
|
339 |
+
'ST' => Mage::helper('cloudgento')->__('Sao Tome and Principe'),
|
340 |
+
'SA' => Mage::helper('cloudgento')->__('Saudi Arabia'),
|
341 |
+
'SN' => Mage::helper('cloudgento')->__('Senegal'),
|
342 |
+
'SC' => Mage::helper('cloudgento')->__('Seychelles'),
|
343 |
+
'SL' => Mage::helper('cloudgento')->__('Sierra Leone'),
|
344 |
+
'SG' => Mage::helper('cloudgento')->__('Singapore'),
|
345 |
+
'SK' => Mage::helper('cloudgento')->__('Slovakia'),
|
346 |
+
'SI' => Mage::helper('cloudgento')->__('Slovenia'),
|
347 |
+
'SB' => Mage::helper('cloudgento')->__('Solomon Islands'),
|
348 |
+
'SO' => Mage::helper('cloudgento')->__('Somalia'),
|
349 |
+
'ZA' => Mage::helper('cloudgento')->__('South Africa'),
|
350 |
+
'GS' => Mage::helper('cloudgento')->__('South Georgia & The S. Sandwich Is'),
|
351 |
+
'ES' => Mage::helper('cloudgento')->__('Spain'),
|
352 |
+
'LK' => Mage::helper('cloudgento')->__('Sri Lanka'),
|
353 |
+
'SR' => Mage::helper('cloudgento')->__('Suriname'),
|
354 |
+
'SJ' => Mage::helper('cloudgento')->__('Svalbard And Jan Mayen Is'),
|
355 |
+
'SZ' => Mage::helper('cloudgento')->__('Swaziland'),
|
356 |
+
'SE' => Mage::helper('cloudgento')->__('Sweden'),
|
357 |
+
'CH' => Mage::helper('cloudgento')->__('Switzerland'),
|
358 |
+
'SY' => Mage::helper('cloudgento')->__('Syria'),
|
359 |
+
'TW' => Mage::helper('cloudgento')->__('Taiwan'),
|
360 |
+
'TJ' => Mage::helper('cloudgento')->__('Tajikistan'),
|
361 |
+
'TZ' => Mage::helper('cloudgento')->__('Tanzania'),
|
362 |
+
'TH' => Mage::helper('cloudgento')->__('Thailand'),
|
363 |
+
'TL' => Mage::helper('cloudgento')->__('Timor-Leste'),
|
364 |
+
'TG' => Mage::helper('cloudgento')->__('Togo'),
|
365 |
+
'TK' => Mage::helper('cloudgento')->__('Tokelau'),
|
366 |
+
'TO' => Mage::helper('cloudgento')->__('Tonga'),
|
367 |
+
'TT' => Mage::helper('cloudgento')->__('Trinidad And Tobago'),
|
368 |
+
'TN' => Mage::helper('cloudgento')->__('Tunisia'),
|
369 |
+
'TR' => Mage::helper('cloudgento')->__('Turkey'),
|
370 |
+
'TC' => Mage::helper('cloudgento')->__('Turks And Caicos Is'),
|
371 |
+
'TM' => Mage::helper('cloudgento')->__('Turkmenistan'),
|
372 |
+
'TV' => Mage::helper('cloudgento')->__('Tuvalu'),
|
373 |
+
'UG' => Mage::helper('cloudgento')->__('Uganda'),
|
374 |
+
'UA' => Mage::helper('cloudgento')->__('Ukraine'),
|
375 |
+
'AE' => Mage::helper('cloudgento')->__('United Arab Emirates'),
|
376 |
+
'GB' => Mage::helper('cloudgento')->__('United Kingdom'),
|
377 |
+
'US' => Mage::helper('cloudgento')->__('United States'),
|
378 |
+
'UM' => Mage::helper('cloudgento')->__('United States Minor Outlying Is'),
|
379 |
+
'UY' => Mage::helper('cloudgento')->__('Uruguay'),
|
380 |
+
'UZ' => Mage::helper('cloudgento')->__('Uzbekistan'),
|
381 |
+
'VU' => Mage::helper('cloudgento')->__('Vanuatu'),
|
382 |
+
'VA' => Mage::helper('cloudgento')->__('Vatican City State(Holy See)'),
|
383 |
+
'VE' => Mage::helper('cloudgento')->__('Venezuela'),
|
384 |
+
'VN' => Mage::helper('cloudgento')->__('Vietnam'),
|
385 |
+
'VG' => Mage::helper('cloudgento')->__('Virgin Islands(British)'),
|
386 |
+
'VI' => Mage::helper('cloudgento')->__('Virgin Islands(US)'),
|
387 |
+
'WF' => Mage::helper('cloudgento')->__('Wallis And Futuna Islands'),
|
388 |
+
'EH' => Mage::helper('cloudgento')->__('Western Sahara'),
|
389 |
+
'YE' => Mage::helper('cloudgento')->__('Yemen'),
|
390 |
+
'ZM' => Mage::helper('cloudgento')->__('Zambia'),
|
391 |
+
'ZW' => Mage::helper('cloudgento')->__('Zimbabwe'),
|
392 |
+
),
|
393 |
+
'value' => 'US',
|
394 |
+
));
|
395 |
+
|
396 |
+
$fieldset->addField('State', 'select', array(
|
397 |
+
'label' => Mage::helper('cloudgento')->__('State'),
|
398 |
+
'class' => 'required-entry',
|
399 |
+
'required' => true,
|
400 |
+
'name' => 'register_data[State]',
|
401 |
+
'values' => array(
|
402 |
+
'' => Mage::helper('cloudgento')->__('--US/Canada Only--'),
|
403 |
+
'AL' => Mage::helper('cloudgento')->__('Alabama'),
|
404 |
+
'AK' => Mage::helper('cloudgento')->__('Alaska'),
|
405 |
+
'AZ' => Mage::helper('cloudgento')->__('Arizona'),
|
406 |
+
'AR' => Mage::helper('cloudgento')->__('Arkansas'),
|
407 |
+
'CA' => Mage::helper('cloudgento')->__('California'),
|
408 |
+
'CO' => Mage::helper('cloudgento')->__('Colorado'),
|
409 |
+
'CT' => Mage::helper('cloudgento')->__('Connecticut'),
|
410 |
+
'DE' => Mage::helper('cloudgento')->__('Delaware'),
|
411 |
+
'DC' => Mage::helper('cloudgento')->__('District of Columbia'),
|
412 |
+
'FL' => Mage::helper('cloudgento')->__('Florida'),
|
413 |
+
'GA' => Mage::helper('cloudgento')->__('Georgia'),
|
414 |
+
'HI' => Mage::helper('cloudgento')->__('Hawaii'),
|
415 |
+
'ID' => Mage::helper('cloudgento')->__('Idaho'),
|
416 |
+
'IL' => Mage::helper('cloudgento')->__('Illinois'),
|
417 |
+
'IN' => Mage::helper('cloudgento')->__('Indiana'),
|
418 |
+
'IA' => Mage::helper('cloudgento')->__('Iowa'),
|
419 |
+
'KS' => Mage::helper('cloudgento')->__('Kansas'),
|
420 |
+
'KY' => Mage::helper('cloudgento')->__('Kentucky'),
|
421 |
+
'LA' => Mage::helper('cloudgento')->__('Louisiana'),
|
422 |
+
'ME' => Mage::helper('cloudgento')->__('Maine'),
|
423 |
+
'MD' => Mage::helper('cloudgento')->__('Maryland'),
|
424 |
+
'MA' => Mage::helper('cloudgento')->__('Massachusetts'),
|
425 |
+
'MI' => Mage::helper('cloudgento')->__('Michigan'),
|
426 |
+
'MN' => Mage::helper('cloudgento')->__('Minnesota'),
|
427 |
+
'MS' => Mage::helper('cloudgento')->__('Mississippi'),
|
428 |
+
'MO' => Mage::helper('cloudgento')->__('Missouri'),
|
429 |
+
'MT' => Mage::helper('cloudgento')->__('Montana'),
|
430 |
+
'NE' => Mage::helper('cloudgento')->__('Nebraska'),
|
431 |
+
'NV' => Mage::helper('cloudgento')->__('Nevada'),
|
432 |
+
'NH' => Mage::helper('cloudgento')->__('New Hampshire'),
|
433 |
+
'NJ' => Mage::helper('cloudgento')->__('New Jersey'),
|
434 |
+
'NM' => Mage::helper('cloudgento')->__('New Mexico'),
|
435 |
+
'NY' => Mage::helper('cloudgento')->__('New York'),
|
436 |
+
'NC' => Mage::helper('cloudgento')->__('North Carolina'),
|
437 |
+
'ND' => Mage::helper('cloudgento')->__('North Dakota'),
|
438 |
+
'OH' => Mage::helper('cloudgento')->__('Ohio'),
|
439 |
+
'OK' => Mage::helper('cloudgento')->__('Oklahoma'),
|
440 |
+
'OR' => Mage::helper('cloudgento')->__('Oregon'),
|
441 |
+
'PA' => Mage::helper('cloudgento')->__('Pennsylvania'),
|
442 |
+
'RI' => Mage::helper('cloudgento')->__('Rhode Island'),
|
443 |
+
'SC' => Mage::helper('cloudgento')->__('South Carolina'),
|
444 |
+
'SD' => Mage::helper('cloudgento')->__('South Dakota'),
|
445 |
+
'TN' => Mage::helper('cloudgento')->__('Tennessee'),
|
446 |
+
'TX' => Mage::helper('cloudgento')->__('Texas'),
|
447 |
+
'UT' => Mage::helper('cloudgento')->__('Utah'),
|
448 |
+
'VT' => Mage::helper('cloudgento')->__('Vermont'),
|
449 |
+
'VA' => Mage::helper('cloudgento')->__('Virginia'),
|
450 |
+
'WA' => Mage::helper('cloudgento')->__('Washington'),
|
451 |
+
'WV' => Mage::helper('cloudgento')->__('West Virginia'),
|
452 |
+
'WI' => Mage::helper('cloudgento')->__('Wisconsin'),
|
453 |
+
'WY' => Mage::helper('cloudgento')->__('Wyoming'),
|
454 |
+
// '' => Mage::helper('cloudgento')->__('--Canadian Provinces--'),
|
455 |
+
'AB' => Mage::helper('cloudgento')->__('Alberta'),
|
456 |
+
'BC' => Mage::helper('cloudgento')->__('British Columbia'),
|
457 |
+
'MB' => Mage::helper('cloudgento')->__('Manitoba'),
|
458 |
+
'NB' => Mage::helper('cloudgento')->__('New Brunswick'),
|
459 |
+
'NL' => Mage::helper('cloudgento')->__('Newfoundland'),
|
460 |
+
'NT' => Mage::helper('cloudgento')->__('Northwest Territories'),
|
461 |
+
'NS' => Mage::helper('cloudgento')->__('Nova Scotia'),
|
462 |
+
'NU' => Mage::helper('cloudgento')->__('Nunavut'),
|
463 |
+
'ON' => Mage::helper('cloudgento')->__('Ontario'),
|
464 |
+
'PE' => Mage::helper('cloudgento')->__('Prince Edward Island'),
|
465 |
+
'QC' => Mage::helper('cloudgento')->__('Quebec'),
|
466 |
+
'SK' => Mage::helper('cloudgento')->__('Saskatchewan'),
|
467 |
+
'YT' => Mage::helper('cloudgento')->__('Yukon'),
|
468 |
+
),
|
469 |
+
));
|
470 |
+
|
471 |
+
$fieldset->addField('SubscriptionAgreement', 'checkbox', array(
|
472 |
+
'label' => Mage::helper('cloudgento')->__('SubscriptionAgreement'),
|
473 |
+
'class' => 'required-entry',
|
474 |
+
'required' => true,
|
475 |
+
'name' => 'register_data[SubscriptionAgreement]',
|
476 |
+
'note' => Mage::helper('cloudgento')->__('I have read and agreed to the <a class="_sub_agree_lnk" href="http://www.salesforce.com/company/msa.jsp">Master Subscription Agreement</a>, including Section 6.'),
|
477 |
+
));
|
478 |
+
|
479 |
+
|
480 |
+
$form->setValues($data);
|
481 |
+
return parent::_prepareForm();
|
482 |
+
}
|
483 |
+
|
484 |
+
}
|
app/code/local/Cloudconversion/CloudGento/Block/Fail.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Block_Fail extends Mage_Core_Block_Template {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
$this->setTemplate('cloudgento/registration_fail.phtml');
|
7 |
+
parent::__construct();
|
8 |
+
}
|
9 |
+
|
10 |
+
}
|
app/code/local/Cloudconversion/CloudGento/Block/Success.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Block_Success extends Mage_Core_Block_Template {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
$this->setTemplate('cloudgento/registration_success.phtml');
|
7 |
+
parent::__construct();
|
8 |
+
}
|
9 |
+
|
10 |
+
}
|
app/code/local/Cloudconversion/CloudGento/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
}
|
app/code/local/Cloudconversion/CloudGento/Model/Api.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Model_Api extends Mage_Core_Model_Abstract {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* URL for sending registration form data
|
7 |
+
*/
|
8 |
+
const registerFormSingupURL = "http://www.salesforce.com/leadcapture/PartnerSignupServlet";
|
9 |
+
|
10 |
+
public function _construct() {
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('cloudgento/api');
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Sends request over POST to provided URL with provided data
|
17 |
+
*
|
18 |
+
* @param string $url URL for sending data
|
19 |
+
* @param array $postParams POST parameters for request
|
20 |
+
* @return string data returned by server
|
21 |
+
*/
|
22 |
+
protected function performPostRequest($url, $postParams, $sendCookie = false) {
|
23 |
+
$postitems = array();
|
24 |
+
foreach($postParams as $key => $value) {
|
25 |
+
$postitems[] = urlencode($key) . '=' . urlencode($value);
|
26 |
+
}
|
27 |
+
$curlInstance = curl_init($url);
|
28 |
+
curl_setopt($curlInstance, CURLOPT_POSTFIELDS, implode("&", $postitems));
|
29 |
+
curl_setopt($curlInstance, CURLOPT_POST, 1); // Sending POST request
|
30 |
+
curl_setopt($curlInstance, CURLOPT_FOLLOWLOCATION, 1); // Read from redirect if redirected
|
31 |
+
curl_setopt($curlInstance, CURLOPT_HEADER, 0); // Do not return HTTP headers in response
|
32 |
+
curl_setopt($curlInstance, CURLOPT_RETURNTRANSFER, 1); // Do return response
|
33 |
+
$recivedData = curl_exec($curlInstance);
|
34 |
+
if($recivedData === false) {
|
35 |
+
throw new Exception(curl_error($curlInstance));
|
36 |
+
}
|
37 |
+
return $recivedData;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Sends registration form data to server
|
42 |
+
*
|
43 |
+
* @param array $formdata Data from registraion form
|
44 |
+
*/
|
45 |
+
public function sendRegisterForm($formdata) {
|
46 |
+
return $this->performPostRequest(self::registerFormSingupURL, $formdata, true);
|
47 |
+
}
|
48 |
+
}
|
app/code/local/Cloudconversion/CloudGento/Model/Registrationformresponserenderer.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Model_Registrationformresponserenderer extends Mage_Core_Model_Abstract {
|
4 |
+
public function renderSuccess() {
|
5 |
+
return Mage::getBlockSingleton('cloudgento/success')->renderView();
|
6 |
+
}
|
7 |
+
|
8 |
+
public function renderFail() {
|
9 |
+
return Mage::getBlockSingleton('cloudgento/fail')->renderView();
|
10 |
+
}
|
11 |
+
}
|
app/code/local/Cloudconversion/CloudGento/controllers/Adminhtml/RegistrationController.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_Adminhtml_RegistrationController extends Mage_Adminhtml_Controller_Action {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Displays registration form
|
7 |
+
*/
|
8 |
+
public function indexAction() {
|
9 |
+
$this->loadLayout()->_addContent($this->getLayout()->createBlock('cloudgento/adminhtml_registration'))->renderLayout();
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Processes and sends registration form
|
14 |
+
*/
|
15 |
+
public function postAction() {
|
16 |
+
$post = $this->getRequest()->getPost();
|
17 |
+
if ($post && array_key_exists('register_data', $post)) {
|
18 |
+
try {
|
19 |
+
// creation of temporary Username (based on JS within form)
|
20 |
+
$appname = 'trialforce';
|
21 |
+
srand(time());
|
22 |
+
$email = explode('@', $post['register_data']['Email']);
|
23 |
+
$random = rand(0, 50);
|
24 |
+
$post['register_data']['UserUsername'] = $email[0].'@'.$random.$appname.'.com';
|
25 |
+
$result = Mage::getModel('cloudgento/api')->sendRegisterForm($post['register_data']);
|
26 |
+
if($result == "success") {
|
27 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getModel('cloudgento/registrationformresponserenderer')->renderSuccess());
|
28 |
+
} else {
|
29 |
+
if($result!="fail") {
|
30 |
+
Mage::log("Cloudconversion_CloudGento postAction got unexpected return: " . $result);
|
31 |
+
}
|
32 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::getModel('cloudgento/registrationformresponserenderer')->renderFail());
|
33 |
+
}
|
34 |
+
} catch (Exception $e) {
|
35 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
36 |
+
Mage::log("Cloudconversion_CloudGento Adminform postAction " . $e->getMessage());
|
37 |
+
}
|
38 |
+
} else {
|
39 |
+
Mage::log("Cloudconversion_CloudGento postAction without form data!");
|
40 |
+
}
|
41 |
+
$this->_redirect('*/*');
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
app/code/local/Cloudconversion/CloudGento/controllers/IndexController.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Cloudconversion_CloudGento_IndexController extends Mage_Core_Controller_Front_Action {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Shows success information (refirected from registration form, used as external HTTP query)
|
7 |
+
*/
|
8 |
+
public function registrationSuccessAction() {
|
9 |
+
echo 'success';
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Shows fail infromation (refirected from registration form, used as external HTTP query)
|
14 |
+
*/
|
15 |
+
public function registrationFailAction() {
|
16 |
+
echo 'fail';
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
app/code/local/Cloudconversion/CloudGento/etc/config.xml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Cloudconversion_CloudGento>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Cloudconversion_CloudGento>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<models>
|
11 |
+
<cloudgento>
|
12 |
+
<class>Cloudconversion_CloudGento_Model</class>
|
13 |
+
</cloudgento>
|
14 |
+
</models>
|
15 |
+
|
16 |
+
<blocks>
|
17 |
+
<cloudgento>
|
18 |
+
<class>Cloudconversion_CloudGento_Block</class>
|
19 |
+
</cloudgento>
|
20 |
+
</blocks>
|
21 |
+
|
22 |
+
<helpers>
|
23 |
+
<cloudgento>
|
24 |
+
<class>Cloudconversion_CloudGento_Helper</class>
|
25 |
+
</cloudgento>
|
26 |
+
</helpers>
|
27 |
+
</global>
|
28 |
+
|
29 |
+
<admin>
|
30 |
+
<routers>
|
31 |
+
<cloudgento>
|
32 |
+
<use>admin</use>
|
33 |
+
<args>
|
34 |
+
<module>Cloudconversion_CloudGento</module>
|
35 |
+
<frontName>cloudgento</frontName>
|
36 |
+
</args>
|
37 |
+
</cloudgento>
|
38 |
+
</routers>
|
39 |
+
</admin>
|
40 |
+
|
41 |
+
<adminhtml>
|
42 |
+
<translate>
|
43 |
+
<modules>
|
44 |
+
<cloudgento_adminhtml>
|
45 |
+
<files>
|
46 |
+
<cloudgento>Cloudconversion_CloudGento.csv</cloudgento>
|
47 |
+
</files>
|
48 |
+
</cloudgento_adminhtml>
|
49 |
+
</modules>
|
50 |
+
</translate>
|
51 |
+
|
52 |
+
<menu>
|
53 |
+
<cloudgento translate="title">
|
54 |
+
<title><![CDATA[<span class="cloudgento-menu-item">CloudGento</span>]]></title>
|
55 |
+
<children>
|
56 |
+
<cloudgento_freetrail>
|
57 |
+
<title>Free Trial</title>
|
58 |
+
<action>cloudgento/adminhtml_registration</action>
|
59 |
+
<sort_order>10</sort_order>
|
60 |
+
</cloudgento_freetrail>
|
61 |
+
</children>
|
62 |
+
</cloudgento>
|
63 |
+
</menu>
|
64 |
+
|
65 |
+
<layout>
|
66 |
+
<updates>
|
67 |
+
<cloudgento>
|
68 |
+
<file>cloudgento.xml</file>
|
69 |
+
</cloudgento>
|
70 |
+
</updates>
|
71 |
+
</layout>
|
72 |
+
</adminhtml>
|
73 |
+
|
74 |
+
<frontend>
|
75 |
+
<routers>
|
76 |
+
<cloudgento>
|
77 |
+
<use>standard</use>
|
78 |
+
<args>
|
79 |
+
<module>Cloudconversion_CloudGento</module>
|
80 |
+
<frontName>cloudgento</frontName>
|
81 |
+
</args>
|
82 |
+
</cloudgento>
|
83 |
+
</routers>
|
84 |
+
</frontend>
|
85 |
+
</config>
|
app/design/adminhtml/default/default/layout/cloudgento.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<layout>
|
2 |
+
<default>
|
3 |
+
<reference name="head">
|
4 |
+
<action method="addCss">
|
5 |
+
<name>cloudgento/topmenu.css</name>
|
6 |
+
</action>
|
7 |
+
</reference>
|
8 |
+
</default>
|
9 |
+
<cloudgento_adminhtml_registration_index>
|
10 |
+
<reference name="head">
|
11 |
+
<action method="addItem">
|
12 |
+
<type>skin_css</type>
|
13 |
+
<name>cloudgento/header.css</name>
|
14 |
+
<params>media="screen, projection"</params>
|
15 |
+
</action>
|
16 |
+
<action method="addItem">
|
17 |
+
<type>skin_js</type>
|
18 |
+
<name>cloudgento/register.js</name>
|
19 |
+
</action>
|
20 |
+
</reference>
|
21 |
+
</cloudgento_adminhtml_registration_index>
|
22 |
+
<cloudgento_adminhtml_history_index>
|
23 |
+
<reference name="head">
|
24 |
+
<action method="addItem">
|
25 |
+
<type>skin_css</type>
|
26 |
+
<name>cloudgento/header.css</name>
|
27 |
+
<params>media="screen, projection"</params>
|
28 |
+
</action>
|
29 |
+
</reference>
|
30 |
+
</cloudgento_adminhtml_history_index>
|
31 |
+
</layout>
|
app/design/adminhtml/default/default/template/cloudgento/register.phtml
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="entry-edit">
|
2 |
+
<div style="padding-bottom:15px;font:13px verdana, sans-serif;color:#444444;">Thank you for your interest in a Free 30-day Trial of Salesforce.com and eCommSource by Cloud Conversion! If you need assistance setting everything up and learning how to use Salesforce, be sure to check out our new <a href="http://www.cloudconversion.com/ecommsource/QuickStart.html">Quick Start program</a>.</div>
|
3 |
+
<h1>No Downloads. No Software to Install.</h1>
|
4 |
+
<p>Register now and for thirty days you'll
|
5 |
+
have full access to all the features and capabilities that make salesforce.com
|
6 |
+
the world's most popular CRM.</p>
|
7 |
+
<p><span class="red">*</span> These fields are required</p>
|
8 |
+
<?php echo $this->getFormHtml(); ?>
|
9 |
+
<div style="text-align:left;padding:0px 0px 10px 10px;">
|
10 |
+
<strong>Note:</strong> Information submitted here will be
|
11 |
+
provided to Salesforce.com. For additional privacy
|
12 |
+
information please view the <a target="_blank" href="http://www.salesforce.com/company/privacy.jsp">Salesforce.com
|
13 |
+
Privacy Statement</a>. </div>
|
14 |
+
<div style="text-align:center;"><button style="" onclick="editForm.submit();" class="scalable save" type="button"><span>Submit</span></button></div>
|
15 |
+
</div>
|
app/design/adminhtml/default/default/template/cloudgento/registration_fail.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cloudgento-message cloudgento-error">
|
2 |
+
<h1>We were unable to complete your request at this time</h1>
|
3 |
+
<p>Thank you for your interest in salesforce.com. If you have signed up previously, an email has been sent to you with further information. For immediate assistance, please feel free to contact us at 1-800-NO-SOFTWARE between 6:00 AM and 6:00 PM Pacific Time (PT), Monday through Friday.</p>
|
4 |
+
</div>
|
app/design/adminhtml/default/default/template/cloudgento/registration_success.phtml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="cloudgento-message cloudgento-success">
|
2 |
+
<h1>Congratulations! Your Trial Account Is Ready</h1>
|
3 |
+
<p>Check your in box for the first in a series of emails guiding you through your free 30-day trial to ensure that you experience everything that salesforce.com's on-demand solution offers.</p>
|
4 |
+
<ul>
|
5 |
+
<li><img src="<?php echo $this->getSkinUrl('cloudgento/img160_smb_conf_step1.gif') ?>" alt=""><br />Check Your Inbox</li>
|
6 |
+
<li><img src="<?php echo $this->getSkinUrl('cloudgento/img160_smb_conf_step2.gif') ?>" alt=""><br /><a href="https://login.salesforce.com/" target="_blank">Login</a> to Salesforce</li>
|
7 |
+
<li><img src="<?php echo $this->getSkinUrl('cloudgento/img160_smb_conf_step3.gif') ?>" alt=""><br />Test Drive the App</li>
|
8 |
+
</ul>
|
9 |
+
</div>
|
app/etc/modules/Cloudconversion_CloudGento.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Cloudconversion_CloudGento>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Cloudconversion_CloudGento>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>CloudGento_FreeTrail</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>CloudGento™ is the first and only complete, channel platform independent, customer relationship management (CRM) solution available to multi-channel online retailers. Companies can now manage all customer service and support operations from a single source and entirely within salesforce.com’s Service Cloud 2.</summary>
|
10 |
+
<description>CloudGento™ is the first and only complete, channel platform independent, customer relationship management (CRM) solution available to multi-channel online retailers. Companies can now manage all customer service and support operations from a single source and entirely within salesforce.com’s Service Cloud 2.
|
11 |
+

|
12 |
+
CloudGento enables Magento customers to manage all customer service and support from a single source. Powered completely by salesforce.com, the leader in customer relationship management (CRM) and cloud computing, this solution is the first 100% native integration between Magento and salesforce.com, meaning there are no extraneous systems or potential points of failure. All Magento customers, orders, products and shipping details are sent directly into Salesforce using Magento’s APIs. So, by leveraging Cloud Conversion and the salesforce.com Service Cloud™, Magento customers can now take advantage of the most advanced customer service available today.</description>
|
13 |
+
<notes>CloudGento moudles enables to register CloudGento Free Trail</notes>
|
14 |
+
<authors><author><name>CloudGento</name><user>auto-converted</user><email>jon@cloudconversion.com</email></author><author><name>Snowdog</name><user>auto-converted</user><email>snowdog@snowdog.pl</email></author></authors>
|
15 |
+
<date>2011-12-09</date>
|
16 |
+
<time>11:50:15</time>
|
17 |
+
<contents><target name="magelocal"><dir name="Cloudconversion"><dir name="CloudGento"><dir name="Block"><dir name="Adminhtml"><dir name="Registration"><file name="Form.php" hash="a80185a400d015c8fe321a31649de820"/></dir><file name="Registration.php" hash="b8f3fed4844b25b5380382552aa569ec"/></dir><file name="Fail.php" hash="51b2ef5f13091426b5f23ddb39ca6467"/><file name="Success.php" hash="dcb6fbe46a16c77228f0a5cf6bee35ea"/></dir><dir name="Helper"><file name="Data.php" hash="325391a52c376c9a02046b2c2487a8bd"/></dir><dir name="Model"><file name="Api.php" hash="4c8248c31eb09ec579d713cbfbbe10ac"/><file name="Registrationformresponserenderer.php" hash="1873b358d226d43a99703704f38a4cca"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RegistrationController.php" hash="f763f2e5e07d8dcf2ae9084d114c27d0"/></dir><file name="IndexController.php" hash="c917dea3025b04d5f60ebafa979d71be"/></dir><dir name="etc"><file name="config.xml" hash="4721fffbcffa7a0c713cc64ecc56adde"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cloudconversion_CloudGento.xml" hash="6f5b6f73f4f97bc0190e4b9a8b2c66ba"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="cloudgento"><file name="CloudGento-Raindrop.png" hash="dfe832d74b587c710c42f0ba7361a72c"/><file name="header.css" hash="c03958244cd779b8e33c38ae7743b696"/><file name="header.png" hash="a8da2e10dbae695cabcd5436e252ef6c"/><file name="img160_smb_conf_step1.gif" hash="16bacfb8b25809e003528803868daea7"/><file name="img160_smb_conf_step2.gif" hash="e39a9ecbb84e3fc27eacc57edd96a2f3"/><file name="img160_smb_conf_step3.gif" hash="7272139860af024b0eca6c232a506021"/><file name="register.js" hash="ba0672521c02e0c00fdb103dd214cc73"/><file name="topmenu.css" hash="2b623f0f363f3b0cf140e02072b796d1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="cloudgento.xml" hash="6d5cec2e8fb6a8247935eacee6fd13a7"/></dir><dir name="template"><dir name="cloudgento"><file name="register.phtml" hash="2096ebebd93ff94a96f43dffbe6990d0"/><file name="registration_fail.phtml" hash="5c58c218c390d80274f64179552a9055"/><file name="registration_success.phtml" hash="35cb3f37ffd7a4f143ec32b613e85cbf"/></dir></dir></dir></dir></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies/>
|
20 |
+
</package>
|
skin/adminhtml/default/default/cloudgento/CloudGento-Raindrop.png
ADDED
Binary file
|
skin/adminhtml/default/default/cloudgento/header.css
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.content-header {
|
2 |
+
margin-bottom: 100px;
|
3 |
+
}
|
4 |
+
.middle {
|
5 |
+
background-image: url(header.png);
|
6 |
+
background-position: center 50px;
|
7 |
+
background-repeat: no-repeat;
|
8 |
+
}
|
9 |
+
.entry-edit {
|
10 |
+
width: 960px;
|
11 |
+
margin: 0 auto;
|
12 |
+
}
|
13 |
+
.entry-edit .entry-edit-head,
|
14 |
+
.entry-edit .entry-edit-head h4 {
|
15 |
+
background: #fff;
|
16 |
+
color: #333;
|
17 |
+
font-size: 20px;
|
18 |
+
padding: 0;
|
19 |
+
text-align: center;
|
20 |
+
float: none;
|
21 |
+
}
|
22 |
+
.entry-edit .fieldset {
|
23 |
+
border: none;
|
24 |
+
background: #fff;
|
25 |
+
}
|
26 |
+
#SubscriptionAgreement {
|
27 |
+
float:left;
|
28 |
+
margin: 3px;
|
29 |
+
}
|
30 |
+
.form-list { width: 100%}
|
31 |
+
.form-list td.label label {
|
32 |
+
display: block;
|
33 |
+
width: 345px;
|
34 |
+
padding-right: 15px;
|
35 |
+
text-align: right;
|
36 |
+
}
|
37 |
+
.red {
|
38 |
+
color: red;
|
39 |
+
}
|
40 |
+
.messages .cloudgento-message {
|
41 |
+
overflow: hidden;
|
42 |
+
}
|
43 |
+
.messages .cloudgento-message ul li {
|
44 |
+
display: block;
|
45 |
+
float: left;
|
46 |
+
margin: 10px !important;
|
47 |
+
}
|
48 |
+
|
skin/adminhtml/default/default/cloudgento/header.png
ADDED
Binary file
|
skin/adminhtml/default/default/cloudgento/img160_smb_conf_step1.gif
ADDED
Binary file
|
skin/adminhtml/default/default/cloudgento/img160_smb_conf_step2.gif
ADDED
Binary file
|
skin/adminhtml/default/default/cloudgento/img160_smb_conf_step3.gif
ADDED
Binary file
|
skin/adminhtml/default/default/cloudgento/register.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function registrationFormDependencyCheck() {
|
2 |
+
var country_value = $("Country").value;
|
3 |
+
var state = $("State");
|
4 |
+
if(country_value == "US" || country_value == "CA") {
|
5 |
+
state.addClassName("required-entry");
|
6 |
+
} else {
|
7 |
+
while(state.hasClassName("required-entry")) {
|
8 |
+
state.removeClassName("required-entry");
|
9 |
+
}
|
10 |
+
}
|
11 |
+
}
|
skin/adminhtml/default/default/cloudgento/topmenu.css
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cloudgento-menu-item {
|
2 |
+
background-image: url('../cloudgento/CloudGento-Raindrop.png');
|
3 |
+
background-repeat: no-repeat;
|
4 |
+
background-position: 0px 6px;
|
5 |
+
padding-left: 16px;
|
6 |
+
}
|