Checkout Captcha for opencart 1.5

时间:2014-05-28 08:13:36

标签: php jquery opencart

在点击提交按钮之前,我一直试图在结帐页面插入验证码工具。我将下面的代码放在checkout / confirm.tpl中(不确定abt这个)......任何想法?...

    <div class="payment"><?php echo $payment; ?></div>

<script type="text/javascript">
var entry_captcha=<?php echo $entry_captcha; ?>;
var captcha =<?php echo $captcha; ?>;
var error_captcha='';
error_captcha =<?php echo $error_captcha; ?>;
var button_continue=<?php echo $button_continue; ?>


$( "#button-confirm" ).replaceWith( '<div class="form-group"> \
<span   class="required">*</span>   <b>"+entry_captcha+"</b><br /> \
    <input  class="form-control" type="text" name="captcha" value=""+captcha+"" /> \
    <br /><br /> \
    <img id="capim" style="align:right;" src="index.php?route=account/login/captcha" alt="" class="img-responsive img-captcha" /> \
<span class="form-group"><a id="capreload" >Click to refresh image</a></span> \
    <span class="error">Error</span> \  
</div> \
        <div class="buttons"> \
          <div class="right"> \
            <input id="button-confirm" type="submit" value=""+button_continue+"" class="button" /> \
          </div> \
        </div>' );
</script>

0 个答案:

没有答案