Post by Patrikiden » Sat Sep 14, 2013 9:21 pm

Hello do any body know how to add a link to renew the Captcha question?

Thank you.

New member

Posts

Joined
Tue Aug 06, 2013 6:55 am

Post by anung » Sun Sep 15, 2013 12:19 am

Try this one,
Open product.tpl on catalog/view/theme/YourTheme/template/product
put this code

Code: Select all

<a id='reload'>Reload Captcha</a>
After this code

Code: Select all

<img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
Then put this code

Code: Select all

$('#reload').click(function(){
   d = new Date();
   $("#captcha").attr("src", "index.php?route=product/product/captcha/?"+d.getTime());
})
Before this code

Code: Select all

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');
Good Luck ;D

User avatar
Active Member

Posts

Joined
Fri Mar 30, 2012 10:32 am
Location - Indonesia

Post by Patrikiden » Sun Sep 15, 2013 12:47 am

Hey, this works but only in the product page. How about making the Captcha image clickable so when you click the image it is reloded?

Thank you for your help.

New member

Posts

Joined
Tue Aug 06, 2013 6:55 am

Post by anung » Sun Sep 15, 2013 12:51 am

Change this code

Code: Select all

<img src="index.php?route=product/product/captcha" alt="" id="captcha" />
with this code

Code: Select all

<a id='reload'><img src="index.php?route=product/product/captcha" alt="" id="captcha" /></a>

User avatar
Active Member

Posts

Joined
Fri Mar 30, 2012 10:32 am
Location - Indonesia

Post by Patrikiden » Sun Sep 15, 2013 1:03 am

OK, thank you. How about getting this function in the Contact page?

Thank you.

New member

Posts

Joined
Tue Aug 06, 2013 6:55 am

Post by anung » Sun Sep 15, 2013 2:23 am

Open contact.tpl on catalog/view/theme/YourTheme/template/information

Find this code

Code: Select all

<img src="index.php?route=information/contact/captcha" alt="" />
Replace with this code

Code: Select all

<a id='reload'><img src="index.php?route=information/contact/captcha" alt="" id="captcha"/><a/><br />
    <a id='reload'>Refresh now</a>
Then Put this code

Code: Select all

<script type="text/javascript"><!--
$('#reload').click(function(){
d = new Date();
$("#captcha").attr("src", "index.php?route=information/contact/captcha/?"+d.getTime());
})
//--></script> 
Before this code

Code: Select all

<?php echo $footer; ?>

User avatar
Active Member

Posts

Joined
Fri Mar 30, 2012 10:32 am
Location - Indonesia

Post by Patrikiden » Sun Sep 15, 2013 3:00 am

Thank you for your help, i now got all the Captcha working as a want it to.

Thank you.

Regards.

Patrik Iden.

New member

Posts

Joined
Tue Aug 06, 2013 6:55 am

Post by davidponting » Mon Sep 16, 2013 3:52 pm

Hi,

I also got good ideas about captcha by reading posts. I tried and it's working.


Thank you

Excel Programming


Newbie

Posts

Joined
Mon Sep 16, 2013 3:42 pm
Who is online

Users browsing this forum: No registered users and 10 guests