Version Notes
Dealer inquiry / Whole sale account request
Download this release
Release Info
Developer | Magento Core Team |
Extension | Dealer_Inquiry |
Version | 1.1.2 |
Comparing to | |
See all releases |
Version 1.1.2
- app/code/local/CapacityWebSolutions/Inquiry/Block/Inquiry.php +33 -0
- app/code/local/CapacityWebSolutions/Inquiry/Block/Manage/Inquiry.php +14 -0
- app/code/local/CapacityWebSolutions/Inquiry/Helper/Data.php +8 -0
- app/code/local/CapacityWebSolutions/Inquiry/Model/Inquiry.php +15 -0
- app/code/local/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry.php +14 -0
- app/code/local/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry/Collection.php +15 -0
- app/code/local/CapacityWebSolutions/Inquiry/controllers/IndexController.php +137 -0
- app/code/local/CapacityWebSolutions/Inquiry/controllers/Manage/InquiryController.php +53 -0
- app/code/local/CapacityWebSolutions/Inquiry/etc/config.xml +105 -0
- app/code/local/CapacityWebSolutions/Inquiry/etc/system.xml +25 -0
- app/code/local/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-install-0.1.0.php +33 -0
- app/design/adminhtml/default/default/layout/inquiry.xml +23 -0
- app/design/adminhtml/default/default/template/inquiry/inquiry.phtml +84 -0
- app/design/adminhtml/default/default/template/inquiry/view.phtml +96 -0
- app/design/frontend/default/default/layout/inquiry.xml +28 -0
- app/design/frontend/default/default/template/inquiry/inquiry.phtml +134 -0
- app/design/frontend/default/default/template/inquiry/thanks.phtml +12 -0
- app/etc/modules/CapacityWebSolutions_Inquiry.xml +9 -0
- package.xml +18 -0
- skin/frontend/default/default/images/button_submit.jpg +0 -0
app/code/local/CapacityWebSolutions/Inquiry/Block/Inquiry.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
|
7 |
+
class CapacityWebSolutions_Inquiry_Block_Inquiry extends Mage_Core_Block_Template
|
8 |
+
{
|
9 |
+
|
10 |
+
/*Start fo functions for admin section.*/
|
11 |
+
public function getAllInquires()
|
12 |
+
{
|
13 |
+
if($collection = Mage::getModel("inquiry/inquiry")->getCollection())
|
14 |
+
$collection->setOrder('createddt',"Desc")->load();
|
15 |
+
return $collection;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function getAllDealer($delId)
|
19 |
+
{
|
20 |
+
$collection = Mage::getModel("inquiry/inquiry")->load($delId)->getData();
|
21 |
+
return $collection;
|
22 |
+
}
|
23 |
+
public function getIsCreated($email)
|
24 |
+
{
|
25 |
+
$collection = Mage::getModel("customer/customer")->getCollection()->addFieldToFilter("email",$email);
|
26 |
+
if($collection->count())
|
27 |
+
return 1;
|
28 |
+
else
|
29 |
+
return 0;
|
30 |
+
}
|
31 |
+
/*End of functions for admin section.*/
|
32 |
+
}
|
33 |
+
|
app/code/local/CapacityWebSolutions/Inquiry/Block/Manage/Inquiry.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
|
7 |
+
class CapacityWebSolutions_Inquiry_Block_Manage_Inquiry extends Mage_Adminhtml_Block_Widget_Grid_Container
|
8 |
+
{
|
9 |
+
public function getAll()
|
10 |
+
{
|
11 |
+
$collection = Mage::getModel("inquiry/inquiry")->getCollection();
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
app/code/local/CapacityWebSolutions/Inquiry/Helper/Data.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
class CapacityWebSolutions_Inquiry_Helper_Data extends Mage_Core_Helper_Abstract
|
7 |
+
{
|
8 |
+
}
|
app/code/local/CapacityWebSolutions/Inquiry/Model/Inquiry.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
class CapacityWebSolutions_Inquiry_Model_Inquiry extends Mage_Core_Model_Abstract
|
7 |
+
{
|
8 |
+
// necessary methods
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('inquiry/inquiry');
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
app/code/local/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiry extends Mage_Core_Model_Mysql4_Abstract
|
7 |
+
{
|
8 |
+
// necessary methods
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
$this->_init('inquiry/inquiry', 'dealerid');
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
app/code/local/CapacityWebSolutions/Inquiry/Model/Mysql4/Inquiry/Collection.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
class CapacityWebSolutions_Inquiry_Model_Mysql4_Inquiry_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
7 |
+
{
|
8 |
+
// necessary methods
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('inquiry/inquiry');
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
app/code/local/CapacityWebSolutions/Inquiry/controllers/IndexController.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
class CapacityWebSolutions_Inquiry_IndexController extends Mage_Core_Controller_Front_Action
|
7 |
+
{
|
8 |
+
public function indexAction()
|
9 |
+
{
|
10 |
+
$this->loadLayout(array('default'));
|
11 |
+
$this->renderLayout();
|
12 |
+
}
|
13 |
+
|
14 |
+
public function thanksAction()
|
15 |
+
{
|
16 |
+
$this->loadLayout(array('default'));
|
17 |
+
$this->renderLayout();
|
18 |
+
$fname = $this->getRequest()->getParam("fname");
|
19 |
+
$lname = $this->getRequest()->getParam("lname");
|
20 |
+
$company = $this->getRequest()->getParam("company");
|
21 |
+
$address = $this->getRequest()->getParam("address");
|
22 |
+
$city = $this->getRequest()->getParam("city");
|
23 |
+
$state = $this->getRequest()->getParam("state_id");
|
24 |
+
$zip = $this->getRequest()->getParam("zip");
|
25 |
+
$phone = $this->getRequest()->getParam("phone");
|
26 |
+
$email = $this->getRequest()->getParam("email");
|
27 |
+
$website = $this->getRequest()->getParam("website");
|
28 |
+
$bdesc = addslashes($this->getRequest()->getParam("bdesc"));
|
29 |
+
$$headers = "";
|
30 |
+
$insertArr = array("firstname"=>$fname,"lastname"=>$lname,"company"=>$company,"address"=>$address,"ciry"=>$city,"state"=>$state,"zip"=>$zip,"phone"=>$phone,"email"=>$email,"website"=>$website,"desc"=>$bdesc,"iscustcreated"=>0,"status"=>1,"createddt"=>date('Y-m-d H:i:s'));
|
31 |
+
$adminContent = '<table border="0">
|
32 |
+
<tr>
|
33 |
+
<td>
|
34 |
+
<table border="0">
|
35 |
+
<tr>
|
36 |
+
<Td>Hello Administrator,</Td>
|
37 |
+
</tr>
|
38 |
+
<tr>
|
39 |
+
<Td><p>Mr/Ms. '.$fname.' '.$lname.' have filled dealer inquiry form and details are below.</p></Td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td>
|
43 |
+
<table border="0">
|
44 |
+
<tr>
|
45 |
+
<td>First Name:</td>
|
46 |
+
<td>'.$fname.'</td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td>Last Name:</td>
|
50 |
+
<td>'.$lname.'</td>
|
51 |
+
</tr>
|
52 |
+
<tr>
|
53 |
+
<td>Company:</td>
|
54 |
+
<td>'.$company.'</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td>Address:</td>
|
58 |
+
<td>'.$address.'</td>
|
59 |
+
</tr>
|
60 |
+
<tr>
|
61 |
+
<td>City:</td>
|
62 |
+
<td>'.$city.'</td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td>State / Province:</td>
|
66 |
+
<td>'.$state.'</td>
|
67 |
+
</tr>
|
68 |
+
<tr>
|
69 |
+
<td>ZIP / Postal Code:</td>
|
70 |
+
<td>'.$zip.'</td>
|
71 |
+
</tr>
|
72 |
+
<tr>
|
73 |
+
<td>Contact Phone Number:</td>
|
74 |
+
<td>'.$phone.'</td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<td>Email:</td>
|
78 |
+
<td>'.$email.'</td>
|
79 |
+
</tr>
|
80 |
+
<tr>
|
81 |
+
<td>Website:</td>
|
82 |
+
<td>'.$website.'</td>
|
83 |
+
</tr>
|
84 |
+
<tr>
|
85 |
+
<td valign="top" width="15%">Business Description:</td>
|
86 |
+
<td>'.$bdesc.'</td>
|
87 |
+
</tr>
|
88 |
+
<tr><td colspan="2"> </td></tr>
|
89 |
+
<tr>
|
90 |
+
<td colspan="2">Thank You.</td>
|
91 |
+
</tr>
|
92 |
+
</table>
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
</table>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
</table>';
|
99 |
+
$adminSubject = "New Dealer Inquiry from dealer";
|
100 |
+
$adminEmail = Mage::getStoreConfig('trans_email/ident_general/email');
|
101 |
+
$headers .= 'From: Admin <'.$adminEmail.'>';
|
102 |
+
$headers .= 'MIME-Version: 1.0'."\r\n";
|
103 |
+
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
104 |
+
mail($adminEmail,$adminSubject,$adminContent,$headers);
|
105 |
+
|
106 |
+
$customerContent = '<table border="0">
|
107 |
+
<tr>
|
108 |
+
<td>
|
109 |
+
<table border="0">
|
110 |
+
<tr>
|
111 |
+
<Td>Hello '.$fname.',</Td>
|
112 |
+
</tr>
|
113 |
+
<tr>
|
114 |
+
<Td><p>Thank you for contacting us. A company representative will contact you with more information within two business days.</p></Td>
|
115 |
+
</tr>
|
116 |
+
<tr><td colspan="2"> </td></tr>
|
117 |
+
<tr>
|
118 |
+
<td colspan="2">Thank You.</td>
|
119 |
+
</tr>
|
120 |
+
</table>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
</table>';
|
124 |
+
$headers = "";
|
125 |
+
$custSubject = "Thank you for contacting East End Imports.";
|
126 |
+
$headers .= 'From: Admin <'.$adminEmail.'>';
|
127 |
+
$headers .= 'MIME-Version: 1.0'."\r\n";
|
128 |
+
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
|
129 |
+
mail($email,$custSubject,$customerContent,$headers);
|
130 |
+
|
131 |
+
$collection = Mage::getModel("inquiry/inquiry");
|
132 |
+
$collection->setData($insertArr);
|
133 |
+
$collection->save();
|
134 |
+
|
135 |
+
}
|
136 |
+
}
|
137 |
+
?>
|
app/code/local/CapacityWebSolutions/Inquiry/controllers/Manage/InquiryController.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
class CapacityWebSolutions_Inquiry_Manage_InquiryController extends Mage_Adminhtml_Controller_Action
|
7 |
+
{
|
8 |
+
public function indexAction()
|
9 |
+
{
|
10 |
+
|
11 |
+
$action = $custId = "";
|
12 |
+
$action = Mage::app()->getRequest()->getParam('ac');
|
13 |
+
$delid = Mage::app()->getRequest()->getParam('delid');
|
14 |
+
|
15 |
+
if($action == "del" && !empty($delid))
|
16 |
+
{
|
17 |
+
|
18 |
+
$collection = Mage::getModel("inquiry/inquiry")->load($delid);
|
19 |
+
|
20 |
+
if($collection->delete())
|
21 |
+
{
|
22 |
+
Mage::getSingleton('core/session')->addSuccess("Inquire deleted successfully.");
|
23 |
+
}
|
24 |
+
else
|
25 |
+
{
|
26 |
+
Mage::getSingleton('core/session')->addError("Sorry inquire is not deleted.");
|
27 |
+
}
|
28 |
+
|
29 |
+
$this->_redirect("inquiry/manage_inquiry/index/".Mage::getSingleton('core/session')->getFormKey());
|
30 |
+
}
|
31 |
+
|
32 |
+
$this->_title($this->__('Dealer Inquiry'));
|
33 |
+
|
34 |
+
$this->loadLayout("default");
|
35 |
+
$this->_setActiveMenu('inquiry');
|
36 |
+
$this->_addContent($this->getLayout()->createBlock('core/template'));
|
37 |
+
$this->renderLayout();
|
38 |
+
}
|
39 |
+
|
40 |
+
public function viewAction()
|
41 |
+
{
|
42 |
+
$delid = $this->getRequest()->getParam('delid');
|
43 |
+
$this->_title($this->__('Dealer Detail'));
|
44 |
+
|
45 |
+
$this->loadLayout();
|
46 |
+
$this->_setActiveMenu('inquiry');
|
47 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Dashboard'), Mage::helper('adminhtml')->__('Dashboard'));
|
48 |
+
$this->_addContent($this->getLayout()->createBlock('core/template'));
|
49 |
+
$this->renderLayout();
|
50 |
+
|
51 |
+
}
|
52 |
+
}
|
53 |
+
?>
|
app/code/local/CapacityWebSolutions/Inquiry/etc/config.xml
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<CapacityWebSolutions_Inquiry>
|
5 |
+
<version>1.1.1</version>
|
6 |
+
</CapacityWebSolutions_Inquiry>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<blocks>
|
11 |
+
<inquiry>
|
12 |
+
<rewrite>
|
13 |
+
<inquiry>CapacityWebSolutions_Inquiry_Block_Inquiry</inquiry>
|
14 |
+
</rewrite>
|
15 |
+
</inquiry>
|
16 |
+
</blocks>
|
17 |
+
<models>
|
18 |
+
<inquiry>
|
19 |
+
<class>CapacityWebSolutions_Inquiry_Model</class>
|
20 |
+
<resourceModel>inquiry_mysql4</resourceModel>
|
21 |
+
</inquiry>
|
22 |
+
<inquiry_mysql4>
|
23 |
+
<class>CapacityWebSolutions_Inquiry_Model_Mysql4</class>
|
24 |
+
<!-- declate table test -->
|
25 |
+
<entities>
|
26 |
+
<inquiry>
|
27 |
+
<table>dealerinquiry</table>
|
28 |
+
</inquiry>
|
29 |
+
</entities>
|
30 |
+
<!-- -/- -->
|
31 |
+
</inquiry_mysql4>
|
32 |
+
</models>
|
33 |
+
<helpers> <!-- Must for admin section Module -->
|
34 |
+
<inquiry>
|
35 |
+
<class>CapacityWebSolutions_Inquiry_Helper</class>
|
36 |
+
</inquiry>
|
37 |
+
</helpers>
|
38 |
+
<resources>
|
39 |
+
<!-- ... -->
|
40 |
+
<inquiry_setup>
|
41 |
+
<setup>
|
42 |
+
<module>CapacityWebSolutions_Inquiry</module>
|
43 |
+
</setup>
|
44 |
+
<connection>
|
45 |
+
<use>core_setup</use>
|
46 |
+
</connection>
|
47 |
+
</inquiry_setup>
|
48 |
+
<!-- ... -->
|
49 |
+
</resources>
|
50 |
+
</global>
|
51 |
+
<admin><!-- Must for admin section Module -->
|
52 |
+
<routers>
|
53 |
+
<inquiry>
|
54 |
+
<use>admin</use>
|
55 |
+
<args>
|
56 |
+
<module>CapacityWebSolutions_Inquiry</module>
|
57 |
+
<frontName>inquiry</frontName>
|
58 |
+
</args>
|
59 |
+
</inquiry>
|
60 |
+
</routers>
|
61 |
+
</admin>
|
62 |
+
<frontend><!-- Name of folder Frontend in app/design folder. -->
|
63 |
+
<routers>
|
64 |
+
<inquiry>
|
65 |
+
<use>standard</use>
|
66 |
+
<args>
|
67 |
+
<module>CapacityWebSolutions_Inquiry</module>
|
68 |
+
<frontName>inquiry</frontName>
|
69 |
+
</args>
|
70 |
+
</inquiry>
|
71 |
+
</routers>
|
72 |
+
<layout>
|
73 |
+
<updates>
|
74 |
+
<inquiry>
|
75 |
+
<file>inquiry.xml</file>
|
76 |
+
</inquiry>
|
77 |
+
</updates>
|
78 |
+
</layout>
|
79 |
+
</frontend>
|
80 |
+
|
81 |
+
<!--To show module in admin sectino with top menu link bellow two things needed. <menu> tag to create menu item. and <layout> tag to define xml file for layout will be in layout folder of adminhtml. -->
|
82 |
+
<adminhtml><!-- Name of folder Adminhtml in app/design folder. -->
|
83 |
+
<menu><!-- To display menu in admin section top menu. -->
|
84 |
+
<inquiry module="inquiry">
|
85 |
+
<title>Dealer Inquiries</title>
|
86 |
+
<sort_order>71</sort_order>
|
87 |
+
<children>
|
88 |
+
<items module="inquiry">
|
89 |
+
<title>Delear Management</title>
|
90 |
+
<sort_order>0</sort_order>
|
91 |
+
<action>inquiry/manage_inquiry</action> <!-- This is url of admin section module page. we can define it's controller any ware. Here "inquiry" is module name while "manage" is folder name that will be in "controller" folder and 2nd "inquiry" is name of the controller. its action will be indexAction. -->
|
92 |
+
</items>
|
93 |
+
</children>
|
94 |
+
</inquiry>
|
95 |
+
</menu>
|
96 |
+
<layout>
|
97 |
+
<updates>
|
98 |
+
<inquiry>
|
99 |
+
<file>inquiry.xml</file><!--Name of the admin sectin layout file. It will be placed in app/design/adminhtml/default/default/layout folder. It's phtml file will be at same path but in "template" folder. -->
|
100 |
+
</inquiry>
|
101 |
+
</updates>
|
102 |
+
</layout>
|
103 |
+
|
104 |
+
</adminhtml>
|
105 |
+
</config>
|
app/code/local/CapacityWebSolutions/Inquiry/etc/system.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
5 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
<config>
|
9 |
+
<!--<tabs>
|
10 |
+
<inquiry translate="label" module="inquiry">
|
11 |
+
<label>Inquiry</label>
|
12 |
+
<sort_order>301</sort_order>
|
13 |
+
</inquiry>
|
14 |
+
</tabs>
|
15 |
+
<sections>
|
16 |
+
<inquiry translate="label" module="inquiry">
|
17 |
+
<label>Dealer Inquiry</label>
|
18 |
+
<tab>inquiry</tab>
|
19 |
+
<sort_order>130</sort_order>
|
20 |
+
<show_in_default>1</show_in_default>
|
21 |
+
<show_in_website>1</show_in_website>
|
22 |
+
<show_in_store>1</show_in_store>
|
23 |
+
</inquiry>
|
24 |
+
</sections>-->
|
25 |
+
</config>
|
app/code/local/CapacityWebSolutions/Inquiry/sql/inquiry_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
|
10 |
+
CREATE TABLE IF NOT EXISTS `dealerinquiry` (
|
11 |
+
`dealerid` int(11) NOT NULL AUTO_INCREMENT,
|
12 |
+
`firstname` varchar(25) NOT NULL,
|
13 |
+
`lastname` varchar(25) NOT NULL,
|
14 |
+
`company` varchar(100) NOT NULL,
|
15 |
+
`address` varchar(255) NOT NULL,
|
16 |
+
`ciry` varchar(25) NOT NULL,
|
17 |
+
`state` varchar(25) NOT NULL,
|
18 |
+
`zip` varchar(6) NOT NULL,
|
19 |
+
`phone` varchar(15) NOT NULL,
|
20 |
+
`email` varchar(100) NOT NULL,
|
21 |
+
`website` varchar(255) NOT NULL,
|
22 |
+
`desc` text NOT NULL,
|
23 |
+
`iscustcreated` enum('0','1') NOT NULL,
|
24 |
+
`status` enum('0','1') NOT NULL,
|
25 |
+
`createddt` datetime NOT NULL,
|
26 |
+
`updateddt` datetime NOT NULL,
|
27 |
+
PRIMARY KEY (`dealerid`)
|
28 |
+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
|
29 |
+
|
30 |
+
|
31 |
+
");
|
32 |
+
|
33 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/inquiry.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
5 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
-->
|
8 |
+
|
9 |
+
<layout>
|
10 |
+
|
11 |
+
<inquiry_manage_inquiry_index>
|
12 |
+
<reference name="content">
|
13 |
+
<block type="inquiry/inquiry" name="inquiry" template="inquiry/inquiry.phtml"/>
|
14 |
+
</reference>
|
15 |
+
</inquiry_manage_inquiry_index>
|
16 |
+
|
17 |
+
<inquiry_manage_inquiry_view>
|
18 |
+
<reference name="content">
|
19 |
+
<block type="inquiry/inquiry" name="inquiry" template="inquiry/view.phtml"/>
|
20 |
+
</reference>
|
21 |
+
</inquiry_manage_inquiry_view>
|
22 |
+
|
23 |
+
</layout>
|
app/design/adminhtml/default/default/template/inquiry/inquiry.phtml
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
|
7 |
+
?>
|
8 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
9 |
+
<html lang="en">
|
10 |
+
<head>
|
11 |
+
<title></title>
|
12 |
+
</head>
|
13 |
+
<body>
|
14 |
+
|
15 |
+
<div class="content-header">
|
16 |
+
<table cellspacing="0">
|
17 |
+
<tr>
|
18 |
+
<td><h3 class="head-dashboard"><?php echo $this->__('Delear Inquiries') ?></h3></td>
|
19 |
+
</tr>
|
20 |
+
</table>
|
21 |
+
</div>
|
22 |
+
<?php $collections = ""; $collections = $this->getAllInquires();
|
23 |
+
$key=Mage::getSingleton('adminhtml/url')->getSecretKey("manage_inquiry","index");
|
24 |
+
?>
|
25 |
+
|
26 |
+
|
27 |
+
<div class="grid">
|
28 |
+
|
29 |
+
<div class="hor-scroll">
|
30 |
+
<table cellspacing="0" id="cmsPageGrid_table" class="data">
|
31 |
+
<col width="10">
|
32 |
+
<thead>
|
33 |
+
<tr class="headings">
|
34 |
+
<th><span class="nobr"><a class="not-sort" title="asc" name="title">Sr#</a></span></th>
|
35 |
+
<th><span class="nobr"><a class="not-sort" title="desc" name="identifier">First Name</a></span></th>
|
36 |
+
<th><span class="nobr"><a class="not-sort" title="asc" name="root_template">Last Name</a></span></th>
|
37 |
+
<th><span class="nobr"><a class="not-sort" title="asc" name="is_active">Company</a></span></th>
|
38 |
+
<th><span class="nobr"><a class="not-sort" title="asc" name="creation_time">Email</a></span></th>
|
39 |
+
<th><span class="nobr"><a class="not-sort" title="asc" name="update_time">Is Created</a></span></th>
|
40 |
+
<th><span class="nobr"><a class="not-sort" title="asc" name="update_time">Created Date</a></span></th>
|
41 |
+
<th class=" no-link last"><span class="nobr">Action</span></th>
|
42 |
+
</tr>
|
43 |
+
</thead>
|
44 |
+
<tbody>
|
45 |
+
<?php
|
46 |
+
if($collections->count() != "")
|
47 |
+
{
|
48 |
+
?>
|
49 |
+
<?php
|
50 |
+
$i = 0;
|
51 |
+
foreach($collections as $item)
|
52 |
+
{
|
53 |
+
$IsCreated = $this->getIsCreated($item['email']);
|
54 |
+
?>
|
55 |
+
<tr class="even pointer">
|
56 |
+
<td class="" align="center"><?php $this->getIsCreated();echo ++$i;?></td>
|
57 |
+
<td class="a-left "><?php echo $item['firstname'];?></td>
|
58 |
+
<td class="a-left "><?php echo $item['lastname'];?></td>
|
59 |
+
<td class="a-left "><?php echo $item['company'];?></td>
|
60 |
+
<td class="a-left "><?php echo $item['email'];?></td>
|
61 |
+
<td class="a-left "><?php echo $IsCreated==0? "<font color='#FF0000'>Not Created</font>" : "<font color='#009933'>Created</font>";?></td>
|
62 |
+
<td class="a-left "><?php echo date("F j, Y",strtotime($item['createddt']));?></td>
|
63 |
+
<td class="a-left "> <a href="<?php echo $this->getUrl("inquiry/manage_inquiry/index/ac/del/delid/".$item['dealerid']."/key/".$key )?>" onclick="javascript:return confirm('Are sure you want to delete this Inquire?');" ><img src="<?php echo str_replace( "find","default",$this->getSkinurl())."images/icon_btn_delete.gif";?>" alt="Delete" title="Delete" /></a> <a href="<?php echo $this->getUrl('inquiry/manage_inquiry/view', array('delid'=>$item['dealerid'],'key'=>Mage::getSingleton('adminhtml/url')->getSecretKey("manage_inquiry","view")
|
64 |
+
)) ?>" ><img src="<?php echo str_replace( "find","default",$this->getSkinurl())."images/fam_page_white.gif";?>" alt="View" title="View" /></a>
|
65 |
+
<?php if($IsCreated==0) {?>
|
66 |
+
<a href="<?php echo $this->getUrl("adminhtml/customer/new/",array('key'=>Mage::getSingleton('adminhtml/url')->getSecretKey("customer","new")))?>" target="_blank"><img src="<?php echo str_replace( "find","default",$this->getSkinurl())."images/fam_page_white_edit.gif";?>" alt="Create Customer" title="Create Customer" /></a>
|
67 |
+
|
68 |
+
</td>
|
69 |
+
<?php } ?>
|
70 |
+
</tr>
|
71 |
+
<?php
|
72 |
+
}
|
73 |
+
}
|
74 |
+
else
|
75 |
+
echo "<tr><Td colspan='8' align='center'>No records found.</td></tr>";
|
76 |
+
?>
|
77 |
+
</tbody>
|
78 |
+
</table>
|
79 |
+
</div>
|
80 |
+
|
81 |
+
</div>
|
82 |
+
|
83 |
+
</body>
|
84 |
+
</html>
|
app/design/adminhtml/default/default/template/inquiry/view.phtml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
|
7 |
+
$item = $this->getAllDealer($this->getRequest()->getParam("delid"));
|
8 |
+
$IsCreated = $this->getIsCreated($item['email']);
|
9 |
+
?>
|
10 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
11 |
+
<html lang="en">
|
12 |
+
<head>
|
13 |
+
<title></title>
|
14 |
+
</head>
|
15 |
+
<body>
|
16 |
+
|
17 |
+
<div class="content-header">
|
18 |
+
<table cellspacing="0">
|
19 |
+
<tr>
|
20 |
+
<td><h3 class="head-dashboard"><?php echo $this->__('Delear Details') ?></h3></td>
|
21 |
+
</tr>
|
22 |
+
</table>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="back"><a href="<?php echo $this->getUrl("inquiry/manage_inquiry/",array('key'=>Mage::getSingleton('adminhtml/url')->getSecretKey("manage_inquiry","index")))?>"><span><font size="4px">«</font> Back</span></a>
|
26 |
+
<?php if($IsCreated==0) {?>
|
27 |
+
| <a href="<?php echo $this->getUrl("adminhtml/customer/new",array('key'=>Mage::getSingleton('adminhtml/url')->getSecretKey("customer","new")))?>" target="_blank">Create Customer</a>
|
28 |
+
<?php } ?>
|
29 |
+
</div>
|
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 |
+
<tbody>
|
36 |
+
|
37 |
+
<tr class="even pointer">
|
38 |
+
<td class=""width="15%">First Name:</td>
|
39 |
+
<td class="a-left "><?php echo $item['firstname'];?></td>
|
40 |
+
</tr>
|
41 |
+
<tr class="even pointer">
|
42 |
+
<td class=""width="15%">Last Name:</td>
|
43 |
+
<td class="a-left "><?php echo $item['lastname'];?></td>
|
44 |
+
</tr>
|
45 |
+
<tr class="even pointer">
|
46 |
+
<td class=""width="15%">Company:</td>
|
47 |
+
<td class="a-left "><?php echo $item['company'];?></td>
|
48 |
+
</tr>
|
49 |
+
<tr class="even pointer">
|
50 |
+
<td class=""width="15%">Address:</td>
|
51 |
+
<td class="a-left "><?php echo $item['address'];?></td>
|
52 |
+
</tr>
|
53 |
+
<tr class="even pointer">
|
54 |
+
<td class=""width="15%">City:</td>
|
55 |
+
<td class="a-left "><?php echo $item['ciry'];?></td>
|
56 |
+
</tr>
|
57 |
+
<tr class="even pointer">
|
58 |
+
<td class=""width="15%">State:</td>
|
59 |
+
<td class="a-left "><?php echo $item['state'];?></td>
|
60 |
+
</tr>
|
61 |
+
<tr class="even pointer">
|
62 |
+
<td class=""width="15%">Zip:</td>
|
63 |
+
<td class="a-left "><?php echo $item['zip'];?></td>
|
64 |
+
</tr>
|
65 |
+
<tr class="even pointer">
|
66 |
+
<td class=""width="15%">Phone:</td>
|
67 |
+
<td class="a-left "><?php echo $item['phone'];?></td>
|
68 |
+
</tr>
|
69 |
+
<tr class="even pointer">
|
70 |
+
<td class=""width="15%">Email:</td>
|
71 |
+
<td class="a-left "><?php echo $item['email'];?></td>
|
72 |
+
</tr>
|
73 |
+
<tr class="even pointer">
|
74 |
+
<td class=""width="15%">Website:</td>
|
75 |
+
<td class="a-left "><?php echo $item['website'];?></td>
|
76 |
+
</tr>
|
77 |
+
<tr class="even pointer">
|
78 |
+
<td class=""width="15%">Is Created:</td>
|
79 |
+
<td class="a-left "><?php echo $IsCreated==0? "<font color='#FF0000'>Not Created</font>" : "<font color='#009933'>Created</font>";?></td>
|
80 |
+
</tr>
|
81 |
+
<tr class="even pointer">
|
82 |
+
<td class=""width="15%">Created Date:</td>
|
83 |
+
<td class="a-left "><?php echo date("F j, Y",strtotime($item['createddt']));?></td>
|
84 |
+
</tr>
|
85 |
+
<tr class="even pointer">
|
86 |
+
<td class=""width="15%">Business Description:</td>
|
87 |
+
<td class="a-left "><p><?php echo stripslashes($item['desc']);?></p></td>
|
88 |
+
</tr>
|
89 |
+
</tr>
|
90 |
+
</tbody>
|
91 |
+
</table>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
|
95 |
+
</body>
|
96 |
+
</html>
|
app/design/frontend/default/default/layout/inquiry.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<layout version="0.1.0">
|
4 |
+
<default>
|
5 |
+
<reference name="top.links">
|
6 |
+
<action method="addLink" translate="label title" module="inquiry"><label>Delear Inquery</label><url>inquiry/</url><title>Delear Inquery</title><prepare>ture</prepare><urlParams/><position>100</position></action>
|
7 |
+
</reference>
|
8 |
+
</default>
|
9 |
+
|
10 |
+
<inquiry_index_index>
|
11 |
+
<reference name="root">
|
12 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
13 |
+
</reference>
|
14 |
+
<reference name="content">
|
15 |
+
<block type="inquiry/inquiry" name="inquiry" template="inquiry/inquiry.phtml"/>
|
16 |
+
</reference>
|
17 |
+
</inquiry_index_index>
|
18 |
+
|
19 |
+
<inquiry_index_thanks>
|
20 |
+
<reference name="root">
|
21 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
22 |
+
</reference>
|
23 |
+
<reference name="content">
|
24 |
+
<block type="inquiry/inquiry" name="inquiryThanks" template="inquiry/thanks.phtml"/>
|
25 |
+
</reference>
|
26 |
+
</inquiry_index_thanks>
|
27 |
+
|
28 |
+
</layout>
|
app/design/frontend/default/default/template/inquiry/inquiry.phtml
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
?>
|
7 |
+
|
8 |
+
<div id="about-copy">
|
9 |
+
<h1>Dealer inquiries</h1>
|
10 |
+
<p>Please fill in this form if you are interested in becoming a distributor. We are interested in partnering with local distributors and retailers throughout North America. We will also be accepting a limited amount of applications from Online retailers for our drop ship program. A company representative will contact you with more information within two business days.</p>
|
11 |
+
<form name="dealerInquiry" id="dealerInquiry" action="<?php echo $this->getUrl("inquiry/index/thanks"); ?>" method="post">
|
12 |
+
<table width="100%" border="0" cellpadding="0" cellspacing="10px" style="border-spacing:10px;">
|
13 |
+
<tr>
|
14 |
+
<Td colspan="2" style="text-align:right;"><span class="required">*</span> Indicates required.</Td>
|
15 |
+
</tr>
|
16 |
+
<tr>
|
17 |
+
<td width="20%">First Name <span class="required">*</span></td>
|
18 |
+
<td>
|
19 |
+
<input type="text" name="fname" id="fname" size="45" class="input-text required-entry" />
|
20 |
+
</td>
|
21 |
+
</tr>
|
22 |
+
<tr>
|
23 |
+
<td>Last Name <span class="required">*</span></td>
|
24 |
+
<td><input type="text" name="lname" size="45" class="input-text required-entry" /> </td>
|
25 |
+
</tr>
|
26 |
+
<tr>
|
27 |
+
<td>Company <span class="required">*</span></td>
|
28 |
+
<td><input type="text" name="company" size="45" class="input-text required-entry" /> </td>
|
29 |
+
</tr>
|
30 |
+
<tr>
|
31 |
+
<td>Address <span class="required">*</span></td>
|
32 |
+
<td><input type="text" name="address" size="45" class="input-text required-entry" /> </td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td>City <span class="required">*</span></td>
|
36 |
+
<td><input type="text" name="city" size="45" class="input-text required-entry" /> </td>
|
37 |
+
</tr>
|
38 |
+
<tr>
|
39 |
+
<td>State / Province <span class="required">*</span></td>
|
40 |
+
<td>
|
41 |
+
<select name="state_id" class="drop" class="input-text required-entry"><option value="AL">Alabama</option>
|
42 |
+
<option value="AK">Alaska</option>
|
43 |
+
<option value="AZ">Arizona</option>
|
44 |
+
|
45 |
+
<option value="AR">Arkansas</option>
|
46 |
+
<option value="CA">California</option>
|
47 |
+
<option value="CO">Colorado</option>
|
48 |
+
<option value="CT">Connecticut</option>
|
49 |
+
<option value="DC">D.C.</option>
|
50 |
+
<option value="DE">Delaware</option>
|
51 |
+
<option value="FL">Florida</option>
|
52 |
+
<option value="GA">Georgia</option>
|
53 |
+
<option value="HI">Hawaii</option>
|
54 |
+
|
55 |
+
<option value="ID">Idaho</option>
|
56 |
+
<option value="IL">Illinois</option>
|
57 |
+
<option value="IN">Indiana</option>
|
58 |
+
<option value="IA">Iowa</option>
|
59 |
+
<option value="KS">Kanasas</option>
|
60 |
+
<option value="KY">Kentucky</option>
|
61 |
+
<option value="LA">Louisiana</option>
|
62 |
+
<option value="ME">Maine</option>
|
63 |
+
<option value="MD">Maryland</option>
|
64 |
+
|
65 |
+
<option value="MA">Massachusetts</option>
|
66 |
+
<option value="MI">Michigan</option>
|
67 |
+
<option value="MN">Minnesota</option>
|
68 |
+
<option value="MS">Mississippi</option>
|
69 |
+
<option value="MO">Missouri</option>
|
70 |
+
<option value="MT">Montana</option>
|
71 |
+
<option value="NE">Nebraska</option>
|
72 |
+
<option value="NV">Nevada</option>
|
73 |
+
<option value="NH">New Hampshire</option>
|
74 |
+
|
75 |
+
<option value="NJ">New Jersey</option>
|
76 |
+
<option value="NM">New Mexico</option>
|
77 |
+
<option value="NY">New York</option>
|
78 |
+
<option value="NC">North Carolina</option>
|
79 |
+
<option value="ND">North Dakota</option>
|
80 |
+
<option value="OH">Ohio</option>
|
81 |
+
<option value="OK">Oklahoma</option>
|
82 |
+
<option value="OR">Oregon</option>
|
83 |
+
<option value="PA">Pennsylvania</option>
|
84 |
+
|
85 |
+
<option value="RI">Rhode Island</option>
|
86 |
+
<option value="SC">South Carolina</option>
|
87 |
+
<option value="SD">South Dakota</option>
|
88 |
+
<option value="TN">Tennessee</option>
|
89 |
+
<option value="TX">Texas</option>
|
90 |
+
<option value="UT">Utah</option>
|
91 |
+
<option value="VT">Vermont</option>
|
92 |
+
<option value="VA">Virginia</option>
|
93 |
+
<option value="WA">Washington</option>
|
94 |
+
|
95 |
+
<option value="WV">West Virginia</option>
|
96 |
+
<option value="WI">Wisconsin</option>
|
97 |
+
<option value="WY">Wyoming</option>
|
98 |
+
</select>
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
+
<tr>
|
102 |
+
<td>ZIP / Postal Code <span class="required">*</span></td>
|
103 |
+
<td><input type="text" name="zip" id="zip" size="45" class="input-text validate-zip required-entry input-text" /> </td>
|
104 |
+
</tr>
|
105 |
+
<tr>
|
106 |
+
<td>Contact Phone Number <span class="required">*</span></td>
|
107 |
+
<td><input type="text" name="phone" size="45" class="input-text validate-phoneLax input-text required-entry" /> </td>
|
108 |
+
</tr>
|
109 |
+
<tr>
|
110 |
+
<td>Email <span class="required">*</span></td>
|
111 |
+
<td><input type="text" name="email" size="45" class="input-text validate-email required-entry" /> </td>
|
112 |
+
</tr>
|
113 |
+
<tr>
|
114 |
+
<td>Website:</td>
|
115 |
+
<td><input type="text" name="website" size="45" class="input-text" /> </td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td>Business Description:</td>
|
119 |
+
<td><textarea name="bdesc" cols="75" rows="6" class="input-text"></textarea></td>
|
120 |
+
</tr>
|
121 |
+
<tr>
|
122 |
+
<td> </td>
|
123 |
+
<td>
|
124 |
+
<button type="submit" class="button"><img src="<?php echo $this->getSkinUrl('images/button_submit.jpg') ?>" alt="Submit" /></button>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
</table>
|
128 |
+
</form>
|
129 |
+
</div>
|
130 |
+
<script type="text/javascript">
|
131 |
+
//< ![CDATA[
|
132 |
+
var customForm = new VarienForm('dealerInquiry');
|
133 |
+
//]]>
|
134 |
+
</script>
|
app/design/frontend/default/default/template/inquiry/thanks.phtml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @copyright Copyright (c) 2010 Capacity Web Solutions Pvt. Ltd (http://www.capacitywebsolutions.com)
|
4 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
5 |
+
*/
|
6 |
+
?>
|
7 |
+
|
8 |
+
|
9 |
+
<div id="about-copy">
|
10 |
+
<h1>Thank You.</h1>
|
11 |
+
<p>Thank you for contacting us. A company representative will contact you with more information within two business days.</p>
|
12 |
+
</div>
|
app/etc/modules/CapacityWebSolutions_Inquiry.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<CapacityWebSolutions_Inquiry>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</CapacityWebSolutions_Inquiry>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Dealer_Inquiry</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>This extension is providing inquiry form.</summary>
|
10 |
+
<description>Dealer filled the details like name, address, contact number, email, website and description inquiry form. It informs to customer and admin by email when customer submits inquiry form. This extension also provides customer listing who submit inquiry form in admin under “Dealer Management “section. You can view inquiry details of customer and also delete the inquiry information. This extension provides create customer link from dealer listing page.</description>
|
11 |
+
<notes>Dealer inquiry / Whole sale account request</notes>
|
12 |
+
<authors><author><name>CapacityWebSolutions</name><user>auto-converted</user><email>magento@capacitywebsolutions.com</email></author></authors>
|
13 |
+
<date>2011-03-16</date>
|
14 |
+
<time>06:46:25</time>
|
15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="inquiry.xml" hash="c82db350f2fe38dd67b49fb8cf49dabf"/></dir><dir name="template"><dir name="inquiry"><file name="inquiry.phtml" hash="d40ce772671e8f5f94dfa3aa92c60756"/><file name="view.phtml" hash="b2679ccd0dd19482b0ce15707038c1af"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="inquiry.xml" hash="5aef78924cf5494891d4143a0375a1e3"/></dir><dir name="template"><dir name="inquiry"><file name="inquiry.phtml" hash="80d8f49a120d3f11f4e8dbe0df968c82"/><file name="thanks.phtml" hash="76aa188ec3cb4d5c15672f41c20aa888"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="CapacityWebSolutions"><dir name="Inquiry"><dir name="Block"><file name="Inquiry.php" hash="6ded5f3a89db3f2ead9d85b423cd9f0e"/><dir name="Manage"><file name="Inquiry.php" hash="9763614178f7d3b9988f4dda528ab2fc"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="337ab4ad7d39427c63a85956e5d07d88"/><dir name="Manage"><file name="InquiryController.php" hash="54faad64e74abced0a07ff4f5d6c0589"/></dir></dir><dir name="etc"><file name="config.xml" hash="501779b8abc04a82a511721b0ac0edd4"/><file name="system.xml" hash="a7fa4e299399752f973cfb7c23b09946"/></dir><dir name="Helper"><file name="Data.php" hash="3727f4f66a8f27b8c2aee88808934919"/></dir><dir name="Model"><file name="Inquiry.php" hash="cf83fcc67ad4fa8906f3a73266e48827"/><dir name="Mysql4"><file name="Inquiry.php" hash="c248c2c9e909dc5d3d9179c470c2bb91"/><dir name="Inquiry"><file name="Collection.php" hash="31cfb1582d408a5495f3863fc84937f2"/></dir></dir></dir><dir name="sql"><dir name="inquiry_setup"><file name="mysql4-install-0.1.0.php" hash="23c2147085626771e46f75f1881c363f"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><file name="button_submit.jpg" hash="c55995572964cf7462fcb452ff919dee"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CapacityWebSolutions_Inquiry.xml" hash="8d654207ecb2796c7275e01299271474"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|
skin/frontend/default/default/images/button_submit.jpg
ADDED
Binary file
|