How can I complete the modification?
This is the current code:
upload/catalog/controller/extension/module/*.php
Code: Select all
// captcha
if ($this->config->get('hb_oosn_enable_captcha') == 1){
if(isset($this->request->post['gcaptcha']) && !empty($this->request->post['gcaptcha'])){
$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($this->config->get('google_captcha_secret')) . '&response=' . $this->request->post['gcaptcha'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']);
$recaptcha = json_decode($recaptcha, true);
if (!$recaptcha['success']) {
$json['notify_error'] = html_entity_decode($this->config->get('hb_oosn_t_error_captcha'.$language_id));
}
}else{
$json['notify_error'] = html_entity_decode($this->config->get('hb_oosn_t_warn_captcha'.$language_id));
}
}
Code: Select all
<?php if ($show_captcha) { ?>
<div class="notify-row-group">
<div class="notify-label notify-col-25"></div>
<div class="notify-col-75" id="recaptcha-inline">
<div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
</div>
<script src="//www.google.com/recaptcha/api.js" type="text/javascript"></script>
</div>
<?php } ?>