wf_quotation - Version 0.1.3

Version Notes

Validation Update in this version

Download this release

Release Info

Developer Ankit Jain
Extension wf_quotation
Version 0.1.3
Comparing to
See all releases


Code changes from version 0.1.2 to 0.1.3

app/code/community/Webfrnd/Quotation/Block/Adminhtml/Filldetails/Edit/Form.php CHANGED
@@ -69,7 +69,8 @@
69
  'label' => Mage::helper('quotation')->__('Customer Email'),
70
  'after_element_html' => '<small>Email on which the quotation will send</small>',
71
  'tabindex' => 1,
72
- 'required' => true
 
73
  ));
74
 
75
  }
69
  'label' => Mage::helper('quotation')->__('Customer Email'),
70
  'after_element_html' => '<small>Email on which the quotation will send</small>',
71
  'tabindex' => 1,
72
+ 'required' => true,
73
+ 'class' => 'required-entry validate-email'
74
  ));
75
 
76
  }
app/code/community/Webfrnd/Quotation/Block/Adminhtml/Quotation/Edit/Tab/Formview.php CHANGED
@@ -35,7 +35,7 @@ class Webfrnd_Quotation_Block_Adminhtml_Quotation_Edit_Tab_Formview extends Mage
35
  $fieldset->addField('mycustom_element', 'selected_products', array(
36
  //'label' => 'Selected Products',
37
  'name' => 'mycustom_element',
38
- 'required' => false,
39
  'value' => $this->getLastEventLabel($lastEvent),
40
  'bold' => true,
41
  'label_style' => 'font-weight: bold;color:red;',
35
  $fieldset->addField('mycustom_element', 'selected_products', array(
36
  //'label' => 'Selected Products',
37
  'name' => 'mycustom_element',
38
+ 'required' => true,
39
  'value' => $this->getLastEventLabel($lastEvent),
40
  'bold' => true,
41
  'label_style' => 'font-weight: bold;color:red;',
app/code/community/Webfrnd/Quotation/Lib/Varien/Data/Form/Element/SelectedProducts.php CHANGED
@@ -10,6 +10,8 @@ class Webfrnd_Quotation_Lib_Varien_Data_Form_Element_SelectedProducts extends Va
10
  $this->edit_id = $edit_id;
11
  }
12
  }
 
 
13
 
14
  public function getElementHtml()
15
  {
@@ -114,6 +116,11 @@ $review = isset($_POST['action']) ? $_POST['action'] : null ;
114
 
115
  }else {
116
 
 
 
 
 
 
117
  if($this->edit_id) {
118
  //echo $this->edit_id;
119
  $edit_data = Mage::registry('quotation_data');
@@ -139,9 +146,9 @@ $review = isset($_POST['action']) ? $_POST['action'] : null ;
139
  $html .= '<table class="colorblack" align="center" border="0" cellpadding="5" cellspacing="0">
140
 
141
  <tbody><tr>
142
- <td valign="top" width="35%"><strong>Sell To:</strong><br><textarea name="sell_to" required="required" >'.str_ireplace($breaks, "", $edit_data_content['sell_to']).'</textarea></td>
143
- <td valign="top" width="40%"><strong>Ship To:</strong><br><textarea name="ship_to" required="required" >'.str_ireplace($breaks, "", $edit_data_content['ship_to']).'</textarea></td>
144
- <td valign="top" width="25%"><strong>Quote Date:</strong> <em><input type="date" name="quote_date" value="'.date('Y-m-d', strtotime($edit_data_content['quote_date'])).'" required="required" /></em><br/><strong>Quoted By:</strong> <em><input type="text" name="quote_by" value="'.$edit_data_content['quote_by'].'" required="required" /></em>
145
  </td>
146
  </tr>
147
 
@@ -168,9 +175,9 @@ $review = isset($_POST['action']) ? $_POST['action'] : null ;
168
  <input type="hidden" name="prod['.$thisProd['id'].'][id]" value="'.$thisProd['id'].'" />
169
  <td class="top" valign="top"><input type="hidden" name="prod['.$thisProd['id'].'][thumbnail]" value="'.$thisProd['thumbnail'].'" /><img src="'.$thisProd['thumbnail'].'" /></td>
170
  <td class="top" valign="top"><strong><input type="hidden" name="prod['.$thisProd['id'].'][item]" value="'.$thisProd['item'].'" />'.$thisProd['item'].'</td>
171
- <td class="top" valign="top"><input type="text" name="prod['.$thisProd['id'].'][qty]" value="'.$thisProd['qty'].'" required="required" /></td>
172
- <td class="top" valign="top"><textarea name="prod['.$thisProd['id'].'][desc]" required="required" >'.$thisProd['desc'].'</textarea></td>
173
- <td class="top" valign="top"><input type="text" name="prod['.$thisProd['id'].'][price]" value="'.number_format($thisProd['price']).'" required="required" /></td>
174
  </tr>';
175
 
176
  }
@@ -224,9 +231,9 @@ $review = isset($_POST['action']) ? $_POST['action'] : null ;
224
  $html .= '<table class="colorblack" align="center" border="0" cellpadding="5" cellspacing="0">
225
 
226
  <tbody><tr>
227
- <td valign="top" width="35%"><strong>Sell To:</strong><br><textarea name="sell_to" required="required" ></textarea></td>
228
- <td valign="top" width="40%"><strong>Ship To:</strong><br><textarea name="ship_to" required="required" ></textarea></td>
229
- <td valign="top" width="25%"><strong>Quoted By:</strong> <em><input type="text" name="quote_by" value="'.Mage::getSingleton('admin/session')->getUser()->getUsername().'" required="required" /></em>
230
  </td>
231
  </tr>
232
 
@@ -261,9 +268,9 @@ $review = isset($_POST['action']) ? $_POST['action'] : null ;
261
  <input type="hidden" name="prod['.$thisProd->getId().'][id]" value="'.$thisProd->getId().'" />
262
  <td class="top" valign="top"><input type="hidden" name="prod['.$thisProd->getId().'][thumbnail]" value="'.$thumbnail.'" /><img src="'.$thumbnail.'" /></td>
263
  <td class="top" valign="top"><strong><input type="hidden" name="prod['.$thisProd->getId().'][item]" value="'.$thisProd->getSku().PHP_EOL.'('.$thisProd->getId().')" />'.$thisProd->getSku().'<br />('.$thisProd->getId().')</strong></td>
264
- <td class="top" valign="top"><input type="text" name="prod['.$thisProd->getId().'][qty]" value="1" required="required" /></td>
265
- <td class="top" valign="top"><textarea name="prod['.$thisProd->getId().'][desc]" required="required" >'.$thisProd->getName().PHP_EOL.$thisProd->getShortDescription().'</textarea></td>
266
- <td class="top" valign="top"><input type="text" name="prod['.$thisProd->getId().'][price]" value="'.number_format($thisProd->getPrice(),2).'" required="required" /></td>
267
  </tr>';
268
 
269
  }
10
  $this->edit_id = $edit_id;
11
  }
12
  }
