Oscprofessionals_ProductEnquires - Version 1.0.2

Version Notes

Email template added

Download this release

Release Info

Developer Satish Mantri
Extension Oscprofessionals_ProductEnquires
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Oscprofessionals/ProductEnquiry/Block/Edit.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @category Oscprofessionals
5
+ * @package Oscprofessionals_ProductEnquiry
6
+ * @author Oscprofessionals Team<oscpteam@oscprofessionals.com>
7
+ *
8
+ */
9
+ class Oscprofessionals_ProductEnquiry_Block_E extends Mage_Core_Block_Template
10
+ {
11
+ public function _prepareLayout()
12
+ {
13
+ return parent::_prepareLayout();
14
+ }
15
+
16
+ public function getEmbriodary()
17
+ {
18
+ if (!$this->hasData('productenquiry')) {
19
+ $this->setData('productenquiry', Mage::registry('productenquiry_data'));
20
+ }
21
+
22
+ return $this->getData('productenquiry');
23
+ }
24
+ }
app/code/community/Oscprofessionals/ProductEnquiry/Helper/Data.php CHANGED
@@ -21,21 +21,23 @@ class Oscprofessionals_ProductEnquiry_Helper_Data extends Mage_Core_Helper_Abstr
21
  */
22
  public function getEnquiryDetails($productId)
23
  {
24
- if($productId){
25
- return Mage::getModel('oscpproductenquiry/productenquiry')->getProductEnquiryDetails($productId);
26
- }else {
27
- return null;
28
- }
29
- }
30
-
31
- /**
32
- * Check module is enable or not
33
- *
34
- */
35
- public function getEnable()
36
- {
 
 
37
 
38
- return Mage::getStoreConfig(self::XML_PATH_ENABLE);
39
  }
40
 
41
  /**
@@ -44,16 +46,13 @@ class Oscprofessionals_ProductEnquiry_Helper_Data extends Mage_Core_Helper_Abstr
44
  */
45
  public function getEnquiryCount($productId)
46
  {
47
- if($productId){
48
- $collection = Mage::getModel('oscpproductenquiry/productenquiry')->getCollection()
49
  ->addFieldToFilter('product_id', array('eq' => $productId))
50
  ->addFieldToFilter('is_approved', array('eq' => 1));
51
 
52
- $enquiryCount = $collection->getSize();
53
- return $enquiryCount;
54
- }else {
55
- return $enquiryCount=null;
56
- }
57
  }
58
 
59
  /**
@@ -63,32 +62,7 @@ class Oscprofessionals_ProductEnquiry_Helper_Data extends Mage_Core_Helper_Abstr
63
  */
64
  public function getProduct($productId)
65
  {
66
- if($productId){
67
- $collection = Mage::getModel('catalog/product')->load($productId);
68
- return $collection;
69
- }else {
70
- return $collection=null;
71
- }
72
- }
73
-
74
- /**
75
- * return module version
76
- *
77
- */
78
- public function getExtensionVersion()
79
- {
80
- return (string) Mage::getConfig()->getNode()->modules->Oscprofessionals_ProductEnquiry->version;
81
- }
82
-
83
- /**
84
- * return product url
85
- *
86
- */
87
- public function getProductUrl($productId)
88
- {
89
-
90
- $product = Mage::getModel('catalog/product')->load($productId);
91
- return $product->getUrl();
92
  }
93
-
94
  }
21
  */
22
  public function getEnquiryDetails($productId)
23
  {
24
+ $productenquiryData = array();
25
+ $collection = Mage::getModel('oscpproductenquiry/productenquiry')->getCollection()
26
+ ->addFieldToSelect('question')
27
+ ->addFieldToSelect('is_approved')
28
+ ->addFieldToSelect('product_id')
29
+ ->addFieldToSelect('name')
30
+ ->addFieldToSelect('email')
31
+ ->addFieldToSelect('product_name')
32
+ ->addFieldToSelect('comment')
33
+ ->addFieldToSelect('created_at')
34
+ ->addFieldToSelect('updated_at')
35
+ ->addFieldToFilter('is_approved',array('eq' => 1))
36
+ ->addFieldToFilter('product_id',array('eq' => $productId))
37
+ ->setOrder('updated_at', 'DESC');
38
+ $collection->getSelect()->limit(Mage::getStoreConfig(self::XML_PATH_ENQUIRY_NUMBER));
39
 
40
+ return $collection;
41
  }
42
 
43
  /**
46
  */
47
  public function getEnquiryCount($productId)
