Version Notes
Dealer Inquiry
Download this release
Release Info
Developer | Capacity Web Solutions |
Extension | Dealer_Inquery |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 2.0.0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry.php +20 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit.php +50 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Form.php +26 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Tab/Form.php +145 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Tabs.php +30 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Grid.php +121 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Renderer/Image.php +19 -0
- app/code/community/CapacityWebSolutions/Inquiry/Block/Inquiry.php +10 -13
- app/code/community/CapacityWebSolutions/Inquiry/Block/Managejquery.php +27 -0
- app/code/community/CapacityWebSolutions/Inquiry/Helper/Data.php +24 -3
- app/code/community/CapacityWebSolutions/Inquiry/Model/Inquiry.php +1 -3
- app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry.php +1 -2
- app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry/Collection.php +1 -3
- app/code/community/CapacityWebSolutions/Inquiry/Model/Observer.php +29 -0
- app/code/community/CapacityWebSolutions/Inquiry/controllers/Adminhtml/InquiryController.php +262 -198
- app/code/community/CapacityWebSolutions/Inquiry/controllers/IndexController.php +260 -284
- app/code/community/CapacityWebSolutions/Inquiry/etc/config.xml +41 -16
- app/code/community/CapacityWebSolutions/Inquiry/etc/system.xml +22 -12
- app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-install-0.1.0.php +1 -3
- app/code/community/CapacityWebSolutions/Inquiry/{Block/Manage/Inquiry.php → sql/inquiry_setup/mysql4-upgrade-1.2.1-2.0.0.php} +12 -11
- app/design/adminhtml/default/default/layout/inquiry.xml +2 -19
- app/design/adminhtml/default/default/template/inquiry/inquiry.phtml +0 -104
- app/design/adminhtml/default/default/template/inquiry/view.phtml +0 -130
- app/design/frontend/base/default/layout/inquiry.xml +11 -16
- app/design/frontend/base/default/template/inquiry/inquiry.phtml +13 -43
- app/design/frontend/base/default/template/inquiry/thanks.phtml +1 -4
- media/inquiry/create_user.png +0 -0
- package.xml +5 -5
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry extends Mage_Adminhtml_Block_Widget_Grid_Container
|
11 |
+
{
|
12 |
+
public function __construct()
|
13 |
+
{
|
14 |
+
$this->_controller = 'adminhtml_inquiry';
|
15 |
+
$this->_blockGroup = 'inquiry';
|
16 |
+
$this->_headerText = Mage::helper('inquiry')->__('Dealer Manager');
|
17 |
+
parent::__construct();
|
18 |
+
$this->_removeButton('add');
|
19 |
+
}
|
20 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
11 |
+
{
|
12 |
+
public function __construct()
|
13 |
+
{
|
14 |
+
parent::__construct();
|
15 |
+
$this->_removeButton('save');
|
16 |
+
$this->_removeButton('reset');
|
17 |
+
$this->_objectId = 'id';
|
18 |
+
$this->_blockGroup = 'inquiry';
|
19 |
+
$this->_controller = 'adminhtml_inquiry';
|
20 |
+
$this->_addButton('adminhtml_inquiry', array(
|
21 |
+
'label' => $this->__('Create Customer'),
|
22 |
+
'onclick' => "setLocation('{$this->getUrl('*/adminhtml_inquiry/createCustomer', array('id' => Mage::registry('inquiry_data')->getId()))}')",
|
23 |
+
));
|
24 |
+
|
25 |
+
$this->_updateButton('delete', 'label', Mage::helper('inquiry')->__('Delete'));
|
26 |
+
|
27 |
+
$this->_formScripts[] = "
|
28 |
+
function toggleEditor() {
|
29 |
+
if (tinyMCE.getInstanceById('inquiry_content') == null) {
|
30 |
+
tinyMCE.execCommand('mceAddControl', false, 'inquiry_content');
|
31 |
+
} else {
|
32 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'inquiry_content');
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
function saveAndContinueEdit(){
|
37 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
38 |
+
}
|
39 |
+
";
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getHeaderText()
|
43 |
+
{
|
44 |
+
if( Mage::registry('inquiry_data') && Mage::registry('inquiry_data')->getId() ) {
|
45 |
+
return Mage::helper('inquiry')->__("View Dealer '%s'", $this->htmlEscape(Mage::registry('inquiry_data')->getFirstname()));
|
46 |
+
} else {
|
47 |
+
return Mage::helper('inquiry')->__('Add Item');
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Form.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
11 |
+
{
|
12 |
+
protected function _prepareForm()
|
13 |
+
{
|
14 |
+
$form = new Varien_Data_Form(array(
|
15 |
+
'id' => 'edit_form',
|
16 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
17 |
+
'method' => 'post',
|
18 |
+
'enctype' => 'multipart/form-data'
|
19 |
+
)
|
20 |
+
);
|
21 |
+
|
22 |
+
$form->setUseContainer(true);
|
23 |
+
$this->setForm($form);
|
24 |
+
return parent::_prepareForm();
|
25 |
+
}
|
26 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
11 |
+
{
|
12 |
+
protected function _prepareForm()
|
13 |
+
{
|
14 |
+
echo " <style type='text/css'>
|
15 |
+
.cws_created
|
16 |
+
{
|
17 |
+
color: green;
|
18 |
+
}
|
19 |
+
.cws_notcreated {
|
20 |
+
color: red;
|
21 |
+
}
|
22 |
+
</style>";
|
23 |
+
$form = new Varien_Data_Form();
|
24 |
+
$this->setForm($form);
|
25 |
+
$fieldset = $form->addFieldset('inquiry_form', array('legend'=>Mage::helper('inquiry')->__('Dealer Information')));
|
26 |
+
|
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()){
|
34 |
+
$iscustomer = 'Created';
|
35 |
+
$cust_class = 'cws_created';
|
36 |
+
}else{
|
37 |
+
$cust_class = 'cws_notcreated';
|
38 |
+
$iscustomer = 'Not Created';
|
39 |
+
}
|
40 |
+
|
41 |
+
$fieldset->addField('firstname', 'label', array(
|
42 |
+
'label' => Mage::helper('inquiry')->__('First Name'),
|
43 |
+
'name' => 'firstname',
|
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'),
|
55 |
+
'name' => 'company',
|
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'),
|
97 |
+
'name' => 'phone',
|
98 |
+
'value' => $data->getPhone(),
|
99 |
+
));
|
100 |
+
|
101 |
+
$fieldset->addField('email', 'label', array(
|
102 |
+
'label' => Mage::helper('inquiry')->__('Email'),
|
103 |
+
'name' => 'email',
|
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'),
|
115 |
+
'name' => 'iscustcreated',
|
116 |
+
'after_element_html' => '<span class="'.$cust_class.'">'.$iscustomer.'</span>',
|
117 |
+
|
118 |
+
));
|
119 |
+
|
120 |
+
$fieldset->addField('storeid', 'label', array(
|
121 |
+
'label' => Mage::helper('inquiry')->__('Store View'),
|
122 |
+
'name' => 'storeid',
|
123 |
+
'value' => $storename,
|
124 |
+
));
|
125 |
+
|
126 |
+
$fieldset->addField('createddt', 'label', array(
|
127 |
+
'label' => Mage::helper('inquiry')->__('Created Date'),
|
128 |
+
'name' => 'createddt',
|
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 |
+
{
|
140 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getInquiryData());
|
141 |
+
Mage::getSingleton('adminhtml/session')->setInquiryData(null);
|
142 |
+
}
|
143 |
+
return parent::_prepareForm();
|
144 |
+
}
|
145 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Edit/Tabs.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
11 |
+
{
|
12 |
+
public function __construct()
|
13 |
+
{
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('inquiry_tabs');
|
16 |
+
$this->setDestElementId('edit_form');
|
17 |
+
$this->setTitle(Mage::helper('inquiry')->__('Dealer Information'));
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _beforeToHtml()
|
21 |
+
{
|
22 |
+
$this->addTab('form_section', array(
|
23 |
+
'label' => Mage::helper('inquiry')->__('Dealer Information'),
|
24 |
+
'title' => Mage::helper('inquiry')->__('Dealer Information'),
|
25 |
+
'content' => $this->getLayout()->createBlock('inquiry/adminhtml_inquiry_edit_tab_form')->toHtml(),
|
26 |
+
));
|
27 |
+
|
28 |
+
return parent::_beforeToHtml();
|
29 |
+
}
|
30 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Grid.php
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
11 |
+
{
|
12 |
+
public function __construct()
|
13 |
+
{
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('inquiryGrid');
|
16 |
+
$this->setDefaultSort('dealerid');
|
17 |
+
$this->setDefaultDir('DESC');
|
18 |
+
$this->setSaveParametersInSession(true);
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareCollection()
|
22 |
+
{
|
23 |
+
$collection = Mage::getModel('inquiry/inquiry')->getCollection();
|
24 |
+
$this->setCollection($collection);
|
25 |
+
return parent::_prepareCollection();
|
26 |
+
}
|
27 |
+
|
28 |
+
protected function _prepareColumns()
|
29 |
+
{
|
30 |
+
$this->addColumn('dealerid', array(
|
31 |
+
'header' => Mage::helper('inquiry')->__('ID'),
|
32 |
+
'align' =>'right',
|
33 |
+
'width' => '50px',
|
34 |
+
'index' => 'dealerid',
|
35 |
+
));
|
36 |
+
|
37 |
+
$this->addColumn('firstname', array(
|
38 |
+
'header' => Mage::helper('inquiry')->__('First Name'),
|
39 |
+
'index' => 'firstname',
|
40 |
+
));
|
41 |
+
|
42 |
+
$this->addColumn('lastname', array(
|
43 |
+
'header' => Mage::helper('inquiry')->__('Last Name'),
|
44 |
+
'index' => 'lastname',
|
45 |
+
));
|
46 |
+
|
47 |
+
$this->addColumn('email', array(
|
48 |
+
'header' => Mage::helper('inquiry')->__('Email'),
|
49 |
+
'index' => 'email',
|
50 |
+
));
|
51 |
+
|
52 |
+
$this->addColumn('iscustcreated', array(
|
53 |
+
'header' => Mage::helper('inquiry')->__('Is Customer Created'),
|
54 |
+
'index' => 'iscustcreated',
|
55 |
+
'frame_callback' => array($this, 'isCustCreated'),
|
56 |
+
'type' => 'options',
|
57 |
+
'options' => array('1' => Mage::helper('adminhtml')->__('Created'), '0' => Mage::helper('adminhtml')->__('Not Created')),
|
58 |
+
'width' => '100px',
|
59 |
+
));
|
60 |
+
|
61 |
+
$this->addColumn('storeid', array(
|
62 |
+
'header' => Mage::helper('inquiry')->__('Store View'),
|
63 |
+
'index' => 'storeid',
|
64 |
+
'type' => 'store',
|
65 |
+
|
66 |
+
|
67 |
+
));
|
68 |
+
|
69 |
+
$this->addColumn('createddt', array(
|
70 |
+
'header' => Mage::helper('inquiry')->__('Created Date'),
|
71 |
+
'format' => 'dd/MM/yyyy hh:mm:ss',
|
72 |
+
'index' => 'createddt',
|
73 |
+
'type' => 'date',
|
74 |
+
));
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
$this->addColumn('action', array(
|
79 |
+
'header' => Mage::helper('inquiry')->__('Action'),
|
80 |
+
'align' =>'center',
|
81 |
+
'index' => 'action',
|
82 |
+
'renderer' => 'CapacityWebSolutions_Inquiry_Block_Adminhtml_Inquiry_Renderer_Image',
|
83 |
+
'filter' => false,
|
84 |
+
));
|
85 |
+
|
86 |
+
|
87 |
+
return parent::_prepareColumns();
|
88 |
+
}
|
89 |
+
|
90 |
+
public function isCustCreated($value, $row, $column, $isExport)
|
91 |
+
{
|
92 |
+
if ($value=="Created") {
|
93 |
+
$cell = '<span class="grid-severity-notice"><span>Created</span></span>';
|
94 |
+
} else {
|
95 |
+
$cell = '<span class="grid-severity-major"><span>Not Created</span></span>';
|
96 |
+
}
|
97 |
+
|
98 |
+
return $cell;
|
99 |
+
}
|
100 |
+
|
101 |
+
protected function _prepareMassaction()
|
102 |
+
{
|
103 |
+
$this->setMassactionIdField('dealer_id');
|
104 |
+
$this->getMassactionBlock()->setFormFieldName('dealer');
|
105 |
+
|
106 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
107 |
+
'label' => Mage::helper('inquiry')->__('Delete'),
|
108 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
109 |
+
'confirm' => Mage::helper('inquiry')->__('Are you sure?')
|
110 |
+
));
|
111 |
+
|
112 |
+
|
113 |
+
return $this;
|
114 |
+
}
|
115 |
+
|
116 |
+
public function getRowUrl($row)
|
117 |
+
{
|
118 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
119 |
+
}
|
120 |
+
|
121 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Adminhtml/Inquiry/Renderer/Image.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Adminhtml_Inquiry_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
11 |
+
{
|
12 |
+
public function render(Varien_Object $row)
|
13 |
+
{
|
14 |
+
$url = $this->getUrl('*/*/createCustomer', array('id' => $row->getId()));
|
15 |
+
$val = Mage::getBaseUrl('media')."inquiry/create_user.png";
|
16 |
+
$out = "<a href='".$url."'><img src=". $val ." width='30px' height='30px' title='Create Customer' alt='Create Customer'/></a>";
|
17 |
+
return $out;
|
18 |
+
}
|
19 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Inquiry.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
@@ -10,8 +9,6 @@
|
|
10 |
|
11 |
class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Template
|
12 |
{
|
13 |
-
|
14 |
-
/*Start fo functions for admin section.*/
|
15 |
public function getAllInquires()
|
16 |
{
|
17 |
if($collection = Mage::getModel("inquiry/inquiry")->getCollection())
|
@@ -24,15 +21,7 @@ class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Templat
|
|
24 |
$collection = Mage::getModel("inquiry/inquiry")->load($delId)->getData();
|
25 |
return $collection;
|
26 |
}
|
27 |
-
public function getIsCreated($email,$website_id)
|
28 |
-
{
|
29 |
-
$collection = Mage::getModel("customer/customer")->getCollection()->addFieldToFilter("email",$email)->addFieldToFilter("website_id",$website_id);
|
30 |
|
31 |
-
if($collection->count())
|
32 |
-
return 1;
|
33 |
-
else
|
34 |
-
return 0;
|
35 |
-
}
|
36 |
public function getRandomCode()
|
37 |
{
|
38 |
$an = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
@@ -43,6 +32,14 @@ class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Templat
|
|
43 |
substr($an, rand(0, $su), 1);
|
44 |
}
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
|
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
|
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())
|
21 |
$collection = Mage::getModel("inquiry/inquiry")->load($delId)->getData();
|
22 |
return $collection;
|
23 |
}
|
|
|
|
|
|
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
public function getRandomCode()
|
26 |
{
|
27 |
$an = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
32 |
substr($an, rand(0, $su), 1);
|
33 |
}
|
34 |
|
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 |
}
|
45 |
|
app/code/community/CapacityWebSolutions/Inquiry/Block/Managejquery.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/Helper/Data.php
CHANGED
@@ -1,14 +1,35 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
9 |
***************************************************************************/
|
10 |
-
|
11 |
|
12 |
class CapacityWebSolutions_Inquiry_Helper_Data extends Mage_Core_Helper_Abstract
|
13 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
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_Helper_Data extends Mage_Core_Helper_Abstract
|
11 |
{
|
12 |
+
public function updateDetails(){
|
13 |
+
$inquiry_model = Mage::getModel('inquiry/inquiry');
|
14 |
+
$collection = $inquiry_model->getCollection();
|
15 |
+
foreach($collection as $data){
|
16 |
+
if(!$data->getWebsiteid()){
|
17 |
+
$websiteid = Mage::getModel('core/store')->load($data->getStoreid())->getWebsiteId();
|
18 |
+
$inquiry_model->load($data->getDealerid())
|
19 |
+
->setData('websiteid',$websiteid)
|
20 |
+
->save();
|
21 |
+
|
22 |
+
$customer = Mage::getModel("customer/customer");
|
23 |
+
$customer->setWebsiteId($websiteid);
|
24 |
+
$customer->loadByEmail($data->getEmail());
|
25 |
+
|
26 |
+
if($customer->getId()){
|
27 |
+
$dealerbyid = $inquiry_model->load($data->getDealerid())
|
28 |
+
->setData('iscustcreated','1')
|
29 |
+
->save();
|
30 |
+
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
}
|
app/code/community/CapacityWebSolutions/Inquiry/Model/Inquiry.php
CHANGED
@@ -1,14 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
9 |
***************************************************************************/
|
10 |
|
11 |
-
|
12 |
class CapacityWebSolutions_Inquiry_Model_Inquiry extends Mage_Core_Model_Abstract
|
13 |
{
|
14 |
public function _construct()
|
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_Inquiry extends Mage_Core_Model_Abstract
|
11 |
{
|
12 |
public function _construct()
|
app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
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
|
app/code/community/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry/Collection.php
CHANGED
@@ -1,13 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
9 |
***************************************************************************/
|
10 |
-
|
11 |
|
12 |
class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiry_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
13 |
{
|
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_Inquiry_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
11 |
{
|
app/code/community/CapacityWebSolutions/Inquiry/Model/Observer.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Observer
|
11 |
+
{
|
12 |
+
public function updateStatus($observer)
|
13 |
+
{
|
14 |
+
$event = $observer->getEvent();
|
15 |
+
$email = $event->getCustomer()->getData('email');
|
16 |
+
$websiteid = $event->getCustomer()->getData('website_id');
|
17 |
+
$dealer_coll = Mage::getModel('inquiry/inquiry')->getCollection()
|
18 |
+
->addFieldToFilter('email',$email)
|
19 |
+
->addFieldToFilter('websiteid',$websiteid);
|
20 |
+
|
21 |
+
foreach($dealer_coll as $d){
|
22 |
+
$coll = Mage::getModel("inquiry/inquiry")->load($d->getDealerid());
|
23 |
+
$coll->setData('iscustcreated','0');
|
24 |
+
$coll->save();
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
|
app/code/community/CapacityWebSolutions/Inquiry/controllers/Adminhtml/InquiryController.php
CHANGED
@@ -1,239 +1,303 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
9 |
***************************************************************************/
|
10 |
-
|
11 |
-
class CapacityWebSolutions_Inquiry_Adminhtml_InquiryController extends
|
12 |
{
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
-
}
|
32 |
-
|
33 |
-
$this->_title($this->__('Dealer Inquiry'));
|
34 |
-
$this->loadLayout();
|
35 |
-
$this->_setActiveMenu('inquiry');
|
36 |
-
$this->_addContent($this->getLayout()->createBlock('core/template'));
|
37 |
-
$this->renderLayout();
|
38 |
-
}
|
39 |
-
public function viewAction()
|
40 |
-
{
|
41 |
-
$delid = $this->getRequest()->getParam('delid');
|
42 |
-
|
43 |
-
$this->_title($this->__('Dealer Detail'));
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
-
public function createCustomerAction()
|
53 |
-
{
|
54 |
-
$del = $this->getRequest()->getParam('multival');
|
55 |
-
$values = explode('~~',$del);
|
56 |
-
|
57 |
-
|
58 |
-
$country11 = $values[9];
|
59 |
-
$country1 = explode('$$$',$country11);
|
60 |
-
function RandomPassword($PwdLength=8, $PwdType='standard')
|
61 |
-
{
|
62 |
-
// $PwdType can be one of these:
|
63 |
-
// test .. .. .. always returns the same password = "test"
|
64 |
-
// any .. .. .. returns a random password, which can contain strange characters
|
65 |
-
// alphanum . .. returns a random password containing alphanumerics only
|
66 |
-
// standard . .. same as alphanum, but not including l10O (lower L, one, zero, upper O)
|
67 |
-
$Ranges='';
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
elseif('any'==$PwdType) $Ranges='40-59,61-91,93-126';
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
-
return $p;
|
87 |
}
|
|
|
88 |
}
|
89 |
-
$randompass = RandomPassword(9,'standard');
|
90 |
-
|
91 |
-
$customer = Mage::getModel('customer/customer');
|
92 |
-
$website_id = Mage::getModel('core/store')->load($values[11])->getWebsiteId();
|
93 |
-
|
94 |
-
$customer->setWebsiteId($website_id);
|
95 |
-
$customer->loadByEmail($values[0]);
|
96 |
-
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$customer->setData('customer_activated', '1');
|
106 |
-
$customer->setStatus(1);
|
107 |
-
$customer->setEmail($values[0]);
|
108 |
-
$customer->setFirstname($values[1]);
|
109 |
-
$customer->setLastname($values[2]);
|
110 |
-
$customer->setTaxvat($values[10]);
|
111 |
-
$customer->setPassword($randompass);
|
112 |
-
//$customer->setPassword($values[1].'pass');
|
113 |
-
$customer->setConfirmation(null);
|
114 |
-
$customer->save();
|
115 |
-
if($customer->save())
|
116 |
-
{
|
117 |
-
$adminEmail = Mage::getStoreConfig('trans_email/ident_general/email', $values[11]);
|
118 |
-
$adminName = Mage::getStoreConfig('trans_email/ident_general/name', $values[11]);
|
119 |
-
$fromEmail = $adminEmail;
|
120 |
-
$fromName = $adminName;
|
121 |
-
|
122 |
-
$toEmail = $values[0];
|
123 |
-
$toName = $values[1].$values[2];
|
124 |
-
|
125 |
-
$email_logo = Mage::getStoreConfig('design/email/logo' ,$values[11]);
|
126 |
-
$subject_title = Mage::getStoreConfig('inquiry/register_email/heading',$values[11]);
|
127 |
-
$email_desc = Mage::getStoreConfig('inquiry/register_email/description',$values[11]);
|
128 |
-
$store_name = Mage::getStoreConfig('general/store_information/name', $values[11]);
|
129 |
-
|
130 |
-
$img_media = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'email/logo/';
|
131 |
-
$img_logo_final = $img_media.$email_logo;
|
132 |
-
|
133 |
-
$skin = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
|
134 |
-
$skin_name = Mage::getStoreConfig('design/theme/skin',$values[11]);
|
135 |
-
if($skin_name == "")
|
136 |
-
{
|
137 |
-
$skin_name = "default";
|
138 |
-
}
|
139 |
-
else
|
140 |
-
{
|
141 |
-
$skin_name = $skin_name;
|
142 |
-
}
|
143 |
-
$package = Mage::getStoreConfig('design/package/name',$values[11]);
|
144 |
-
$default_logo = Mage::getStoreConfig('design/header/logo_src',$values[11]);
|
145 |
-
|
146 |
-
$logo_default = $skin."/frontend/".$package."/".$skin_name."/".$default_logo;
|
147 |
-
|
148 |
-
if($img_logo_final == $img_media)
|
149 |
-
{
|
150 |
-
$logo_img = "<img src='$logo_default'/>";
|
151 |
-
}
|
152 |
-
else
|
153 |
-
{
|
154 |
-
$logo_img = "<img src='$img_logo_final'/>";
|
155 |
-
}
|
156 |
|
157 |
-
|
158 |
-
$email_desc = str_replace("{{username}}",$values[0],$email_desc);
|
159 |
-
$email_desc = str_replace("{{password}}",$randompass,$email_desc);
|
160 |
-
$url = Mage::app()->getStore($values[11])->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'customer/account/login/';
|
161 |
-
$email_desc = str_replace("{{url}}",$url,$email_desc);
|
162 |
-
$email_desc = str_replace("{{storename}}",$store_name,$email_desc);
|
163 |
|
164 |
-
|
165 |
-
// die;
|
166 |
|
|
|
|
|
|
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
<Td><p>'.$email_desc.'</p></Td>
|
182 |
-
</tr>
|
183 |
-
|
184 |
-
</table>
|
185 |
-
</td>
|
186 |
-
</tr>
|
187 |
-
</table>';
|
188 |
-
|
189 |
-
$headers = "";
|
190 |
-
|
191 |
-
$custSubject = $subject_title;
|
192 |
-
$headers .= 'MIME-Version: 1.0'."\r\n";
|
193 |
-
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
194 |
-
$headers .= 'From:'. $adminName.' <'.$adminEmail.'>';
|
195 |
-
|
196 |
-
|
197 |
-
if(mail($toEmail,$custSubject,$body,$headers)){
|
198 |
-
|
199 |
-
}else{
|
200 |
-
Mage::getSingleton('core/session')
|
201 |
-
->addError('Unable to send email.');
|
202 |
-
}
|
203 |
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
-
|
|
|
|
|
|
|
207 |
$_custom_address = array (
|
208 |
'street' => array (
|
209 |
-
|
210 |
-
//'1' => $values[11],
|
211 |
),
|
212 |
-
'firstname' => $
|
213 |
-
'lastname' => $
|
214 |
-
'company' => $
|
215 |
-
'city' => $
|
216 |
'region_id' => '',
|
217 |
-
'region' => $
|
218 |
-
'postcode' => $
|
219 |
-
'country_id' => $
|
220 |
-
'telephone' => $
|
221 |
);
|
222 |
|
223 |
$customAddress = Mage::getModel('customer/address');
|
224 |
$customAddress->setData($_custom_address)
|
225 |
-
->setCustomerId($
|
226 |
->setIsDefaultBilling('1')
|
227 |
->setIsDefaultShipping('1')
|
228 |
->setSaveInAddressBook('1');
|
229 |
|
230 |
try {
|
231 |
-
|
232 |
}
|
233 |
catch (Exception $ex) {
|
234 |
}
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
-
|
239 |
-
|
|
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_Adminhtml_InquiryController extends Mage_Adminhtml_Controller_action
|
11 |
{
|
12 |
+
protected function _initAction() {
|
13 |
+
$this->loadLayout()->_setActiveMenu('cws');
|
14 |
+
return $this;
|
15 |
+
}
|
16 |
+
|
17 |
+
public function indexAction() {
|
18 |
+
$helper = Mage::helper('inquiry');
|
19 |
+
$helper->updateDetails();
|
20 |
+
$this->_title($this->__('CWS Extension'))->_title($this->__('Dealer Inquiries'))->_title($this->__('Dealer Management'));
|
21 |
+
$this->_initAction()
|
22 |
+
->renderLayout();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function editAction() {
|
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)) {
|
33 |
+
$model->setData($data);
|
34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
Mage::register('inquiry_data', $model);
|
37 |
+
|
38 |
+
$this->loadLayout();
|
39 |
+
$this->_setActiveMenu('cws');
|
40 |
+
|
41 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
42 |
+
|
43 |
+
$this->_addContent($this->getLayout()->createBlock('inquiry/adminhtml_inquiry_edit'))
|
44 |
+
->_addLeft($this->getLayout()->createBlock('inquiry/adminhtml_inquiry_edit_tabs'));
|
45 |
+
|
46 |
+
$this->renderLayout();
|
47 |
+
} else {
|
48 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('inquiry')->__('Dealer does not exist'));
|
49 |
+
$this->_redirect('*/*/');
|
50 |
+
}
|
51 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
public function newAction() {
|
54 |
+
$this->_forward('edit');
|
55 |
+
}
|
|
|
56 |
|
57 |
+
public function deleteAction() {
|
58 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
59 |
+
try {
|
60 |
+
$model = Mage::getModel('inquiry/inquiry');
|
61 |
+
|
62 |
+
$model->setId($this->getRequest()->getParam('id'))
|
63 |
+
->delete();
|
64 |
+
|
65 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Dealer was successfully deleted'));
|
66 |
+
$this->_redirect('*/*/');
|
67 |
+
} catch (Exception $e) {
|
68 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
69 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
70 |
+
}
|
71 |
+
}
|
72 |
+
$this->_redirect('*/*/');
|
73 |
+
}
|
74 |
+
|
75 |
+
public function massDeleteAction() {
|
76 |
+
$dealerIds = $this->getRequest()->getParam('dealer');
|
77 |
+
if(!is_array($dealerIds)) {
|
78 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
79 |
+
} else {
|
80 |
+
try {
|
81 |
+
foreach ($dealerIds as $dealerId) {
|
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 |
}
|
94 |
+
$this->_redirect('*/*/index');
|
95 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
+
public function createCustomerAction()
|
98 |
+
{
|
99 |
+
$dealer_data = array();
|
100 |
+
$id = $this->getRequest()->getParam('id');
|
101 |
+
$collection = Mage::getModel("inquiry/inquiry")->load($id);
|
102 |
+
$dealer_data = $collection->getData();
|
103 |
+
$dealer_data['country'] = explode('$$$',$dealer_data['country']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
+
$randompass = $this->randomPassword(9,'standard');//generate random password
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
+
$websiteId = Mage::getModel('core/store')->load($dealer_data['storeid'])->getWebsiteId();
|
|
|
108 |
|
109 |
+
$customer = Mage::getModel("customer/customer");
|
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'])
|
118 |
+
->setEmail($dealer_data['email'])
|
119 |
+
->setPassword($randompass)
|
120 |
+
->setTaxvat($dealer_data['taxvat'])
|
121 |
+
->setCustomerActivated('1')
|
122 |
+
->setConfirmation(null);
|
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())
|
133 |
+
->addFieldToFilter('websiteid',$customer->getWebsiteId());
|
134 |
+
|
135 |
+
foreach($dealer_coll as $d){
|
136 |
+
$coll = Mage::getModel("inquiry/inquiry")->load($d->getDealerid());
|
137 |
+
$coll->setData('iscustcreated','1');
|
138 |
+
$coll->save();
|
139 |
+
}
|
140 |
+
|
141 |
+
}
|
142 |
+
catch (Exception $e) {
|
143 |
+
Zend_Debug::dump($e->getMessage());
|
144 |
+
}
|
145 |
+
|
146 |
+
}else{
|
147 |
+
Mage::getSingleton('core/session')->addError("Customer Account Already Created.");
|
148 |
}
|
149 |
+
$this->_redirectReferer();
|
150 |
+
}
|
151 |
+
|
152 |
+
public function addAddress($dealer_data,$id){
|
153 |
$_custom_address = array (
|
154 |
'street' => array (
|
155 |
+
'0' => $dealer_data['address'],
|
|
|
156 |
),
|
157 |
+
'firstname' => $dealer_data['firstname'],
|
158 |
+
'lastname' => $dealer_data['lastname'],
|
159 |
+
'company' => $dealer_data['company'],
|
160 |
+
'city' => $dealer_data['city'],
|
161 |
'region_id' => '',
|
162 |
+
'region' => $dealer_data['state'],
|
163 |
+
'postcode' => $dealer_data['zip'],
|
164 |
+
'country_id' => $dealer_data['country'][0],
|
165 |
+
'telephone' => $dealer_data['phone'],
|
166 |
);
|
167 |
|
168 |
$customAddress = Mage::getModel('customer/address');
|
169 |
$customAddress->setData($_custom_address)
|
170 |
+
->setCustomerId($id)
|
171 |
->setIsDefaultBilling('1')
|
172 |
->setIsDefaultShipping('1')
|
173 |
->setSaveInAddressBook('1');
|
174 |
|
175 |
try {
|
176 |
+
$customAddress->save();
|
177 |
}
|
178 |
catch (Exception $ex) {
|
179 |
}
|
180 |
+
return;
|
181 |
+
}
|
182 |
+
|
183 |
+
public function randomPassword($pwdLength=8, $pwdType='standard')
|
184 |
+
{
|
185 |
+
// $pwdType can be one of these:
|
186 |
+
// test .. .. .. always returns the same password = "test"
|
187 |
+
// any .. .. .. returns a random password, which can contain strange characters
|
188 |
+
// alphanum . .. returns a random password containing alphanumerics only
|
189 |
+
// standard . .. same as alphanum, but not including l10O (lower L, one, zero, upper O)
|
190 |
+
$ranges='';
|
191 |
+
|
192 |
+
if('test'==$pwdType) return 'test';
|
193 |
+
elseif('standard'==$pwdType) $ranges='65-78,80-90,97-107,109-122,50-57';
|
194 |
+
elseif('alphanum'==$pwdType) $ranges='65-90,97-122,48-57';
|
195 |
+
elseif('any'==$pwdType) $ranges='40-59,61-91,93-126';
|
196 |
+
|
197 |
+
if($ranges<>'')
|
198 |
+
{
|
199 |
+
$range=explode(',',$ranges);
|
200 |
+
$numRanges=count($range);
|
201 |
+
mt_srand(time()); //not required after PHP v4.2.0
|
202 |
+
$p='';
|
203 |
+
for ($i = 1; $i <= $pwdLength; $i++)
|
204 |
+
{
|
205 |
+
$r=mt_rand(0,$numRanges-1);
|
206 |
+
list($min,$max)=explode('-',$range[$r]);
|
207 |
+
$p.=chr(mt_rand($min,$max));
|
208 |
+
}
|
209 |
+
return $p;
|
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"> </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 |
+
}
|
app/code/community/CapacityWebSolutions/Inquiry/controllers/IndexController.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
@@ -14,315 +13,292 @@ class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_
|
|
14 |
{
|
15 |
$this->loadLayout(array('default'));
|
16 |
$this->renderLayout();
|
17 |
-
|
18 |
-
}
|
19 |
-
|
20 |
-
public function delAction()
|
21 |
-
{
|
22 |
-
$getUrl=Mage::getSingleton('adminhtml/url')->getSecretKey("adminhtml_mycontroller","delAction");
|
23 |
-
$delid = $this->getRequest()->getParam('delid');
|
24 |
-
if(!empty($delid))
|
25 |
-
{
|
26 |
-
$collection = Mage::getModel("inquiry/inquiry")->load($delid);
|
27 |
-
|
28 |
-
if($collection->delete())
|
29 |
-
{
|
30 |
-
|
31 |
-
}
|
32 |
-
else
|
33 |
-
{
|
34 |
-
Mage::getSingleton('core/session')->addError("Sorry inquiry is not deleted.");
|
35 |
-
}
|
36 |
-
}
|
37 |
-
$this->_redirectReferer();
|
38 |
}
|
39 |
-
|
40 |
public function thanksAction()
|
41 |
{
|
42 |
-
|
43 |
-
$this->loadLayout(array('default'));
|
44 |
-
$this->renderLayout();
|
45 |
-
if($_POST['SUBMIT']=='SUBMIT')
|
46 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
$collection->save();
|
86 |
-
|
87 |
-
$first_name = Mage::getStoreConfig('inquiry/change_label/f_name');
|
88 |
-
if($first_name){
|
89 |
-
$first_name = Mage::getStoreConfig('inquiry/change_label/f_name');
|
90 |
-
}else {
|
91 |
-
$first_name = "First Name";
|
92 |
-
}
|
93 |
-
$last_name = Mage::getStoreConfig('inquiry/change_label/l_name');
|
94 |
-
if($last_name){
|
95 |
-
$last_name = Mage::getStoreConfig('inquiry/change_label/l_name');
|
96 |
-
}else {
|
97 |
-
$last_name = "Last Name";
|
98 |
-
}
|
99 |
-
$company_name = Mage::getStoreConfig('inquiry/change_label/company_name');
|
100 |
-
if($company_name){
|
101 |
-
$company_name = Mage::getStoreConfig('inquiry/change_label/company_name');
|
102 |
-
}else{
|
103 |
-
$company_name = "Last Name";
|
104 |
-
}
|
105 |
-
|
106 |
-
$vat_number = Mage::getStoreConfig('inquiry/change_label/vat_number');
|
107 |
-
if($vat_number){
|
108 |
-
$vat_number = Mage::getStoreConfig('inquiry/change_label/vat_number');
|
109 |
-
}else{
|
110 |
-
$vat_number = "TAX/VAT Number";
|
111 |
-
}
|
112 |
-
|
113 |
-
$address_name = Mage::getStoreConfig('inquiry/change_label/address');
|
114 |
-
if($address_name){
|
115 |
-
$address_name = Mage::getStoreConfig('inquiry/change_label/address');
|
116 |
-
}else{
|
117 |
-
$address_name = "Address";
|
118 |
-
}
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
$country = Mage::getStoreConfig('inquiry/change_label/country');
|
135 |
-
if($country){
|
136 |
-
$country = Mage::getStoreConfig('inquiry/change_label/country');
|
137 |
-
}else{
|
138 |
-
$country = "Country";
|
139 |
-
}
|
140 |
-
$postal_code = Mage::getStoreConfig('inquiry/change_label/postal_code');
|
141 |
-
if($postal_code){
|
142 |
-
$postal_code = Mage::getStoreConfig('inquiry/change_label/postal_code');
|
143 |
-
}else{
|
144 |
-
$postal_code = "ZIP/Postal Code";
|
145 |
-
}
|
146 |
-
|
147 |
-
$contact_number = Mage::getStoreConfig('inquiry/change_label/contact_number');
|
148 |
-
if($contact_number){
|
149 |
-
$contact_number = Mage::getStoreConfig('inquiry/change_label/contact_number');
|
150 |
-
}else{
|
151 |
-
$contact_number = "Contact Number";
|
152 |
-
}
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
<tr>
|
189 |
<td>
|
190 |
-
|
191 |
-
<tr>
|
192 |
-
<td><label>'.$first_name.':</label></td>
|
193 |
-
<td><label>'.$fname.'</label></td>
|
194 |
-
</tr>
|
195 |
-
<tr>
|
196 |
-
<td><label>'.$last_name.':</label></td>
|
197 |
-
<td><label>'.$lname.'</label></td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<td><label>'.$company_name.':</label></td>
|
201 |
-
<td><label>'.$company.'</label></td>
|
202 |
-
</tr>
|
203 |
-
<tr>
|
204 |
-
<td><label>'.$vat_number.':</label></td>
|
205 |
-
<td><label>'.$taxvat.'</label></td>
|
206 |
-
</tr>
|
207 |
-
<tr>
|
208 |
-
<td><label>'.$address_name.':</label></td>
|
209 |
-
<td><label>'.$address.'</label></td>
|
210 |
-
</tr>
|
211 |
-
<tr>
|
212 |
-
<td><label>'.$city_name.':</label></td>
|
213 |
-
<td><label>'.$city.'</label></td>
|
214 |
-
</tr>
|
215 |
-
<tr>
|
216 |
-
<td><label>'.$state_name.':</label></td>
|
217 |
-
<td><label>'.$state.'</label></td>
|
218 |
-
</tr>
|
219 |
-
<tr>
|
220 |
-
<td><label>'.$country.':</label></td>
|
221 |
-
<td><label>'.$country1[1].'</label></td>
|
222 |
-
</tr>
|
223 |
-
<tr>
|
224 |
-
<td><label>'.$postal_code.':</label></td>
|
225 |
-
<td><label>'.$zip.'</label></td>
|
226 |
-
</tr>
|
227 |
-
<tr>
|
228 |
-
<td><label>'.$contact_number.':</label></td>
|
229 |
-
<td><label>'.$phone.'</label></td>
|
230 |
-
</tr>
|
231 |
<tr>
|
232 |
-
<
|
233 |
-
|
|
|
234 |
</tr>
|
235 |
<tr>
|
236 |
-
<
|
237 |
-
|
|
|
238 |
</tr>
|
239 |
<tr>
|
240 |
-
<td
|
241 |
-
<
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
</tr>
|
248 |
</table>
|
249 |
</td>
|
250 |
</tr>
|
251 |
-
</table>
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
-
|
277 |
-
{
|
278 |
-
$logo_img = "<img src='$logo_default'/>";
|
279 |
-
}
|
280 |
-
else
|
281 |
-
{
|
282 |
-
$logo_img = "<img src='$img_logo_final'/>";
|
283 |
-
}
|
284 |
-
|
285 |
-
$customerContent = '<table border="0">
|
286 |
-
<tr>
|
287 |
-
<td>
|
288 |
-
<table border="0">
|
289 |
<tr>
|
290 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
</tr>
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
$headers .= 'From:'. $adminName.' <'.$adminEmail.'>';
|
308 |
-
|
309 |
-
mail($email,$custSubject,$customerContent,$headers);
|
310 |
}
|
311 |
else
|
312 |
{
|
313 |
-
|
314 |
-
|
315 |
-
$this->_redirectReferer();
|
316 |
-
|
317 |
}
|
318 |
-
}
|
319 |
-
else
|
320 |
-
{
|
321 |
-
$message = "wrong";
|
322 |
-
Mage::getSingleton('core/session')->setSomeSessionVar($message);
|
323 |
-
$this->_redirectReferer();
|
324 |
}
|
325 |
-
|
|
|
|
|
|
|
|
|
|
|
326 |
}
|
327 |
}
|
328 |
?>
|
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
|
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)
|
27 |
+
{
|
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 |
+
|
35 |
+
$model = Mage::getModel("inquiry/inquiry");
|
36 |
+
$collection = $model->getCollection()
|
37 |
+
->addFieldToFilter('email',$data['email'])
|
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']);
|
45 |
+
$customer->loadByEmail($data['email']);
|
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"> </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"> </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 |
+
{
|
286 |
+
Mage::getSingleton('core/session')->addError(Mage::helper('inquiry')->__('Email id already exits !'));
|
287 |
+
$this->_redirect('*/*/');return;
|
288 |
+
}
|
|
|
|
|
|
|
289 |
}
|
290 |
else
|
291 |
{
|
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();
|
302 |
}
|
303 |
}
|
304 |
?>
|
app/code/community/CapacityWebSolutions/Inquiry/etc/config.xml
CHANGED
@@ -1,27 +1,14 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
<!--
|
4 |
-
/***************************************************************************
|
5 |
-
@extension : Dealer Inquiry Extension.
|
6 |
-
@copyright : Copyright (c) 2014 Capacity Web Solutions.
|
7 |
-
( http://www.capacitywebsolutions.com )
|
8 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
9 |
-
@support : magento@capacitywebsolutions.com
|
10 |
-
***************************************************************************/
|
11 |
-
-->
|
12 |
-
|
13 |
<config>
|
14 |
<modules>
|
15 |
<CapacityWebSolutions_Inquiry>
|
16 |
-
<version>
|
17 |
</CapacityWebSolutions_Inquiry>
|
18 |
</modules>
|
19 |
<global>
|
20 |
<blocks>
|
21 |
<inquiry>
|
22 |
-
<
|
23 |
-
<inquiry>CapacityWebSolutions_Inquiry_Block_Inquiry</inquiry>
|
24 |
-
</rewrite>
|
25 |
</inquiry>
|
26 |
</blocks>
|
27 |
<models>
|
@@ -38,6 +25,26 @@
|
|
38 |
</entities>
|
39 |
</inquiry_mysql4>
|
40 |
</models>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<helpers>
|
42 |
<inquiry>
|
43 |
<class>CapacityWebSolutions_Inquiry_Helper</class>
|
@@ -84,8 +91,23 @@
|
|
84 |
</layout>
|
85 |
</frontend>
|
86 |
<adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
<menu>
|
88 |
-
<
|
|
|
|
|
|
|
|
|
89 |
<title>Dealer Inquiries</title>
|
90 |
<sort_order>71</sort_order>
|
91 |
<children>
|
@@ -101,6 +123,8 @@
|
|
101 |
</dealer_settings>
|
102 |
</children>
|
103 |
</inquiry>
|
|
|
|
|
104 |
</menu>
|
105 |
<layout>
|
106 |
<updates>
|
@@ -134,6 +158,7 @@
|
|
134 |
<general>
|
135 |
<enabled>1</enabled>
|
136 |
<heading>Dealer Inquiry</heading>
|
|
|
137 |
<description>Write description here and it will display after Title.</description>
|
138 |
<success_tital>Thank You.</success_tital>
|
139 |
<success_des>Thank you for contacting us.</success_des>
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<CapacityWebSolutions_Inquiry>
|
5 |
+
<version>2.0.0</version>
|
6 |
</CapacityWebSolutions_Inquiry>
|
7 |
</modules>
|
8 |
<global>
|
9 |
<blocks>
|
10 |
<inquiry>
|
11 |
+
<class>CapacityWebSolutions_Inquiry_Block</class>
|
|
|
|
|
12 |
</inquiry>
|
13 |
</blocks>
|
14 |
<models>
|
25 |
</entities>
|
26 |
</inquiry_mysql4>
|
27 |
</models>
|
28 |
+
<resources>
|
29 |
+
<inquiry_setup>
|
30 |
+
<setup>
|
31 |
+
<module>CapacityWebSolutions_Inquiry</module>
|
32 |
+
</setup>
|
33 |
+
<connection>
|
34 |
+
<use>core_setup</use>
|
35 |
+
</connection>
|
36 |
+
</inquiry_setup>
|
37 |
+
<inquiry_write>
|
38 |
+
<connection>
|
39 |
+
<use>core_write</use>
|
40 |
+
</connection>
|
41 |
+
</inquiry_write>
|
42 |
+
<inquiry_read>
|
43 |
+
<connection>
|
44 |
+
<use>core_read</use>
|
45 |
+
</connection>
|
46 |
+
</inquiry_read>
|
47 |
+
</resources>
|
48 |
<helpers>
|
49 |
<inquiry>
|
50 |
<class>CapacityWebSolutions_Inquiry_Helper</class>
|
91 |
</layout>
|
92 |
</frontend>
|
93 |
<adminhtml>
|
94 |
+
<events>
|
95 |
+
<customer_delete_commit_after>
|
96 |
+
<observers>
|
97 |
+
<inquiry>
|
98 |
+
<type>singleton</type>
|
99 |
+
<class>inquiry/observer</class>
|
100 |
+
<method>updateStatus</method>
|
101 |
+
</inquiry>
|
102 |
+
</observers>
|
103 |
+
</customer_delete_commit_after>
|
104 |
+
</events>
|
105 |
<menu>
|
106 |
+
<cws module="inquiry">
|
107 |
+
<title>CWS Extensions</title>
|
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>
|
123 |
</dealer_settings>
|
124 |
</children>
|
125 |
</inquiry>
|
126 |
+
</children>
|
127 |
+
</cws>
|
128 |
</menu>
|
129 |
<layout>
|
130 |
<updates>
|
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>
|
app/code/community/CapacityWebSolutions/Inquiry/etc/system.xml
CHANGED
@@ -1,13 +1,4 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/***************************************************************************
|
4 |
-
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c) 2014 Capacity Web Solutions.
|
6 |
-
( http://www.capacitywebsolutions.com )
|
7 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
-
@support : magento@capacitywebsolutions.com
|
9 |
-
***************************************************************************/
|
10 |
-
-->
|
11 |
<config>
|
12 |
<tabs>
|
13 |
<cws translate="label" module="inquiry">
|
@@ -41,16 +32,35 @@
|
|
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 |
-
</enabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
50 |
<show_in_default>1</show_in_default>
|
51 |
<show_in_website>1</show_in_website>
|
52 |
<show_in_store>1</show_in_store>
|
53 |
</heading>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
<description translate="label">
|
55 |
<label>Description</label>
|
56 |
<comment>This text will appear under the Dealer inquiry Form title. </comment>
|
@@ -71,7 +81,7 @@
|
|
71 |
</btn_text>
|
72 |
<success_tital translate="label">
|
73 |
<label>Success Page Heading</label>
|
74 |
-
<comment>Here, We can Set Dealer inquiry Success Page
|
75 |
<frontend_type>text</frontend_type>
|
76 |
<sort_order>30</sort_order>
|
77 |
<show_in_default>1</show_in_default>
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<tabs>
|
4 |
<cws translate="label" module="inquiry">
|
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>
|
51 |
<show_in_website>1</show_in_website>
|
52 |
<show_in_store>1</show_in_store>
|
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>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
</enable_js>
|
64 |
<description translate="label">
|
65 |
<label>Description</label>
|
66 |
<comment>This text will appear under the Dealer inquiry Form title. </comment>
|
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>
|
app/code/community/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-install-0.1.0.php
CHANGED
@@ -1,14 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
9 |
***************************************************************************/
|
10 |
|
11 |
-
|
12 |
$installer = $this;
|
13 |
|
14 |
$installer->startSetup();
|
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();
|
app/code/community/CapacityWebSolutions/Inquiry/{Block/Manage/Inquiry.php → sql/inquiry_setup/mysql4-upgrade-1.2.1-2.0.0.php}
RENAMED
@@ -1,19 +1,20 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***************************************************************************
|
4 |
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c)
|
6 |
( http://www.capacitywebsolutions.com )
|
7 |
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
@support : magento@capacitywebsolutions.com
|
9 |
***************************************************************************/
|
10 |
-
|
11 |
-
class CapacityWebSolutions_Inquiry_Block_Manage_Inquiry extends Mage_Adminhtml_Block_Widget_Grid_Container
|
12 |
-
{
|
13 |
-
public function getAll()
|
14 |
-
{
|
15 |
-
$collection = Mage::getModel("inquiry/inquiry")->getCollection();
|
16 |
-
}
|
17 |
-
|
18 |
-
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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();
|
app/design/adminhtml/default/default/layout/inquiry.xml
CHANGED
@@ -1,25 +1,8 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/***************************************************************************
|
4 |
-
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c) 2014 Capacity Web Solutions.
|
6 |
-
( http://www.capacitywebsolutions.com )
|
7 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
-
@support : magento@capacitywebsolutions.com
|
9 |
-
***************************************************************************/
|
10 |
-
-->
|
11 |
-
|
12 |
<layout>
|
13 |
<inquiry_adminhtml_inquiry_index>
|
14 |
-
|
15 |
-
<block type="inquiry/
|
16 |
</reference>
|
17 |
</inquiry_adminhtml_inquiry_index>
|
18 |
-
|
19 |
-
<inquiry_adminhtml_inquiry_view>
|
20 |
-
<reference name="content">
|
21 |
-
<block type="inquiry/inquiry" name="inquiry" template="inquiry/view.phtml"/>
|
22 |
-
</reference>
|
23 |
-
</inquiry_adminhtml_inquiry_view>
|
24 |
-
|
25 |
</layout>
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<layout>
|
3 |
<inquiry_adminhtml_inquiry_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="inquiry/adminhtml_inquiry" name="inquiry" />
|
6 |
</reference>
|
7 |
</inquiry_adminhtml_inquiry_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
</layout>
|
app/design/adminhtml/default/default/template/inquiry/inquiry.phtml
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/***************************************************************************
|
3 |
-
@extension : Dealer Inquiry Extension.
|
4 |
-
@copyright : Copyright (c) 2014 Capacity Web Solutions.
|
5 |
-
( http://www.capacitywebsolutions.com )
|
6 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
-
@support : magento@capacitywebsolutions.com
|
8 |
-
***************************************************************************/
|
9 |
-
|
10 |
-
?>
|
11 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
12 |
-
<html lang="en">
|
13 |
-
<head>
|
14 |
-
<title></title>
|
15 |
-
</head>
|
16 |
-
<body>
|
17 |
-
<div class="content-header">
|
18 |
-
<table cellspacing="0">
|
19 |
-
<tr>
|
20 |
-
<td>
|
21 |
-
<h3 class="head-dashboard">
|
22 |
-
<?php echo $this->__('Dealer Inquiries') ?>
|
23 |
-
</h3>
|
24 |
-
</td>
|
25 |
-
</tr>
|
26 |
-
</table>
|
27 |
-
</div>
|
28 |
-
<?php $collections = ""; $collections = $this->getAllInquires(); ?>
|
29 |
-
|
30 |
-
<div class="grid">
|
31 |
-
<div class="hor-scroll">
|
32 |
-
<table cellspacing="0" id="cmsPageGrid_table" class="data">
|
33 |
-
<col width="10">
|
34 |
-
<thead>
|
35 |
-
<tr class="headings">
|
36 |
-
<th>
|
37 |
-
<span class="nobr"><a class="not-sort" title="asc" name="title">Sr#</a></span>
|
38 |
-
</th>
|
39 |
-
<th>
|
40 |
-
<span class="nobr"><a class="not-sort" title="desc" name="identifier">First Name</a></span>
|
41 |
-
</th>
|
42 |
-
<th>
|
43 |
-
<span class="nobr"><a class="not-sort" title="asc" name="root_template">Last Name</a></span>
|
44 |
-
</th>
|
45 |
-
<th>
|
46 |
-
<span class="nobr"><a class="not-sort" title="asc" name="is_active">Company Name</a></span>
|
47 |
-
</th>
|
48 |
-
<th>
|
49 |
-
<span class="nobr"><a class="not-sort" title="asc" name="creation_time">Email</a></span>
|
50 |
-
</th>
|
51 |
-
<th>
|
52 |
-
<span class="nobr"><a class="not-sort" title="asc" name="update_time">Is Created</a></span>
|
53 |
-
</th>
|
54 |
-
<th>
|
55 |
-
<span class="nobr"><a class="not-sort" title="asc" name="update_time">Created Date</a></span>
|
56 |
-
</th>
|
57 |
-
<th class=" no-link last">
|
58 |
-
<span class="nobr">Action</span>
|
59 |
-
</th>
|
60 |
-
</tr>
|
61 |
-
</thead>
|
62 |
-
<tbody>
|
63 |
-
<?php
|
64 |
-
if($collections->count() != "")
|
65 |
-
{
|
66 |
-
?>
|
67 |
-
<?php
|
68 |
-
$i = 1;
|
69 |
-
foreach($collections as $item)
|
70 |
-
{
|
71 |
-
$website_id = Mage::getModel('core/store')->load($item['storeid'])->getWebsiteId();
|
72 |
-
|
73 |
-
$IsCreated = $this->getIsCreated($item['email'],$website_id);
|
74 |
-
?>
|
75 |
-
<tr class="even pointer">
|
76 |
-
<td class="" align="center"><?php echo $i;//$this->getIsCreated();?></td>
|
77 |
-
<td class="a-left "><?php echo $item['firstname'];?></td>
|
78 |
-
<td class="a-left "><?php echo $item['lastname'];?></td>
|
79 |
-
<td class="a-left "><?php echo $item['company'];?></td>
|
80 |
-
<td class="a-left "><?php echo $item['email'];?></td>
|
81 |
-
<td class="a-left "><?php echo $IsCreated==0? "<font color='#FF0000'>Not Created</font>" : "<font color='#009933'>Created</font>";?></td>
|
82 |
-
<td class="a-left "><?php echo date("F j, Y",strtotime($item['createddt']));?></td>
|
83 |
-
<td class="a-left ">
|
84 |
-
<a href="<?php echo $this->getUrl("inquiry/index/del/delid/".$item['dealerid'])?>" onclick="javascript:return confirm('Are you sure to delete this Inquire?')"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/icon_btn_delete.gif";?>" alt="Delete" title="Delete" /></a>
|
85 |
-
|
86 |
-
<a href="<?php echo Mage::helper("adminhtml")->getUrl("inquiry/adminhtml_inquiry/view/delid/".$item['dealerid']);?>"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/fam_page_white.gif";?>" alt="View" title="View" /></a>
|
87 |
-
|
88 |
-
<?php if($IsCreated==0) {?>
|
89 |
-
<a href="<?php echo Mage::helper("adminhtml")->getUrl("inquiry/adminhtml_inquiry/createCustomer/multival/".$item['email'].'~~'.$item['firstname'].'~~'.$item['lastname'].'~~'.$item['company'].'~~'.$item['address'].'~~'.$item['city'].'~~'.$item['state'].'~~'.$item['zip'].'~~'.$item['phone'].'~~'.$item['country'].'~~'.$item['taxvat'].'~~'.$item['storeid']);?>" onclick="javascript:return confirm('Are you sure to create the account?')"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)."adminhtml/default/default/images/fam_page_white_edit.gif";?>" alt="Create Customer" title="Create Customer" /></a></td>
|
90 |
-
<?php } ?>
|
91 |
-
</tr>
|
92 |
-
<?php $i++;
|
93 |
-
}
|
94 |
-
}
|
95 |
-
else
|
96 |
-
echo "<tr><Td colspan='8' align='center'>No records found.</td></tr>";
|
97 |
-
?>
|
98 |
-
</tbody>
|
99 |
-
</table>
|
100 |
-
</div>
|
101 |
-
</div>
|
102 |
-
|
103 |
-
</body>
|
104 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/inquiry/view.phtml
DELETED
@@ -1,130 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/***************************************************************************
|
4 |
-
@extension : Dealer Inquiry Extension.
|
5 |
-
@copyright : Copyright (c) 2014 Capacity Web Solutions.
|
6 |
-
( http://www.capacitywebsolutions.com )
|
7 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
8 |
-
@support : magento@capacitywebsolutions.com
|
9 |
-
***************************************************************************/
|
10 |
-
|
11 |
-
$_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat');
|
12 |
-
$item = $this->getAllDealer($this->getRequest()->getParam("delid"));
|
13 |
-
$website_id = Mage::getModel('core/store')->load($item['storeid'])->getWebsiteId();
|
14 |
-
|
15 |
-
$IsCreated = $this->getIsCreated($item['email'],$website_id);
|
16 |
-
|
17 |
-
?>
|
18 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
19 |
-
<html lang="en">
|
20 |
-
<head>
|
21 |
-
<title></title>
|
22 |
-
</head>
|
23 |
-
<body>
|
24 |
-
|
25 |
-
<div class="content-header">
|
26 |
-
<table cellspacing="0">
|
27 |
-
<tr>
|
28 |
-
<td><h3 class="head-dashboard"><?php echo $this->__('Dealer Details') ?></h3></td>
|
29 |
-
</tr>
|
30 |
-
</table>
|
31 |
-
</div>
|
32 |
-
<?php
|
33 |
-
$prevurl = Mage::helper("adminhtml")->getUrl("inquiry/adminhtml_inquiry/index/"); ?>
|
34 |
-
<div class="back">
|
35 |
-
<a href="<?php echo $prevurl;?>">
|
36 |
-
<span><font size="4px">«</font> Back</span>
|
37 |
-
</a>
|
38 |
-
<?php if($IsCreated==0)
|
39 |
-
{
|
40 |
-
?>
|
41 |
-
<a href="<?php echo Mage::helper("adminhtml")->getUrl("inquiry/adminhtml_inquiry/createCustomer/multival/".$item['email'].'~~'.$item['firstname'].'~~'.$item['lastname'].'~~'.$item['company'].'~~'.$item['address'].'~~'.$item['city'].'~~'.$item['state'].'~~'.$item['zip'].'~~'.$item['phone'].'~~'.$item['country'].'~~'.$item['taxvat'].'~~'.$item['storeid']);?>" onclick="javascript:return confirm('Are you sure to create the account?')">Create Customer</a>
|
42 |
-
<?php
|
43 |
-
}
|
44 |
-
$country1 = explode('$$$',$item['country']);
|
45 |
-
?>
|
46 |
-
</div>
|
47 |
-
<div class="grid">
|
48 |
-
<div class="hor-scroll">
|
49 |
-
<table cellspacing="0" id="cmsPageGrid_table" class="data">
|
50 |
-
<col width="10">
|
51 |
-
<thead>
|
52 |
-
<tbody>
|
53 |
-
<tr class="even pointer">
|
54 |
-
<td class=""width="15%">First Name</td>
|
55 |
-
<td class="a-left ">
|
56 |
-
<?php echo $item['firstname'];?>
|
57 |
-
</td>
|
58 |
-
</tr>
|
59 |
-
<tr class="even pointer">
|
60 |
-
<td class=""width="15%">Last Name</td>
|
61 |
-
<td class="a-left ">
|
62 |
-
<?php echo $item['lastname'];?>
|
63 |
-
</td>
|
64 |
-
</tr>
|
65 |
-
<tr class="even pointer">
|
66 |
-
<td class=""width="15%">Company Name</td>
|
67 |
-
<td class="a-left ">
|
68 |
-
<?php echo $item['company'];?>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
|
72 |
-
<tr class="even pointer">
|
73 |
-
<td class=""width="15%">Tax/VAT Number</td>
|
74 |
-
<td class="a-left ">
|
75 |
-
<?php if($item['taxvat']==""): echo "-";else:echo $item['taxvat'];endif;?>
|
76 |
-
</td>
|
77 |
-
</tr>
|
78 |
-
|
79 |
-
<tr class="even pointer">
|
80 |
-
<td class=""width="15%">Address</td>
|
81 |
-
<td class="a-left "><?php echo $item['address'];?></td>
|
82 |
-
</tr>
|
83 |
-
<tr class="even pointer">
|
84 |
-
<td class=""width="15%">City</td>
|
85 |
-
<td class="a-left "><?php echo $item['city'];?></td>
|
86 |
-
</tr>
|
87 |
-
<tr class="even pointer">
|
88 |
-
<td class=""width="15%">State</td>
|
89 |
-
<td class="a-left "><?php echo $item['state'];?></td>
|
90 |
-
</tr>
|
91 |
-
<tr class="even pointer">
|
92 |
-
<td class=""width="15%">Country</td>
|
93 |
-
<td class="a-left "><?php echo $country1[1];?></td>
|
94 |
-
</tr>
|
95 |
-
<tr class="even pointer">
|
96 |
-
<td class=""width="15%">Zip</td>
|
97 |
-
<td class="a-left "><?php echo $item['zip'];?></td>
|
98 |
-
</tr>
|
99 |
-
<tr class="even pointer">
|
100 |
-
<td class=""width="15%">Phone</td>
|
101 |
-
<td class="a-left "><?php echo $item['phone'];?></td>
|
102 |
-
</tr>
|
103 |
-
<tr class="even pointer">
|
104 |
-
<td class=""width="15%">Email</td>
|
105 |
-
<td class="a-left "><?php echo $item['email'];?></td>
|
106 |
-
</tr>
|
107 |
-
<tr class="even pointer">
|
108 |
-
<td class=""width="15%">Website</td>
|
109 |
-
<td class="a-left "><?php if($item['website']==""): echo "-";else:echo $item['website'];endif; ?></td>
|
110 |
-
</tr>
|
111 |
-
<tr class="even pointer">
|
112 |
-
<td class=""width="15%">Is Created</td>
|
113 |
-
<td class="a-left "><?php echo $IsCreated==0? "<font color='#FF0000'>Not Created</font>" : "<font color='#009933'>Created</font>";?></td>
|
114 |
-
</tr>
|
115 |
-
<tr class="even pointer">
|
116 |
-
<td class=""width="15%">Created Date</td>
|
117 |
-
<td class="a-left "><?php echo date("F j, Y",strtotime($item['createddt']));?></td>
|
118 |
-
</tr>
|
119 |
-
<tr class="even pointer">
|
120 |
-
<td class=""width="15%">Business Description</td>
|
121 |
-
<td class="a-left "><p><?php if($item['desc']==""): echo "-"; else:echo stripslashes($item['desc']);endif;?></p></td>
|
122 |
-
</tr>
|
123 |
-
</tr>
|
124 |
-
</tbody>
|
125 |
-
</table>
|
126 |
-
</div>
|
127 |
-
</div>
|
128 |
-
|
129 |
-
</body>
|
130 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/layout/inquiry.xml
CHANGED
@@ -1,23 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
<!--
|
4 |
-
/***************************************************************************
|
5 |
-
@extension : Dealer Inquiry Extension.
|
6 |
-
@copyright : Copyright (c) 2014 Capacity Web Solutions.
|
7 |
-
( http://www.capacitywebsolutions.com )
|
8 |
-
@author : Capacity Web Solutions Pvt. Ltd.
|
9 |
-
@support : magento@capacitywebsolutions.com
|
10 |
-
***************************************************************************/
|
11 |
-
-->
|
12 |
-
|
13 |
<layout version="0.1.0">
|
14 |
<default>
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
18 |
</default>
|
19 |
<inquiry_index_index>
|
20 |
<reference name="head">
|
|
|
|
|
|
|
21 |
<action method="addCss"><stylesheet>css/inquiry.css</stylesheet></action>
|
22 |
</reference>
|
23 |
<reference name="root">
|
@@ -29,7 +24,7 @@
|
|
29 |
</block>
|
30 |
</reference>
|
31 |
</inquiry_index_index>
|
32 |
-
<
|
33 |
<reference name="head">
|
34 |
<action method="addCss"><stylesheet>css/inquiry.css</stylesheet></action>
|
35 |
</reference>
|
@@ -41,5 +36,5 @@
|
|
41 |
<action method="setTemplate" ifconfig="inquiry/general/enabled"><template>inquiry/thanks.phtml</template></action>
|
42 |
</block>
|
43 |
</reference>
|
44 |
-
</
|
45 |
</layout>
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<layout version="0.1.0">
|
3 |
<default>
|
4 |
+
<!-- Add top links for dealer inquiry -->
|
5 |
+
<reference name="top.links">
|
6 |
+
<block type="inquiry/inquiry" name="inquirymanagetoplink" >
|
7 |
+
<action method="addTopLinkStores" ifconfig="inquiry/general/enabled"/>
|
8 |
+
</block>
|
9 |
+
</reference>
|
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">
|
24 |
</block>
|
25 |
</reference>
|
26 |
</inquiry_index_index>
|
27 |
+
<inquiry_index_success>
|
28 |
<reference name="head">
|
29 |
<action method="addCss"><stylesheet>css/inquiry.css</stylesheet></action>
|
30 |
</reference>
|
36 |
<action method="setTemplate" ifconfig="inquiry/general/enabled"><template>inquiry/thanks.phtml</template></action>
|
37 |
</block>
|
38 |
</reference>
|
39 |
+
</inquiry_index_success>
|
40 |
</layout>
|
app/design/frontend/base/default/template/inquiry/inquiry.phtml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/***************************************************************************
|
3 |
@extension : Dealer Inquiry Extension.
|
4 |
-
@copyright : Copyright (c)
|
5 |
( http://www.capacitywebsolutions.com )
|
6 |
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
@support : magento@capacitywebsolutions.com
|
@@ -39,13 +39,12 @@
|
|
39 |
?>
|
40 |
|
41 |
<?php if($captcha_hide): ?>
|
42 |
-
|
43 |
-
</script>
|
44 |
<script>
|
45 |
-
var jq = $.noConflict();
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
});
|
50 |
});
|
51 |
</script>
|
@@ -64,7 +63,7 @@ jq("#img_refresh").click(function(){
|
|
64 |
}
|
65 |
else
|
66 |
{
|
67 |
-
alert ("
|
68 |
return false;
|
69 |
}
|
70 |
}
|
@@ -78,50 +77,21 @@ jq("#img_refresh").click(function(){
|
|
78 |
<div class="indicates"><span class="required"><em>*</em></span><?php echo $this->__($indicates); ?></div>
|
79 |
<?php } ?>
|
80 |
|
81 |
-
<?php
|
82 |
-
$msg = Mage::getSingleton('core/session')->getSomeSessionVar();
|
83 |
-
if($msg == 'wrong') { ?>
|
84 |
-
<div id="messages">
|
85 |
-
<ul class="messages">
|
86 |
-
<li class="error-msg">
|
87 |
-
<ul><li>
|
88 |
-
<span style="font-size:12px;">captcha code does not match!</span>
|
89 |
-
</li></ul>
|
90 |
-
</li>
|
91 |
-
</ul>
|
92 |
-
</div>
|
93 |
-
<?php Mage::getSingleton('core/session')->unsSomeSessionVar();
|
94 |
-
$msg = ''; } ?>
|
95 |
-
<?php
|
96 |
-
$msgs = Mage::getSingleton('core/session')->getSomeSessionVar();
|
97 |
-
if($msgs == 'email_wrong') { ?>
|
98 |
-
<div id="messages">
|
99 |
-
<ul class="messages">
|
100 |
-
<li class="error-msg">
|
101 |
-
<ul><li>
|
102 |
-
<span style="font-size:12px;">Email id already exits !</span>
|
103 |
-
</li></ul>
|
104 |
-
</li>
|
105 |
-
</ul>
|
106 |
-
</div>
|
107 |
-
<?php Mage::getSingleton('core/session')->unsSomeSessionVar();
|
108 |
-
$msg = ''; } ?>
|
109 |
-
|
110 |
-
<form name="dealerInquiry" id="dealerInquiry" action="<?php echo $this->getUrl("inquiry/index/thanks"); ?>" method="post">
|
111 |
<div class="fieldset">
|
112 |
<ul class="form-list">
|
113 |
<li class="fields">
|
114 |
<div class="field">
|
115 |
<label><?php if($first_name): ?><?php echo $first_name; ?><?php else: ?><?php echo "First Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
|
116 |
<div class="input-box">
|
117 |
-
<input type="text" name="
|
118 |
</div>
|
119 |
</div>
|
120 |
<?php if($last_name_hide): ?>
|
121 |
<div class="field">
|
122 |
<label><?php if($last_name): ?><?php echo $last_name; ?><?php else: ?><?php echo "Last Name:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
|
123 |
<div class="input-box">
|
124 |
-
<input type="text" name="
|
125 |
</div>
|
126 |
</div>
|
127 |
<?php endif; ?>
|
@@ -138,7 +108,7 @@ jq("#img_refresh").click(function(){
|
|
138 |
<div class="field">
|
139 |
<label><?php if($vat_number): ?><?php echo $vat_number; ?><?php else: ?><?php echo "Tax/VAT Number:"; ?><?php endif; ?></label>
|
140 |
<div class="input-box">
|
141 |
-
<input type="text" name="
|
142 |
</div>
|
143 |
</div>
|
144 |
<?php endif; ?>
|
@@ -167,7 +137,7 @@ jq("#img_refresh").click(function(){
|
|
167 |
<div class="field">
|
168 |
<label><?php if($state): ?><?php echo $state; ?><?php else: ?><?php echo "State / Province:"; ?><?php endif; ?><span class="required"><em>*</em></span></label>
|
169 |
<div class="input-box">
|
170 |
-
<input type="text" name="
|
171 |
</div>
|
172 |
</div>
|
173 |
<?php endif; ?>
|
@@ -232,7 +202,7 @@ jq("#img_refresh").click(function(){
|
|
232 |
<div class="field">
|
233 |
<label><?php if($description): ?><?php echo $description; ?><?php else: ?><?php echo "Business Description:"; ?><?php endif; ?></label>
|
234 |
<div class="input-box">
|
235 |
-
<textarea name="
|
236 |
</div>
|
237 |
</div>
|
238 |
</li>
|
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
|
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>
|
63 |
}
|
64 |
else
|
65 |
{
|
66 |
+
alert ("Captcha code does not match!");
|
67 |
return false;
|
68 |
}
|
69 |
}
|
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>
|
96 |
</div>
|
97 |
<?php endif; ?>
|
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; ?>
|
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>
|
142 |
</div>
|
143 |
<?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>
|
app/design/frontend/base/default/template/inquiry/thanks.phtml
CHANGED
@@ -1,15 +1,12 @@
|
|
1 |
<?php
|
2 |
/***************************************************************************
|
3 |
@extension : Dealer Inquiry Extension.
|
4 |
-
@copyright : Copyright (c)
|
5 |
( http://www.capacitywebsolutions.com )
|
6 |
@author : Capacity Web Solutions Pvt. Ltd.
|
7 |
@support : magento@capacitywebsolutions.com
|
8 |
***************************************************************************/
|
9 |
-
?>
|
10 |
-
|
11 |
|
12 |
-
<?php
|
13 |
$success_tital = Mage::getStoreConfig('inquiry/general/success_tital');
|
14 |
$success_des = Mage::getStoreConfig('inquiry/general/success_des');
|
15 |
?>
|
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 |
$success_tital = Mage::getStoreConfig('inquiry/general/success_tital');
|
11 |
$success_des = Mage::getStoreConfig('inquiry/general/success_des');
|
12 |
?>
|
media/inquiry/create_user.png
ADDED
Binary file
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Dealer_Inquery</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
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 "&lt;strong&gt;Dealer Management &lt;/strong&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>
|
14 |
-
<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"><file name="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.0.0</min><max>5.6.
|
18 |
</package>
|
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>
|
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 "&lt;strong&gt;Dealer Management &lt;/strong&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>
|