13
+
14
+
15
 
16
  public function getElementHtml()
17
  {
116
 
117
  }else {
118
 
119
+ $html .= ' <script>
120
+
121
+ </script>
122
+ ';
123
+
124
  if($this->edit_id) {
125
  //echo $this->edit_id;
126
  $edit_data = Mage::registry('quotation_data');
146
  $html .= '<table class="colorblack" align="center" border="0" cellpadding="5" cellspacing="0">
147
 
148
  <tbody><tr>
149
+ <td valign="top" width="35%"><strong>Sell To:</strong><br><textarea class="required-entry" name="sell_to" >'.str_ireplace($breaks, "", $edit_data_content['sell_to']).'</textarea></td>
150
+ <td valign="top" width="40%"><strong>Ship To:</strong><br><textarea class="required-entry" name="ship_to" >'.str_ireplace($breaks, "", $edit_data_content['ship_to']).'</textarea></td>
151
+ <td valign="top" width="25%"><strong>Quote Date:</strong> <em><input class="required-entry" type="date" name="quote_date" value="'.date('Y-m-d', strtotime($edit_data_content['quote_date'])).'" /></em><br/><strong>Quoted By:</strong> <em><input class="required-entry" type="text" name="quote_by" value="'.$edit_data_content['quote_by'].'" /></em>
152
  </td>
153
  </tr>
154
 
175
  <input type="hidden" name="prod['.$thisProd['id'].'][id]" value="'.$thisProd['id'].'" />
176
  <td class="top" valign="top"><input type="hidden" name="prod['.$thisProd['id'].'][thumbnail]" value="'.$thisProd['thumbnail'].'" /><img src="'.$thisProd['thumbnail'].'" /></td>
177
  <td class="top" valign="top"><strong><input type="hidden" name="prod['.$thisProd['id'].'][item]" value="'.$thisProd['item'].'" />'.$thisProd['item'].'</td>
178
+ <td class="top" valign="top"><input class="required-entry validate-number" type="text" name="prod['.$thisProd['id'].'][qty]" value="'.$thisProd['qty'].'" /></td>
179
+ <td class="top" valign="top"><textarea class="required-entry" name="prod['.$thisProd['id'].'][desc]" >'.$thisProd['desc'].'</textarea></td>
180
+ <td class="top" valign="top"><input class="required-entry validate-number" type="text" name="prod['.$thisProd['id'].'][price]" value="'.number_format($thisProd['price']).'" /></td>
181
  </tr>';
182
 
183
  }
231
  $html .= '<table class="colorblack" align="center" border="0" cellpadding="5" cellspacing="0">
232
 
233
  <tbody><tr>
234
+ <td valign="top" width="35%"><strong>Sell To:</strong><br><textarea class="required-entry" name="sell_to"></textarea></td>
235
+ <td valign="top" width="40%"><strong>Ship To:</strong><br><textarea class="required-entry" name="ship_to" ></textarea></td>
236
+ <td valign="top" width="25%"><strong>Quoted By:</strong> <em><input class="required-entry" type="text" name="quote_by" value="'.Mage::getSingleton('admin/session')->getUser()->getUsername().'" /></em>
237
  </td>
238
  </tr>
239
 
268
  <input type="hidden" name="prod['.$thisProd->getId().'][id]" value="'.$thisProd->getId().'" />
269
  <td class="top" valign="top"><input type="hidden" name="prod['.$thisProd->getId().'][thumbnail]" value="'.$thumbnail.'" /><img src="'.$thumbnail.'" /></td>
270
  <td class="top" valign="top"><strong><input type="hidden" name="prod['.$thisProd->getId().'][item]" value="'.$thisProd->getSku().PHP_EOL.'('.$thisProd->getId().')" />'.$thisProd->getSku().'<br />('.$thisProd->getId().')</strong></td>
271
+ <td class="top" valign="top"><input class="required-entry validate-number" type="text" name="prod['.$thisProd->getId().'][qty]" value="1" /></td>
272
+ <td class="top" valign="top"><textarea class="required-entry" name="prod['.$thisProd->getId().'][desc]" >'.$thisProd->getName().PHP_EOL.$thisProd->getShortDescription().'</textarea></td>
273
+ <td class="top" valign="top"><input class="required-entry validate-number" type="text" name="prod['.$thisProd->getId().'][price]" value="'.number_format($thisProd->getPrice(),2).'" /></td>
274
  </tr>';
275
 
276
  }