48
  {
49
+
50
+ $collection = Mage::getModel('oscpproductenquiry/productenquiry')->getCollection()
51
  ->addFieldToFilter('product_id', array('eq' => $productId))
52
  ->addFieldToFilter('is_approved', array('eq' => 1));
53
 
54
+ $enquiryCount = $collection->getSize();
55
+ return $enquiryCount;
 
 
 
56
  }
57
 
58
  /**
62
  */
63
  public function getProduct($productId)
64
  {
65
+ $collection = Mage::getModel('catalog/product')->load($productId);
66
+ return $collection;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
 
68
  }
app/code/community/Oscprofessionals/ProductEnquiry/Model/Productenquiry.php CHANGED
@@ -8,11 +8,6 @@
8
  */
9
  class Oscprofessionals_ProductEnquiry_Model_Productenquiry extends Mage_Core_Model_Abstract
10
  {
11
- /**
12
- * Declare Constants
13
- */
14
- const XML_PATH_ENQUIRY_NUMBER = 'productenquiry/email/enquiry_number';
15
-
16
  /**
17
  * Call Parents _init function
18
  */
@@ -21,30 +16,4 @@ class Oscprofessionals_ProductEnquiry_Model_Productenquiry extends Mage_Core_Mod
21
  parent::_construct();
22
  $this->_init('oscpproductenquiry/productenquiry');
23
  }
24
-
25
- /**
26
- * Get product id and return product data
27
- *
28
- * return Array
29
- */
30
- public function getProductEnquiryDetails($productId)
31
- {
32
- $productenquiryData = array();
33
- $collection = Mage::getModel('oscpproductenquiry/productenquiry')->getCollection()
34
- ->addFieldToSelect('question')
35
- ->addFieldToSelect('is_approved')
36
- ->addFieldToSelect('product_id')
37
- ->addFieldToSelect('name')
38
- ->addFieldToSelect('email')
39
- ->addFieldToSelect('product_name')
40
- ->addFieldToSelect('comment')
41
- ->addFieldToSelect('created_at')
42
- ->addFieldToSelect('updated_at')
43
- ->addFieldToFilter('is_approved',array('eq' => 1))
44
- ->addFieldToFilter('product_id',array('eq' => $productId))
45
- ->setOrder('updated_at', 'DESC');
46
- $collection->getSelect()->limit(Mage::getStoreConfig(self::XML_PATH_ENQUIRY_NUMBER));
47
-
48
- return $collection;
49
- }
50
  }
8
  */
9
  class Oscprofessionals_ProductEnquiry_Model_Productenquiry extends Mage_Core_Model_Abstract
10
  {
 
 
 
 
 
11
  /**
12
  * Call Parents _init function
13
  */
16
  parent::_construct();
17
  $this->_init('oscpproductenquiry/productenquiry');
18
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
app/code/community/Oscprofessionals/ProductEnquiry/Model/Resource/Productenquiry.php CHANGED
@@ -16,6 +16,4 @@ class Oscprofessionals_ProductEnquiry_Model_Resource_Productenquiry extends Mage
16
 
17
  $this->_init('oscpproductenquiry/productenquiry', 'model_id');
18
  }
19
-
20
-
21
  }
16
 
17
  $this->_init('oscpproductenquiry/productenquiry', 'model_id');
18
  }
 
 
19
  }
app/code/community/Oscprofessionals/ProductEnquiry/controllers/AccountController.php CHANGED
@@ -26,11 +26,14 @@ class Oscprofessionals_ProductEnquiry_AccountController extends Mage_Customer_Ac
26
  */
27
  public function loginAction()
28
  {
29
-
 
 
 
30
  if(Mage::app()->getRequest()->getParam('type') == 'enquiry'){
31
- $request["url"] = $this->getRequest()->getServer('HTTP_REFERER');
32
  Mage::getSingleton('core/session')->setLastRequest($request["url"]);
33
- }
34
 
35
  if ($this->_getSession()->isLoggedIn()) {
36
  $this->_redirect('*/*/');
@@ -84,16 +87,14 @@ class Oscprofessionals_ProductEnquiry_AccountController extends Mage_Customer_Ac
84
  $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));
85
  }
86
  }
87
- $redirectUrl=Mage::getSingleton('core/session')->getLastRequest();
88
-
89
- if($redirectUrl){
90
- $this->_redirectUrl($redirectUrl);
91
- Mage::getSingleton('core/session')->unsLastRequest();
92
  }
93
  else{
94
  $this->_redirectUrl($session->getBeforeAuthUrl(true));
95
  }
96
  }
97
-
98
-
99
  }
