Dealer_Inquery - Version 2.1.0

Version Notes

Dealer Inquiry

Download this release

Release Info

Developer Capacity Web Solutions
Extension Dealer_Inquery
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.0 to 2.1.0

Files changed (25) hide show
  1. app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Tab/Form.php +117 -48
  2. app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Grid.php +0 -3
  3. app/code/community/CapacityWebSolutions/Inquiry/Block/Inquiry.php +55 -5
  4. app/code/community/CapacityWebSolutions/Inquiry/Block/Managejquery.php +0 -27
  5. app/code/community/CapacityWebSolutions/Inquiry/Model/Inquiryfiles.php +18 -0
  6. app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry.php +22 -0
  7. app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry/Collection.php +10 -0
  8. app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiryfiles.php +16 -0
  9. app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiryfiles/Collection.php +18 -0
  10. app/code/community/CapacityWebSolutions/Inquiry/Model/Observer.php +27 -0
  11. app/code/community/CapacityWebSolutions/Inquiry/Model/System/Config/Source/Customergroup.php +1 -0
  12. app/code/community/CapacityWebSolutions/Inquiry/controllers/Adminhtml/InquiryController.php +45 -96
  13. app/code/community/CapacityWebSolutions/Inquiry/controllers/IndexController.php +280 -236
  14. app/code/community/CapacityWebSolutions/Inquiry/etc/config.xml +71 -39
  15. app/code/community/CapacityWebSolutions/Inquiry/etc/system.xml +179 -28
  16. app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-install-0.1.0.php +0 -8
  17. app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-upgrade-1.2.1-2.0.0.php +2 -10
  18. app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-upgrade-2.0.0-2.1.0.php +25 -0
  19. app/design/frontend/base/default/layout/inquiry.xml +10 -7
  20. app/design/frontend/base/default/template/inquiry/inquiry.phtml +99 -66
  21. app/locale/en_US/template/email/inquiry/admin_inquiry.html +145 -0
  22. app/locale/en_US/template/email/inquiry/create_customer.html +38 -0
  23. app/locale/en_US/template/email/inquiry/customer_inquiry.html +33 -0
  24. package.xml +6 -6
  25. skin/frontend/base/default/css/inquiry.css +6 -1
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Tab/Form.php CHANGED
@@ -27,7 +27,12 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Edit_Tab_Form extends
27
  $data = Mage::registry('inquiry_data');
28
  $storename = Mage::getModel('core/store')->load($data->getStoreid())->getName();
29
  $createddt = date("d/m/Y H:i:s", strtotime($data->getCreateddt()));
30
- $country = explode('$$$',$data->getCountry());
 
 
 
 
 
31
 
32
 
33
  if(Mage::registry('inquiry_data')->getIscustcreated()){
@@ -44,11 +49,13 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Edit_Tab_Form extends
44
  'value' => $data->getFirstname(),
45
  ));
46
 
47
- $fieldset->addField('lastname', 'label', array(
48
- 'label' => Mage::helper('inquiry')->__('Last Name'),
49
- 'name' => 'lastname',
50
- 'value' => $data->getLastname(),
51
- ));
 
 
52
 
53
  $fieldset->addField('company', 'label', array(
54
  'label' => Mage::helper('inquiry')->__('Company Name'),
@@ -56,41 +63,54 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Edit_Tab_Form extends
56
  'value' => $data->getCompany(),
57
  ));
58
 
59
- $fieldset->addField('taxvat', 'label', array(
60
- 'label' => Mage::helper('inquiry')->__('Tax/VAT Number'),
61
- 'name' => 'taxvat',
62
- 'value' => $data->getTaxvat(),
63
- ));
64
-
65
- $fieldset->addField('address ', 'label', array(
66
- 'label' => Mage::helper('inquiry')->__('Address'),
67
- 'name' => 'address ',
68
- 'value' => $data->getAddress(),
69
- ));
70
-
71
- $fieldset->addField('city', 'label', array(
72
- 'label' => Mage::helper('inquiry')->__('City'),
73
- 'name' => 'city',
74
- 'value' => $data->getCity(),
75
- ));
76
 
77
- $fieldset->addField('state', 'label', array(
78
- 'label' => Mage::helper('inquiry')->__('State'),
79
- 'name' => 'state',
80
- 'value' => $data->getState(),
81
- ));
 
 
82
 
83
- $fieldset->addField('country', 'label', array(
84
- 'label' => Mage::helper('inquiry')->__('Country'),
85
- 'name' => 'country',
86
- 'value' => $country[1],
87
- ));
 
 
88
 
89
- $fieldset->addField('zip', 'label', array(
90
- 'label' => Mage::helper('inquiry')->__('Zip'),
91
- 'name' => 'zip',
92
- 'value' => $data->getZip(),
93
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  $fieldset->addField('phone', 'label', array(
96
  'label' => Mage::helper('inquiry')->__('Phone'),
@@ -104,11 +124,13 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Edit_Tab_Form extends
104
  'value' => $data->getEmail(),
105
  ));
106
 
107
- $fieldset->addField('website', 'label', array(
108
- 'label' => Mage::helper('inquiry')->__('Website'),
109
- 'name' => 'website',
110
- 'value' => $data->getWebsite(),
111
- ));
 
 
112
 
113
  $fieldset->addField('iscustcreated', 'label', array(
114
  'label' => Mage::helper('inquiry')->__('Is Created'),
@@ -129,11 +151,58 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Edit_Tab_Form extends
129
  'value' => $createddt,
130
  ));
131
 
132
- $fieldset->addField('desc', 'label', array(
133
- 'label' => Mage::helper('inquiry')->__('Business Description'),
134
- 'name' => 'desc',
135
- 'value' => $data->getDesc(),
136
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  if ( Mage::getSingleton('adminhtml/session')->getInquiryData() )
139
  {
27
  $data = Mage::registry('inquiry_data');
28
  $storename = Mage::getModel('core/store')->load($data->getStoreid())->getName();
29
  $createddt = date("d/m/Y H:i:s", strtotime($data->getCreateddt()));
30
+ $datetimeformat = date("d/m/Y H:i:s", strtotime($data->getDateTime()));
31
+
32
+ $date_time = trim(Mage::getStoreConfig('inquiry/change_label/datetime'));
33
+ $extra_field_one = trim(Mage::getStoreConfig('inquiry/change_label/extra_field_one'));
34
+ $extra_field_two = trim(Mage::getStoreConfig('inquiry/change_label/extra_field_two'));
35
+ $extra_field_three = trim(Mage::getStoreConfig('inquiry/change_label/extra_field_three'));
36
 
37
 
38
  if(Mage::registry('inquiry_data')->getIscustcreated()){
49
  'value' => $data->getFirstname(),
50
  ));
51
 
52
+ if($data->getLastname()){
53
+ $fieldset->addField('lastname', 'label', array(
54
+ 'label' => Mage::helper('inquiry')->__('Last Name'),
55
+ 'name' => 'lastname',
56
+ 'value' => $data->getLastname(),
57
+ ));
58
+ }
59
 
60
  $fieldset->addField('company', 'label', array(
61
  'label' => Mage::helper('inquiry')->__('Company Name'),
63
  'value' => $data->getCompany(),
64
  ));
65
 
66
+ if($data->getTaxvat()){
67
+ $fieldset->addField('taxvat', 'label', array(
68
+ 'label' => Mage::helper('inquiry')->__('Tax/VAT Number'),
69
+ 'name' => 'taxvat',
70
+ 'value' => $data->getTaxvat(),
71
+ ));
72
+ }
 
 
 
 
 
 
 
 
 
 
73
 
74
+ if($data->getAddress()){
75
+ $fieldset->addField('address ', 'label', array(
76
+ 'label' => Mage::helper('inquiry')->__('Address'),
77
+ 'name' => 'address ',
78
+ 'value' => $data->getAddress(),
79
+ ));
80
+ }
81
 
82
+ if($data->getCity()){
83
+ $fieldset->addField('city', 'label', array(
84
+ 'label' => Mage::helper('inquiry')->__('City'),
85
+ 'name' => 'city',
86
+ 'value' => $data->getCity(),
87
+ ));
88
+ }
89
 
90
+ if($data->getState()){
91
+ $fieldset->addField('state', 'label', array(
92
+ 'label' => Mage::helper('inquiry')->__('State'),
93
+ 'name' => 'state',
94
+ 'value' => $data->getState(),
95
+ ));
96
+ }
97
+
98
+ if($data->getCountry()){
99
+ $country = explode('$$$',$data->getCountry());
100
+ $fieldset->addField('country', 'label', array(
101
+ 'label' => Mage::helper('inquiry')->__('Country'),
102
+ 'name' => 'country',
103
+ 'value' => $country[1],
104
+ ));
105
+ }
106
+
107
+ if($data->getZip()){
108
+ $fieldset->addField('zip', 'label', array(
109
+ 'label' => Mage::helper('inquiry')->__('Zip'),
110
+ 'name' => 'zip',
111
+ 'value' => $data->getZip(),
112
+ ));
113
+ }
114
 
115
  $fieldset->addField('phone', 'label', array(
116
  'label' => Mage::helper('inquiry')->__('Phone'),
124
  'value' => $data->getEmail(),
125
  ));
126
 
127
+ if($data->getWebsite()){
128
+ $fieldset->addField('website', 'label', array(
129
+ 'label' => Mage::helper('inquiry')->__('Website'),
130
+ 'name' => 'website',
131
+ 'value' => $data->getWebsite(),
132
+ ));
133
+ }
134
 
135
  $fieldset->addField('iscustcreated', 'label', array(
136
  'label' => Mage::helper('inquiry')->__('Is Created'),
151
  'value' => $createddt,
152
  ));
153
 
154
+ if($data->getDesc()){
155
+ $fieldset->addField('desc', 'label', array(
156
+ 'label' => Mage::helper('inquiry')->__('Business Description'),
157
+ 'name' => 'desc',
158
+ 'value' => $data->getDesc(),
159
+ ));
160
+ }
161
+
162
+ if($data->getDateTime()){
163
+ $fieldset->addField('date_time', 'label', array(
164
+ 'label' => Mage::helper('inquiry')->__($date_time),
165
+ 'name' => 'date_time',
166
+ 'value' => $datetimeformat,
167
+ ));
168
+ }
169
+
170
+ if($data->getFilename()){
171
+ $file_names = explode('|',$data->getFilename());
172
+ foreach($file_names as $key=>$file){
173
+ $file_value = "<a href='".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA)."inquiry/upload/".$file."' target='_blank'>".$file."</a>";
174
+ $fieldset->addField('filename_'.$key, 'label', array(
175
+ 'label' => Mage::helper('inquiry')->__('Uploaded File'),
176
+ 'name' => 'filename_'.$key,
177
+ 'after_element_html' => $file_value,
178
+ ));
179
+ }
180
+ }
181
+
182
+ if($data->getExtraFieldOne()){
183
+ $fieldset->addField('extra_field_one', 'label', array(
184
+ 'label' => Mage::helper('inquiry')->__($extra_field_one),
185
+ 'name' => 'extra_field_one',
186
+ 'value' => $data->getExtraFieldOne(),
187
+ ));
188
+ }
189
+
190
+ if($data->getExtraFieldTwo()){
191
+ $fieldset->addField('extra_field_two', 'label', array(
192
+ 'label' => Mage::helper('inquiry')->__($extra_field_two),
193
+ 'name' => 'extra_field_two',
194
+ 'value' => $data->getExtraFieldTwo(),
195
+ ));
196
+ }
197
+
198
+ if($data->getExtraFieldThree()){
199
+ $fieldset->addField('extra_field_three', 'label', array(
200
+ 'label' => Mage::helper('inquiry')->__($extra_field_three),
201
+ 'name' => 'extra_field_three',
202
+ 'value' => $data->getExtraFieldThree(),
203
+ ));
204
+ }
205
+
206
 
207
  if ( Mage::getSingleton('adminhtml/session')->getInquiryData() )
208
  {
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Grid.php CHANGED
@@ -94,7 +94,6 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Grid extends Mage_Adm
94
  } else {
95
  $cell = '<span class="grid-severity-major"><span>Not Created</span></span>';
96
  }
97
-
98
  return $cell;
99
  }
100
 
@@ -108,8 +107,6 @@ class CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Grid extends Mage_Adm
108
  'url' => $this->getUrl('*/*/massDelete'),
109
  'confirm' => Mage::helper('inquiry')->__('Are you sure?')
110
  ));
111
-
112
-
113
  return $this;
114
  }
115
 
94
  } else {
95
  $cell = '<span class="grid-severity-major"><span>Not Created</span></span>';
96
  }
 
97
  return $cell;
98
  }
99
 
107
  'url' => $this->getUrl('*/*/massDelete'),
108
  'confirm' => Mage::helper('inquiry')->__('Are you sure?')
109
  ));
 
 
110
  return $this;
111
  }
112
 
app/code/community/CapacityWebSolutions/Inquiry/Block/Inquiry.php CHANGED
@@ -9,10 +9,57 @@
9
 
10
  class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Template
11
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  public function getAllInquires()
13
  {
14
  if($collection = Mage::getModel("inquiry/inquiry")->getCollection())
15
- $collection->setOrder('createddt',"Asc")->load();
16
  return $collection;
17
  }
18
 
@@ -35,10 +82,13 @@ class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Templat
35
  //for add top link
36
  public function addTopLinkStores()
37
  {
38
- $label = trim(Mage::getStoreConfig('inquiry/general/toplink'));
39
- $storeID = Mage::app()->getStore()->getId();
40
- $toplinkBlock = $this->getParentBlock();
41
- $toplinkBlock->addLink($this->__($label),'inquiry/',$label,true,array(),90);
 
 
 
42
  }
43
 
44
  }
9
 
10
  class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Template
11
  {
12
+ public function __construct()
13
+ {
14
+ //general settings
15
+ $this->setLinkEnabled((bool)Mage::getStoreConfig("inquiry/general/enable_toplink"));
16
+ $this->setLinkLabel(Mage::getStoreConfig("inquiry/general/toplink"));
17
+ $this->setHeading(trim(Mage::getStoreConfig('inquiry/general/heading')));
18
+ $this->setIndicates(trim(Mage::getStoreConfig('inquiry/general/indicates')));
19
+ $this->setDesc(trim(Mage::getStoreConfig('inquiry/general/description')));
20
+ $this->setBtnText(trim(Mage::getStoreConfig('inquiry/general/btn_text')));
21
+
22
+ //change label settings
23
+ $this->setFirstName(trim(Mage::getStoreConfig('inquiry/change_label/f_name')));
24
+ $this->setLastName(trim(Mage::getStoreConfig('inquiry/change_label/l_name')));
25
+ $this->setCompanyName(trim(Mage::getStoreConfig('inquiry/change_label/company_name')));
26
+ $this->setVatNumber(trim(Mage::getStoreConfig('inquiry/change_label/vat_number')));
27
+ $this->setAddress(trim(Mage::getStoreConfig('inquiry/change_label/address')));
28
+ $this->setCity(trim(Mage::getStoreConfig('inquiry/change_label/city')));
29
+ $this->setState(trim(Mage::getStoreConfig('inquiry/change_label/state')));
30
+ $this->setCountry(trim(Mage::getStoreConfig('inquiry/change_label/country')));
31
+ $this->setPostalCode(trim(Mage::getStoreConfig('inquiry/change_label/postal_code')));
32
+ $this->setContactNumber(trim(Mage::getStoreConfig('inquiry/change_label/contact_number')));
33
+ $this->setEmail(trim(Mage::getStoreConfig('inquiry/change_label/email')));
34
+ $this->setWebsite(trim(Mage::getStoreConfig('inquiry/change_label/website')));
35
+ $this->setDescription(trim(Mage::getStoreConfig('inquiry/change_label/description')));
36
+ $this->setDateTime(trim(Mage::getStoreConfig('inquiry/change_label/datetime')));
37
+ $this->setUploadFile(trim(Mage::getStoreConfig('inquiry/change_label/upload_file')));
38
+ $this->setExtraFieldOne(trim(Mage::getStoreConfig('inquiry/change_label/extra_field_one')));
39
+ $this->setExtraFieldTwo(trim(Mage::getStoreConfig('inquiry/change_label/extra_field_two')));
40
+ $this->setExtraFieldThree(trim(Mage::getStoreConfig('inquiry/change_label/extra_field_three')));
41
+
42
+ //show/hide labels settings
43
+ $this->setLastNameHide((bool)Mage::getStoreConfig('inquiry/label_hide/l_name'));
44
+ $this->setVatNumberHide((bool)Mage::getStoreConfig('inquiry/label_hide/vat_number'));
45
+ $this->setAddressHide((bool)Mage::getStoreConfig('inquiry/label_hide/address'));
46
+ $this->setCityHide((bool)Mage::getStoreConfig('inquiry/label_hide/city'));
47
+ $this->setStateHide((bool)Mage::getStoreConfig('inquiry/label_hide/state'));
48
+ $this->setCountryHide((bool)Mage::getStoreConfig('inquiry/label_hide/country'));
49
+ $this->setPostalCodeHide((bool)Mage::getStoreConfig('inquiry/label_hide/postal_code'));
50
+ $this->setWebsiteHide((bool)Mage::getStoreConfig('inquiry/label_hide/website'));
51
+ $this->setCaptchaHide((bool)Mage::getStoreConfig('inquiry/label_hide/captcha'));
52
+ $this->setDateTimeHide((bool)Mage::getStoreConfig('inquiry/label_hide/datetime'));
53
+ $this->setUploadFileHide((bool)Mage::getStoreConfig('inquiry/label_hide/upload_file'));
54
+ $this->setFieldOneHide((bool)Mage::getStoreConfig('inquiry/label_hide/field_one'));
55
+ $this->setFieldTwoHide((bool)Mage::getStoreConfig('inquiry/label_hide/field_two'));
56
+ $this->setFieldThreeHide((bool)Mage::getStoreConfig('inquiry/label_hide/field_three'));
57
+ }
58
+
59
  public function getAllInquires()
60
  {
61
  if($collection = Mage::getModel("inquiry/inquiry")->getCollection())
62
+ $collection->setOrder('createddt',"ASC")->load();
63
  return $collection;
64
  }
65
 
82
  //for add top link
83
  public function addTopLinkStores()
84
  {
85
+ $enable_link = $this->getLinkEnabled();
86
+ if($enable_link){
87
+ $label = trim($this->getLinkLabel());
88
+ $storeID = Mage::app()->getStore()->getId();
89
+ $toplinkBlock = $this->getParentBlock();
90
+ $toplinkBlock->addLink($this->__($label),'inquiry/',$label,true,array(),90);
91
+ }
92
  }
93
 
94
  }