app/code/community/Webfrnd/Quotation/controllers/Adminhtml/QuotationController.php CHANGED
@@ -288,6 +288,7 @@ class Webfrnd_Quotation_Adminhtml_QuotationController extends Mage_Adminhtml_Con
288
 
289
  try{
290
  $mail->send();
 
291
  //Mage::getSingleton('core/session')->addSuccess("Quotation is successfully sent to ". $customerEmail);
292
  //$this->_redirect('/quotation/index');
293
  }
288
 
289
  try{
290
  $mail->send();
291
+ return true;
292
  //Mage::getSingleton('core/session')->addSuccess("Quotation is successfully sent to ". $customerEmail);
293
  //$this->_redirect('/quotation/index');
294
  }
app/code/community/Webfrnd/Quotation/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Webfrnd_Quotation>
5
- <version>0.1.2</version>
6
  </Webfrnd_Quotation>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Webfrnd_Quotation>
5
+ <version>0.1.3</version>
6
  </Webfrnd_Quotation>
7
  </modules>
8
  <frontend>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>wf_quotation</name>
4
- <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>First Trial Version</summary>
10
  <description>This extension will provide ability to admin users to send quotation/proposal to Any Email. This is the first trial version for test phase.</description>
11
- <notes>First preview release</notes>
12
  <authors><author><name>Ankit Jain</name><user>ankitengr</user><email>ankitengr@gmail.com</email></author></authors>