26
  */
27
  public function loginAction()
28
  {
29
+ // $controllerName = Mage::app()->getFrontController()->getRequest()->getPost('controller_name', '');
30
+
31
+ //print_r(Mage::app()->getRequest()->getControllerName());exit;
32
+
33
  if(Mage::app()->getRequest()->getParam('type') == 'enquiry'){
34
+ $request["url"] = $this->getRequest()->getServer('HTTP_REFERER');
35
  Mage::getSingleton('core/session')->setLastRequest($request["url"]);
36
+ }
37
 
38
  if ($this->_getSession()->isLoggedIn()) {
39
  $this->_redirect('*/*/');
87
  $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));
88
  }
89
  }
90
+ $redirectUrl=Mage::getSingleton('core/session')->getLastRequest();
91
+ //print_r($redirectUrl);exit;
92
+ if($redirectUrl){
93
+ $this->_redirectUrl($redirectUrl);
94
+ Mage::getSingleton('core/session')->unsLastRequest();
95
  }
96
  else{
97
  $this->_redirectUrl($session->getBeforeAuthUrl(true));
98
  }
99
  }
 
 
100
  }
app/code/community/Oscprofessionals/ProductEnquiry/controllers/Adminhtml/ProductenquiryController.php CHANGED
@@ -44,7 +44,6 @@ class Oscprofessionals_ProductEnquiry_Adminhtml_ProductenquiryController extends
44
  $id = $this->getRequest()->getParam('id');
45
  $model = Mage::getModel('oscpproductenquiry/productenquiry')->load($id);
46
 
47
-
48
  if ($model->getId() || $id == 0) {
49
  $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
50
  if (!empty($data)) {
@@ -223,5 +222,4 @@ class Oscprofessionals_ProductEnquiry_Adminhtml_ProductenquiryController extends
223
  $this->getLayout()->createBlock('oscpproductenquiry/adminhtml_productenquiry_edit_tab_product')->toHtml()
224
  );
225
  }
226
-
227
  }
44
  $id = $this->getRequest()->getParam('id');
45
  $model = Mage::getModel('oscpproductenquiry/productenquiry')->load($id);
46
 
 
47
  if ($model->getId() || $id == 0) {
48
  $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
49
  if (!empty($data)) {
222
  $this->getLayout()->createBlock('oscpproductenquiry/adminhtml_productenquiry_edit_tab_product')->toHtml()
223
  );
224
  }
 
225
  }
app/code/community/Oscprofessionals/ProductEnquiry/controllers/IndexController.php CHANGED
@@ -98,8 +98,7 @@ class Oscprofessionals_ProductEnquiry_IndexController extends Mage_Core_Controll
98
  if ($error) {
99
  throw new Exception();
100
  }
101
-
102
-
103
  $mailTemplate = Mage::getModel('core/email_template');
104
 
105
  $mailTemplate->setDesignConfig(array('area' => 'frontend'))
@@ -111,15 +110,14 @@ class Oscprofessionals_ProductEnquiry_IndexController extends Mage_Core_Controll
111
  Mage::getSingleton('core/session')->addSuccess(Mage::helper('oscpproductenquiry')->__('Your question was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
112
 
113
  $this->_redirectUrl(Mage::getBaseUrl() . "productenquiry/index/index/id/" . $post['product_id']);
114
-
115
  return;
116
  } catch (Exception $e) {
117
-
 
118
  $translate->setTranslateInline(true);
119
  Mage::getSingleton('core/session')->addError(Mage::helper('oscpproductenquiry')->__('Unable to submit your request. Please, check all required fields'));
120
  $this->_redirectUrl(Mage::getBaseUrl() . 'productenquiry?id=' . $post['product_id']);
121
  return;
122
  }
123
  }
124
-
125
  }
98
  if ($error) {
99
  throw new Exception();
100
  }
101
+
 
102
  $mailTemplate = Mage::getModel('core/email_template');
103
 
104
  $mailTemplate->setDesignConfig(array('area' => 'frontend'))
110
  Mage::getSingleton('core/session')->addSuccess(Mage::helper('oscpproductenquiry')->__('Your question was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
111
 
112
  $this->_redirectUrl(Mage::getBaseUrl() . "productenquiry/index/index/id/" . $post['product_id']);
 
113
  return;
114
  } catch (Exception $e) {
115
+ echo $e;
116
+ exit;
117
  $translate->setTranslateInline(true);
118
  Mage::getSingleton('core/session')->addError(Mage::helper('oscpproductenquiry')->__('Unable to submit your request. Please, check all required fields'));
119
  $this->_redirectUrl(Mage::getBaseUrl() . 'productenquiry?id=' . $post['product_id']);
120
  return;
121
  }
122
  }
 
