kormisosh Posted May 5, 2013 Share Posted May 5, 2013 (edited) Hi, I've got an taks from a friend to complete the customization of a Prestashop site. It uses a custom theme, and when it's sat on - the client registration don't work at all. It eve don't show an error message. Could you give some advise? Thamks! Here is the temporary installation of the shop: http://sov.equinox-d...k/src/index.php And here is the login page: http://sov.equinox-d...=authentication P.S. I forgot to mention that the Registration works fine with the default theme. Edited May 13, 2013 by kormisosh (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted May 5, 2013 Share Posted May 5, 2013 I see one strange thing and that is that the Create account button is of type "button". Try to change that to type"submit": probably in file: /themes/<your theme folder>/authentication.tpl : search for text: "create-account_form" A little below this, you see a line something like: <input type="button" id="SubmitCreate" name="SubmitCreate" class="button_large button black" value="Create your account"> change the type into submit: <input type="submit" id="SubmitCreate" name="SubmitCreate" class="button_large button black" value="Create your account"> save, reload page and try again. Hope this helps, pascal Link to comment Share on other sites More sharing options...
kormisosh Posted May 5, 2013 Author Share Posted May 5, 2013 I've changed the type of the button to 'submit', but with no effect. I've compared 'authentication.tpl' in the custom theme folder to the same file in the default theme folder. In the default theme this button is type="button" as it was in the custom theme. But there it works. Thank you for your reply, however. As I said - I'm beginning to work on this project from now on, and unfortunately I've no clue what the previous developers has done Link to comment Share on other sites More sharing options...
PascalVG Posted May 5, 2013 Share Posted May 5, 2013 Can you copy your code around the submit button (say from <form> to </form>) ? Link to comment Share on other sites More sharing options...
kormisosh Posted May 5, 2013 Author Share Posted May 5, 2013 Yes, of course. Here it is: <form action="{$link->getPageLink('authentication', true)}" method="post" id="create-account_form" class="std form"> <fieldset> <h3>{l s='Create your account'}</h3> <div class="form_content clearfix"> <h4>{l s='Enter your e-mail address to create an account'}.</h4> <div class="error" id="create_account_error" style="display:none"></div> <div class="field"> <label for="email_create">{l s='E-mail address'}</label> <span><input type="text" id="email_create" name="email_create" value="{if isset($smarty.post.email_create)}{$smarty.post.email_create|stripslashes}{/if}" class="account_input input text" /></span> </div> <div class="buttons-group center"> {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if} <input type="submit" id="SubmitCreate" name="SubmitCreate" class="button_large button black" value="{l s='Create your account'}" /> <input type="hidden" class="hidden" name="SubmitCreate" value="{l s='Create your account'}" /> </div> </div> </fieldset> </form> Link to comment Share on other sites More sharing options...
PascalVG Posted May 6, 2013 Share Posted May 6, 2013 Code looks OK, we have to search somewhere else, I think: I tried to search in the buglist of Prestashop and found this one: http://forge.prestas...owse/PSCFV-5267 Here's what they said to someone with somewhat similar bug: Hi Lars Jacobsson, Thank you for your report. You didn't update your theme. In 1.5.1.0 we have a debug in the file /themes/default/js/tools/statesManagement.js Please update your theme or remove this line : console.log($('select#id_state'+(suffix !== undefined ? '_'+suffix : '')+' option:not(:first-child)')); If you don't have this line remove all cache and compile smarty in /cache/smarty Best regards Can you check if the file themes/<your theme folder>/js/tools/statesManagement.js exists, and if so, if it contains that console.log line? Just trying... strange problem. Other 'solutions' I came across were the same as I suggested above: change type="button" to type="submit"... We keep searching.... let me know the result. pascal Link to comment Share on other sites More sharing options...
kormisosh Posted May 6, 2013 Author Share Posted May 6, 2013 Yes, one of the first things I've checked was if all the .js includes are present, and they all are. Besides, if there was a missing .js file, there should be some error, shouldn't it? In the 'statesManagement.js' of the custom theme there is no line, starting with 'console.log'. There is a line, which looks like $('select#id_state'+(suffix !== undefined ? '_'+suffix : '')+' option:not(:first-child)').remove(); But removing it didn't change anything. I've changed back the type of the button to 'button' if you don't mind. Next I've tried was to debug the submitFunction(), adding alerts between it's lines. All of the alerts appeared correctly, except in one piece of the function. Here it is: $('#noSlide').fadeOut('slow', function(){ $('#noSlide').html(jsonData.page); // update the state (when this file is called from AJAX you still need to update the state) bindStateInputAndUpdate(); }); Between these lines no alert appears at all. Yes, it is a strange problem... It seems like the AJAX do not work at all, but if I write down an invalid email address, it works. It even clears the error message for the wrong address, when I correct it, but do not show the form for registration... Link to comment Share on other sites More sharing options...
[email protected] Posted May 16, 2013 Share Posted May 16, 2013 HI Team, I got stuck in last piece of my website and couldnt think of any solution.I will be really grateful if any one can help me on this. 1. I have created two shops desipotli.com and desipotli.in 2. I am using country level redirection to both my sites means depending on the country ip my relevant site will be open.for india .in and for rest of world .com. to achieve that I have created two index files index1 and index 2 index 1 contains include("geoip.inc"); $gi = geoip_open('GeoIP.dat', GEOIP_MEMORY_CACHE); $country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']); geoip_close($gi); $my_countries = array('in'); if (in_array(strtolower($country), $my_countries)) { header('Location: http://www.desipotli.in'); exit; } require(dirname(__FILE__).'/config/config.inc.php'); Dispatcher::getInstance()->dispatch(); index 2 contains include("geoip.inc"); $gi = geoip_open('GeoIP.dat', GEOIP_MEMORY_CACHE); $country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']); geoip_close($gi); $my_countries = array('in'); if (!in_array(strtolower($country), $my_countries)) { header('Location: http://www.desipotli.com'); exit; } require(dirname(__FILE__).'/config/config.inc.php'); Dispatcher::getInstance()->dispatch(); I have changed the following in .htaccess made index to index1 RewriteCond %{HTTP_HOST} ^www.desipotli.com$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] made index to index2 RewriteCond %{HTTP_HOST} ^www.desipotli.in$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] 3. now everthing is working fine but when i try to create a account it gives a error, unable to load the form and when I remove the redirection changes, codes starts working fine. I really Really need your help on this, this is last piece of my website where I got stuck. Regards Ranjan Link to comment Share on other sites More sharing options...
rohit verma Posted October 9, 2013 Share Posted October 9, 2013 i also had the same problem with magari theme but it happend because i turned on development mode." define('_PS_MODE_DEV_', true);" which was define('_PS_MODE_DEV_', false); as default. but when change it to default " define('_PS_MODE_DEV_', false); everything works fine. i suggest you to try once. You can find this code into defines.inc.php file in "config" folder. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now