13
- <date>2015-03-11</date>
14
- <time>12:50:05</time>
15
- <contents><target name="magecommunity"><dir name="Webfrnd"><dir name="Quotation"><dir name="Block"><dir name="Adminhtml"><dir name="Filldetails"><dir name="Edit"><file name="Form.php" hash="df9032d9b038ef2c96353fd1c4dba4b3"/><dir name="Renderer----"><file name="Label.php" hash="bba29ed4f2d634cebea678221e0cf270"/></dir></dir></dir><file name="Filldetails.php" hash="b1183cd5478ab2a18c29ea19b2c9984a"/><dir name="Quotation"><dir name="Edit"><file name="Form.php" hash="6d5ce4d7ff8c29bf9030d72c0ef746e0"/><dir name="Tab"><file name="Form.php" hash="d3c1e209ac20771ce3aff5788beb8ceb"/><file name="Formview.php" hash="ca9ddb44900bae1d821a6da8900f2860"/></dir><file name="Tabs.php" hash="6a0c8a2836c63482691c6889297c482c"/></dir><file name="Edit.php" hash="c5478022d928be0f69651d0720d7c96c"/><file name="Grid.php" hash="cf7a943d34b9a567d17d9e1c852dabd8"/></dir><file name="Quotation.php" hash="45ca661a168000a51ec2500ade664295"/><dir name="Selectproducts"><file name="Grid.php" hash="b7818cec438a1fe9e6982ec529061343"/></dir><file name="Selectproducts.php" hash="edf73749062559b2422c502a14790540"/></dir></dir><dir name="Helper"><file name="Data.php" hash="f4cb8c08a4f303c1f5fb09dc172b5d1f"/></dir><dir name="Lib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="SelectedProducts.php" hash="6f59177977db750df6e1010894aa9826"/></dir></dir></dir></dir></dir><dir name="Model"><dir name="Mysql4"><dir name="Quotation"><file name="Collection.php" hash="5e26750d67bfd9ff7ac3f70963f20aa2"/></dir><file name="Quotation.php" hash="cf961f072e267203b548a01406452f4c"/></dir><file name="Quotation.php" hash="5a6db1535e214e20f10b3c2d0e8b1550"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="QuotationController.php" hash="b492cdcdcea40b747b0e2fd424d8e94d"/></dir><file name="IndexController.php" hash="d5c57e345e6a83608a6bebe306193e4e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="fe8ea78043a4b7f407695f3d8ba8cbb4"/><file name="config.xml" hash="56ffc28d1acf328841c221ba69f68b10"/></dir><dir name="sql"><dir name="quotation_setup"><file name="mysql4-install-0.1.0.php" hash="ce55488926a2c16be18d100f9d37da2f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webfrnd_Quotation.xml" hash="26a1ab4302a048f70f44e4dedcf78465"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="webfrnd_quotation.xml" hash="69b0c12348fae1a449fca8beea2cb86c"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="webfrnd_quotation.xml" hash="902f7c6782b93a05280db787fa52b57c"/></dir><dir name="template"><dir name="webfrnd"><dir name="quotation"><file name="quotation.phtml" hash="80321c2256c6e21ef79f80f2985629d4"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="webfrnd_quotation"><file name="quotation_submit.html" hash="2128717b97dbb975100c71f6f437c861"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>wf_quotation</name>
4
+ <version>0.1.3</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>First Trial Version</summary>
10
  <description>This extension will provide ability to admin users to send quotation/proposal to Any Email. This is the first trial version for test phase.</description>