123
  }
app/code/community/Oscprofessionals/ProductEnquiry/etc/config.xml CHANGED
@@ -11,7 +11,7 @@
11
  <config>
12
  <modules>
13
  <Oscprofessionals_ProductEnquiry>
14
- <version>1.0.1</version>
15
  </Oscprofessionals_ProductEnquiry>
16
  </modules>
17
  <frontend>
@@ -62,7 +62,7 @@
62
  <class>Oscprofessionals_ProductEnquiry_Model_Resource</class>
63
  <entities>
64
  <productenquiry>
65
- <table>productenquiry</table>
66
  </productenquiry>
67
  </entities>
68
  </oscpproductenquiry_resource>
@@ -99,7 +99,7 @@
99
  </helpers>
100
  <template>
101
  <email>
102
- <productenquiry_email_email_template translate="label" module="productenquiry">
103
  <label>Product Enquiry Form</label>
104
  <file>oscprofessionals/productenquiry.html</file>
105
  <type>html</type>
11
  <config>
12
  <modules>
13
  <Oscprofessionals_ProductEnquiry>
14
+ <version>1.0.2</version>
15
  </Oscprofessionals_ProductEnquiry>
16
  </modules>
17
  <frontend>
62
  <class>Oscprofessionals_ProductEnquiry_Model_Resource</class>
63
  <entities>
64
  <productenquiry>
65
+ <table>product_enquiry</table>
66
  </productenquiry>
67
  </entities>
68
  </oscpproductenquiry_resource>
99
  </helpers>
100
  <template>
101
  <email>
102
+ <productenquiry_email_email_template translate="label" module="oscpproductenquiry">
103
  <label>Product Enquiry Form</label>
104
  <file>oscprofessionals/productenquiry.html</file>
105
  <type>html</type>
app/code/community/Oscprofessionals/ProductEnquiry/etc/config.xml.bak DELETED
@@ -1,120 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- *
5
- * @category Oscprofessionals
6
- * @package Oscprofessionals_ProductEnquiry
7
- * @author Oscprofessionals Team<oscpteam@oscprofessionals.com>
8
- *
9
- */
10
- -->
11
- <config>
12
- <modules>
13
- <Oscprofessionals_ProductEnquiry>
14
- <version>1.0.1</version>
15
- </Oscprofessionals_ProductEnquiry>
16
- </modules>
17
- <frontend>
18
- <routers>
19
- <customer>
20
- <args>
21
- <modules>
22
- <Oscprofessionals_ProductEnquiry before="Mage_Customer">Oscprofessionals_ProductEnquiry</Oscprofessionals_ProductEnquiry>
23
- </modules>
24
- </args>
25
- </customer>
26
- </routers>
27
- <layout>
28
- <updates>
29
- <productenquiry>
30
- <file>oscprofessionals/productenquiry.xml</file>
31
- </productenquiry>
32
- </updates>
33
- </layout>
34
- </frontend>
35
- <admin>
36
- <routers>
37
- <productenquiry>
38
- <use>admin</use>
39
- <args>
40
- <module>Oscprofessionals_ProductEnquiry</module>
41
- <frontName>productenquiry</frontName>
42
- </args>
43
- </productenquiry>
44
- </routers>
45
- </admin>
46
- <adminhtml>
47
- <layout>
48
- <updates>
49
- <productenquiry>
50
- <file>oscprofessionals/productenquiry.xml</file>
51
- </productenquiry>
52
- </updates>
53
- </layout>
54
- </adminhtml>
55
- <global>
56
- <models>
57
- <oscpproductenquiry>
58
- <class>Oscprofessionals_ProductEnquiry_Model</class>
59
- <resourceModel>oscpproductenquiry_resource</resourceModel>
60
- </oscpproductenquiry>
61
- <oscpproductenquiry_resource>
62
- <class>Oscprofessionals_ProductEnquiry_Model_Resource</class>
63
- <entities>
64
- <productenquiry>
65
- <table>product_enquiry</table>
66
- </productenquiry>
67
- </entities>
68
- </oscpproductenquiry_resource>
69
- </models>
70
- <resources>
71
- <productenquiry_setup>
72
- <setup>
73
- <module>Oscprofessionals_ProductEnquiry</module>
74
- </setup>
75
- <connection>
76
- <use>core_setup</use>
77
- </connection>
78
- </productenquiry_setup>
79
- <productenquiry_write>
80
- <connection>
81
- <use>core_write</use>
82
- </connection>
83
- </productenquiry_write>
84
- <productenquiry_read>
85
- <connection>
86
- <use>core_read</use>
87
- </connection>
88
- </productenquiry_read>
89
- </resources>
90
- <blocks>
91
- <oscpproductenquiry>
92
- <class>Oscprofessionals_ProductEnquiry_Block</class>
93
- </oscpproductenquiry>
94
- </blocks>
95
- <helpers>
96
- <oscpproductenquiry>
97
- <class>Oscprofessionals_ProductEnquiry_Helper</class>
98
- </oscpproductenquiry>
99
- </helpers>
100
- <template>
101
- <email>
102
- <productenquiry_email_email_template translate="label" module="productenquiry">
103
- <label>Product Enquiry Form</label>
104
- <file>oscprofessionals/productenquiry.html</file>
105
- <type>html</type>
106
- </productenquiry_email_email_template>
107
- </email>
108
- </template>
109
- </global>
110
- <default>
111
- <productenquiry>
112
- <email>
113
- <recipient_email_sendto><![CDATA[hello@example.com]]></recipient_email_sendto>
114
- <sender_email_identity_sender>custom2</sender_email_identity_sender>
115
- <email_template>productenquiry_email_email_template</email_template>
116
- <enquiry_number>3</enquiry_number>
117
- </email>
118
- </productenquiry>
119
- </default>
120
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Oscprofessionals/ProductEnquiry/etc/system.xml CHANGED
@@ -33,17 +33,6 @@
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  <fields>
36
- <enabled translate="label">
37
- <label>Enable Product Enquiry</label>
38
- <frontend_type>select</frontend_type>
39
- <source_model>adminhtml/system_config_source_yesno</source_model>
40
- <backend_model>contacts/system_config_backend_links</backend_model>
41
- <sort_order>1</sort_order>
42
- <show_in_default>1</show_in_default>
43
- <show_in_website>1</show_in_website>
44
- <show_in_store>1</show_in_store>
45
- <comment>You can enable module. </comment>
46
- </enabled>
47
  <recipient_email_sendto translate="label">
