First_Hokage Posted April 4, 2013 Share Posted April 4, 2013 Hi, I tried to implement SlideCaptcha version:2.0 module in PS 1.5.3.1 for the account creation form but the slider does not appear on the first load and account is created if no error occurs, slider appears only if form errors are generated. What seems to be the problem? All suggestions are appreciated. Regards, FH Link to comment Share on other sites More sharing options...
RaPhiuS Posted April 8, 2013 Share Posted April 8, 2013 Hello, Can you please share the code you modified? That will help us in seeing if you put something at the wrong place. BR, RaPhiuS Link to comment Share on other sites More sharing options...
First_Hokage Posted April 8, 2013 Author Share Posted April 8, 2013 Hi, I added the following code in the authentication.tpl file just above the submit button, <fieldset class="account_creation"> <div class="exclusive">{include file="$tpl_dir./../../modules/slidecaptcha/slidecaptcha.tpl"}</div> </fieldset> <p class="cart_navigation required submit"> <input type="hidden" name="email_create" value="1" /> <input type="hidden" name="is_new_customer" value="1" /> {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if} <input type="submit" name="submitAccount" id="submitAccount" value="{l s='Register'}" class="exclusive" /> <span><sup>*</sup>{l s='Required field'}</span> </p> </form> {/if} I hope this gets the idea clear. Regards, FH Link to comment Share on other sites More sharing options...
First_Hokage Posted June 10, 2013 Author Share Posted June 10, 2013 Can anybody has a solution for this problem it's been long since i raised this issue and couldn't find the solution! Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 can you give more informations about module that you use for this? this isn't default module so we need more informations about it, where i can find this addon? Link to comment Share on other sites More sharing options...
First_Hokage Posted June 10, 2013 Author Share Posted June 10, 2013 This where i found this module http://www.prestashop.com/forums/topic/114958-module-slide-captcha-20-add-a-captcha-to-your-forms-support-iphoneipad/ Link to comment Share on other sites More sharing options...
First_Hokage Posted June 10, 2013 Author Share Posted June 10, 2013 I think it can also be found in the back office module search. Link to comment Share on other sites More sharing options...
blacktrend Posted August 9, 2013 Share Posted August 9, 2013 Up ! Same issue. The module is Slide Captcha. It can be found on http://www.catalogo-onlinersi.net/. Anyone has a solution ? Link to comment Share on other sites More sharing options...
NicoT Posted August 31, 2013 Share Posted August 31, 2013 Bump Bump Bump!!! Does anyone have a fix for this issue please? Link to comment Share on other sites More sharing options...
vekia Posted August 31, 2013 Share Posted August 31, 2013 you should ask module developer, his nickname is: @shacker he is very helpfull and i suppose that he will fix it for each of you 1 Link to comment Share on other sites More sharing options...
amit.monash Posted November 21, 2013 Share Posted November 21, 2013 (edited) you should ask module developer, his nickname is: @shacker he is very helpfull and i suppose that he will fix it for each of you Looks like @shacker is too busy with other developments. We should help him guys. However it would be nice to have you involved @shacker as this module will need an upgrade. I was trying to resolve this issue and I think I have got a bit ahead. Here is what I discovered: First the module works just fine on Contact Us form and fails to load the first time on Create an account page. Nothing new, we all know that. Why? That's a million dollar question... This is because 'Create an account' page is an asynchronous call to the authentication page itself and the module code works on document.ready jQuery call. Let me explain... Problem: If you look into '/themes/default/authentication.tpl', the page has four forms, first two 'Email to create a new account' and 'User login' forms are displayed when you first access this page. At this stage; if slide captcha module is working properly, you have 'slidecaptcha-footer.tpl' code in the footer of your web page. You can see this using developers tool of the browser you are using. You will see the necessary jQuery reference on the web page. The 'slidecaptcha.tpl' however does not get loaded until the last form 'Create an account' is called using ajax. This is when you type email and hit 'Create an account'. If you look carefully in the code of 'slidecaptcha-footer.tpl', you will see that there is a jQuery doing some operation on document.ready event. Which means that the query will run only when the page is loaded first time and not on ajax calls. Hence you see the slider second time onwards when there is error on page. In this situation the request is being sent to server and back to show 'Create an account' form along with 'slidecaptcha.tpl'. Solution: Here is what I did... I added another line of code just after 'slidecaptcha.tpl' call. My code looks like follows inside last form on 'authentication.tpl' page. <input type="submit" name="submitAccount" id="submitAccount" value="{l s='Register'}" class="exclusive submitMessage" /> <span><sup>*</sup>{l s='Required field'}</span> {include file="$tpl_dir./../../modules/slidecaptcha/slidecaptcha.tpl"} {include file="$tpl_dir./../../modules/slidecaptcha/slidecaptcha-footer.tpl"} You will also not that the submit button has a different name and id 'submitAccount'. That holds the key to why Register button does not hide where as 'Send' button does on Contact Us page. Easy fix I just added a class 'submitMessage' as you can see in above code. Well guess what, after saving and accessing the form in browser, I could see the slider and Register button was hidden. Oh... my god.... I was the happiest man on earth at that very moment. Only until I slided the slider to right.... and nothing happened.... I thought I had it solved.... yes I got as exited as you guys but I was that....... ||....... close to fixing the problem. For some reason the slider loses its event listeners or the randon Id that gets generated for the slider is not registered and it does not work. Now I have a dead form that just does not want to register. (ofcourse I can roll back changes and have a live form again with all the spams). But I have hit a wall with it and I need @shacker to please please please help us. As you have more knowledge that any one of us here. By the way guys have you thought of donating a bit to this guy, I think this is a great module and deserves a bit more funding. Please help! Edited November 21, 2013 by amit.monash (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts