1.rewrite core model in config.xml
<models> <mycaptcha> <class>Bysoft_Mycaptcha_Model</class> <resourceModel>mycaptcha_mysql4</resourceModel> </mycaptcha> <captcha> <rewrite> <zend>Bysoft_Mycaptcha_Model_Zend</zend> </rewrite> </captcha> </models>
2. rewrite model class
<?php
class Bysoft_Mycaptcha_Model_Zend extends Mage_Captcha_Model_Zend {
/**
* Zend captcha constructor
*
* @param array $params
*/
public function __construct($params)
{
if (!isset($params['formId'])) {
throw new Exception('formId is mandatory');
}
$this->_formId = $params['formId'];
$this->setExpiration($this->getTimeout());
$this->setDotNoiseLevel(10); // Added code
$this->setLineNoiseLevel(0); // Added code
}
}
?>