48
  <label>Send Emails To</label>
49
  <frontend_type>text</frontend_type>
@@ -80,15 +69,6 @@
80
  <show_in_store>1</show_in_store>
81
  <comment>Enter number. </comment>
82
  </enquiry_number>
83
- <version translate="label">
84
- <label>Version of Product Enquiry</label>
85
- <frontend_type>select</frontend_type>
86
- <frontend_model>Oscprofessionals_ProductEnquiry_Block_Adminhtml_Version</frontend_model>
87
- <sort_order>50</sort_order>
88
- <show_in_default>1</show_in_default>
89
- <show_in_website>1</show_in_website>
90
- <show_in_store>1</show_in_store>
91
- </version>
92
  </fields>
93
  </email>
94
  </groups>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  <fields>
 
 
 
 
 
 
 
 
 
 
 
36
  <recipient_email_sendto translate="label">
37
  <label>Send Emails To</label>
38
  <frontend_type>text</frontend_type>
69
  <show_in_store>1</show_in_store>
70
  <comment>Enter number. </comment>
71
  </enquiry_number>
 
 
 
 
 
 
 
 
 
72
  </fields>
73
  </email>
74
  </groups>
app/code/community/Oscprofessionals/ProductEnquiry/sql/productenquiry_setup/install-1.0.0.php CHANGED
@@ -11,8 +11,8 @@ $installer = $this;
11
 
12
  $installer->startSetup();