app/code/community/CapacityWebSolutions/Inquiry/Block/Managejquery.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- /***************************************************************************
3
- @extension : Dealer Inquiry Extension.
4
- @copyright : Copyright (c) 2015 Capacity Web Solutions.
5
- ( http://www.capacitywebsolutions.com )
6
- @author : Capacity Web Solutions Pvt. Ltd.
7
- @support : magento@capacitywebsolutions.com
8
- ***************************************************************************/
9
-
10
- class CapacityWebSolutions_Inquiry_Block_Managejquery extends Mage_Core_Block_Template
11
- {
12
- public function addJquery()
13
- {
14
- $enabled = Mage::getStoreConfig('inquiry/general/enable_js');
15
-
16
- $_head = $this->__getHeadBlock();
17
- if($enabled){
18
- $_head->addItem('js', 'inquiry/jquery.min.js');
19
- }
20
-
21
- return $_head;
22
- }
23
-
24
- private function __getHeadBlock() {
25
- return $this->getLayout()->getBlock('head');
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/CapacityWebSolutions/Inquiry/Model/Inquiryfiles.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /***************************************************************************
3
+ @extension : Dealer Inquiry Extension.
4
+ @copyright : Copyright (c) 2015 Capacity Web Solutions.
5
+ ( http://www.capacitywebsolutions.com )
6
+ @author : Capacity Web Solutions Pvt. Ltd.
7
+ @support : magento@capacitywebsolutions.com
8
+ ***************************************************************************/
9
+
10
+ class CapacityWebSolutions_Inquiry_Model_Inquiryfiles extends Mage_Core_Model_Abstract
11
+ {
12
+ public function _construct()
13
+ {
14
+ parent::_construct();
15
+ $this->_init('inquiry/inquiryfiles');
16
+ }
17
+ }
18
+
app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry.php CHANGED
@@ -13,5 +13,27 @@ class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiry extends Mage_Core_Model_
13
  {
14
  $this->_init('inquiry/inquiry', 'dealerid');
15
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
13
  {
14
  $this->_init('inquiry/inquiry', 'dealerid');
15
  }
16
+
17
+ /* protected function _getLoadSelect($field, $value, $object)
18
+ {
19
+ $select = parent::_getLoadSelect($field, $value, $object);
20
+ $select->joinLeft(
21
+ array('files' => 'dealerinquiry_files'),$this->getMainTable() . '.dealerid = files.dealerid');
22
+ return $select;
23
+ } */
24
+
25
+ protected function _afterSave(Mage_Core_Model_Abstract $object)
26
+ {
27
+ $inq_file_model = Mage::getModel('inquiry/inquiryfiles');
28
+ if($object->getFile()){
29
+ foreach($object->getFile() as $fname){
30
+ $data['dealerid'] = $object->getId();
31
+ $data['filename'] = $fname;
32
+ $inq_file_model->setData($data);
33
+ $inq_file_model->save();
34
+ }
35
+ }
36
+ return parent::_afterSave( $object );
37
+ }
38
  }
39
 
app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry/Collection.php CHANGED
@@ -14,5 +14,15 @@ class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiry_Collection extends Mage_
14
  parent::_construct();
15
  $this->_init('inquiry/inquiry');
16
  }
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
14
  parent::_construct();
15
  $this->_init('inquiry/inquiry');
16
  }
17
+
18
+ public function inquiryFilter($dealerid) {
19
+ $this->getSelect()->join(
20
+ array('dealerinquiry_files' => $this->getTable('inquiry/inquiryfiles')),
21
+ 'main_table.dealerid = dealerinquiry_files.dealerid',
22
+ array('*')
23
+ )
24
+ ->where('dealerinquiry_files.dealerid = ?', $dealerid);
25
+ return $this;
26
+ }
27
  }
28
 
app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiryfiles.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /***************************************************************************
3
+ @extension : Dealer Inquiry Extension.
4
+ @copyright : Copyright (c) 2015 Capacity Web Solutions.
5
+ ( http://www.capacitywebsolutions.com )
6
+ @author : Capacity Web Solutions Pvt. Ltd.
7
+ @support : magento@capacitywebsolutions.com
8
+ ***************************************************************************/
9
+ class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiryfiles extends Mage_Core_Model_Mysql4_Abstract
10
+ {
11
+ public function _construct()
12
+ {
13
+ $this->_init('inquiry/inquiryfiles', 'dealer_file_id');
14
+ }
15
+ }
16
+
app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiryfiles/Collection.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /***************************************************************************
3
+ @extension : Dealer Inquiry Extension.
4
+ @copyright : Copyright (c) 2015 Capacity Web Solutions.
5
+ ( http://www.capacitywebsolutions.com )
6
+ @author : Capacity Web Solutions Pvt. Ltd.
7
+ @support : magento@capacitywebsolutions.com
8
+ ***************************************************************************/
9
+
10
+ class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiryfiles_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
11
+ {
12
+ public function _construct()
13
+ {
14
+ parent::_construct();
15
+ $this->_init('inquiry/inquiryfiles');
16
+ }
17
+ }
18
+
app/code/community/CapacityWebSolutions/Inquiry/Model/Observer.php CHANGED
@@ -24,6 +24,33 @@ class CapacityWebSolutions_Inquiry_Model_Observer
24
  $coll->save();
25
  }
26
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
28
 
29
 
24
  $coll->save();
25
  }
26
  }
27
+
28
+ public function prepareLayoutBefore(Varien_Event_Observer $observer)
29
+ {
30
+ $enabled = Mage::getStoreConfig('inquiry/general/enabled');
31
+
32
+ $disable_output = Mage::getStoreConfig('advanced/modules_disable_output/CapacityWebSolutions_Inquiry');
33
+
34
+ if (!$enabled) {
35
+ return $this;
36
+ }
37
+ if ($disable_output) {
38
+ return $this;
39
+ }
40
+
41
+ $block = $observer->getEvent()->getBlock();
42
+
43
+ $route = Mage::app()->getRequest()->getRouteName();
44
+
45
+ if ("head" == $block->getNameInLayout() && $route=="inquiry") {
46
+ $jquery_enabled = Mage::getStoreConfig('inquiry/general/enable_js');;
47
+ if($jquery_enabled){
48
+ $block->addJs('inquiry/jquery.min.js');
49
+ }
50
+ }
51
+ return $this;
52
+ }
53
+
54
  }
55
 
56
 
app/code/community/CapacityWebSolutions/Inquiry/Model/System/Config/Source/Customergroup.php ADDED
@@ -0,0 +1 @@
 
0
  {
1
  return Mage::helper('customer')->getGroups()->toOptionArray();
2
  }
1
+ <?php
2
  {
3
  return Mage::helper('customer')->getGroups()->toOptionArray();
4
  }
app/code/community/CapacityWebSolutions/Inquiry/controllers/Adminhtml/InquiryController.php CHANGED
@@ -9,6 +9,8 @@
9
 
10
  class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Adminhtml_Controller_action
11
  {
 
 
12
  protected function _initAction() {
13
  $this->loadLayout()->_setActiveMenu('cws');
14
  return $this;
@@ -26,7 +28,19 @@ class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Admi
26
  $this->_title($this->__('CWS Extension'))->_title($this->__('Dealer Inquiries'))->_title($this->__('Dealer Management'))->_title($this->__('Dealer Information'));
27
  $id = $this->getRequest()->getParam('id');
28
  $model = Mage::getModel('inquiry/inquiry')->load($id);
29
-
 
 
 
 
 
 
 
 
 
 
 
 
30
  if ($model->getId() || $id == 0) {
31
  $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
32
  if (!empty($data)) {
@@ -82,12 +96,12 @@ class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Admi
82
  $inquiry = Mage::getModel('inquiry/inquiry')->load($dealerId);
83
  $inquiry->delete();
84
  }
85
- Mage::getSingleton('adminhtml/session')->addSuccess(
86
- Mage::helper('adminhtml')->__(
87
- 'Total of %d record(s) were successfully deleted', count($dealerIds)
88
- )
89
- );
90
- } catch (Exception $e) {
91
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
92
  }
93
  }
@@ -110,8 +124,11 @@ class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Admi
110
  $customer->setWebsiteId($websiteId);
111
  $customer->loadByEmail($dealer_data['email']);
112
 
 
 
113
  if(!$customer->getId()) {
114
- $customer ->setWebsiteId($websiteId)
 
115
  ->setStoreId($dealer_data['storeid'])
116
  ->setFirstname($dealer_data['firstname'])
117
  ->setLastname($dealer_data['lastname'])
@@ -123,10 +140,10 @@ class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Admi
123
 
124
  try{
125
  $customer->save();
126
-
127
  $this->addAddress($dealer_data,$customer->getId());
128
  $this->sendMail($dealer_data,$randompass);
129
-
 
130
  //for update is customer created status
131
  $dealer_coll = Mage::getModel('inquiry/inquiry')->getCollection()
132
  ->addFieldToFilter('email',$customer->getEmail())
@@ -210,94 +227,26 @@ class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Admi
210
  }
211
  }
212
 
213
- public function sendMail($dealer_data,$randompass){
214
-
 
 
215
  $adminEmail = Mage::getStoreConfig('trans_email/ident_general/email', $dealer_data['storeid']);
216
  $adminName = Mage::getStoreConfig('trans_email/ident_general/name', $dealer_data['storeid']);
217
- $fromEmail = $adminEmail;
218
- $fromName = $adminName;
219
-
220
- $toEmail = $dealer_data['email'];
221
- //$toName = $dealer_data['firstname'].$dealer_data['lastname'];
222
-
223
- $email_logo = Mage::getStoreConfig('design/email/logo' ,$dealer_data['storeid']);
224
- $subject_title = Mage::getStoreConfig('inquiry/register_email/heading',$dealer_data['storeid']);
225
- $email_desc = Mage::getStoreConfig('inquiry/register_email/description',$dealer_data['storeid']);
226
  $store_name = Mage::getStoreConfig('general/store_information/name', $dealer_data['storeid']);
227
-
228
- $img_media = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'email/logo/';
229
- $img_logo_final = $img_media.$email_logo;
230
-
231
- $skin = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
232
- $skin_name = Mage::getStoreConfig('design/theme/skin',$dealer_data['storeid']);
233
- if($skin_name == "")
234
- {
235
- $skin_name = "default";
236
- }
237
- else
238
- {
239
- $skin_name = $skin_name;
240
- }
241
- $package = Mage::getStoreConfig('design/package/name',$dealer_data['storeid']);
242
- $default_logo = Mage::getStoreConfig('design/header/logo_src',$dealer_data['storeid']);
243
-
244
- $logo_default = $skin."/frontend/".$package."/".$skin_name."/".$default_logo;
245
-
246
- if($img_logo_final == $img_media)
247
- {
248
- $logo_img = "<img src='$logo_default'/>";
249
- }
250
- else
251
- {
252
- $logo_img = "<img src='$img_logo_final'/>";
253
- }
254
-
255
- $email_desc = str_replace("{{Name}}",$dealer_data['firstname'].' '.$dealer_data['lastname'],$email_desc);
256
- $email_desc = str_replace("{{username}}",$dealer_data['email'],$email_desc);
257
- $email_desc = str_replace("{{password}}",$randompass,$email_desc);
258
- $url = Mage::app()->getStore($dealer_data['storeid'])->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'customer/account/login/';
259
- $email_desc = str_replace("{{url}}",$url,$email_desc);
260
- $email_desc = str_replace("{{storename}}",$store_name,$email_desc);
261
-
262
- $body = '<table border="0">
263
- <tr>
264
- <td>
265
- <table border="0">
266
- <tr>
267
- <td>'.$logo_img.'</td>
268
- </tr>
269
- <tr>
270
- <td colspan="2">&nbsp;</td></tr>
271
- <tr>
272
-
273
-
274
- <tr>
275
- <td><p>'.$email_desc.'</p></td>
276
- </tr>
277
-
278
- </table>
279
- </td>
280
- </tr>
281
- </table>';
282
-
283
- $headers = "";
284
-
285
- $custSubject = $subject_title;
286
- $headers .= 'MIME-Version: 1.0'."\r\n";
287
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
288
- $headers .= 'From:'. $adminName.' <'.$adminEmail.'>';
289
-
290
-
291
- if(mail($toEmail,$custSubject,$body,$headers)){
292
-
293
- }else{
294
- Mage::getSingleton('core/session')
295
- ->addError('Unable to send email.');
296
- }
297
-
298
- Mage::getSingleton('core/session')->addSuccess("Customer Account Created successfully.");
299
- return;
300
  }
301
-
302
-
303
  }
9
 
10
  class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends Mage_Adminhtml_Controller_action