11
+ <notes>Validation Update in this version</notes>
12
  <authors><author><name>Ankit Jain</name><user>ankitengr</user><email>ankitengr@gmail.com</email></author></authors>
13
+ <date>2015-03-12</date>
14
+ <time>12:25:50</time>
15
+ <contents><target name="magecommunity"><dir name="Webfrnd"><dir name="Quotation"><dir name="Block"><dir name="Adminhtml"><dir name="Filldetails"><dir name="Edit"><file name="Form.php" hash="beee55c4d81044f3dfe53bb79e41a664"/><dir name="Renderer----"><file name="Label.php" hash="bba29ed4f2d634cebea678221e0cf270"/></dir></dir></dir><file name="Filldetails.php" hash="b1183cd5478ab2a18c29ea19b2c9984a"/><dir name="Quotation"><dir name="Edit"><file name="Form.php" hash="6d5ce4d7ff8c29bf9030d72c0ef746e0"/><dir name="Tab"><file name="Form.php" hash="d3c1e209ac20771ce3aff5788beb8ceb"/><file name="Formview.php" hash="eb06ba38bde73b3b5a8ac7677eb71e59"/></dir><file name="Tabs.php" hash="6a0c8a2836c63482691c6889297c482c"/></dir><file name="Edit.php" hash="c5478022d928be0f69651d0720d7c96c"/><file name="Grid.php" hash="cf7a943d34b9a567d17d9e1c852dabd8"/></dir><file name="Quotation.php" hash="45ca661a168000a51ec2500ade664295"/><dir name="Selectproducts"><file name="Grid.php" hash="b7818cec438a1fe9e6982ec529061343"/></dir><file name="Selectproducts.php" hash="edf73749062559b2422c502a14790540"/></dir></dir><dir name="Helper"><file name="Data.php" hash="f4cb8c08a4f303c1f5fb09dc172b5d1f"/></dir><dir name="Lib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="SelectedProducts.php" hash="39b2a6523d6fbe70bd3c28c61182e355"/></dir></dir></dir></dir></dir><dir name="Model"><dir name="Mysql4"><dir name="Quotation"><file name="Collection.php" hash="5e26750d67bfd9ff7ac3f70963f20aa2"/></dir><file name="Quotation.php" hash="cf961f072e267203b548a01406452f4c"/></dir><file name="Quotation.php" hash="5a6db1535e214e20f10b3c2d0e8b1550"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="QuotationController.php" hash="b6cd066963192f36ddd8da29363349b1"/></dir><file name="IndexController.php" hash="d5c57e345e6a83608a6bebe306193e4e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="fe8ea78043a4b7f407695f3d8ba8cbb4"/><file name="config.xml" hash="10d1ca613d20a41dd2cbac08c26b1db6"/></dir><dir name="sql"><dir name="quotation_setup"><file name="mysql4-install-0.1.0.php" hash="ce55488926a2c16be18d100f9d37da2f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webfrnd_Quotation.xml" hash="26a1ab4302a048f70f44e4dedcf78465"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="webfrnd_quotation.xml" hash="69b0c12348fae1a449fca8beea2cb86c"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="webfrnd_quotation.xml" hash="902f7c6782b93a05280db787fa52b57c"/></dir><dir name="template"><dir name="webfrnd"><dir name="quotation"><file name="quotation.phtml" hash="80321c2256c6e21ef79f80f2985629d4"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="webfrnd_quotation"><file name="quotation_submit.html" hash="2128717b97dbb975100c71f6f437c861"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>5.6.0</max></php></required></dependencies>
18
  </package>