13
  $installer->run("
14
- DROP TABLE IF EXISTS `{$installer->getTable('productenquiry')}`;
15
- CREATE TABLE `{$installer->getTable('productenquiry')}` (
16
  `model_id` int(11) unsigned NOT NULL auto_increment COMMENT 'Model ID',
17
  `product_id` int(11) default NULL,
18
  `name` varchar(50) default NULL,
11
 
12
  $installer->startSetup();
13
  $installer->run("
14
+ DROP TABLE IF EXISTS `{$installer->getTable('product_enquiry')}`;
15
+ CREATE TABLE `{$installer->getTable('product_enquiry')}` (
16
  `model_id` int(11) unsigned NOT NULL auto_increment COMMENT 'Model ID',
17
  `product_id` int(11) default NULL,
18
  `name` varchar(50) default NULL,
app/design/adminhtml/default/default/layout/oscprofessionals/productenquiry.xml DELETED
@@ -1,17 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- *
5
- * @category Oscprofessionals
6
- * @package Oscprofessionals_ProductEnquiry
7
- * @author Oscprofessionals Team<oscpteam@oscprofessionals.com>
8
- *
9
- */
10
- -->
11
- <layout version="0.1.0">
12
- <productenquiry_adminhtml_productenquiry_index>
13
- <reference name="content">
14
- <block type="oscpproductenquiry/adminhtml_productenquiry" name="productenquiry" />
15
- </reference>
16
- </productenquiry_adminhtml_productenquiry_index>
17
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/template/oscprofessionals/productenquiry/form.phtml CHANGED
@@ -3,7 +3,6 @@
3
  $_gridJsObject='fileuploader_fileuploader_productsJsObject';//$this->getJsObjectName();
4
  ?>
5
 
6
-
7
  <script type="text/javascript">
8
  //<![CDATA[
9
  var fileProducts = $H(<?php echo $this->getProductsJson() ?>);
3
  $_gridJsObject='fileuploader_fileuploader_productsJsObject';//$this->getJsObjectName();
4
  ?>
5
 
 
6
  <script type="text/javascript">
7
  //<![CDATA[
8
  var fileProducts = $H(<?php echo $this->getProductsJson() ?>);
app/design/frontend/base/default/template/oscprofessionals/productenquiry/modelform.phtml CHANGED
@@ -15,7 +15,8 @@
15
  <?php
16
  $_id = explode("/", $this->getRequest()->getParam('id'));
17
  $_product = $this->helper('oscpproductenquiry')->getProduct($_id[0]);
18
- $_productName=$_product->getName();?>
 
19
  <?php
20
  $_breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
21
  $_breadcrumbs->addCrumb('home', array('label'=>Mage::helper('cms')->__('Home'), 'title'=>Mage::helper('cms')->__('Home Page'), 'link'=>Mage::getBaseUrl()));
@@ -52,7 +53,7 @@ echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();
52
  <div class="field">
53
  <label for="question" class="text required"><?php echo Mage::helper('oscpproductenquiry')->__('Question') ?><em>*</em></label>
54
  <div class="input-box">
55
- <textarea name="question" id="question" title="<?php echo Mage::helper('oscpproductenquiry')->__('Question') ?>" class="required-entry input-text" style="width: 485px; height: 110px;"></textarea>
56
  </div>
57
  </div>
58
  </div>
15
  <?php
16
  $_id = explode("/", $this->getRequest()->getParam('id'));
17
  $_product = $this->helper('oscpproductenquiry')->getProduct($_id[0]);
18
+ $_productName=$_product->getName();
19
+ ?>
20
  <?php
21
  $_breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
22
  $_breadcrumbs->addCrumb('home', array('label'=>Mage::helper('cms')->__('Home'), 'title'=>Mage::helper('cms')->__('Home Page'), 'link'=>Mage::getBaseUrl()));
53
  <div class="field">
54
  <label for="question" class="text required"><?php echo Mage::helper('oscpproductenquiry')->__('Question') ?><em>*</em></label>
55
  <div class="input-box">
56
+ <textarea name="question" id="question" title="<?php echo Mage::helper('oscpproductenquiry')->__('Question') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
57
  </div>
58
  </div>
59
  </div>
app/locale/en_US/template/email/oscprofessionals/productenquiry.html ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject Product Enquiry Form @-->
2
+
3
+
4
+ <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
5
+ <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
6
+ <table>
7
+ <tr>
8
+ <td>
9
+ First Name: {{var data.name}}
10
+ </td>
11
+ </tr>
12
+ <tr>
13
+ <td>
14
+ Email Address :{{var data.email}}
15
+ </td>
16
+ </tr>
17
+ <tr>
18
+ <td>
19
+ Question: {{var data.question}}
20
+ </td>
21
+ </tr>
22
+ </div>
23
+
24
+ </table>
25
+ </div>
26
+ </body>
package.xml CHANGED
@@ -1,18 +1,24 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Oscprofessionals_ProductEnquires</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>This extension allow customer to submit enquiry or ask question or doubt about any product.</summary>
10
- <description>With this Product Enquiry Magento Extension, customer can submit Enquiry and ask question about any product. While buying product online, mostly customers have many doubt and questions and no one is present there physically to answer their questions, many customer do not prefer to purchase the product if they have any doubt regarding the product. Thus to resolve this problem, product Enquiry extension is used. Its act same like your customer care center for your online shopping. If the customer satisfies by getting their question&#x2019;s answered, customer won&#x2019;t hesitate to buy the product. </description>
11
- <notes>Optimize the Code </notes>
12
- <authors><author><name>Satish Mantri</name><user>satish</user><email>satish@oscprofessionals.com</email></author></authors>
13
- <date>2015-06-05</date>
14
- <time>11:33:21</time>
15
- <contents><target name="magecommunity"><dir name="Oscprofessionals"><dir name="ProductEnquiry"><dir name="Block"><dir name="Adminhtml"><dir name="Productenquiry"><dir name="Edit"><file name="Form.php" hash="70768798a3db6e9cb3edd4377881fa92"/><dir name="Tab"><file name="Form.php" hash="723e37cc0fa286601de06b8ae7b9551c"/></dir><file name="Tabs.php" hash="d6e6c2b95d060e0a0a0a8be8dd1125f5"/></dir><file name="Edit.php" hash="23c67db7f45d9d9956630626327128a9"/><file name="Grid.php" hash="463d3c3f95251a5e6444a13d2a321a73"/></dir><file name="Productenquiry.php" hash="fdf956dba08ee02b01915895973e93fb"/><file name="Version.php" hash="ced17f326a12f542a49888f07b31bacd"/></dir><file name="ProductEnquiry.php" hash="9c63a502eefa900ce571cf1e77cf1cfb"/></dir><dir name="Helper"><file name="Data.php" hash="cd9d4d452078410212cc84390a18abba"/></dir><dir name="Model"><file name="Productenquiry.php" hash="81536cfce15b566fbcb5b4ea470d10cb"/><dir name="Resource"><dir name="Productenquiry"><file name="Collection.php" hash="019681b27898cf314b2751c078773b1a"/></dir><file name="Productenquiry.php" hash="3152358b1c892d7b92a5e2f4b4a75acc"/></dir><file name="Status.php" hash="c42d1ef7fb9fc041c9b2946c0c54b2f6"/></dir><dir name="controllers"><file name="AccountController.php" hash="2f5a92be20b728178ac198d76757553a"/><dir name="Adminhtml"><file name="ProductenquiryController.php" hash="3744dd7ff3bcb791416d0d67b941888a"/></dir><file name="IndexController.php" hash="7c4950490cbca21a56ac8af74ee25765"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5bca418cc8f6229b0c2f0d8cac6e93fa"/><file name="config.xml" hash="1bb65f2d265030479aaa7281fe52d776"/><file name="config.xml.bak" hash="7a435b50fa92bfdee1a60e03e0e4a6c0"/><file name="system.xml" hash="e9c6182561c8a006757a43cefaa96624"/></dir><dir name="sql"><dir name="productenquiry_setup"><file name="install-1.0.0.php" hash="abad6e485c171871eb50c6d87431d645"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="oscprofessionals"><file name="productenquiry.xml" hash="bc4e19457ed963673d667e2b353073cf"/></dir></dir><dir name="template"><dir name="oscprofessionals"><dir name="productenquiry"><file name="enquirydisplay.phtml" hash="98235c6b76674b6c9babcbbec79cc8e0"/><file name="enquirydisplay.phtml_org" hash="75d3f27d63cc2a725ec7e3ef96835c74"/><file name="modelform.phtml" hash="4de8c7cd3715a27c0b5f05a7326f096c"/><file name="org_modelform.phtml" hash="6753f5c81c91b258214c9bc276d88bbb"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="oscprofessionals"><file name="productenquiry.xml" hash="53c925595ebc0b3792d79794db840e1b"/></dir></dir><dir name="template"><dir name="oscprofessionals"><dir name="productenquiry"><file name="form.phtml" hash="2ee32a0ca7b9595ef303469f2d579e5b"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oscprofessionals_ProductEnquiry.xml" hash="815293361a43c88eea862a786736ae06"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="oscprofessionals"><dir name="productenquiry"><file name="productenquiry.css" hash="694a1b72e696dd2f629d971c71f6d4ff"/></dir></dir></dir></dir></dir></dir></target></contents>
 
 
 
 
 
 
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Oscprofessionals_ProductEnquires</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>While buying product online, mostly customers have many doubt and questions and no one is present there physically to answer their questions, many customer do not prefer to purchase the product if they have any doubt regarding the product. Thus to resolve this problem, product enquiry extension is used.</summary>
10
+ <description>With this product Enquiry Magento Extension, customer can submit Enquiry and ask question about any product. &amp;#xD;&#xD;
11
+ &amp;#xD;&#xD;
12
+ While buying product online, mostly customers have many doubt and questions and no one is present there physically to answer their questions, many customer do not prefer to purchase the product if they have any doubt regarding the product.&amp;#xD;&#xD;
13
+ &amp;#xD;&#xD;
14
+ Thus to resolve this problem, product Enquiry extension is used. Its act same like your customer care center for your online shopping. If the customer satisfies by getting their question&amp;#x2019;s answered, customer won&amp;#x2019;t hesitate to buy the product. &amp;#xD;&#xD;
15
+ &amp;#xD;&#xD;
16
+ This feature is added to delight the customer by adding the additional advantage by solving the queries and questions of customers. It simplifies the decision making of the customer about the product.</description>
17
+ <notes>Email template added</notes>
18
+ <authors><author><name>Satish Mantri</name><user>oscprof</user><email>satish@oscprofessionals.com</email></author></authors>
19
+ <date>2015-09-28</date>
20
+ <time>09:04:27</time>
21
+ <contents><target name="magecommunity"><dir name="Oscprofessionals"><dir name="ProductEnquiry"><dir name="Block"><dir name="Adminhtml"><dir name="Productenquiry"><dir name="Edit"><file name="Form.php" hash="70768798a3db6e9cb3edd4377881fa92"/><dir name="Tab"><file name="Form.php" hash="723e37cc0fa286601de06b8ae7b9551c"/></dir><file name="Tabs.php" hash="d6e6c2b95d060e0a0a0a8be8dd1125f5"/></dir><file name="Edit.php" hash="23c67db7f45d9d9956630626327128a9"/><file name="Grid.php" hash="463d3c3f95251a5e6444a13d2a321a73"/></dir><file name="Productenquiry.php" hash="fdf956dba08ee02b01915895973e93fb"/><file name="Version.php" hash="ced17f326a12f542a49888f07b31bacd"/></dir><file name="Edit.php" hash="9a8536fc26dd5eb839e20370ba138a47"/><file name="ProductEnquiry.php" hash="9c63a502eefa900ce571cf1e77cf1cfb"/></dir><dir name="Helper"><file name="Data.php" hash="3e21d26792255a3177f46f757fe6dccd"/></dir><dir name="Model"><file name="Productenquiry.php" hash="f6fd15fbf336ac37fe5bc81a8e853889"/><dir name="Resource"><dir name="Productenquiry"><file name="Collection.php" hash="019681b27898cf314b2751c078773b1a"/></dir><file name="Productenquiry.php" hash="f7a9dcb648e8341aed410e9314e03381"/></dir><file name="Status.php" hash="c42d1ef7fb9fc041c9b2946c0c54b2f6"/></dir><dir name="controllers"><file name="AccountController.php" hash="b5ec1b2d0fffc4cf454f44b259c067f0"/><dir name="Adminhtml"><file name="ProductenquiryController.php" hash="6c3a0202c1efa25f6add5622821ab922"/></dir><file name="IndexController.php" hash="5c4ab5afa40e9c5617d7bbd41f1350e6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5bca418cc8f6229b0c2f0d8cac6e93fa"/><file name="config.xml" hash="09764d860e421fe6cc8fdb6c68258f49"/><file name="system.xml" hash="64c22bf0c2efa83af3449b6f8d8349c1"/></dir><dir name="sql"><dir name="productenquiry_setup"><file name="install-1.0.0.php" hash="f029faacf2775a789648966cef4ad20f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="oscprofessionals"><dir name="productenquiry"><file name="enquirydisplay.phtml" hash="98235c6b76674b6c9babcbbec79cc8e0"/><file name="enquirydisplay.phtml_org" hash="75d3f27d63cc2a725ec7e3ef96835c74"/><file name="modelform.phtml" hash="a26fedd1c4f7fbaed1daf945c2da11ca"/><file name="org_modelform.phtml" hash="6753f5c81c91b258214c9bc276d88bbb"/></dir></dir></dir><dir name="layout"><dir name="oscprofessionals"><file name="productenquiry.xml" hash="bc4e19457ed963673d667e2b353073cf"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="oscprofessionals"><dir name="productenquiry"><file name="form.phtml" hash="96896b54032a8855b80012981734c821"/></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="oscprofessionals"><file name="productenquiry.xml" hash=""/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oscprofessionals_ProductEnquiry.xml" hash="815293361a43c88eea862a786736ae06"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="oscprofessionals"><file name="productenquiry.html" hash="1ed255d80be3ce7cc6a175b52b5e5c3b"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="oscprofessionals"><dir name="productenquiry"><file name="productenquiry.css" hash="694a1b72e696dd2f629d971c71f6d4ff"/></dir></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>