11
  {
12
+ const EMAIL_TEMPLATE_XML_PATH = 'inquiry/create_account/email_template';
13
+
14
  protected function _initAction() {
15
  $this->loadLayout()->_setActiveMenu('cws');
16
  return $this;
28
  $this->_title($this->__('CWS Extension'))->_title($this->__('Dealer Inquiries'))->_title($this->__('Dealer Management'))->_title($this->__('Dealer Information'));
29
  $id = $this->getRequest()->getParam('id');
30
  $model = Mage::getModel('inquiry/inquiry')->load($id);
31
+
32
+ $inquiry_file_collection = Mage::getModel('inquiry/inquiry')->getCollection()->inquiryFilter($id);
33
+ $filename = "";
34
+ $collection_data = $inquiry_file_collection->getData();
35
+ foreach($collection_data as $data){
36
+ if(next($collection_data)){
37
+ $filename.= $data['filename']."|";
38
+ }else{
39
+ $filename.= $data['filename'];
40
+ }
41
+ }
42
+
43
+ $model->setData('filename',$filename);
44
  if ($model->getId() || $id == 0) {
45
  $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
46
  if (!empty($data)) {
96
  $inquiry = Mage::getModel('inquiry/inquiry')->load($dealerId);
97
  $inquiry->delete();
98
  }
99
+ Mage::getSingleton('adminhtml/session')->addSuccess(
100
+ Mage::helper('adminhtml')->__(
101
+ 'Total of %d record(s) were successfully deleted', count($dealerIds)
102
+ )
103
+ );
104
+ } catch (Exception $e) {
105
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
106
  }
107
  }
124
  $customer->setWebsiteId($websiteId);
125
  $customer->loadByEmail($dealer_data['email']);
126
 
127
+ $groupid = Mage::getStoreConfig('inquiry/general/customer',$dealer_data['storeid']);
128
+
129
  if(!$customer->getId()) {
130
+ $customer ->setGroupId($groupid)
131
+ ->setWebsiteId($websiteId)
132
  ->setStoreId($dealer_data['storeid'])
133
  ->setFirstname($dealer_data['firstname'])
134
  ->setLastname($dealer_data['lastname'])
140
 
141
  try{
142
  $customer->save();
 
143
  $this->addAddress($dealer_data,$customer->getId());
144
  $this->sendMail($dealer_data,$randompass);
145
+ Mage::getSingleton('core/session')->addSuccess("Customer Account Created successfully.");
146
+
147
  //for update is customer created status
148
  $dealer_coll = Mage::getModel('inquiry/inquiry')->getCollection()
149
  ->addFieldToFilter('email',$customer->getEmail())
227
  }
228
  }
229
 
230
+ public function sendMail($dealer_data, $randompass){
231
+ $templateId = Mage::getStoreConfig(self::EMAIL_TEMPLATE_XML_PATH, $dealer_data['storeid']);
232
+ $customerEmailId = $dealer_data['email'];
233
+ $customerName = $dealer_data['firstname']." ".$dealer_data['lastname'];
234
  $adminEmail = Mage::getStoreConfig('trans_email/ident_general/email', $dealer_data['storeid']);
235
  $adminName = Mage::getStoreConfig('trans_email/ident_general/name', $dealer_data['storeid']);
 
 
 
 
 
 
 
 
 
236
  $store_name = Mage::getStoreConfig('general/store_information/name', $dealer_data['storeid']);
237
+ $mailSubject = Mage::getStoreConfig('inquiry/create_account/heading',$dealer_data['storeid']);
238
+
239
+ $sender = Array('name' => $adminName,
240
+ 'email' => $adminEmail);
241
+
242
+ $storeId = $dealer_data['storeid'];
243
+ $loginlink = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
244
+ $vars = Array();
245
+ $vars = Array('password'=>$randompass,'loginlink'=>$loginlink,'subject'=>$mailSubject);
246
+ $translate = Mage::getSingleton('core/translate');
247
+ Mage::getModel('core/email_template')
248
+ ->setTemplateSubject($mailSubject)
249
+ ->sendTransactional($templateId, $sender, $customerEmailId, $customerName, $vars, $storeId);
250
+ $translate->setTranslateInline(true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  }
 
 
252
  }
app/code/community/CapacityWebSolutions/Inquiry/controllers/IndexController.php CHANGED
@@ -9,18 +9,19 @@
9
 
10
  class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_Front_Action
11
  {
12
- public function indexAction()
13
- {
 
 
 
14
  $this->loadLayout(array('default'));
15
  $this->renderLayout();
16
  }
17
 
18
- public function thanksAction()
19
- {
20
  if($this->getRequest()->getPost())
21
  {
22
  $data = $this->getRequest()->getPost();
23
-
24
  $captcha = $this->getRequest()->getParam("captcha");
25
  $captcha_code = $this->getRequest()->getParam("captcha_code");
26
  if($captcha == $captcha_code)
@@ -28,7 +29,7 @@ class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_
28
  $storeid = Mage::app()->getStore()->getStoreId();
29
  $websiteid = Mage::app()->getWebsite()->getId();
30
 
31
- $country_name = explode('$$$',$data['country']);
32
  $data['storeid']=$storeid;
33
  $data['websiteid']=$websiteid;
34
 
@@ -38,7 +39,7 @@ class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_
38
  ->addFieldToFilter('storeid',$storeid);
39
 
40
  if(!$collection->getSize())
41
- {
42
  $data['createddt']=Mage::getModel('core/date')->date('Y-m-d H:i:s');
43
  $customer = Mage::getModel("customer/customer");
44
  $customer->setWebsiteId($data['websiteid']);
@@ -46,240 +47,50 @@ class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_
46
 
47
  if($customer->getId()){
48
  $data['iscustcreated']=1;
49
-
50
- }
51
- $model->setData($data);
52
- $model->save();
53
-
54
- $config_change_label = Mage::getStoreConfig('inquiry/change_label');
55
-
56
- $first_name = $config_change_label['f_name'];
57
- if($first_name){
58
- $first_name = $config_change_label['f_name'];
59
- }else {
60
- $first_name = "First Name";
61
- }
62
-
63
- $last_name = $config_change_label['l_name'];
64
- if($last_name){
65
- $last_name = $config_change_label['l_name'];
66
- }else {
67
- $last_name = "Last Name";
68
- }
69
-
70
- $company_name = $config_change_label['company_name'];
71
- if($company_name){
72
- $company_name = $config_change_label['company_name'];
73
- }else{
74
- $company_name = "Company Name";
75
  }
76
-
77
- $vat_number = $config_change_label['vat_number'];
78
- if($vat_number){
79
- $vat_number = $config_change_label['vat_number'];
80
- }else{
81
- $vat_number = "TAX/VAT Number";
82
- }
83
-
84
- $address_name = $config_change_label['address'];
85
- if($address_name){
86
- $address_name = $config_change_label['address'];
87
- }else{
88
- $address_name = "Address";
89
- }
90
-
91
- $city_name = $config_change_label['city'];
92
- if($city_name){
93
- $city_name = $config_change_label['city'];
94
- }else{
95
- $city_name = "City";
96
- }
97
-
98
- $state_name = $config_change_label['state'];
99
- if($state_name){
100
- $state_name = $config_change_label['state'];
101
- }else{
102
- $state_name = "State/Province";
103
- }
104
-
105
- $country = $config_change_label['country'];
106
- if($country){
107
- $country = $config_change_label['country'];
108
- }else{
109
- $country = "Country";
110
- }
111
- $postal_code = $config_change_label['postal_code'];
112
- if($postal_code){
113
- $postal_code = $config_change_label['postal_code'];
114
- }else{
115
- $postal_code = "ZIP/Postal Code";
116
- }
117
-
118
- $contact_number = $config_change_label['contact_number'];
119
- if($contact_number){
120
- $contact_number = $config_change_label['contact_number'];
121
- }else{
122
- $contact_number = "Contact Number";
123
- }
124
-
125
- $email_name = $config_change_label['email'];
126
- if($email_name){
127
- $email_name = $config_change_label['email'];
128
- }else{
129
- $email_name = "Email";
130
- }
131
 
132
- $website_name = $config_change_label['website'];
133
- if($website_name){
134
- $website_name = $config_change_label['website'];
135
- }else{
136
- $website_name = "Website";
137
- }
138
- $description = $config_change_label['description'];
139
- if($description){
140
- $description = $config_change_label['description'];
141
- }else{
142
- $description = "Business Description";
143
- }
144
-
145
- $adminContent = '<table border="0">
146
- <tr>
147
- <td>
148
- <table border="0">
149
- <tr>
150
- <Td>
151
- <label><p style="Font-size:22px;"><b>Hello Administrator,</b></p></label>
152
- </Td>
153
- </tr>
154
- <tr>
155
- <Td>
156
- <p>Mr/Ms. '.$data['firstname'].' '.$data['lastname'].' have filled dealer inquiry form and details are below.</p>
157
- </td>
158
- </tr>
159
- <tr>
160
- <td>
161
- <table border="0">
162
- <tr>
163
- <td><label>'.$first_name.':</label></td>
164
- <td><label>'.$data['firstname'].'</label></td>
165
- </tr>
166
- <tr>
167
- <td><label>'.$last_name.':</label></td>
168
- <td><label>'.$data['lastname'].'</label></td>
169
- </tr>
170
- <tr>
171
- <td><label>'.$company_name.':</label></td>
172
- <td><label>'.$data['company'].'</label></td>
173
- </tr>
174
- <tr>
175
- <td><label>'.$vat_number.':</label></td>
176
- <td><label>'.$data['taxvat'].'</label></td>
177
- </tr>
178
- <tr>
179
- <td><label>'.$address_name.':</label></td>
180
- <td><label>'.$data['address'].'</label></td>
181
- </tr>
182
- <tr>
183
- <td><label>'.$city_name.':</label></td>
184
- <td><label>'.$data['city'].'</label></td>
185
- </tr>
186
- <tr>
187
- <td><label>'.$state_name.':</label></td>
188
- <td><label>'.$data['state'].'</label></td>
189
- </tr>
190
- <tr>
191
- <td><label>'.$country.':</label></td>
192
- <td><label>'.$country_name[1].'</label></td>
193
- </tr>
194
- <tr>
195
- <td><label>'.$postal_code.':</label></td>
196
- <td><label>'.$data['zip'].'</label></td>
197
- </tr>
198
- <tr>
199
- <td><label>'.$contact_number.':</label></td>
200
- <td><label>'.$data['phone'].'</label></td>
201
- </tr>
202
- <tr>
203
- <td><label>'.$email_name.':</label></td>
204
- <td><label>'.$data['email'].'</label></td>
205
- </tr>
206
- <tr>
207
- <td><label>'.$website_name.':</label></td>
208
- <td><label>'.$data['website'].'</label></td>
209
- </tr>
210
- <tr>
211
- <td valign="top" width="15%"><label>'.$description.':</label></td>
212
- <td><label>'.$data['desc'].'</label></td>
213
- </tr>
214
- <tr>
215
- <td colspan="2">&nbsp;</td></tr>
216
- <tr>
217
- <td colspan="2"><label>Thank You.</label></td>
218
- </tr>
219
- </table>
220
- </td>
221
- </tr>
222
- </table>
223
- </td>
224
- </tr>
225
- </table>';
226
-
227
- $adminSubject = "New Dealer Inquiry from dealer";
228
- $adminName = Mage::getStoreConfig('trans_email/ident_general/name'); //sender name
229
- $adminEmail = Mage::getStoreConfig('trans_email/ident_general/email');
230
- $headers="";
231
- $headers .= 'MIME-Version: 1.0'."\r\n";
232
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
233
- $headers .= 'From:'. $adminName.' <'.$adminEmail.'>';
234
- mail($adminEmail,$adminSubject,$adminContent,$headers);
235
-
236
- $email_logo = Mage::getStoreConfig('design/email/logo');
237
- $subject_title = Mage::getStoreConfig('inquiry/customer_email/heading');
238
- $email_desc = Mage::getStoreConfig('inquiry/customer_email/description');
239
- $email_desc = str_replace("{{Name}}",$data['firstname'].$data['lastname'],$email_desc);
240
- $store_name = Mage::getStoreConfig('general/store_information/name');
241
-
242
- $img_media = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'email/logo/';
243
-
244
- $img_logo_final = $img_media.$email_logo;
245
- $default_logo = Mage::getStoreConfig('design/header/logo_src');
246
- $logo_default = Mage::getDesign()->getSkinUrl().$default_logo;
247
- $email_desc = str_replace("{{Storename}}",$store_name,$email_desc);
248
-
249
- if($img_logo_final == $img_media)
250
- {
251
- $logo_img = "<img src='$logo_default'/>";
252
  }
253
- else
 
254
  {
255
- $logo_img = "<img src='$img_logo_final'/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  }
257
-
258
- $customerContent = '<table border="0">
259
- <tr>
260
- <td>
261
- <table border="0">
262
- <tr>
263
- <Td>'.$logo_img.'</Td>
264
- </tr>
265
- <tr>
266
- <td colspan="2">&nbsp;</td></tr>
267
- <tr>
268
- <Td><p>'.$email_desc.'. </p></Td>
269
- </tr>
270
-
271
- </table>
272
- </td>
273
- </tr>
274
- </table>';
275
- $headers = "";
276
- $adminName = Mage::getStoreConfig('trans_email/ident_general/name'); //sender name
277
- $custSubject = $subject_title;
278
- $headers .= 'MIME-Version: 1.0'."\r\n";
279
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
280
- $headers .= 'From:'. $adminName.' <'.$adminEmail.'>';
281
-
282
- mail($data['email'],$custSubject,$customerContent,$headers);
283
  }
284
  else
285
  {
@@ -292,10 +103,243 @@ class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_
292
  Mage::getSingleton('core/session')->addError(Mage::helper('inquiry')->__('Captcha code does not match!'));
293
  $this->_redirect('*/*/');return;
294
  }
 
295
  }
296
  $this->_redirect('*/*/success');
297
  }
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  public function successAction(){
300
  $this->loadLayout(array('default'));
301
  $this->renderLayout();
9
 
10
  class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_Front_Action
11
  {
12
+ const OWNER_EMAIL_TEMPLATE_XML_PATH = 'inquiry/admin_email/email_template';
13
+ const CUSTOMER_EMAIL_TEMPLATE_XML_PATH = 'inquiry/customer_email/email_template';
14
+
15
+ public function indexAction() {
16
+ $this->_title($this->__('Dealer Inquiry'));
17
  $this->loadLayout(array('default'));
18
  $this->renderLayout();
19
  }
20
 
21
+ public function thanksAction() {
 
22
  if($this->getRequest()->getPost())
23
  {
24
  $data = $this->getRequest()->getPost();
 
25
  $captcha = $this->getRequest()->getParam("captcha");
26
  $captcha_code = $this->getRequest()->getParam("captcha_code");
27
  if($captcha == $captcha_code)
29
  $storeid = Mage::app()->getStore()->getStoreId();
30
  $websiteid = Mage::app()->getWebsite()->getId();
31
 
32
+
33
  $data['storeid']=$storeid;
34
  $data['websiteid']=$websiteid;
35
 
39
  ->addFieldToFilter('storeid',$storeid);
40
 
41
  if(!$collection->getSize())
42
+ {
43
  $data['createddt']=Mage::getModel('core/date')->date('Y-m-d H:i:s');
44
  $customer = Mage::getModel("customer/customer");
45
  $customer->setWebsiteId($data['websiteid']);
47
 
48
  if($customer->getId()){
49
  $data['iscustcreated']=1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
+ if(!empty($data['date_time'])){
53
+ $data['date_time'] = preg_replace('#(\d{2})/(\d{2})/(\d{4})\s(.*)#', '$3-$2-$1 $4', $data['date_time']);//convert datetime to mysql format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
+
56
+ if(!empty($_FILES['file']['name'][0]))
57
  {
58
+ $filetypes = Mage::getStoreConfig('inquiry/label_hide/file_type');
59
+ $filetype_array = array();
60
+ $filetype_array = explode(',',$filetypes);
61
+ foreach($_FILES['file']['name'] as $key => $fname)
62
+ {
63
+ try {
64
+ $path = Mage::getBaseDir('media') . DS . 'inquiry' . DS . 'upload' . DS;
65
+ $uploader = new Varien_File_Uploader(
66
+ array(
67
+ 'name' => $_FILES['file']['name'][$key],
68
+ 'type' => $_FILES['file']['type'][$key],
69
+ 'tmp_name' => $_FILES['file']['tmp_name'][$key],
70
+ 'error' => $_FILES['file']['error'][$key],
71
+ 'size' => $_FILES['file']['size'][$key]
72
+ )
73
+ );
74
+ $fname = preg_replace('/[^a-zA-Z0-9._]/s', '', $_FILES['file']['name'][$key]);
75
+ $uploader->setAllowedExtensions($filetype_array); //Allowed extension for file
76
+ $uploader->setAllowRenameFiles(false);
77
+ $uploader->setFilesDispersion(false);
78
+ $path_parts = pathinfo($fname);
79
+ $fileName = $path_parts['filename'].'_'.time().'.'.$path_parts['extension'];//rename file
80
+ $uploader->save($path, $fileName);
81
+ $data['file'][] = $fileName;
82
+ }catch (Exception $e) {
83
+ $data['file'] = '';
84
+ Mage::getSingleton('core/session')->addError($e->getMessage());
85
+ $this->_redirect('*/*/');return;
86
+ }
87
+ }
88
  }
89
+ $model->setData($data);
90
+ $model->save();
91
+
92
+ $this->sendOwnerMail($data);//send mail to owner
93
+ $this->sendCustomerMail($data);//send mail to dealer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
  else
96
  {
103
  Mage::getSingleton('core/session')->addError(Mage::helper('inquiry')->__('Captcha code does not match!'));
104
  $this->_redirect('*/*/');return;
105
  }
106
+
107
  }
108
  $this->_redirect('*/*/success');
109
  }
110
 
111
+ public function sendOwnerMail($data){
112
+
113
+ $config_change_label = Mage::getStoreConfig('inquiry/change_label');
114
+ $adminSubject = Mage::getStoreConfig('inquiry/admin_email/heading');
115
+ $adminName = Mage::getStoreConfig('trans_email/ident_general/name'); //sender name
116
+ $adminEmail = Mage::getStoreConfig('trans_email/ident_general/email');
117
+
118
+ //template variables
119
+ $emailTemplateVariables = array();
120
+ $emailTemplateVariables['subject'] = $adminSubject;
121
+ $emailTemplateVariables['name'] = $adminName;
122
+
123
+ $emailTemplateVariables['firstname'] = $data['firstname'];
124
+ $lastname = " ";
125
+ if(!empty($data['lastname'])){
126
+ $lastname = $emailTemplateVariables['lastname'] = $data['lastname'];
127
+ }
128
+ $emailTemplateVariables['dealername'] = $data['firstname'].' '.$lastname;
129
+ $emailTemplateVariables['company'] = $data['company'];
130
+ if(!empty($data['taxvat'])){
131
+ $emailTemplateVariables['vat_number'] = $data['taxvat'];
132
+ }
133
+ if(!empty($data['address'])){
134
+ $emailTemplateVariables['address'] = $data['address'];
135
+ }
136
+ if(!empty($data['city'])){
137
+ $emailTemplateVariables['city'] = $data['city'];
138
+ }
139
+ if(!empty($data['state'])){
140
+ $emailTemplateVariables['state'] = $data['state'];
141
+ }
142
+ if(!empty($data['country'])){
143
+ $country_name = explode('$$$',$data['country']);
144
+ $emailTemplateVariables['country'] = $country_name[1];
145
+ }
146
+ if(!empty($data['zip'])){
147
+ $emailTemplateVariables['zip'] = $data['zip'];
148
+ }
149
+ if(!empty($data['phone'])){
150
+ $emailTemplateVariables['phone'] = $data['phone'];
151
+ }
152
+ $emailTemplateVariables['dealeremail'] = $data['email'];
153
+ if(!empty($data['website'])){
154
+ $emailTemplateVariables['website'] = $data['website'];
155
+ }
156
+ if(!empty($data['desc'])){
157
+ $emailTemplateVariables['description'] =$data['desc'];
158
+ }
159
+ if(!empty($data['date_time'])){
160
+ $emailTemplateVariables['datetime'] =$data['date_time'];
161
+ }
162
+
163
+ if(!empty($data['file'])){
164
+ foreach($data['file'] as $key=>$fname){
165
+ $file_link[$key] = "<a href='".Mage::getBaseUrl('media')."inquiry/upload/".$fname."' target='_blank'>".$fname."</a>";
166
+ }
167
+ $emailTemplateVariables['upload_file'] = implode(', ',$file_link);
168
+ }
169
+
170
+ if(!empty($data['extra_field_one'])){
171
+ $emailTemplateVariables['extra_field_one'] =$data['extra_field_one'];
172
+ }
173
+ if(!empty($data['extra_field_two'])){
174
+ $emailTemplateVariables['extra_field_two'] =$data['extra_field_two'];
175
+ }
176
+ if(!empty($data['extra_field_three'])){
177
+ $emailTemplateVariables['extra_field_three'] =$data['extra_field_three'];
178
+ }
179
+
180
+ //labels
181
+ if($config_change_label['f_name']){
182
+ $emailTemplateVariables['firstname_label'] = $config_change_label['f_name'];
183
+ }else {
184
+ $emailTemplateVariables['firstname_label'] = "First Name";
185
+ }
186
+
187
+ if($config_change_label['l_name']){
188
+ $emailTemplateVariables['lastname_label'] = $config_change_label['l_name'];
189
+ }else {
190
+ $emailTemplateVariables['lastname_label'] = "Last Name";
191
+ }
192
+
193
+ if($config_change_label['company_name']){
194
+ $emailTemplateVariables['company_label'] = $config_change_label['company_name'];
195
+ }else{
196
+ $emailTemplateVariables['company_label'] = "Company Name";
197
+ }
198
+
199
+ if($config_change_label['vat_number']){
200
+ $emailTemplateVariables['vat_number_label'] = $config_change_label['vat_number'];
201
+ }else{
202
+ $emailTemplateVariables['vat_number_label'] = "TAX/VAT Number";
203
+ }
204
+
205
+ if($config_change_label['address']){
206
+ $emailTemplateVariables['address_label'] = $config_change_label['address'];
207
+ }else{
208
+ $emailTemplateVariables['address_label'] = "Address";
209
+ }
210
+
211
+ if($config_change_label['city']){
212
+ $emailTemplateVariables['city_label'] = $config_change_label['city'];
213
+ }else{
214
+ $emailTemplateVariables['city_label'] = "City";
215
+ }
216
+
217
+ if($config_change_label['state']){
218
+ $emailTemplateVariables['state_label'] = $config_change_label['state'];
219
+ }else{
220
+ $emailTemplateVariables['state_label'] = "State/Province";
221
+ }
222
+
223
+ if($config_change_label['country']){
224
+ $emailTemplateVariables['country_label'] = $config_change_label['country'];
225
+ }else{
226
+ $emailTemplateVariables['country_label'] = "Country";
227
+ }
228
+
229
+ if($config_change_label['postal_code']){
230
+ $emailTemplateVariables['zip_label'] = $config_change_label['postal_code'];
231
+ }else{
232
+ $emailTemplateVariables['zip_label'] = "ZIP/Postal Code";
233
+ }
234
+
235
+ if($config_change_label['contact_number']){
236
+ $emailTemplateVariables['phone_label'] = $config_change_label['contact_number'];
237
+ }else{
238
+ $emailTemplateVariables['phone_label'] = "Contact Number";
239
+ }
240
+
241
+ if($config_change_label['email']){
242
+ $emailTemplateVariables['email_label'] = $config_change_label['email'];
243
+ }else{
244
+ $emailTemplateVariables['email_label'] = "Email";
245
+ }
246
+
247
+ if(!empty($data['website'])){
248
+ if($config_change_label['website']){
249
+ $emailTemplateVariables['website_label'] = $config_change_label['website'];
250
+ }else{
251
+ $emailTemplateVariables['website_label'] = "Website";
252
+ }
253
+ }
254
+
255
+ if(!empty($data['desc'])){
256
+ if($config_change_label['description']){
257
+ $emailTemplateVariables['description_label'] = $config_change_label['description'];
258
+ }else{
259
+ $emailTemplateVariables['description_label'] = "Business Description";
260
+ }
261
+ }
262
+
263
+ if(!empty($data['date_time'])){
264
+ if($config_change_label['datetime']){
265
+ $emailTemplateVariables['datetime_label'] = $config_change_label['datetime'];
266
+ }else{
267
+ $emailTemplateVariables['datetime_label'] = "Date Time";
268
+ }
269
+ }
270
+
271
+ if(!empty($data['file'])){
272
+ if($config_change_label['upload_file']){
273
+ $emailTemplateVariables['upload_file_label'] = $config_change_label['upload_file'];
274
+ }else{
275
+ $emailTemplateVariables['upload_file_label'] = "Uploaded File(s)";
276
+ }
277
+ }
278
+
279
+ if(!empty($data['extra_field_one'])){
280
+ if($config_change_label['extra_field_one']){
281
+ $emailTemplateVariables['extra_field_one_label'] = $config_change_label['extra_field_one'];
282
+ }else{
283
+ $emailTemplateVariables['extra_field_one_label'] = "Extra Field 2";
284
+ }
285
+ }
286
+
287
+ if(!empty($data['extra_field_two'])){
288
+ if($config_change_label['extra_field_two']){
289
+ $emailTemplateVariables['extra_field_two_label'] = $config_change_label['extra_field_two'];
290
+ }else{
291
+ $emailTemplateVariables['extra_field_two_label'] = "Extra Field 2";
292
+ }
293
+ }
294
+
295
+ if(!empty($data['extra_field_three'])){
296
+ if($config_change_label['extra_field_three']){
297
+ $emailTemplateVariables['extra_field_three_label'] = $config_change_label['extra_field_three'];
298
+ }else{
299
+ $emailTemplateVariables['extra_field_three_label'] = "Extra Field 3";
300
+ }
301
+ }
302
+
303
+ //load the custom template to the email
304
+ $templateId = Mage::getStoreConfig(self::OWNER_EMAIL_TEMPLATE_XML_PATH);
305
+
306
+ $sender = Array('name' => $adminName,
307
+ 'email' => $adminEmail);
308
+
309
+ $translate = Mage::getSingleton('core/translate');
310
+ Mage::getModel('core/email_template')
311
+ ->setTemplateSubject($adminSubject)
312
+ ->sendTransactional($templateId, $sender, $adminEmail, $adminName, $emailTemplateVariables);
313
+ $translate->setTranslateInline(true);
314
+ }
315
+
316
+ public function sendCustomerMail($data){
317
+ $subject_title = Mage::getStoreConfig('inquiry/customer_email/heading');
318
+ $customerEmailId = $data['email'];
319
+ $lastname = " ";
320
+ if(!empty($data['lastname'])){
321
+ $lastname = $data['lastname'];
322
+ }
323
+ $customerName = $data['firstname']." ".$lastname;
324
+ $store_name = Mage::getStoreConfig('general/store_information/name');
325
+ $adminName = Mage::getStoreConfig('trans_email/ident_general/name'); //sender name
326
+ $adminEmail = Mage::getStoreConfig('trans_email/ident_general/email');
327
+
328
+ //load the custom template to the email
329
+ $templateId = Mage::getStoreConfig(self::CUSTOMER_EMAIL_TEMPLATE_XML_PATH);
330
+
331
+ $sender = Array('name' => $adminName,
332
+ 'email' => $adminEmail);
333
+
334
+ $vars = Array();
335
+ $vars = Array('name'=>$customerName,'subject'=>$subject_title);
336
+ $translate = Mage::getSingleton('core/translate');
337
+ Mage::getModel('core/email_template')
338
+ ->setTemplateSubject($subject_title)
339
+ ->sendTransactional($templateId, $sender, $customerEmailId, $customerName, $vars);
340
+ $translate->setTranslateInline(true);
341
+ }
342
+
343
  public function successAction(){
344
  $this->loadLayout(array('default'));
345
  $this->renderLayout();
app/code/community/CapacityWebSolutions/Inquiry/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <CapacityWebSolutions_Inquiry>
5
- <version>2.0.0</version>
6
  </CapacityWebSolutions_Inquiry>
7
  </modules>
8
  <global>
@@ -22,6 +22,9 @@
22
  <inquiry>
23
  <table>dealerinquiry</table>
24
  </inquiry>
 
 
 
25
  </entities>
26
  </inquiry_mysql4>
27
  </models>
@@ -45,6 +48,25 @@
45
  </connection>
46
  </inquiry_read>
47
  </resources>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  <helpers>
49
  <inquiry>
50
  <class>CapacityWebSolutions_Inquiry_Helper</class>
@@ -60,6 +82,16 @@
60
  </connection>
61
  </inquiry_setup>
62
  </resources>
 
 
 
 
 
 
 
 
 
 
63
  </global>
64
  <admin>
65
  <routers>
@@ -108,21 +140,21 @@
108
  <sort_order>70</sort_order>
109
  <children>
110
  <inquiry module="inquiry">
111
- <title>Dealer Inquiries</title>
112
- <sort_order>71</sort_order>
113
- <children>
114
- <items module="inquiry">
115
- <title>Dealer Management</title>
116
- <sort_order>0</sort_order>
117
- <action>inquiry/adminhtml_inquiry/index</action>
118
- </items>
119
- <dealer_settings module="inquiry">
120
- <title>Settings</title>
121
- <sort_order>10</sort_order>
122
- <action>adminhtml/system_config/edit/section/inquiry</action>
123
- </dealer_settings>
124
- </children>
125
- </inquiry>
126
  </children>
127
  </cws>
128
  </menu>
@@ -157,40 +189,29 @@
157
  <inquiry>
158
  <general>
159
  <enabled>1</enabled>
 
160
  <heading>Dealer Inquiry</heading>
161
  <toplink>Dealer Inquiry</toplink>
 
162
  <description>Write description here and it will display after Title.</description>
163
  <success_tital>Thank You.</success_tital>
164
  <success_des>Thank you for contacting us.</success_des>
 
165
  <indicates>Indicates Required.</indicates>
 
166
  </general>
 
 
 
 
167
  <customer_email>
168
  <heading>Thank you for contacting Us.</heading>
169
- <description><![CDATA[<h2>Hello {{Name}}, </h2>
170
- <br><br>
171
- Thank you for contacting Owner. A company representative will contact you with more information within two business days.
172
- <br><br>
173
- Thank You,{{Storename}}]]>
174
-
175
- </description>
176
  </customer_email>
177
- <register_email>
178
  <heading>Registration Details of Dealer Inquiry</heading>
179
- <description><![CDATA[<h2>Hello {{Name}}, </h2>
180
- <br>
181
- Thank You for Register with Owner.Your Login Details for access your Account.....
182
- <br><br>
183
- Login Email : {{username}}
184
- <br>
185
- Login Password : {{password}}
186
- <br><br>
187
- You can login directly in your account from here with given login details.....
188
- <br><br>
189
- {{url}}
190
- <br><br>
191
- Thank You,{{storename}}]]>
192
- </description>
193
- </register_email>
194
  <change_label>
195
  <f_name>First Name</f_name>
196
  <l_name>Last Name</l_name>
@@ -204,7 +225,12 @@ Thank You,{{storename}}]]>
204
  <contact_number>Contact Number</contact_number>
205
  <email>Email</email>
206
  <website>Website</website>
 
 
207
  <description>Business Description</description>
 
 
 
208
  </change_label>
209
  <label_hide>
210
  <l_name>1</l_name>
@@ -216,6 +242,12 @@ Thank You,{{storename}}]]>
216
  <postal_code>1</postal_code>
217
  <website>1</website>
218
  <captcha>1</captcha>
 
 
 
 
 
 
219
  </label_hide>
220
  </inquiry>
221
  </default>
2
  <config>
3
  <modules>
4
  <CapacityWebSolutions_Inquiry>
5
+ <version>2.1.0</version>
6
  </CapacityWebSolutions_Inquiry>
7
  </modules>
8
  <global>
22
  <inquiry>
23
  <table>dealerinquiry</table>
24
  </inquiry>
25
+ <inquiryfiles>
26
+ <table>dealerinquiry_files</table>
27
+ </inquiryfiles>
28
  </entities>
29
  </inquiry_mysql4>
30
  </models>
48
  </connection>
49
  </inquiry_read>
50
  </resources>
51
+ <template>
52
+ <email>
53
+ <inquiry_admin_email_email_template translate="label" module="inquiry">
54
+ <label>Dealer Inquiry-Admin Email</label>
55
+ <file>inquiry/admin_inquiry.html</file>
56
+ <type>html</type>
57
+ </inquiry_admin_email_email_template>
58
+ <inquiry_customer_email_email_template translate="label" module="inquiry">
59
+ <label>Dealer Inquiry-Customer Submit Form Email</label>
60
+ <file>inquiry/customer_inquiry.html</file>
61
+ <type>html</type>
62
+ </inquiry_customer_email_email_template>
63
+ <inquiry_create_account_email_template translate="label" module="inquiry">
64
+ <label>Dealer Inquiry-Create Customer Email</label>
65
+ <file>inquiry/create_customer.html</file>
66
+ <type>html</type>
67
+ </inquiry_create_account_email_template>
68
+ </email>
69
+ </template>
70
  <helpers>
71
  <inquiry>
72
  <class>CapacityWebSolutions_Inquiry_Helper</class>
82
  </connection>
83
  </inquiry_setup>
84
  </resources>
85
+ <events>
86
+ <core_block_abstract_prepare_layout_before>
87
+ <observers>
88
+ <capacityWebSolutions_inquiry_prepare_layout_before>
89
+ <class>inquiry/observer</class>
90
+ <method>prepareLayoutBefore</method>
91
+ </capacityWebSolutions_inquiry_prepare_layout_before>
92
+ </observers>
93
+ </core_block_abstract_prepare_layout_before>
94
+ </events>
95
  </global>
96
  <admin>
97
  <routers>
140
  <sort_order>70</sort_order>
141
  <children>
142
  <inquiry module="inquiry">
143
+ <title>Dealer Inquiries</title>
144
+ <sort_order>71</sort_order>
145
+ <children>
146
+ <items module="inquiry">
147
+ <title>Dealer Management</title>
148
+ <sort_order>0</sort_order>
149
+ <action>inquiry/adminhtml_inquiry/index</action>
150
+ </items>
151
+ <dealer_settings module="inquiry">
152
+ <title>Settings</title>
153
+ <sort_order>10</sort_order>
154
+ <action>adminhtml/system_config/edit/section/inquiry</action>
155
+ </dealer_settings>
156
+ </children>
157
+ </inquiry>
158
  </children>
159
  </cws>
160
  </menu>
189
  <inquiry>
190
  <general>
191
  <enabled>1</enabled>
192
+ <enable_toplink>1</enable_toplink>
193
  <heading>Dealer Inquiry</heading>
194
  <toplink>Dealer Inquiry</toplink>
195
+ <enable_js>1</enable_js>
196
  <description>Write description here and it will display after Title.</description>
197
  <success_tital>Thank You.</success_tital>
198
  <success_des>Thank you for contacting us.</success_des>
199
+ <btn_text>Submit</btn_text>
200
  <indicates>Indicates Required.</indicates>
201
+ <customer>1</customer>
202
  </general>
203
+ <admin_email>
204
+ <heading>New Dealer Inquiry from dealer</heading>
205
+ <email_template>inquiry_admin_email_email_template</email_template>
206
+ </admin_email>
207
  <customer_email>
208
  <heading>Thank you for contacting Us.</heading>
209
+ <email_template>inquiry_customer_email_email_template</email_template>
 
 
 
 
 
 
210
  </customer_email>
211
+ <create_account>
212
  <heading>Registration Details of Dealer Inquiry</heading>
213
+ <email_template>inquiry_create_account_email_template</email_template>
214
+ </create_account>
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  <change_label>
216
  <f_name>First Name</f_name>
217
  <l_name>Last Name</l_name>
225
  <contact_number>Contact Number</contact_number>
226
  <email>Email</email>
227
  <website>Website</website>
228
+ <datetime>Date Time</datetime>
229
+ <upload_file>Upload File</upload_file>
230
  <description>Business Description</description>
231
+ <extra_field_one>Extra Field 1</extra_field_one>
232
+ <extra_field_two>Extra Field 2</extra_field_two>
233
+ <extra_field_three>Extra Field 3</extra_field_three>
234
  </change_label>
235
  <label_hide>
236
  <l_name>1</l_name>
242
  <postal_code>1</postal_code>
243
  <website>1</website>
244
  <captcha>1</captcha>
245
+ <upload_file>0</upload_file>
246
+ <file_type>jpg,jpeg,png,doc,docx,pdf,txt</file_type>
247
+ <datetime>0</datetime>
248
+ <field_one>0</field_one>
249
+ <field_two>0</field_two>
250
+ <field_three>0</field_three>
251
  </label_hide>
252
  </inquiry>
253
  </default>
app/code/community/CapacityWebSolutions/Inquiry/etc/system.xml CHANGED
@@ -25,26 +25,39 @@
25
  <fields>
26
  <enabled translate="label">
27
  <label>Enabled</label>
28
- <comment>Select Yes for display the Dealer inquiry on frontend.</comment>
29
  <source_model>adminhtml/system_config_source_yesno</source_model>
30
  <frontend_type>select</frontend_type>
31
- <sort_order>1</sort_order>
32
  <show_in_default>1</show_in_default>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  </enabled>
 
 
 
 
 
 
 
 
 
 
36
  <toplink translate="label">
37
- <label>Top Link</label>
38
- <comment>Here, We can Set Dealer inquiry Top Link Label. </comment>
39
  <frontend_type>text</frontend_type>
40
  <sort_order>2</sort_order>
41
  <show_in_default>1</show_in_default>
42
  <show_in_website>1</show_in_website>
43
  <show_in_store>1</show_in_store>
 
 
 
44
  </toplink>
45
  <heading translate="label">
46
  <label>Heading</label>
47
- <comment>Here, We can Set Dealer inquiry Form title. </comment>
48
  <frontend_type>text</frontend_type>
49
  <sort_order>3</sort_order>
50
  <show_in_default>1</show_in_default>
@@ -53,7 +66,7 @@
53
  </heading>
54
  <enable_js translate="label">
55
  <label>Include Jquery</label>
56
- <comment>Select Yes for include the jquery library. </comment>
57
  <source_model>adminhtml/system_config_source_yesno</source_model>
58
  <frontend_type>select</frontend_type>
59
  <sort_order>4</sort_order>
@@ -63,7 +76,7 @@
63
  </enable_js>
64
  <description translate="label">
65
  <label>Description</label>
66
- <comment>This text will appear under the Dealer inquiry Form title. </comment>
67
  <frontend_type>textarea</frontend_type>
68
  <sort_order>20</sort_order>
69
  <show_in_default>1</show_in_default>
@@ -72,7 +85,7 @@
72
  </description>
73
  <btn_text translate="label">
74
  <label>Submit button text</label>
75
- <comment>Set text for the submit button of the form. If empty the default value "Submit" will be used</comment>
76
  <frontend_type>text</frontend_type>
77
  <sort_order>30</sort_order>
78
  <show_in_default>1</show_in_default>
@@ -81,7 +94,7 @@
81
  </btn_text>
82
  <success_tital translate="label">
83
  <label>Success Page Heading</label>
84
- <comment>Here, We can Set Dealer inquiry Success Page title.</comment>
85
  <frontend_type>text</frontend_type>
86
  <sort_order>30</sort_order>
87
  <show_in_default>1</show_in_default>
@@ -90,7 +103,7 @@
90
  </success_tital>
91
  <success_des translate="label">
92
  <label>Success Page Description</label>
93
- <comment>This text will be displayed after the Dealer inquiry form submission.</comment>
94
  <frontend_type>textarea</frontend_type>
95
  <sort_order>40</sort_order>
96
  <show_in_default>1</show_in_default>
@@ -99,20 +112,60 @@
99
  </success_des>
100
  <indicates translate="label">
101
  <label>Indicates Required Label</label>
102
- <comment>Here, We can Change Dealer inquiry Indicates Required Label. </comment>
103
  <frontend_type>text</frontend_type>
104
  <sort_order>50</sort_order>
105
  <show_in_default>1</show_in_default>
106
  <show_in_website>1</show_in_website>
107
  <show_in_store>1</show_in_store>
108
  </indicates>
 
 
 
 
 
 
 
 
 
 
109
  </fields>
110
  </general>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  </groups>
112
  <groups>
113
  <customer_email translate="label">
114
- <label>Dealer inquiry Email Template</label>
115
- <comment>After submit dealer inquiry form customer get email notification so you can set Email Subject and Email content here. </comment>
116
  <frontend_type>text</frontend_type>
117
  <sort_order>85</sort_order>
118
  <show_in_default>1</show_in_default>
@@ -127,22 +180,22 @@
127
  <show_in_website>1</show_in_website>
128
  <show_in_store>1</show_in_store>
129
  </heading>
130
- <description translate="label">
131
- <label>Email content</label>
132
- <frontend_type>textarea</frontend_type>
133
- <sort_order>20</sort_order>
 
134
  <show_in_default>1</show_in_default>
135
  <show_in_website>1</show_in_website>
136
  <show_in_store>1</show_in_store>
137
- <comment><![CDATA[Please do not change {{Name}} & {{Storename}}]]> </comment>
138
- </description>
139
  </fields>
140
  </customer_email>
141
  </groups>
142
  <groups>
143
- <register_email translate="label">
144
  <label>Create Customer Email Template</label>
145
- <comment>When admin click on create customer button. Customer get email notification of his username and password. So for that email you can set email Subject and email content here.</comment>
146
  <frontend_type>text</frontend_type>
147
  <sort_order>90</sort_order>
148
  <show_in_default>1</show_in_default>
@@ -157,17 +210,17 @@
157
  <show_in_website>1</show_in_website>
158
  <show_in_store>1</show_in_store>
159
  </heading>
160
- <description translate="label">
161
- <label>Email content</label>
162
- <frontend_type>textarea</frontend_type>
163
- <sort_order>20</sort_order>
 
164
  <show_in_default>1</show_in_default>
165
  <show_in_website>1</show_in_website>
166
  <show_in_store>1</show_in_store>
167
- <comment><![CDATA[Please do not change {{Name}},{{username}},{{password}} & {{storename}}]]> </comment>
168
- </description>
169
  </fields>
170
- </register_email>
171
  </groups>
172
  <groups>
173
  <change_label translate="label">
@@ -282,6 +335,46 @@
282
  <show_in_website>1</show_in_website>
283
  <show_in_store>1</show_in_store>
284
  </description>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  </fields>
286
  </change_label>
287
  </groups>
@@ -375,6 +468,64 @@
375
  <show_in_website>1</show_in_website>
376
  <show_in_store>1</show_in_store>
377
  </captcha>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  </fields>
379
  </label_hide>
380
  </groups>
25
  <fields>
26
  <enabled translate="label">
27
  <label>Enabled</label>
28
+ <comment><![CDATA[Select Yes for display the Dealer inquiry on frontend.]]></comment>
29
  <source_model>adminhtml/system_config_source_yesno</source_model>
30
  <frontend_type>select</frontend_type>
31
+ <sort_order>0</sort_order>
32
  <show_in_default>1</show_in_default>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  </enabled>
36
+ <enable_toplink>
37
+ <label>Enabled Top Link</label>
38
+ <comment><![CDATA[Select Yes for display the Dealer inquiry top link on frontend.]]></comment>
39
+ <source_model>adminhtml/system_config_source_yesno</source_model>
40
+ <frontend_type>select</frontend_type>
41
+ <sort_order>1</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ </enable_toplink>
46
  <toplink translate="label">
47
+ <label>Top Link Label</label>
48
+ <comment><![CDATA[Here, We can Set Dealer inquiry Top Link Label.]]></comment>
49
  <frontend_type>text</frontend_type>
50
  <sort_order>2</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>1</show_in_store>
54
+ <depends>
55
+ <enable_toplink>1</enable_toplink>
56
+ </depends>
57
  </toplink>
58
  <heading translate="label">
59
  <label>Heading</label>
60
+ <comment><![CDATA[Here, We can Set Dealer inquiry Form title.]]></comment>
61
  <frontend_type>text</frontend_type>
62
  <sort_order>3</sort_order>
63
  <show_in_default>1</show_in_default>
66
  </heading>
67
  <enable_js translate="label">
68
  <label>Include Jquery</label>
69
+ <comment><![CDATA[Select Yes for include the jquery library.]]></comment>
70
  <source_model>adminhtml/system_config_source_yesno</source_model>
71
  <frontend_type>select</frontend_type>
72
  <sort_order>4</sort_order>
76
  </enable_js>
77
  <description translate="label">
78
  <label>Description</label>
79
+ <comment><![CDATA[This text will appear under the Dealer inquiry Form title.]]></comment>
80
  <frontend_type>textarea</frontend_type>
81
  <sort_order>20</sort_order>
82
  <show_in_default>1</show_in_default>
85
  </description>
86
  <btn_text translate="label">
87
  <label>Submit button text</label>
88
+ <comment><![CDATA[Set text for the submit button of the form. If empty the default value "Submit" will be used]]></comment>
89
  <frontend_type>text</frontend_type>
90
  <sort_order>30</sort_order>
91
  <show_in_default>1</show_in_default>
94
  </btn_text>
95
  <success_tital translate="label">
96
  <label>Success Page Heading</label>
97
+ <comment><![CDATA[Here, We can Set Dealer inquiry Success Page title.]]></comment>
98
  <frontend_type>text</frontend_type>
99
  <sort_order>30</sort_order>
100
  <show_in_default>1</show_in_default>
103
  </success_tital>
104
  <success_des translate="label">
105
  <label>Success Page Description</label>
106
+ <comment><![CDATA[This text will be displayed after the Dealer inquiry form submission.]]></comment>
107
  <frontend_type>textarea</frontend_type>
108
  <sort_order>40</sort_order>
109
  <show_in_default>1</show_in_default>
112
  </success_des>
113
  <indicates translate="label">
114
  <label>Indicates Required Label</label>
115
+ <comment><![CDATA[Here, We can Change Dealer inquiry Indicates Required Label.]]> </comment>
116
  <frontend_type>text</frontend_type>
117
  <sort_order>50</sort_order>
118
  <show_in_default>1</show_in_default>
119
  <show_in_website>1</show_in_website>
120
  <show_in_store>1</show_in_store>
121
  </indicates>
122
+ <customer>
123
+ <label>Select Customer group for create customer</label>
124
+ <comment><![CDATA[Choose customer type from here for create different type of customer from Dealer Manager.]]></comment>
125
+ <source_model>inquiry/system_config_source_customergroup</source_model>
126
+ <frontend_type>select</frontend_type>
127
+ <sort_order>60</sort_order>
128
+ <show_in_default>1</show_in_default>
129
+ <show_in_website>1</show_in_website>
130
+ <show_in_store>1</show_in_store>
131
+ </customer>
132
  </fields>
133
  </general>
134
+ </groups>
135
+ <groups>
136
+ <admin_email translate="label">
137
+ <label>Dealer Inquiry Owner Email Template</label>
138
+ <comment>After submit dealer inquiry form Owner get email notification so you can set Email Subject and Email template here. </comment>
139
+ <frontend_type>text</frontend_type>
140
+ <sort_order>82</sort_order>
141
+ <show_in_default>1</show_in_default>
142
+ <show_in_website>1</show_in_website>
143
+ <show_in_store>1</show_in_store>
144
+ <fields>
145
+ <heading translate="label">
146
+ <label>Subject</label>
147
+ <frontend_type>text</frontend_type>
148
+ <sort_order>10</sort_order>
149
+ <show_in_default>1</show_in_default>
150
+ <show_in_website>1</show_in_website>
151
+ <show_in_store>1</show_in_store>
152
+ </heading>
153
+ <email_template translate="label">
154
+ <label>Email Template</label>
155
+ <frontend_type>select</frontend_type>
156
+ <source_model>adminhtml/system_config_source_email_template</source_model>
157
+ <sort_order>15</sort_order>
158
+ <show_in_default>1</show_in_default>
159
+ <show_in_website>1</show_in_website>
160
+ <show_in_store>1</show_in_store>
161
+ </email_template>
162
+ </fields>
163
+ </admin_email>
164
  </groups>
165
  <groups>
166
  <customer_email translate="label">
167
+ <label>Dealer Inquiry Customer Email Template</label>
168
+ <comment>After submit dealer inquiry form customer get email notification so you can set Email Subject and Email template here. </comment>
169
  <frontend_type>text</frontend_type>
170
  <sort_order>85</sort_order>
171
  <show_in_default>1</show_in_default>
180
  <show_in_website>1</show_in_website>
181
  <show_in_store>1</show_in_store>
182
  </heading>
183
+ <email_template translate="label">
184
+ <label>Email Template</label>
185
+ <frontend_type>select</frontend_type>
186
+ <source_model>adminhtml/system_config_source_email_template</source_model>
187
+ <sort_order>15</sort_order>
188
  <show_in_default>1</show_in_default>
189
  <show_in_website>1</show_in_website>
190
  <show_in_store>1</show_in_store>
191
+ </email_template>
 
192
  </fields>
193
  </customer_email>
194
  </groups>
195
  <groups>
196
+ <create_account translate="label">
197
  <label>Create Customer Email Template</label>
198
+ <comment>When admin click on create customer button. Customer get email notification of his username and password. So for that email you can set email Subject and email template here.</comment>
199
  <frontend_type>text</frontend_type>
200
  <sort_order>90</sort_order>
201
  <show_in_default>1</show_in_default>
210
  <show_in_website>1</show_in_website>
211
  <show_in_store>1</show_in_store>
212
  </heading>
213
+ <email_template translate="label">
214
+ <label>Email Template</label>
215
+ <frontend_type>select</frontend_type>
216
+ <source_model>adminhtml/system_config_source_email_template</source_model>
217
+ <sort_order>15</sort_order>
218
  <show_in_default>1</show_in_default>
219
  <show_in_website>1</show_in_website>
220
  <show_in_store>1</show_in_store>
221
+ </email_template>
 
222
  </fields>
223
+ </create_account>
224
  </groups>
225
  <groups>
226
  <change_label translate="label">
335
  <show_in_website>1</show_in_website>
336
  <show_in_store>1</show_in_store>
337
  </description>
338
+ <datetime translate="label">
339
+ <label>Date Time</label>
340
+ <frontend_type>text</frontend_type>
341
+ <sort_order>13</sort_order>
342
+ <show_in_default>1</show_in_default>
343
+ <show_in_website>1</show_in_website>
344
+ <show_in_store>1</show_in_store>
345
+ </datetime>
346
+ <upload_file>
347
+ <label>Upload File</label>
348
+ <frontend_type>text</frontend_type>
349
+ <sort_order>14</sort_order>
350
+ <show_in_default>1</show_in_default>
351
+ <show_in_website>1</show_in_website>
352
+ <show_in_store>1</show_in_store>
353
+ </upload_file>
354
+ <extra_field_one translate="label">
355
+ <label>Extra Field 1</label>
356
+ <frontend_type>text</frontend_type>
357
+ <sort_order>20</sort_order>
358
+ <show_in_default>1</show_in_default>
359
+ <show_in_website>1</show_in_website>
360
+ <show_in_store>1</show_in_store>
361
+ </extra_field_one>
362
+ <extra_field_two translate="label">
363
+ <label>Extra Field 2</label>
364
+ <frontend_type>text</frontend_type>
365
+ <sort_order>25</sort_order>
366
+ <show_in_default>1</show_in_default>
367
+ <show_in_website>1</show_in_website>
368
+ <show_in_store>1</show_in_store>
369
+ </extra_field_two>
370
+ <extra_field_three translate="label">
371
+ <label>Extra Field 3</label>
372
+ <frontend_type>text</frontend_type>
373
+ <sort_order>30</sort_order>
374
+ <show_in_default>1</show_in_default>
375
+ <show_in_website>1</show_in_website>
376
+ <show_in_store>1</show_in_store>
377
+ </extra_field_three>
378
  </fields>
379
  </change_label>
380
  </groups>
468
  <show_in_website>1</show_in_website>
469
  <show_in_store>1</show_in_store>
470
  </captcha>
471
+ <datetime>
472
+ <label>Date Time</label>
473
+ <source_model>adminhtml/system_config_source_yesno</source_model>
474
+ <frontend_type>select</frontend_type>
475
+ <sort_order>20</sort_order>
476
+ <show_in_default>1</show_in_default>
477
+ <show_in_website>1</show_in_website>
478
+ <show_in_store>1</show_in_store>
479
+ </datetime>
480
+ <upload_file>
481
+ <label>Upload File</label>
482
+ <source_model>adminhtml/system_config_source_yesno</source_model>
483
+ <frontend_type>select</frontend_type>
484
+ <sort_order>21</sort_order>
485
+ <show_in_default>1</show_in_default>
486
+ <show_in_website>1</show_in_website>
487
+ <show_in_store>1</show_in_store>
488
+ <comment><![CDATA[The default file upload size is restricted by server, in general it is maximum 2MB, so if you need to allow more than 2MB to be uploaded then please contact your server support team to increase file upload size limit.]]></comment>
489
+ </upload_file>
490
+ <file_type translate="label">
491
+ <label>Allowed File Types</label>
492
+ <frontend_type>text</frontend_type>
493
+ <sort_order>22</sort_order>
494
+ <show_in_default>1</show_in_default>
495
+ <show_in_website>1</show_in_website>
496
+ <show_in_store>1</show_in_store>
497
+ <comment><![CDATA[Add comma separated file extensions<br>(for e.g. jpeg,jpg,png)]]></comment>
498
+ <depends>
499
+ <upload_file>1</upload_file>
500
+ </depends>
501
+ </file_type>
502
+ <field_one translate="label">
503
+ <label>Extra Filed 1</label>
504
+ <source_model>adminhtml/system_config_source_yesno</source_model>
505
+ <frontend_type>select</frontend_type>
506
+ <sort_order>25</sort_order>
507
+ <show_in_default>1</show_in_default>
508
+ <show_in_website>1</show_in_website>
509
+ <show_in_store>1</show_in_store>
510
+ </field_one>
511
+ <field_two translate="label">
512
+ <label>Extra Filed 2</label>
513
+ <source_model>adminhtml/system_config_source_yesno</source_model>
514
+ <frontend_type>select</frontend_type>
515
+ <sort_order>30</sort_order>
516
+ <show_in_default>1</show_in_default>
517
+ <show_in_website>1</show_in_website>
518
+ <show_in_store>1</show_in_store>
519
+ </field_two>
520
+ <field_three translate="label">
521
+ <label>Extra Filed 3</label>
522
+ <source_model>adminhtml/system_config_source_yesno</source_model>
523
+ <frontend_type>select</frontend_type>
524
+ <sort_order>35</sort_order>
525
+ <show_in_default>1</show_in_default>
526
+ <show_in_website>1</show_in_website>
527
+ <show_in_store>1</show_in_store>
528
+ </field_three>
529
  </fields>
530
  </label_hide>
531
  </groups>
app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,12 +1,4 @@
1
  <?php
2
- /***************************************************************************
3
- @extension : Dealer Inquiry Extension.
4
- @copyright : Copyright (c) 2015 Capacity Web Solutions.
5
- ( http://www.capacitywebsolutions.com )
6
- @author : Capacity Web Solutions Pvt. Ltd.
7
- @support : magento@capacitywebsolutions.com
8
- ***************************************************************************/
9
-
10
  $installer = $this;
11
 
12
  $installer->startSetup();
1
  <?php
 
 
 
 
 
 
 
 
2
  $installer = $this;
3
 
4
  $installer->startSetup();
app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-upgrade-1.2.1-2.0.0.php CHANGED
@@ -1,20 +1,12 @@
1
  <?php
2
- /***************************************************************************
3
- @extension : Dealer Inquiry Extension.
4
- @copyright : Copyright (c) 2015 Capacity Web Solutions.
5
- ( http://www.capacitywebsolutions.com )
6
- @author : Capacity Web Solutions Pvt. Ltd.
7
- @support : magento@capacitywebsolutions.com
8
- ***************************************************************************/
9
 
10
  $installer = $this;
11
  $installer->startSetup();
12
 
13
- $dealer_table = 'dealerinquiry';
14
-
15
  $installer->run("
 
16
  ALTER TABLE `{$this->getTable('dealerinquiry')}` ADD `websiteid` varchar(100) NOT NULL;
17
 
18
- ");
19
 
20
  $installer->endSetup();
1
  <?php
 
 
 
 
 
 
 
2
 
3
  $installer = $this;
4
  $installer->startSetup();
5
 
 
 
6
  $installer->run("
7
+
8
  ALTER TABLE `{$this->getTable('dealerinquiry')}` ADD `websiteid` varchar(100) NOT NULL;
9
 
10
+ ");
11
 
12
  $installer->endSetup();
app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-upgrade-2.0.0-2.1.0.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $installer->run("
6
+ ALTER TABLE `{$this->getTable('dealerinquiry')}` ENGINE=InnoDB;
7
+ ALTER TABLE `{$this->getTable('dealerinquiry')}` CHANGE `zip` `zip` varchar(255) NOT NULL;
8
+ ALTER TABLE `{$this->getTable('dealerinquiry')}` ADD `date_time` datetime;
9
+ ALTER TABLE `{$this->getTable('dealerinquiry')}` ADD `extra_field_one` varchar(255) NOT NULL;
10
+ ALTER TABLE `{$this->getTable('dealerinquiry')}` ADD `extra_field_two` varchar(255) NOT NULL;
11
+ ALTER TABLE `{$this->getTable('dealerinquiry')}` ADD `extra_field_three` varchar(255) NOT NULL;
12
+
13
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('dealerinquiry_files')}` (
14
+ `dealer_file_id` int(11) NOT NULL AUTO_INCREMENT,
15
+ `dealerid` int(11) NOT NULL,
16
+ `filename` varchar(255) NOT NULL,
17
+ PRIMARY KEY (`dealer_file_id`),
18
+ KEY `IDX_DEALERINQUIRY_FILES_DEALER_ID` (`dealerid`)
19
+ ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=0;
20
+
21
+ ALTER TABLE {$this->getTable('dealerinquiry_files')}
22
+ ADD CONSTRAINT `FK_DEALERINQUIRY_FILES_DEALER_ID` FOREIGN KEY (`dealerid`) REFERENCES {$this->getTable('dealerinquiry')} (`dealerid`) ON DELETE CASCADE ON UPDATE CASCADE;
23
+ ");
24
+
25
+ $installer->endSetup();
app/design/frontend/base/default/layout/inquiry.xml CHANGED
@@ -10,13 +10,16 @@
10
  </default>
11
  <inquiry_index_index>
12
  <reference name="head">
13
- <block type="inquiry/managejquery" name="managejquery" >
14
- <action method="addJquery" ifconfig="inquiry/general/enabled"/>
 
 
 
 
15
  </block>
16
- <action method="addCss"><stylesheet>css/inquiry.css</stylesheet></action>
17
  </reference>
18
  <reference name="root">
19
- <action method="setTemplate" ><template>page/1column.phtml</template></action>
20
  </reference>
21
  <reference name="content">
22
  <block type="inquiry/inquiry" name="inquiry">
@@ -26,10 +29,10 @@
26
  </inquiry_index_index>
27
  <inquiry_index_success>
28
  <reference name="head">
29
- <action method="addCss"><stylesheet>css/inquiry.css</stylesheet></action>
30
- </reference>
31
  <reference name="root">
32
- <action method="setTemplate"><template>page/1column.phtml</template></action>
33
  </reference>
34
  <reference name="content">
35
  <block type="inquiry/inquiry" name="inquiryThanks">
10
  </default>
11
  <inquiry_index_index>
12
  <reference name="head">
13
+ <action method="addCss" ifconfig="inquiry/general/enabled"><stylesheet>css/inquiry.css</stylesheet></action>
14
+ <action method="addItem" ifconfig="inquiry/general/enabled"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params></params></action>
15
+ <action method="addItem" ifconfig="inquiry/general/enabled"><type>js</type><name>calendar/calendar.js</name></action>
16
+ <action method="addItem" ifconfig="inquiry/general/enabled"><type>js</type><name>calendar/calendar-setup.js</name></action>
17
+ <block type="core/html_calendar" name="head.calendar" as="calendar">
18
+ <action method="setTemplate" ifconfig="inquiry/general/enabled"><template>page/js/calendar.phtml</template></action>
19
  </block>
 
20
  </reference>
21
  <reference name="root">
22
+ <action method="setTemplate" ifconfig="inquiry/general/enabled"><template>page/1column.phtml</template></action>
23
  </reference>
24
  <reference name="content">
25
  <block type="inquiry/inquiry" name="inquiry">
29
  </inquiry_index_index>
30
  <inquiry_index_success>
31
  <reference name="head">
32
+ <action method="addCss" ifconfig="inquiry/general/enabled"><stylesheet>css/inquiry.css</stylesheet></action>
33
+ </reference>
34
  <reference name="root">
35
+ <action method="setTemplate" ifconfig="inquiry/general/enabled"><template>page/1column.phtml</template></action>
36
  </reference>
37
  <reference name="content">
38
  <block type="inquiry/inquiry" name="inquiryThanks">
app/design/frontend/base/default/template/inquiry/inquiry.phtml CHANGED
@@ -9,43 +9,21 @@
9
 
10
  $code = trim($this->getRandomCode());
11
  $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat');
12
- $heading = trim(Mage::getStoreConfig('inquiry/general/heading'));
13
- $indicates = trim(Mage::getStoreConfig('inquiry/general/indicates'));
14
- $des_gen = trim(Mage::getStoreConfig('inquiry/general/description'));
15
- $btn_text = trim(Mage::getStoreConfig('inquiry/general/btn_text'));
16
- $first_name = trim(Mage::getStoreConfig('inquiry/change_label/f_name'));
17
- $last_name = trim(Mage::getStoreConfig('inquiry/change_label/l_name'));
18
- $company_name = trim(Mage::getStoreConfig('inquiry/change_label/company_name'));
19
- $vat_number = trim(Mage::getStoreConfig('inquiry/change_label/vat_number'));
20
- $address = trim(Mage::getStoreConfig('inquiry/change_label/address'));
21
- $city = trim(Mage::getStoreConfig('inquiry/change_label/city'));
22
- $state = trim(Mage::getStoreConfig('inquiry/change_label/state'));
23
- $country = trim(Mage::getStoreConfig('inquiry/change_label/country'));
24
- $postal_code = trim(Mage::getStoreConfig('inquiry/change_label/postal_code'));
25
- $contact_number = trim(Mage::getStoreConfig('inquiry/change_label/contact_number'));
26
- $email = trim(Mage::getStoreConfig('inquiry/change_label/email'));
27
- $website = trim(Mage::getStoreConfig('inquiry/change_label/website'));
28
- $description = trim(Mage::getStoreConfig('inquiry/change_label/description'));
29
- $last_name_hide = Mage::getStoreConfig('inquiry/label_hide/l_name');
30
- $vat_number_hide = Mage::getStoreConfig('inquiry/label_hide/vat_number');
31
- $address_hide = Mage::getStoreConfig('inquiry/label_hide/address');
32
- $city_hide = Mage::getStoreConfig('inquiry/label_hide/city');
33
- $state_hide = Mage::getStoreConfig('inquiry/label_hide/state');
34
- $country_hide = Mage::getStoreConfig('inquiry/label_hide/country');
35
- $postal_code_hide = Mage::getStoreConfig('inquiry/label_hide/postal_code');
36
- $website_hide = Mage::getStoreConfig('inquiry/label_hide/website');
37
- $captcha_hide = Mage::getStoreConfig('inquiry/label_hide/captcha');
38
 
39
  ?>
40
-
41
- <?php if($captcha_hide): ?>
42
-
 
 
 
 
43
  <script>
44
- //var jq = $.noConflict();
45
  jQuery(document).ready(function(){
46
  jQuery("#img_refresh").click(function(){
47
  jQuery("#captcha").load(location.href + " #captcha");
48
  });
 
49
  });
50
  </script>
51
  <script language="JavaScript" type="text/JavaScript">
@@ -71,25 +49,25 @@ jQuery("#img_refresh").click(function(){
71
  <?php endif; ?>
72
 
73
  <div id="about-copy" class="inquiryForm">
74
- <h1><img src="<?php echo $this->getSkinUrl('images/inquiry-icon.png') ?>" alt="" /><?php if($heading): ?><?php echo $this->__($heading); ?><?php endif; ?></h1>
75
- <p><?php if($des_gen): ?><?php echo $des_gen; ?><?php endif; ?></p>
76
- <?php if($indicates != "") { ?>
77
- <div class="indicates"><span class="required"><em>*</em></span><?php echo $this->__($indicates); ?></div>
78
  <?php } ?>
79
 
80
- <form name="dealerInquiry" id="dealerInquiry" action="<?php echo $this->getUrl("inquiry/index/thanks"); ?>" method="post">
81
  <div class="fieldset">
82
  <ul class="form-list">
83
  <li class="fields">
84
  <div class="field">
85
- <label><?php if($first_name): ?><?php echo $first_name; ?><?php else: ?><?php echo "First Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
86
  <div class="input-box">
87
  <input type="text" name="firstname" id="firstname" size="45" class="input-text required-entry input-box" />
88
  </div>
89
  </div>
90
- <?php if($last_name_hide): ?>
91
  <div class="field">
92
- <label><?php if($last_name): ?><?php echo $last_name; ?><?php else: ?><?php echo "Last Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
93
  <div class="input-box">
94
  <input type="text" name="lastname" size="45" class="input-text required-entry" />
95
  </div>
@@ -98,26 +76,24 @@ jQuery("#img_refresh").click(function(){
98
  </li>
99
  <li class="fields">
100
  <div class="field">
101
- <label><?php if($company_name): ?><?php echo $company_name; ?><?php else: ?><?php echo "Company Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
102
  <div class="input-box">
103
  <input type="text" name="company" size="45" class="input-text required-entry" />
104
  </div>
105
  </div>
106
 
107
- <?php if($vat_number_hide): ?>
108
  <div class="field">
109
- <label><?php if($vat_number): ?><?php echo $vat_number; ?><?php else: ?><?php echo "Tax/VAT Number:"; ?><?php endif; ?></label>
110
  <div class="input-box">
111
  <input type="text" name="taxvat" size="45" class="input-text" />
112
  </div>
113
  </div>
114
  <?php endif; ?>
115
 
116
-
117
-
118
- <?php if($address_hide): ?>
119
  <div class="field">
120
- <label><?php if($address): ?><?php echo $address; ?> <?php else: ?><?php echo "Address:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
121
  <div class="input-box">
122
  <textarea name="address" cols="42" rows="1" class="input-text required-entry"></textarea>
123
  </div>
@@ -125,17 +101,17 @@ jQuery("#img_refresh").click(function(){
125
  <?php endif; ?>
126
  </li>
127
  <li class="fields">
128
- <?php if($city_hide): ?>
129
  <div class="field">
130
- <label><?php if($city): ?><?php echo $city; ?><?php else: ?><?php echo "City:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
131
  <div class="input-box">
132
  <input type="text" name="city" size="45" class="input-text required-entry" />
133
  </div>
134
  </div>
135
  <?php endif; ?>
136
- <?php if($state_hide): ?>
137
  <div class="field">
138
- <label><?php if($state): ?><?php echo $state; ?><?php else: ?><?php echo "State / Province:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
139
  <div class="input-box">
140
  <input type="text" name="state" size="45" class="input-text required-entry" />
141
  </div>
@@ -143,9 +119,9 @@ jQuery("#img_refresh").click(function(){
143
  <?php endif; ?>
144
  </li>
145
  <li class="fields">
146
- <?php if($country_hide): ?>
147
  <div class="field">
148
- <label><?php if($country): ?><?php echo $country; ?><?php else: ?><?php echo "Country:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
149
  <div class="input-box">
150
  <select name="country" id="country" class="drop" class="input-text required-entry">
151
  <?php
@@ -154,20 +130,20 @@ jQuery("#img_refresh").click(function(){
154
  $collection = Mage::getModel('directory/country')->getCollection();
155
  foreach ($collection as $country)
156
  {
157
- $cid = $country->getId();
158
- $cname = $country->getName();
159
- ?>
160
- <option value="<?php echo $cid.'$$$'.$cname; ?>"<?php if($cid == $countryCode) echo "SELECTED" ?> ><?php echo $cname; ?></option>
161
- <?php
162
- }
163
  ?>
164
  </select>
165
  </div>
166
  </div>
167
  <?php endif; ?>
168
- <?php if($postal_code_hide): ?>
169
  <div class="field">
170
- <label><?php if($postal_code): ?><?php echo $postal_code; ?><?php else: ?><?php echo "ZIP / Postal Code:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
171
  <div class="input-box">
172
  <input type="text" name="zip" id="zip" size="45" maxlength="10" class="required-entry input-text required-entry input-text required-entry validation-passed" />
173
  </div>
@@ -176,7 +152,7 @@ jQuery("#img_refresh").click(function(){
176
  </li>
177
  <li class="fields">
178
  <div class="field">
179
- <label><?php if($contact_number): ?><?php echo $contact_number; ?><?php else: ?><?php echo "Contact Number:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
180
  <div class="input-box">
181
  <input type="text" name="phone" size="45" onKeyPress="return isNumberKey(event)" maxlength="15" class="input-text validate input-text required-entry"/>
182
  </div>
@@ -184,30 +160,87 @@ jQuery("#img_refresh").click(function(){
184
  </li>
185
  <li class="fields">
186
  <div class="field">
187
- <label><?php if($email): ?><?php echo $email; ?><?php else: ?><?php echo "Email:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
188
  <div class="input-box">
189
  <input type="text" name="email" size="45" class="input-text validate-email required-entry" />
190
  </div>
191
  </div>
192
  </li>
193
  <li class="fields">
194
- <?php if($website_hide): ?>
195
  <div class="field">
196
- <label><?php if($website): ?><?php echo $website; ?><?php else: ?><?php echo "Website:"; ?><?php endif; ?></label>
197
  <div class="input-box">
198
  <input type="text" name="website" size="45" class="input-text" />
199
  </div>
200
  </div>
201
  <?php endif; ?>
202
  <div class="field">
203
- <label><?php if($description): ?><?php echo $description; ?><?php else: ?><?php echo "Business Description:"; ?><?php endif; ?></label>
204
  <div class="input-box">
205
  <textarea name="desc" cols="75" rows="2" class="input-text"></textarea>
206
  </div>
207
  </div>
208
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  <li class="fields last">
210
- <?php if($captcha_hide): ?>
211
  <label>Capctha<span class="required"><em>*</em></span></label>
212
  <div class="captcha-main">
213
  <div id="captcha" class="captcha-left">
@@ -223,7 +256,7 @@ jQuery("#img_refresh").click(function(){
223
  </ul>
224
  <div class="clear"></div>
225
  <div class="button-set">
226
- <button type="submit" name="SUBMIT" class="button" value="SUBMIT" onclick="return captchacode() ;"><span><span><?php if($btn_text): ?><?php echo $btn_text; ?><?php else: ?><?php echo "Submit"; ?><?php endif; ?></span></span></button>
227
  </div>
228
  </div>
229
  </form>
9
 
10
  $code = trim($this->getRandomCode());
11
  $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  ?>
14
+ <script>
15
+ function clearFileInputField(tagId) {
16
+ document.getElementById(tagId).innerHTML =
17
+ document.getElementById(tagId).innerHTML;
18
+ }
19
+ </script>
20
+ <?php if($this->getCaptchaHide()): ?>
21
  <script>
 
22
  jQuery(document).ready(function(){
23
  jQuery("#img_refresh").click(function(){
24
  jQuery("#captcha").load(location.href + " #captcha");
25
  });
26
+
27
  });
28
  </script>
29
  <script language="JavaScript" type="text/JavaScript">
49
  <?php endif; ?>
50
 
51
  <div id="about-copy" class="inquiryForm">
52
+ <h1><img src="<?php echo $this->getSkinUrl('images/inquiry-icon.png') ?>" alt="" /><?php if($this->getHeading()): ?><?php echo $this->__($this->getHeading()); ?><?php endif; ?></h1>
53
+ <p><?php if($this->getDesc()): ?><?php echo $this->getDesc(); ?><?php endif; ?></p>
54
+ <?php if($this->getIndicates()) { ?>
55
+ <div class="indicates"><span class="required"><em>*</em></span><?php echo $this->__($this->getIndicates()); ?></div>
56
  <?php } ?>
57
 
58
+ <form name="dealerInquiry" id="dealerInquiry" action="<?php echo $this->getUrl("inquiry/index/thanks"); ?>" method="post" enctype="multipart/form-data">
59
  <div class="fieldset">
60
  <ul class="form-list">
61
  <li class="fields">
62
  <div class="field">
63
+ <label><?php if($this->getFirstName()): ?><?php echo $this->getFirstName(); ?><?php else: ?><?php echo "First Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
64
  <div class="input-box">
65
  <input type="text" name="firstname" id="firstname" size="45" class="input-text required-entry input-box" />
66
  </div>
67
  </div>
68
+ <?php if($this->getLastNameHide()): ?>
69
  <div class="field">
70
+ <label><?php if($this->getLastName()): ?><?php echo $this->getLastName(); ?><?php else: ?><?php echo "Last Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
71
  <div class="input-box">
72
  <input type="text" name="lastname" size="45" class="input-text required-entry" />
73
  </div>
76
  </li>
77
  <li class="fields">
78
  <div class="field">
79
+ <label><?php if($this->getCompanyName()): ?><?php echo $this->getCompanyName(); ?><?php else: ?><?php echo "Company Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
80
  <div class="input-box">
81
  <input type="text" name="company" size="45" class="input-text required-entry" />
82
  </div>
83
  </div>
84
 
85
+ <?php if($this->getVatNumberHide()): ?>
86
  <div class="field">
87
+ <label><?php if($this->getVatNumber()): ?><?php echo $this->getVatNumber(); ?><?php else: ?><?php echo "Tax/VAT Number:"; ?><?php endif; ?></label>
88
  <div class="input-box">
89
  <input type="text" name="taxvat" size="45" class="input-text" />
90
  </div>
91
  </div>
92
  <?php endif; ?>
93
 
94
+ <?php if($this->getAddressHide()): ?>
 
 
95
  <div class="field">
96
+ <label><?php if($this->getAddress()): ?><?php echo $this->getAddress(); ?> <?php else: ?><?php echo "Address:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
97
  <div class="input-box">
98
  <textarea name="address" cols="42" rows="1" class="input-text required-entry"></textarea>
99
  </div>
101
  <?php endif; ?>
102
  </li>
103
  <li class="fields">
104
+ <?php if($this->getCityHide()): ?>
105
  <div class="field">
106
+ <label><?php if($this->getCity()): ?><?php echo $this->getCity(); ?><?php else: ?><?php echo "City:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
107
  <div class="input-box">
108
  <input type="text" name="city" size="45" class="input-text required-entry" />
109
  </div>
110
  </div>
111
  <?php endif; ?>
112
+ <?php if($this->getStateHide()): ?>
113
  <div class="field">
114
+ <label><?php if($this->getState()): ?><?php echo $this->getState(); ?><?php else: ?><?php echo "State / Province:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
115
  <div class="input-box">
116
  <input type="text" name="state" size="45" class="input-text required-entry" />
117
  </div>
119
  <?php endif; ?>
120
  </li>
121
  <li class="fields">
122
+ <?php if($this->getCountryHide()): ?>
123
  <div class="field">
124
+ <label><?php if($this->getCountry()): ?><?php echo $this->getCountry(); ?><?php else: ?><?php echo "Country:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
125
  <div class="input-box">
126
  <select name="country" id="country" class="drop" class="input-text required-entry">
127
  <?php
130
  $collection = Mage::getModel('directory/country')->getCollection();
131
  foreach ($collection as $country)
132
  {
133
+ $cid = $country->getId();
134
+ $cname = $country->getName();
135
+ ?>
136
+ <option value="<?php echo $cid.'$$$'.$cname; ?>"<?php if($cid == $countryCode) echo "SELECTED" ?> ><?php echo $cname; ?></option>
137
+ <?php
138
+ }
139
  ?>
140
  </select>
141
  </div>
142
  </div>
143
  <?php endif; ?>
144
+ <?php if($this->getPostalCodeHide()): ?>
145
  <div class="field">
146
+ <label><?php if($this->getPostalCode()): ?><?php echo $this->getPostalCode(); ?><?php else: ?><?php echo "ZIP / Postal Code:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
147
  <div class="input-box">
148
  <input type="text" name="zip" id="zip" size="45" maxlength="10" class="required-entry input-text required-entry input-text required-entry validation-passed" />
149
  </div>
152
  </li>
153
  <li class="fields">
154
  <div class="field">
155
+ <label><?php if($this->getContactNumber()): ?><?php echo $this->getContactNumber(); ?><?php else: ?><?php echo "Contact Number:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
156
  <div class="input-box">
157
  <input type="text" name="phone" size="45" onKeyPress="return isNumberKey(event)" maxlength="15" class="input-text validate input-text required-entry"/>
158
  </div>
160
  </li>
161
  <li class="fields">
162
  <div class="field">
163
+ <label><?php if($this->getEmail()): ?><?php echo $this->getEmail(); ?><?php else: ?><?php echo "Email:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
164
  <div class="input-box">
165
  <input type="text" name="email" size="45" class="input-text validate-email required-entry" />
166
  </div>
167
  </div>
168
  </li>
169
  <li class="fields">
170
+ <?php if($this->getWebsiteHide()): ?>
171
  <div class="field">
172
+ <label><?php if($this->getWebsite()): ?><?php echo $this->getWebsite(); ?><?php else: ?><?php echo "Website:"; ?><?php endif; ?></label>
173
  <div class="input-box">
174
  <input type="text" name="website" size="45" class="input-text" />
175
  </div>
176
  </div>
177
  <?php endif; ?>
178
  <div class="field">
179
+ <label><?php if($this->getDescription()): ?><?php echo $this->getDescription(); ?><?php else: ?><?php echo "Business Description:"; ?><?php endif; ?></label>
180
  <div class="input-box">
181
  <textarea name="desc" cols="75" rows="2" class="input-text"></textarea>
182
  </div>
183
  </div>
184
  </li>
185
+ <li class="fields">
186
+ <?php if($this->getDateTimeHide()): ?>
187
+ <div class="field">
188
+ <label><?php if($this->getDateTime()): ?><?php echo $this->getDateTime(); ?><?php else: ?><?php echo "Date Time:"; ?><?php endif; ?></label>
189
+ <div class="input-box">
190
+ <input type="text" name="date_time" id="date_time" size="45" class="input-text validate-date" placeholder="dd/mm/yyyy HH:MM:SS"/> <img title="Select date" id="date-picker-cal" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'adminhtml/default/default/images/grid-cal.gif'; ?>">
191
+ </div>
192
+ </div>
193
+ <script type="text/javascript">// <![CDATA[
194
+ Calendar.setup({
195
+ inputField : 'date_time',
196
+ ifFormat : '%d/%m/%Y %H:%M:%S',
197
+ button : 'date-picker-cal',
198
+ align : 'Br',
199
+ singleClick : true ,
200
+ showsTime : true
201
+ });
202
+
203
+ // ]]></script>
204
+ <?php endif; ?>
205
+ <?php if($this->getUploadFileHide()): ?>
206
+ <div class="field">
207
+ <label><?php if($this->getUploadFile()): ?><?php echo $this->getUploadFile(); ?><?php else: ?><?php echo "Upload File:"; ?><?php endif; ?></label>
208
+ <div class="input-box" id="uploadFile_div">
209
+ <input type="file" id="file" name="file[]" size="45" class="input-text" multiple="multiple"/>&nbsp;&nbsp;&nbsp;
210
+ <a id="clearfile" onclick="clearFileInputField('uploadFile_div')"
211
+ href="javascript:void(0);">Clear Uploaded File</a>
212
+ </div>
213
+ </div>
214
+ <?php endif; ?>
215
+ </li>
216
+ <li class="fields">
217
+ <?php if($this->getFieldOneHide()): ?>
218
+ <div class="field">
219
+ <label><?php if($this->getExtraFieldOne()): ?><?php echo $this->getExtraFieldOne(); ?><?php else: ?><?php echo "Extra Field 1:"; ?><?php endif; ?></label>
220
+ <div class="input-box">
221
+ <input type="text" name="extra_field_one" size="45" class="input-text" />
222
+ </div>
223
+ </div>
224
+ <?php endif; ?>
225
+ <?php if($this->getFieldTwoHide()): ?>
226
+ <div class="field">
227
+ <label><?php if($this->getExtraFieldTwo()): ?><?php echo $this->getExtraFieldTwo(); ?><?php else: ?><?php echo "Extra Field 2:"; ?><?php endif; ?></label>
228
+ <div class="input-box">
229
+ <input type="text" name="extra_field_two" size="45" class="input-text" />
230
+ </div>
231
+ </div>
232
+ <?php endif; ?>
233
+ <?php if($this->getFieldThreeHide()): ?>
234
+ <div class="field">
235
+ <label><?php if($this->getExtraFieldThree()): ?><?php echo $this->getExtraFieldThree(); ?><?php else: ?><?php echo "Extra Field 3:"; ?><?php endif; ?></label>
236
+ <div class="input-box">
237
+ <input type="text" name="extra_field_three" size="45" class="input-text" />
238
+ </div>
239
+ </div>
240
+ <?php endif; ?>
241
+ </li>
242
  <li class="fields last">
243
+ <?php if($this->getCaptchaHide()): ?>
244
  <label>Capctha<span class="required"><em>*</em></span></label>
245
  <div class="captcha-main">
246
  <div id="captcha" class="captcha-left">
256
  </ul>
257
  <div class="clear"></div>
258
  <div class="button-set">
259
+ <button type="submit" name="SUBMIT" class="button" value="SUBMIT" onclick="return captchacode() ;"><span><span><?php if($this->getBtnText()): ?><?php echo $this->getBtnText(); ?><?php else: ?><?php echo "Submit"; ?><?php endif; ?></span></span></button>
260
  </div>
261
  </div>
262
  </form>
app/locale/en_US/template/email/inquiry/admin_inquiry.html ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject {{var subject}}@-->
2
+
3
+ <!--@styles
4
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
8
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
9
+ <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
10
+ <tr>
11
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
12
+ <!-- [ header starts here] -->
13
+ <table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
14
+ <tr>
15
+ <td valign="top">
16
+ <a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
17
+ </tr>
18
+ <!-- [ middle starts here] -->
19
+ <tr>
20
+ <td valign="top">
21
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello {{var name}},</h1>
22
+ <table border="0">
23
+ <tr>
24
+ <td>
25
+ <p>Mr/Ms. {{var dealername}} have filled dealer inquiry form and details are below.</p>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td>
30
+ <table border="0" width="100%">
31
+ <tr>
32
+ <td>{{var firstname_label}}:</td>
33
+ <td>{{var firstname}}</td>
34
+ </tr>
35
+ {{depend lastname}}
36
+ <tr>
37
+ <td>{{var lastname_label}}:</td>
38
+ <td>{{var lastname}}</td>
39
+ </tr>
40
+ {{/depend}}
41
+ <tr>
42
+ <td>{{var company_label}}:</td>
43
+ <td>{{var company}}</td>
44
+ </tr>
45
+ {{depend vat_number}}
46
+ <tr>
47
+ <td>{{var vat_number_label}}:</td>
48
+ <td>{{var vat_number}}</td>
49
+ </tr>
50
+ {{/depend}}
51
+ {{depend address}}
52
+ <tr>
53
+ <td>{{var address_label}}:</td>
54
+ <td>{{var address}}</td>
55
+ </tr>
56
+ {{/depend}}
57
+ {{depend city}}
58
+ <tr>
59
+ <td>{{var city_label}}:</td>
60
+ <td>{{var city}}</td>
61
+ </tr>
62
+ {{/depend}}
63
+ {{depend state}}
64
+ <tr>
65
+ <td>{{var state_label}}:</td>
66
+ <td>{{var state}}</td>
67
+ </tr>
68
+ {{/depend}}
69
+ {{depend country}}
70
+ <tr>
71
+ <td>{{var country_label}}:</td>
72
+ <td>{{var country}}</td>
73
+ </tr>
74
+ {{/depend}}
75
+ {{depend zip}}
76
+ <tr>
77
+ <td>{{var zip_label}}:</td>
78
+ <td>{{var zip}}</td>
79
+ </tr>
80
+ {{/depend}}
81
+ <tr>
82
+ <td>{{var phone_label}}:</td>
83
+ <td>{{var phone}}</td>
84
+ </tr>
85
+ <tr>
86
+ <td>{{var email_label}}:</td>
87
+ <td>{{var dealeremail}}</td>
88
+ </tr>
89
+ {{depend website}}
90
+ <tr>
91
+ <td>{{var website_label}}:</td>
92
+ <td>{{var website}}</td>
93
+ </tr>
94
+ {{/depend}}
95
+ {{depend description}}
96
+ <tr>
97
+ <td>{{var description_label}}:</td>
98
+ <td>{{var description}}</td>
99
+ </tr>
100
+ {{/depend}}
101
+ {{depend datetime}}
102
+ <tr>
103
+ <td>{{var datetime_label}}:</td>
104
+ <td>{{var datetime}}</td>
105
+ </tr>
106
+ {{/depend}}
107
+ {{depend upload_file}}
108
+ <tr>
109
+ <td>{{var upload_file_label}}:</td>
110
+ <td>{{var upload_file}}</td>
111
+ </tr>
112
+ {{/depend}}
113
+ {{depend extra_field_one}}
114
+ <tr>
115
+ <td>{{var extra_field_one_label}}:</td>
116
+ <td>{{var extra_field_one}}</td>
117
+ </tr>
118
+ {{/depend}}
119
+ {{depend extra_field_two}}
120
+ <tr>
121
+ <td>{{var extra_field_two_label}}:</td>
122
+ <td>{{var extra_field_two}}</td>
123
+ </tr>
124
+ {{/depend}}
125
+ {{depend extra_field_three}}
126
+ <tr>
127
+ <td>{{var extra_field_three_label}}:</td>
128
+ <td>{{var extra_field_three}}</td>
129
+ </tr>
130
+ {{/depend}}
131
+ </table>
132
+ </td>
133
+ </tr>
134
+ </table>
135
+ </td>
136
+ </tr>
137
+ <tr>
138
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{config path="general/store_information/name"}}</strong></p></center></td>
139
+ </tr>
140
+ </table>
141
+ </td>
142
+ </tr>
143
+ </table>
144
+ </div>
145
+ </body>
app/locale/en_US/template/email/inquiry/create_customer.html ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject {{var subject}}@-->
2
+
3
+ <!--@styles
4
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
5
+ @-->
6
+
7
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
8
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
9
+ <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
10
+ <tr>
11
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
12
+ <!-- [ header starts here] -->
13
+ <table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
14
+ <tr>
15
+ <td valign="top">
16
+ <a href="{{var loginlink}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
17
+ </tr>
18
+ <!-- [ middle starts here] -->
19
+ <tr>
20
+ <td valign="top">
21
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello {{var name}},</h1>
22
+ <p style="font-size:12px; line-height:16px; margin:0 0 16px 0;">Welcome to {{var store.getFrontendName()}}. To log in when visiting our site just click <a href='{{var loginlink}}customer/account/' style="color:#1E7EC8;">Login</a> or <a href='{{var loginlink}}customer/account/' style="color:#1E7EC8;">My Account</a> at the top of every page, and then enter your e-mail address and password.</p>
23
+ <p style="border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#f9f9f9;">
24
+ Use the following values when prompted to log in:<br/>
25
+ <strong>E-mail</strong>: {{var email}}<br/>
26
+ <strong>Password</strong>: {{var password}}
27
+ </p>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
32
+ </tr>
33
+ </table>
34
+ </td>
35
+ </tr>
36
+ </table>
37
+ </div>
38
+ </body>
app/locale/en_US/template/email/inquiry/customer_inquiry.html ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject {{var subject}}@-->
2
+ <!--@styles
3
+ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
4
+ @-->
5
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
6
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
7
+ <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
8
+ <tr>
9
+ <td align="center" valign="top" style="padding:20px 0 20px 0">
10
+ <!-- [ header starts here] -->
11
+ <table bgcolor="FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
12
+ <tr>
13
+ <td valign="top">
14
+ <a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
15
+ </tr>
16
+ <!-- [ middle starts here] -->
17
+ <tr>
18
+ <td valign="top">
19
+ <h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello {{var name}},</h1>
20
+ <p style="font-size:12px; line-height:16px; margin:0 0 16px 0;">
21
+ Thank you for contacting Owner. A company representative will contact you with more information within two business days.
22
+ </p>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{config path="general/store_information/name"}}</strong></p></center></td>
27
+ </tr>
28
+ </table>
29
+ </td>
30
+ </tr>
31
+ </table>
32
+ </div>
33
+ </body>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Dealer_Inquery</name>
4
- <version>2.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension is providing inquiry form.</summary>
10
- <description>Dealer filled the details like name, address, contact number, email, website and description inquiry form. It informs to customer and admin by email when customer submits inquiry form. This extension also provides customer listing who submit inquiry form in admin under "&amp;lt;strong&amp;gt;Dealer Management &amp;lt;/strong&amp;gt;"section. You can view inquiry details of customer and also delete the inquiry information. This extension provides create customer link from dealer listing page.</description>
11
  <notes>Dealer Inquiry</notes>
12
  <authors><author><name>Capacity Web Solutions</name><user>capacitywebsolutions</user><email>magento@capacitywebsolutions.com</email></author></authors>
13
- <date>2015-03-19</date>
14
- <time>10:57:10</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="CapacityWebSolutions_Inquiry.xml" hash="02eb95f93a47babe658b8cacd8a79dba"/></dir></target><target name="magecommunity"><dir name="CapacityWebSolutions"><dir name="Inquiry"><dir name="Block"><dir name="Adminhtml"><dir name="Inquiry"><dir name="Edit"><file name="Form.php" hash="b41b39fd79c19b2f842326e65b8a2699"/><dir name="Tab"><file name="Form.php" hash="1b62fd528d2e1cc8124d9f9ed951862b"/></dir><file name="Tabs.php" hash="0109c0c113599b39ab4c07945239749c"/></dir><file name="Edit.php" hash="bf44f001fdfcf38b37ac6d1790d58690"/><file name="Grid.php" hash="4463eb1b61069f78194bee4a9bd38e45"/><dir name="Renderer"><file name="Image.php" hash="3144c3d0c044af157fab6df031791b33"/></dir></dir><file name="Inquiry.php" hash="be61f0084c0511766729226518f3389e"/></dir><file name="Inquiry.php" hash="cfdfa5a1bd05086f8315ee391c382618"/><file name="Managejquery.php" hash="bab28024ee5af44baa53bf5b92867848"/></dir><dir name="Helper"><file name="Data.php" hash="25c35f249d0a6c7cde3ac6b5e9dd16cd"/></dir><dir name="Model"><file name="Inquiry.php" hash="62a5d4e637b7262032b7dbd4fe4e1170"/><dir name="Mysql4"><dir name="Inquiry"><file name="Collection.php" hash="3d411f614160c29f07c4dcbfc22046e0"/></dir><file name="Inquiry.php" hash="c11cdf013dfa28292593faa2c36042cb"/></dir><file name="Observer.php" hash="a2e3e43ea2fc17d4ce679e7890ea5641"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="InquiryController.php" hash="ba3109bde96f90d58575fb5d57a4318e"/></dir><file name="IndexController.php" hash="257d53120b661e40c2905dafb86691b5"/></dir><dir name="etc"><file name="config.xml" hash="f853b282a67e80ea1e15b8ff9a938580"/><file name="system.xml" hash="9c6a1dbf6a7ad35105c9034b2a936bd4"/></dir><dir name="sql"><dir name="inquiry_setup"><file name="mysql4-install-0.1.0.php" hash="9dd400deb62109642ae5dbf5f1fe7143"/><file name="mysql4-upgrade-1.2.1-2.0.0.php" hash="5e12024f064aab2cf5e576f1dbbaf48c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="inquiry"><file name="inquiry.phtml" hash="83ba7f04645c1784c8f170b33fed9749"/><file name="thanks.phtml" hash="c147c29548128a2983073b586a99de38"/></dir></dir><dir name="layout"><file name="inquiry.xml" hash="5cd84a40b6e7283a86860733f6a598fa"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="inquiry.xml" hash="dee4607eb3b3a4013586821b799b41ba"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="inquiry"><file name="jquery.min.js" hash="8fc25e27d42774aeae6edbc0a18b72aa"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="refresh.png" hash="cb4184defa247c1b3ebfcf89cd279872"/><file name="inquiry-icon.png" hash="2fe54ac19c9baab1c6ac4927b6a034f5"/></dir><dir name="css"><file name="inquiry.css" hash="f6a43a7ffe6144e603fb7c09155557d6"/></dir></dir></dir></dir></target><target name="magemedia"><dir name="inquiry"><file name="create_user.png" hash="7b785ab3b563f8880819404c0382b11e"/></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.0.0</min><max>5.6.6</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Dealer_Inquery</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension is providing inquiry form.</summary>
10
+ <description>Dealer filled the details like name, address, contact number, email, website and description inquiry form. It informs to customer and admin by email when customer submits inquiry form. This extension also provides customer listing who submit inquiry form in admin under Dealer Management section. You can view inquiry details of customer and also delete the inquiry information. This extension provides create customer link from dealer listing page.</description>
11
  <notes>Dealer Inquiry</notes>
12
  <authors><author><name>Capacity Web Solutions</name><user>capacitywebsolutions</user><email>magento@capacitywebsolutions.com</email></author></authors>
13
+ <date>2015-05-28</date>
14
+ <time>12:31:39</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="CapacityWebSolutions_Inquiry.xml" hash="02eb95f93a47babe658b8cacd8a79dba"/></dir></target><target name="magecommunity"><dir name="CapacityWebSolutions"><dir name="Inquiry"><dir name="Block"><dir name="Adminhtml"><dir name="Inquiry"><dir name="Edit"><file name="Form.php" hash="b41b39fd79c19b2f842326e65b8a2699"/><dir name="Tab"><file name="Form.php" hash="1aac14e890ad865a872c4976556ef725"/></dir><file name="Tabs.php" hash="0109c0c113599b39ab4c07945239749c"/></dir><file name="Edit.php" hash="bf44f001fdfcf38b37ac6d1790d58690"/><file name="Grid.php" hash="e250ba2f6ce60e2130952588dbebe240"/><dir name="Renderer"><file name="Image.php" hash="3144c3d0c044af157fab6df031791b33"/></dir></dir><file name="Inquiry.php" hash="be61f0084c0511766729226518f3389e"/></dir><file name="Inquiry.php" hash="d27df5bbc8022671efbcff7a00321156"/></dir><dir name="Helper"><file name="Data.php" hash="25c35f249d0a6c7cde3ac6b5e9dd16cd"/></dir><dir name="Model"><file name="Inquiry.php" hash="62a5d4e637b7262032b7dbd4fe4e1170"/><file name="Inquiryfiles.php" hash="cb4e16e0b2a7d20cad1ecefa84b72ee9"/><dir name="Mysql4"><dir name="Inquiry"><file name="Collection.php" hash="d76a5718818ad6c01db0fb209c77e9a2"/></dir><file name="Inquiry.php" hash="7e734ffa9ca66168b4bfb47d06532857"/><dir name="Inquiryfiles"><file name="Collection.php" hash="c18c70966753d83f707e01604f5cb5b1"/></dir><file name="Inquiryfiles.php" hash="89c9f29a6393598a931e7e41cea04de6"/></dir><file name="Observer.php" hash="ce8ef735f08a6761cf721007c308a483"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Customergroup.php" hash="aee85d96fe2348009e6ed28ba5d5c8e0"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="InquiryController.php" hash="5337dec8b58763266bc54542f2dd308e"/></dir><file name="IndexController.php" hash="67392c41ce6beef6c3adaac364ca6131"/></dir><dir name="etc"><file name="config.xml" hash="df84ac0a9af43d3cfd9a1e757a025269"/><file name="system.xml" hash="09e434ff1d572879c9cf750469eac40f"/></dir><dir name="sql"><dir name="inquiry_setup"><file name="mysql4-install-0.1.0.php" hash="9a91bba5121b6618130fe56e6d0b01e2"/><file name="mysql4-upgrade-1.2.1-2.0.0.php" hash="944b85aeb8b9ead25a60faf7c2aeb9e9"/><file name="mysql4-upgrade-2.0.0-2.1.0.php" hash="faf3b74c1e2d8d6405498fcf743bb9fa"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="inquiry.xml" hash="683c5199e6ade5fdc8ebd4760ed95dd6"/></dir><dir name="template"><dir name="inquiry"><file name="inquiry.phtml" hash="f1bdc5efc0feb03514f9a1f17f759bad"/><file name="thanks.phtml" hash="c147c29548128a2983073b586a99de38"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="inquiry.xml" hash="dee4607eb3b3a4013586821b799b41ba"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="inquiry"><file name="jquery.min.js" hash="8fc25e27d42774aeae6edbc0a18b72aa"/></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="inquiry"><file name="admin_inquiry.html" hash="22e95bf5df3ffe8ba171482bae94883d"/><file name="create_customer.html" hash="01c94aac3b06a4e94081d9cc18253ead"/><file name="customer_inquiry.html" hash="6c7ed1f09acca09403dd91f774f8afe1"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="inquiry.css" hash="7c9bd48079e4f9d053d1519f286700fc"/></dir><dir name="images"><file name="inquiry-icon.png" hash="2fe54ac19c9baab1c6ac4927b6a034f5"/><file name="refresh.png" hash="cb4184defa247c1b3ebfcf89cd279872"/></dir></dir></dir></dir></target><target name="magemedia"><dir name="inquiry"><file name="create_user.png" hash="7b785ab3b563f8880819404c0382b11e"/></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.0.0</min><max>5.6.9</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/css/inquiry.css CHANGED
@@ -24,7 +24,7 @@
24
  .inquiryForm .fieldset .form-list input, .inquiryForm .fieldset .form-list select,
25
  .inquiryForm .fieldset .form-list textarea { background:#fff; border:1px solid #ddd; padding:5px; font-size:14px; color:#555; }
26
  .inquiryForm .fieldset .form-list input, .inquiryForm .fieldset .form-list select,
27
- .inquiryForm .fieldset .form-list textarea { width:100%; border-radius:0 0 0; -webkit-border-radius:0 0 0; box-shadow:1px 1px 1px #ddd; -webkit-box-shadow:1px 1px 1px #ddd; }
28
  .inquiryForm .fieldset .form-list input:focus, .inquiryForm .fieldset .form-list select:focus,
29
  .inquiryForm .fieldset .form-list textarea:focus { box-shadow:0 0 3px #ffc45d; -webkit-box-shadow:0 0 3px #ffc45d; transition:all 0.5s ease-in-out 0s; -moz-transition:all 0.5s ease-in-out; -webkit-transition:all 0.5s ease-in-out; }
30
  .inquiryForm .fieldset .form-list li:after { clear:both; content:"."; display:block; font-size:0; height:0; line-height:0; overflow:hidden; }
@@ -42,6 +42,11 @@
42
  .inquiryForm button.button span { background:none; border:0 none; font:inherit; height:inherit; }
43
  p.required, .validation-advice { color:#FF0000; font-size:13px; margin:5px 0 0; }
44
 
 
 
 
 
 
45
  @media (max-width:1200px) {
46
  .inquiryForm .fieldset .form-list .field { width:60%; margin:0 0 10px 0; float:none; }
47
  .inquiryForm .fieldset .form-list .input-box { width:100%; }
24
  .inquiryForm .fieldset .form-list input, .inquiryForm .fieldset .form-list select,
25
  .inquiryForm .fieldset .form-list textarea { background:#fff; border:1px solid #ddd; padding:5px; font-size:14px; color:#555; }
26
  .inquiryForm .fieldset .form-list input, .inquiryForm .fieldset .form-list select,
27
+ .inquiryForm .fieldset .form-list textarea { width:100%; max-width:100%; border-radius:0 0 0; -webkit-border-radius:0 0 0; box-shadow:1px 1px 1px #ddd; -webkit-box-shadow:1px 1px 1px #ddd; }
28
  .inquiryForm .fieldset .form-list input:focus, .inquiryForm .fieldset .form-list select:focus,
29
  .inquiryForm .fieldset .form-list textarea:focus { box-shadow:0 0 3px #ffc45d; -webkit-box-shadow:0 0 3px #ffc45d; transition:all 0.5s ease-in-out 0s; -moz-transition:all 0.5s ease-in-out; -webkit-transition:all 0.5s ease-in-out; }
30
  .inquiryForm .fieldset .form-list li:after { clear:both; content:"."; display:block; font-size:0; height:0; line-height:0; overflow:hidden; }
42
  .inquiryForm button.button span { background:none; border:0 none; font:inherit; height:inherit; }
43
  p.required, .validation-advice { color:#FF0000; font-size:13px; margin:5px 0 0; }
44
 
45
+ .inquiryForm .fieldset .form-list input#date_time { width:50%; }
46
+ .inquiryForm .fieldset .form-list input#file { width:70%; }
47
+ img#date-picker-cal { display:inline-block; margin-left:10px; }
48
+ div#clearfile { display:inline-block; margin-left:10px; }
49
+
50
  @media (max-width:1200px) {
51
  .inquiryForm .fieldset .form-list .field { width:60%; margin:0 0 10px 0; float:none; }
52
  .inquiryForm .fieldset .form-list .input-box { width:100%; }