OutsourceOnline_Captcha - Version 2.0.5

Version Notes

updated to rectify an error caused due to javascript changes in magento 1.8
Fixed a small bug in OnepageController.php

Download this release

Release Info

Developer Magento Core Team
Extension OutsourceOnline_Captcha
Version 2.0.5
Comparing to
See all releases


Code changes from version 2.0.4 to 2.0.5

app/code/community/OutsourceOnline/Captcha/controllers/OnepageController.php CHANGED
@@ -27,6 +27,7 @@ class OutsourceOnline_Captcha_OnepageController extends Mage_Checkout_OnepageCon
27
  */
28
  public function saveBillingAction()
29
  {
 
30
  //die(Mage::getSingleton('core/session')->getSecuriyCode());
31
  if ($this->_expireAjax()) {
32
  return;
@@ -47,13 +48,14 @@ class OutsourceOnline_Captcha_OnepageController extends Mage_Checkout_OnepageCon
47
 
48
  if ($resp == true)
49
  { // if captcha response is correct, use core functionality
50
- parent::saveBillingAction();
51
  }
52
  else
53
  { // if captcha response is incorrect, reload the page
54
  Mage::getSingleton('core/session')->addError($this->__('Your CAPTCHA entry is incorrect. Please try again.'));
55
  Mage::getSingleton('review/session')->setFormData($data);
56
  $this->_redirectReferer();
 
57
  return;
58
  }
59
  }
@@ -62,7 +64,7 @@ class OutsourceOnline_Captcha_OnepageController extends Mage_Checkout_OnepageCon
62
  parent::postAction();
63
  }*/
64
  }
65
- else
66
  { // if captcha is not enabled, use core function alone
67
  parent::saveBillingAction();
68
  }
27
  */
28
  public function saveBillingAction()
29
  {
30
+ $saveBillingActionComplete = false;
31
  //die(Mage::getSingleton('core/session')->getSecuriyCode());
32
  if ($this->_expireAjax()) {
33
  return;
48
 
49
  if ($resp == true)
50
  { // if captcha response is correct, use core functionality
51
+ //parent::saveBillingAction();
52
  }
53
  else
54
  { // if captcha response is incorrect, reload the page
55
  Mage::getSingleton('core/session')->addError($this->__('Your CAPTCHA entry is incorrect. Please try again.'));
56
  Mage::getSingleton('review/session')->setFormData($data);
57
  $this->_redirectReferer();
58
+ $saveBillingActionComplete = true;
59
  return;
60
  }
61
  }
64
  parent::postAction();
65
  }*/
66
  }
67
+ if(!$saveBillingActionComplete)
68
  { // if captcha is not enabled, use core function alone
69
  parent::saveBillingAction();
70
  }
app/design/frontend/default/default/template/outsourceOnline/captcha/onepage_billing.phtml CHANGED
@@ -207,7 +207,17 @@
207
 
208
  //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
209
  $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
210
-
211
- var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
 
 
 
 
 
 
 
 
 
 
212
  //]]>
213
  </script>
207
 
208
  //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
209
  $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
210
+ <?php if (version_compare(Mage::getVersion(), '1.8', '>=')) //magento 1.8 doesnt have js variable countryRegions
211
+ {?>
212
+ //alert('<?php echo Mage::getVersion();?>');
213
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
214
+ <?php }
215
+ else
216
+ {?>
217
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
218
+ <?php
219
+ }
220
+ ?>
221
+
222
  //]]>
223
  </script>
package.xml CHANGED
@@ -1,18 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>OutsourceOnline_Captcha</name>
4
- <version>2.0.4</version>
5
  <stability>stable</stability>
6
- <license>gpl</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Module to add Ajax captcha functionality for magento</summary>
10
  <description>Captcha functionality for magento forms for registration,contactus,product review and send a friend .Simply install the module and check the aforementioned forms</description>
11
- <notes>fixed issues on magento compilation</notes>
 
12
  <authors><author><name>Sreekanth Dayanand</name><user>auto-converted</user><email>blogspot@outsource-online.net</email></author></authors>
13
- <date>2013-08-08</date>
14
- <time>12:24:26</time>
15
- <contents><target name="magelocale"><dir name="en_US"><file name="OutsourceOnline_Captcha.csv" hash="46c1c9105a99ef6a3e884381ba060fe9"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="OutsourceOnline_Captcha.xml" hash="f1108b50e824b5482177f2dc2eb3443b"/></dir><dir name="template"><dir name="outsourceOnline"><dir name="captcha"><file name="ajaxInsert.phtml" hash="eb81b88715c0c927e4ef8dd0f4e82c82"/><file name="captchaAjax.phtml" hash="5feefbfb1a1aaad28aaadd572dafbe74"/><file name="contacts.phtml" hash="acc889439f7f2375c3c55bfd55e7e05a"/><file name="form.phtml" hash="c6c74543a1859affe1c5051516e76da4"/><file name="onepage_billing.phtml" hash="2d54f1a6b377e949571762cf3ac5f749"/><file name="register.phtml" hash="9140614281ccfd7b8cbc238a34048d6b"/><file name="send.phtml" hash="81196f45080cdfec3741bcab351b92c8"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OutsourceOnline_Captcha.xml" hash="7b700e1a3656005d4fc1b3f703a4269a"/></dir></target><target name="magecommunity"><dir name="OutsourceOnline"><dir name="Captcha"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Billing.php" hash="d9610a7617bf208112283751282a5732"/></dir></dir><dir name="Review"><file name="Form.php" hash="d9039bc65bbf00e4e9a42e405b5864a9"/></dir></dir><dir name="controllers"><file name="AccountController.php" hash="54e72a083e7975feb2140380287cfbb7"/><file name="AjaxController.php" hash="8b923b7ba0ee6736e79a438dbbffade7"/><file name="ContactsController.php" hash="7fc9965a47d3416870cd407a36715a71"/><file name="OnepageController.php" hash="f782d938d9f617c5d0c68f5cc4872740"/><file name="ProductController.php" hash="2d7a42ee7e769a79520c07c535f52f7e"/><file name="ReviewController.php" hash="3d61d2157edf8b3e2a470f9bdd912c34"/></dir><dir name="etc"><file name="config.xml" hash="c1cf64335c83efca54a57c16bc9b467f"/><file name="system.xml" hash="504c040bcc5e99e367e3b32aaccc5d32"/></dir><dir name="Helper"><dir name="osolCaptcha"><file name="ajax-loader-big.gif" hash="a51c5608d01acf32df728f299767f82b"/><file name="font-png.png" hash="91d6af87287956ca32991bb9f81a90e1"/><file name="fontFileMeta.meta" hash="aba07e9e5a68d194cce8434593451c51"/><file name="temp.meta" hash="625e359f6a3bfa64572544d5bf0a073d"/><file name="temp.png" hash="697c73c21eb60c6c237b0bf099428267"/><dir name="ttfs"><file name="AdLibBT.TTF" hash="4ff833d37c38398cd201b2550bf8ecb5"/><file name="BookmanOldStyle.TTF" hash="4267d8aa8711bb8c72cbefb26066c9e0"/><file name="CooperBlack.TTF" hash="8eb03871e6046162efce5f2cdf5fa849"/><file name="index.html" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><file name="Data.php" hash="8f7ce7d3a01d6c6a065a636dc78abdb7"/><file name="OSOLmulticaptcha.php" hash="c4a2e999bb41d1bf4a217ccb2dfc5fea"/></dir><dir name="Model"><dir name="Source"><file name="Captchafonts.php" hash="4ac034345994bdf1eeada4ff0f1b4d22"/><file name="Captchafontsize.php" hash="c6d6c3d7107363f1aa1111663bb14647"/><file name="Captchaimage.php" hash="b49acab3a47cfa798aa16825f6417c82"/><file name="Captchalanguage.php" hash="89d9e8e16788d84c5ce8fcc2a9e07925"/><file name="Captchanoise.php" hash="cf5367e941950ebe7fc5786a550c0f17"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>OutsourceOnline_Captcha</name>
4
+ <version>2.0.5</version>
5
  <stability>stable</stability>
6
+ <license/>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Module to add Ajax captcha functionality for magento</summary>
10
  <description>Captcha functionality for magento forms for registration,contactus,product review and send a friend .Simply install the module and check the aforementioned forms</description>
11
+ <notes>updated to rectify an error caused due to javascript changes in magento 1.8
12
+ Fixed a small bug in OnepageController.php</notes>
13
  <authors><author><name>Sreekanth Dayanand</name><user>auto-converted</user><email>blogspot@outsource-online.net</email></author></authors>
14
+ <date>2014-01-15</date>
15
+ <time>11:20:29</time>
16
+ <contents><target name="magelocale"><dir name="en_US"><file name="OutsourceOnline_Captcha.csv" hash="46c1c9105a99ef6a3e884381ba060fe9"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="OutsourceOnline_Captcha.xml" hash="f1108b50e824b5482177f2dc2eb3443b"/></dir><dir name="template"><dir name="outsourceOnline"><dir name="captcha"><file name="ajaxInsert.phtml" hash="eb81b88715c0c927e4ef8dd0f4e82c82"/><file name="captchaAjax.phtml" hash="5feefbfb1a1aaad28aaadd572dafbe74"/><file name="contacts.phtml" hash="acc889439f7f2375c3c55bfd55e7e05a"/><file name="form.phtml" hash="c6c74543a1859affe1c5051516e76da4"/><file name="onepage_billing.phtml" hash="60c45e8b4683ecb4f7a7cda1cf741d2a"/><file name="register.phtml" hash="9140614281ccfd7b8cbc238a34048d6b"/><file name="send.phtml" hash="81196f45080cdfec3741bcab351b92c8"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OutsourceOnline_Captcha.xml" hash="7b700e1a3656005d4fc1b3f703a4269a"/></dir></target><target name="magecommunity"><dir name="OutsourceOnline"><dir name="Captcha"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Billing.php" hash="d9610a7617bf208112283751282a5732"/></dir></dir><dir name="Review"><file name="Form.php" hash="d9039bc65bbf00e4e9a42e405b5864a9"/></dir></dir><dir name="controllers"><file name="AccountController.php" hash="54e72a083e7975feb2140380287cfbb7"/><file name="AjaxController.php" hash="8b923b7ba0ee6736e79a438dbbffade7"/><file name="ContactsController.php" hash="7fc9965a47d3416870cd407a36715a71"/><file name="OnepageController.php" hash="0b8482baae828d17834cc92bb52afe10"/><file name="ProductController.php" hash="2d7a42ee7e769a79520c07c535f52f7e"/><file name="ReviewController.php" hash="3d61d2157edf8b3e2a470f9bdd912c34"/></dir><dir name="etc"><file name="config.xml" hash="c1cf64335c83efca54a57c16bc9b467f"/><file name="system.xml" hash="504c040bcc5e99e367e3b32aaccc5d32"/></dir><dir name="Helper"><dir name="osolCaptcha"><file name="ajax-loader-big.gif" hash="a51c5608d01acf32df728f299767f82b"/><file name="font-png.png" hash="91d6af87287956ca32991bb9f81a90e1"/><file name="fontFileMeta.meta" hash="aba07e9e5a68d194cce8434593451c51"/><file name="temp.meta" hash="625e359f6a3bfa64572544d5bf0a073d"/><file name="temp.png" hash="697c73c21eb60c6c237b0bf099428267"/><dir name="ttfs"><file name="AdLibBT.TTF" hash="4ff833d37c38398cd201b2550bf8ecb5"/><file name="BookmanOldStyle.TTF" hash="4267d8aa8711bb8c72cbefb26066c9e0"/><file name="CooperBlack.TTF" hash="8eb03871e6046162efce5f2cdf5fa849"/><file name="index.html" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><file name="Data.php" hash="8f7ce7d3a01d6c6a065a636dc78abdb7"/><file name="OSOLmulticaptcha.php" hash="c4a2e999bb41d1bf4a217ccb2dfc5fea"/></dir><dir name="Model"><dir name="Source"><file name="Captchafonts.php" hash="4ac034345994bdf1eeada4ff0f1b4d22"/><file name="Captchafontsize.php" hash="c6d6c3d7107363f1aa1111663bb14647"/><file name="Captchaimage.php" hash="b49acab3a47cfa798aa16825f6417c82"/><file name="Captchalanguage.php" hash="89d9e8e16788d84c5ce8fcc2a9e07925"/><file name="Captchanoise.php" hash="cf5367e941950ebe7fc5786a550c0f17"/></dir></dir></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies/>
19
  </package>